The Path perception module detects drive-able paths from camera images. The NVIDIA proprietary DNN named PathNet returns the coordinates of the edges and center of each drive-able path. For each input image, this module employs PathNet to infer paths in image coordinates. Paths are distinguished from lanes where paths are either explicitly marked on the road (for example marked lanes), or implied by road geometry and traffic patterns (for example, implied lanes on a two way street with no markings). With proper initialization of camera intrinsic and extrinsic parameters, paths can be viewed in top-view vehicle coordinate system.
Path detector module initialization takes either PathNet module handle or user customized path detection network module handle as an input. To initialize NVIDIA PathNet module:
With the initialized PathNet module handle, path detection module can be initialized by:
To initialize PathNet module with calibrated camera for computing paths in top-down vehicle coordinate system:
Path detector allows user to set detection Region of Interest (ROI) and how much each detected path is being temporally smoothed.
To set detection ROI in input image coordinates:
To temporally smooth each detected path:
Output predictions are sensitive to detection threshold. To set detection threshold:
To set detection threshold for the opposite traffic path attribute:
World coordinates generated from path detection module are sensitive to max look ahead distance. To set max look ahead distance:
The center rail of the ego path in world view is used for driving. We can calculate that either by: 1) Computing the center rail in image view from the path edged and projecting that to world view 2) Projecting the path edges to world view and then computing the center. To switch between these options, use:
For more details, please refer to API header documentation.
After module initialization and detector parameter setup, the sequential API calls to compute paths from an input image are as follows. To perform network inference on GPU:
To interpret the network inferred results into image coordinates and path labels:
To get the per frame interpreted results in the format of dwPathDetection
:
To release the path detector module, the module itself needs to be released first by:
then the PathNet module: