1 # Copyright (c) 2019-2020 NVIDIA CORPORATION. All rights reserved.
3 @page dwx_object_detector_tracker_sample Basic Object Detector and Tracker Sample
6 @note SW Release Applicability: This sample is available in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
8 @section dwx_object_detector_tracker_description Description
10 The Basic Object Detector and Tracker sample demonstrates how the @ref dnn_group can be used for
11 object detection and the 2D object tracking capabilities of the @ref boxtracker_group module.
13 The sample streams a H.264 or RAW video and runs DNN inference on each frame to
14 detect objects using NVIDIA<sup>®</sup> TensorRT<sup>&tm;</sup> model.
16 The interpretation of the output of a network depends on the network design. In this sample,
17 2 output blobs (with `coverage` and `bboxes` as blob names) are interpreted as coverage and bounding boxes.
19 For each frame, it detects the object locations and tracks the objects between video frames. Currently, the
20 object tracker resorts to image feature detection and tracking. The tracker uses feature motion to predict
23 @section dwx_object_detector_tracker_sample_running Running the Sample
25 The Basic Object Detector and Tracker sample, `sample_object_detector_tracker`, accepts the following optional parameters. If none are specified, it performs detections on a supplied pre-recorded video.
27 ./sample_object_detector_tracker --input-type=[video|camera]
28 --video=[path/to/video]
29 --camera-type=[camera]
30 --camera-group=[a|b|c|d]
31 --camera-index=[0|1|2|3]
33 --tensorRT_model=[path/to/TensorRT/model]
37 --input-type=[video|camera]
38 Defines if the input is from live camera or from a recorded video.
39 Live camera is supported only on NVIDIA DRIVE platforms.
42 --video=[path/to/video]
43 Specifies the absolute or relative path of a raw or h264 recording.
44 Only applicable if --input-type=video
45 Default value: path/to/data/samples/sfm/triangulation/video_0.h264.
47 --camera-type=[camera]
48 Specifies a supported AR0231 `RCCB` sensor.
49 Only applicable if --input-type=camera.
50 Default value: ar0231-rccb-bae-sf3324
52 --camera-group=[a|b|c|d]
53 Specifies the group where the camera is connected to.
54 Only applicable if --input-type=camera.
57 --camera-index=[0|1|2|3]
58 Specifies the camera index on the given port.
62 Setting this parameter to 1 when running the sample on Xavier B allows to access a camera that
63 is being used on Xavier A. Only applicable if --input-type=camera.
66 --tensorRT_model=[path/to/TensorRT/model]
67 Specifies the path to the NVIDIA<sup>®</sup> TensorRT<sup>™</sup>
69 The loaded network is expected to have a coverage output blob named "coverage" and a bounding box output blob named "bboxes".
70 Default value: path/to/data/samples/detector/<gpu-architecture>/tensorRT_model.bin, where <gpu-architecture> can be `Pascal` or `Volta`.
72 @note This sample loads its DataConditioner parameters from DNN metadata JSON file.
73 To provide the DNN metadata to the DNN module, place the JSON file in the same
74 directory as the model file. An example of the DNN metadata file is:
76 data/samples/detector/pascal/tensorRT_model.bin.json
78 @subsection dwx_object_detector_tracker_sample_examples Examples
82 ./sample_object_detector_tracker
84 The video file must be a H.264 or RAW stream. Video containers such as MP4, AVI, MKV, etc. are not supported.
86 #### To run the sample on a video on NVIDIA DRIVE or Linux platforms with a custom TensorRT network
88 ./sample_object_detector_tracker --input-type=video --video=<video file.h264/raw> --tensorRT_model=<TensorRT model file>
90 #### To run the sample on a camera on NVIDIA DRIVE platforms with a custom TensorRT network
92 ./sample_object_detector_tracker --input-type=camera --camera-type=<rccb_camera_type> --camera-group=<camera group> --camera-index=<camera idx on camera group> --tensorRT_model=<TensorRT model file>
94 where `<rccb_camera_type>` is a supported `RCCB` sensor.
95 See @ref supported_sensors for the list of supported cameras for each platform.
97 @section dwx_object_detector_tracker_sample_output Output
99 The sample creates a window, displays the video streams, and overlays the list
100 of features and detected/tracked bounding boxes of the objects with IDs.
102 The color coding of the overlay is:
104 - Red bounding boxes: Indicate successfully tracked bounding boxes.
105 - Red points: Indicate successfully tracked 2D features.
106 - Yellow bounding box: Identifies the region which is given as input to the DNN.
108 
110 @section dwx_object_detector_tracker_sample_more Additional Information
112 For more information, see:
113 - @ref dnn_mainsection
114 - @ref dataconditioner_mainsection
115 - @ref imageprocessing_features_mainsection