DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Road Mark Classification Sample

Description

The road mark classification sample demonstrates how to use the NVIDIA® proprietary deep neural network (DNN) RoadMarkNet to perform classification on detected road markings from a given frame
. It classifies the type of road markings that include different types of arrow marks, speed limit mark and its associated value, HOV mark, bike mark, hump mark and a variety of text marks.

A user assigned threshold value sets the minimum confidence for the road mark classification to be considered valid.

Sensor Details

The image datasets used to train RoadMarkNet have been captured by a View Sekonix Camera Module (SF3324/5) with AR0231 RCCB sensor.
The camera is mounted high up at the rear view mirror position. Demo videos are captured at 2.3 MP and down-sampled to 960 x 604.

To achieve the best road mark classification performance, adopt a similar camera setup and align the video center vertically with the horizon before recording new videos.

Running the Sample

The road mark classification sample, sample_roadmark_classification accepts the following optional parameters.
If none are specified, it will perform classification on supplied pre-recorded video. Note: Do not include angle brackets < and > in the parameters below.

./sample_roadmark_classification --camera-type=<camera>
                                 --camera-group=<a|b|c|d>
                                 --camera-index=<0|1|2|3>
                                 --input-type=<video|camera>
                                 --roi=<x,y,w,h>
                                 --classificationThreshold=<floating-point number in (0, 1)>
                                 --video=<path/to/video>

Where:

--camera-type=<camera>
        Is a supported AR0231 `RCCB` sensor.
        Only applicable if '--input-type=camera'.
        Default value: ar0231-rccb-bae-sf3324

--camera-group=<a|b|c|d>
        Is the group where the camera is connected to.
        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

--input-type=<video|camera>
        Defines if the input is from live camera or from a recorded video.
        Live camera is only supported on On NVIDIA DRIVE platform.
        Default value: video

--roi=<x,y,w,h>
        Defines a Region of Interest (ROI) where landmark detections occur:
        X: x-coordinate.
        Y: y-coordinate.
        W: width.
        H: height.
        Default value: No ROI.

--classificationThreshold=<floating-point number in (0, 1)>
    The classification threshold parameter is used to determine the validity of the road mark
    type generated by the network. If there is no type above the threshold parameter, then the
    road mark is assigned as background.
    Default value: 0.5f

--video=<path/to/video>
        Is the absolute or relative path of a raw/h264/mp4 recording.
        Default value: path/to/data/samples/recordings/suburb0/video_0_roof_front_120.mp4.

Examples

To run the sample on Linux

./sample_roadmark_classification --video=<video file.h264>

or

./sample_roadmark_classification --video=<video file.raw>

or

./sample_roadmark_classification --video=<video file.mp4>

To run the sample on an NVIDIA DRIVE platform with cameras

./sample_roadmark_classification --input-type=camera --camera-type=<camera_type> --camera-group=<camera_group>

where <camera type> is a supported RCCB sensor. See Cameras Supported for the list of supported cameras for each platform.

Output

The sample app creates a window and overlays the bounding box of road mark detection from landmark detector. The type of road marking and it's associated confidence from roadmark classifier is displayed on top of each bounding box.

sample_roadmark_classification.png
RoadMark Classification Sample

Additional Information

For more details see Landmark Perception.