DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Road Mark Classification Sample


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>
                                 --classificationThreshold=<floating-point number in (0, 1)>


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

        Is the group where the camera is connected to.
        Only applicable if '--input-type=camera'.
        Default value: a

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

        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

        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

        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.


To run the sample on Linux

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


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


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


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.

RoadMark Classification Sample

Additional Information

For more details see Landmark Perception.