1 # Copyright (c) 2019-2020 NVIDIA CORPORATION. All rights reserved.
3 @page dwx_light_classification_sample Traffic Light Classification Sample (LightNet)
6 @note SW Release Applicability: This sample is available in **NVIDIA DRIVE Software** releases.
8 @section dwx_light_classification_description Description
10 The Traffic Light Classification sample demonstrates how to use the NVIDIA<sup>®</sup>
11 proprietary LightNet deep neural network (DNN)
12 to perform traffic light classification. It detects the state of the traffic lights facing the ego car. LightNet currently supports RCB
13 images. RGBA images are not supported.
15 This sample shows a simple implementation of
16 traffic light classification built around the NVIDIA LightNet DNN.
17 For more information on the LightNet DNN and how to customize it for your applications,
18 consult your NVIDIA sales or business representative.
20 @subsection dwx_light_classification_sensor_details Sensor Details
22 The image datasets used to train LightNet have been captured by a View Sekonix Camera Module (SF3325) with
23 AR0231 RCCB sensor. The camera is mounted high up at the rear view mirror position. Demo videos are
24 captured at 2.3 MP and down-sampled to 960 x 604.
26 To achieve the best traffic light detection performance, NVIDIA recommends to adopt a similar camera setup and align
27 the video center vertically with the horizon before recording new videos.
29 @subsection dwx_light_classification_sample_limitations Limitations
31 @warning Currently, the LightNet DNN has limitations that could affect its performance:
32 - It is optimized for daytime, clear-weather data. As a result, it
33 does not perform well in dark or rainy conditions.
34 - It is trained on data collected in the United States.
35 As a result, it may have reduced accuracy in other locales.
37 The LightNet DNN is trained to support any of the following six camera configurations:
38 * Front camera location with a 60° field of view
39 * Front camera location with a 120° field of view
41 @section dwx_light_classification_running Running the Sample
43 ./sample_light_classifier --rig=[path/to/rig/file]
48 --rig=[path/to/rig/file]
49 Rig file containing all information about vehicle sensors and calibration.
50 Default value with video: path/to/data/samples/waitcondition/rig.json
51 Default value with live camera: path/to/data/samples/waitcondition/live_cam_rig.json
54 Use live camera or video file. Takes no effect on x86.
55 Need to be set to 1 if passing in a rig with live camera setup.
56 To switch the mode, pass `--liveCam=0/1` as the argument.
59 ### To run the sample on Linux
61 ./sample_light_classifier
63 ### To run the sample on a camera on NVIDIA DRIVE platforms
65 ./sample_light_classifier --liveCam=1
67 @section dwx_light_classification_output Output
69 The sample creates a window, displays a video, and overlays bounding boxes for traffic light objects.
70 The state of the traffic light is displayed on the text on top of the bounding box. The color of the bounding boxes represents the status of the traffic light, as follows:
72 - Green: Green_Arrow_Traffic_Light, Green_Solid_Traffic_Light, Green_Arrow_Green_Solid_Traffic_Light
73 - Red: Red_Arrow_Traffic_Light, Red_Solid_Traffic_Light, Red_Arrow_Red_Solid_Traffic_Light
74 - White: Stateless or non-facing Traffic Light, Red_Arrow_Green_Solid_Traffic_Light, Green_Arrow_Red_Solid_Traffic_Light
75 - Yellow: Yellow_Arrow_Traffic_Light, Yellow_Solid_Traffic_Light
77 
79 @section dwx_light_classification_more Additional Information
81 For more information, see @ref lightnet_mainsection.