Skip to content
Fast object detector
C++ C Dockerfile Other
Branch: master
Clone or download
Latest commit 5ae1969 May 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker current state Mar 11, 2019
.gitignore fst commit Feb 19, 2019
BatchStreamPPM.h fst commit Feb 19, 2019
CMakeLists.txt current state Mar 11, 2019
CalibrationTableSSD Callibration table Feb 19, 2019
LICENSE fst commit Feb 19, 2019
README.md link to blog May 21, 2019
argsParser.h fst commit Feb 19, 2019
channel_first.cu fst commit Feb 19, 2019
common.h fst commit Feb 19, 2019
cpall.sh docker stuff Mar 10, 2019
dynlink_nvcuvid.cpp fst commit Feb 19, 2019
infer_with_trt.cpp fst commit Feb 19, 2019
inference_base.cpp fst commit Feb 19, 2019
inference_base.h fst commit Feb 19, 2019
inference_tf.cpp fst commit Feb 19, 2019
inference_tf.h fst commit Feb 19, 2019
inference_trt.cpp fst commit Feb 19, 2019
inference_trt.h fst commit Feb 19, 2019
main.cpp fst commit Feb 19, 2019
run_tf.sh fst commit Feb 19, 2019
run_trt.sh fst commit Feb 19, 2019
run_trt_int8.sh fst commit Feb 19, 2019
utils.cpp fst commit Feb 19, 2019
utils.h fst commit Feb 19, 2019

README.md

Optimizied Video Object Detection

The completed application runs any Model Zoo style object detector in Tensorflow mode (default) and an Inception V2 SSD detector converted from Tensorflow graph to UFF format recognized by TensorRT in TensorRT mode (-t).

Setting up the environment

Read these series of posts

Building the app

  • Clone the repo.
  • Get the frozen graph and the class labels files for Tensorflow from here
  • Get the frozen graph for TensorRT. The class labels file should be available in /usr/src/tensorrt/data/ssd directory.
  • Build:
mkdir build
cd build
cmake .. # cmake -DCMAKE_BUILD_TYPE=Debug

Running

Command line options are described in main.cpp:

const String keys =
    "{d display |1  | view video while objects are detected}"
    "{t tensorrt|false | use tensorrt}"
    "{i int8|false| use INT8 (requires callibration)}"
    "{v video    |  | video for detection}"
    "{graph ||frozen graph location}"
    "{labels ||trained labels filelocation}";

Examples are in run_*.sh files in the sources directory. Worth mentioning:

-d=0 - run without UX, print out framerate only. -d=2 run with UX
-t - TensorRT graph
-t -i - TensorRT graph with INT8 precision.

Slowdown due to UX

The application uses a bare-bones OpenCV UI for visual feedback (imshow) and that causes a significant perf hit, so to measure actual performance we run with -d=0 which suppresses the UI.

You can’t perform that action at this time.