DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Segmentation-based Landmark Detection Sample (MapNet)
Note
SW Release Applicability: This sample is available in NVIDIA DRIVE Software releases.

Description

The Segmentation-based Landmark Detection sample demonstrates how to use the NVIDIA® proprietary deep neural network (DNN) MapNet to perform landmark detection. MapNet has been trained with RCB images and its performance is invariant to RGB encoded H.264 videos. MapNet

This sample can also stream a H.264 or RAW video and computes the binary likelihood map of landmarks on each frame. A user assigned threshold value binarizes a likelihood map into clusters of landmarks, then image post-processing steps are employed to fit polylines onto the landmark clusters. The sample can also be operated with cameras.

Sensor Details

The image datasets used to train MapNet have been captured by a View Sekonix Camera Module (SS3323) 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 landmark detection performance, NVIDIA recommends to adopt a similar camera setup and align the video center vertically with the horizon before recording new videos.

Running the Sample

The Segmentation-based Landmark Detection sample, sample_landmark_detection_by_segmentation, accepts the following optional parameters.

./sample_landmark_detection_by_segmentation --video=[path/to/video]
                                            --useCudaGraph=[0|1]
                                            --threshold=[0..1]

where

--video=[path/to/video]
        Specifies the absolute or relative path of a raw, lraw or h264 recording.
        Only applicable if --input-type=video
        Default value: path/to/data/samples/laneDetection/video_lane.h264

--useCudaGraph=[0|1]
        Setting this parameter to 1 runs MapNet DNN inference by CUDAGraph if the hardware supports.
        Default value: 0

--threshold=[0..1]
        The threshold parameter is used to binarize a likelihood map.
        Any likelihood value above the threshold is considered a landmark pixel.
        By default, the value is 0.3, which provides the best accuracy based on the NVIDIA
        test data set. Reduce the threshold value if landmark polylines flicker or cover
        shorter distance.
        Default value: 0.3

Examples

The command lines for running the sample on Linux:

./sample_landmark_detection_by_segmentation --video=<video file.h264> --threshold=<floating-point number in (0,1)>

or

./sample_landmark_detection_by_segmentation --video=<video file.raw> --threshold=<floating-point number in (0,1)>
Note
The Segmentation-based Landmark Detection sample directly resizes video frames to the network input resolution. Therefore, to get the best performance, it is recommended to use videos with a similar aspect ratio to the demo video. Or you can set the Region of Interest (ROI) to perform inference on a sub-window of the full frame.

Output

MapNet creates a window, displays a video, and overlays polylines of the detected landmarks. Colors indicate the following:

  • Orange - Pole Detection
  • Light Blue - Adjacent Left Lane Boundary
  • Red - Current Driving Lane Left Boundary
  • Green - Current Driving Lane Right Boundary
  • Dark Blue - Adjacent Right Lane Boundary

Letters indicate the following:

  • S - Solid Lane Line Type
  • D - Dashed Lane Line Type
  • B - Road Boundary Line Type
  • P - Vertical Pole Line Type
sample_landmark_perception.png
Landmark Detection

For more details see Landmark Perception.