DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

LightSourcePerception Sample (LightSourceNet)
SW Release Applicability: This sample is available in NVIDIA DRIVE Software releases.


The LightSourcePerception is the key perception module that implements night-time and low-light active light source perception, supporting auto and adaptive driving beam control.

The LightSourcePerception sample streams frames from a live camera or recorded video. It runs LightSourceNet DNN inference on each frame to generate perception intermediate outputs. These outputs are noisy before going through post-processing. Finally, a binary ON/OFF auto high beam signal is generated.

The sample only works on front 60 FOV camera and it assumes night-time or low-light image input. It won't work on side cameras or day-time camera input.

Running the Sample

The LightSourcePerception sample, sample_lightsourceperception, accepts the following optional parameters. If none are specified, it performs detections on a supplied pre-recorded video.

/sample_lightsourceperception --input-type=[video,camera]


        Specifies whether the input is from a live camera or a recorded video.
        Live camera input is supported only on NVIDIA DRIVE(tm) platforms.
        It is not supported on Linux (x86 architecture) host systems.
        Default value: video

        Specifies the absolute or relative path of a raw or h264 recording.
        Only applicable if --input-type=video.
        Default value: path/to/data/samples/lsp/night_lightbeam_test.h264.

        Specifies a supported AR0231 `RCCB` sensor.
        Only applicable if --input-type=camera.
        Default value: ar0231-rccb-bae-sf3325

        Specifies the group to which the camera is connected.
        Only applicable if --input-type=camera.
        Default value: a

        Indicates the camera index on the given port.
        Default value: 0


To run a default (H264) video in a loop:


To use the --video option to run a custom RAW or H264 video file:

./sample_lightsourceperception --video=PATH_TO_VIDEO

In order to run the sample on a live video feed on NVIDIA DRIVE platform, set the --input-type option to camera.

./sample_lightsourceperception --input-type=camera [--camera-type=<rccb camera type> --camera-group=<camera group> --camera-index=<camera idx on camera group>]

where default values are:

  • ar0231-rccb-bae-sf3325 for --camera-type.
  • a for --camera-group.
  • 0 for --camera-index.


LightSourcePerception Sample
The white line at top left corner of screen shows current high beam ON/OFF signal and its history.

Additional Information

For more details see DNN-based Night-time and low-light Active Light Source Perception Module.