2D/3D Object Detection and Tracking

July 23, 2021 ยท View on GitHub

Currently tkDNN supports only CenterTrack as 3DOD & 2D/3D Tracker network.

3D Object Detection

To run the 3D object detection demo follow these steps (example with CenterNet based on DLA34):

rm dla34_cnet3d_fp32.rt        # be sure to delete(or move) old tensorRT files
./test_dla34_cnet3d            # run the yolo test (is slow)
./demo3D dla34_cnet3d_fp32.rt ../demo/yolo_test.mp4 NULL c

The demo3D program takes the same parameters of the demo program:

./demo3D <network-rt-file> <path-to-video> <calibration-file> <kind-of-network> <number-of-classes> <n-batches> <show-flag> <conf-thresh>

where

  • <calibration-file> is the camera calibration file (opencv format). It is important that the file contains entry "camera_matrix" with sub-entry "rows", "cols", "data". If you do not want to pass the calibration file, pass "NULL" instead.

demo

Object Detection and Tracking

To run the 3D object detection & tracking demo follow these steps (example with CenterTrack based on DLA34):

rm dla34_ctrack_fp32.rt  # be sure to delete(or move) old tensorRT files
./test_dla34_ctrack      # run the yolo test (is slow)
./demoTracker dla34_ctrack_fp32.rt ../demo/yolo_test.mp4 NULL c

The demoTracker program takes the same parameters of the demo program:

./demoTracker <network-rt-file> <path-to-video> <calibration-file> <kind-of-network> <number-of-classes> <n-batches> <show-flag> <conf-thresh> <2D/3D-flag>

where

  • <calibration-file> is the camera calibration file (opencv format). It is important that the file contains entry "camera_matrix" with sub-entry "rows", "cols", "data". If you do not want to pass the calibration file, pass "NULL" instead.
  • <2D/3D-flag> if set to 0 the demo will be in the 2D mode, while if set to 1 the demo will be in the 3D mode (Default is 1 - 3D mode).

demo

FPS Results

Inference FPS of shelfnet with tkDNN, average of 1200 images on:

  • RTX 2080Ti (CUDA 10.2, TensorRT 7.0.0, Cudnn 7.6.5);
  • Xavier AGX, Jetpack 4.3 (CUDA 10.0, CUDNN 7.6.3, tensorrt 6.0.1 );

3D OD and Tracking

PlatformTestPhaseFP32, msFP32, FPSFP16, msFP16, FPSINT8, msINT8, FPS
RTX 2080TiCenterTrack3D 512x512 (B=1)pre4.43883225.2854.42951225.7594.44278225.084
RTX 2080TiCenterTrack3D 512x512 (B=1)inf9.03454110.6866.02013166.1095.31611188.108
RTX 2080TiCenterTrack3D 512x512 (B=1)post0.966311034.870.968241032.800.950661051.90
RTX 2080TiCenterTrack3D 512x512 (B=1)tot14.439769.253511.417987.581810.709593.3750
RTX 2080TiCenterTrack3D 512x512 (B=4)pre4.60075217.3564.28658233.2864.29473232.844
RTX 2080TiCenterTrack3D 512x512 (B=4)inf8.48365117.8745.25150190.4224.58463218.120
RTX 2080TiCenterTrack3D 512x512 (B=4)post0.994841005.190.917761089.610.898531112.93
RTX 2080TiCenterTrack3D 512x512 (B=4)tot14.079271.026610.455895.64059.77788102.272
AGX XavierCenterTrack3D 512x512 (B=1)pre34.991528.578433.597629.744034.442529.0339
AGX XavierCenterTrack3D 512x512 (B=1)inf76.357913.096252.475919.056451.461019.4322
AGX XavierCenterTrack3D 512x512 (B=1)post3.38576295.3553.26010306.7393.19770312.725
AGX XavierCenterTrack3D 512x512 (B=1)tot114.7358.7157489.333611.194089.101211.2232
AGX XavierCenterTrack3D 512x512 (B=4)pre32.893330.401432.795030.492532.960330.3396
AGX XavierCenterTrack3D 512x512 (B=4)inf74.284013.461850.385819.846949.203020.3240
AGX XavierCenterTrack3D 512x512 (B=4)post3.14888317.5743.13615318.8623.02550330.524
AGX XavierCenterTrack3D 512x512 (B=4)tot110.3269.0640486.316911.585285.188811.7386

2D OD and Tracking

PlatformTestPhaseFP32, msFP32, FPSFP16, msFP16, FPSINT8, msINT8, FPS
RTX 2080TiCenterTrack2D 512x512 (B=1)pre4.44386225.0304.43828225.3134.47747223.340
RTX 2080TiCenterTrack2D 512x512 (B=1)inf9.08365110.0886.04842165.3325.34787186.990
RTX 2080TiCenterTrack2D 512x512 (B=1)post0.985931014.270.977451023.070.965951035.25
RTX 2080TiCenterTrack2D 512x512 (B=1)tot14.513468.901811.464287.228110.791392.6672
RTX 2080TiCenterTrack2D 512x512 (B=4)pre4.41188226.6614.50800221.8284.29238232.971
RTX 2080TiCenterTrack2D 512x512 (B=4)inf8.29015120.6255.38630185.6564.58500218.103
RTX 2080TiCenterTrack2D 512x512 (B=4)post0.968471032.550.979971020.440.917911089.43
RTX 2080TiCenterTrack2D 512x512 (B=4)tot13.670573.150210.874391.96029.79528102.090
AGX XavierCenterTrack2D 512x512 (B=1)pre33.474529.873533.484729.864333.502229.8488
AGX XavierCenterTrack2D 512x512 (B=1)inf76.207713.122052.511119.043651.605719.3777
AGX XavierCenterTrack2D 512x512 (B=1)post3.26055306.6973.26806305.9923.21988310.571
AGX XavierCenterTrack2D 512x512 (B=1)tot111.9438.9331289.263911.202788.327811.3215
AGX XavierCenterTrack2D 512x512 (B=4)pre32.832330.457932.859530.432632.819530.4697
AGX XavierCenterTrack2D 512x512 (B=4)inf74.307513.457650.355519.858849.180520.3333
AGX XavierCenterTrack2D 512x512 (B=4)post3.12360320.1433.13570318.9083.04943327.931
AGX XavierCenterTrack2D 512x512 (B=4)tot110.2639.0692086.350711.580785.049411.7579