This project demonstrates object tracking using the Kalman Filter, integrated with YOLO for object detection. It leverages NVIDIA's TensorRT for fast inference of pre-trained deep learning models, enabling real-time object detection and tracking.
In this implementation:
- YOLO performs object detection on frames of a video.
- The Kalman Filter is applied for object tracking across frames.
This project is based on the original TensorRT C++ API for efficient TensorRT usage.
In addition to the prerequisites listed in the TensorRT C++ API, the following are required:
- GTest: Used for unit testing the Kalman Filter implementation. Install Google Test for running tests.
mkdir build
cd build
cmake ..
make -j$(nproc)
To run the executables, use the following commands:
-
Using camera as input:
./detect_object_video --model /path/to/your/onnx/model.onnx --input 0
-
Using video as input:
./detect_object_video --model /path/to/your/onnx/model.onnx --input /path/to/videofile
-
To record the result:
./detect_object_video --model /path/to/your/onnx/model.onnx --input /path/to/videofile --output validmp4filename
The video will be saved in theoutputs
folder.