DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

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

Description

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]
                              --video=[path/to/video]
                              --camera-type=[camera]
                              --camera-group=[a|b|c|d]
                              --camera-index=[0|1|2|3]

where

--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

--video=[path/to/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.

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

--camera-group=[a|b|c|d]
        Specifies the group to which the camera is connected.
        Only applicable if --input-type=camera.
        Default value: a

--camera-index=[0|1|2|3]
        Indicates the camera index on the given port.
        Default value: 0

Examples

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

./sample_lightsourceperception

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.

Output

sample_lightsourceperception.png
LightSourcePerception Sample
Note
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.