Cpp and python implementation of YOLOv9 using TensorRT API
This repo hosts a C++ and python implementation of the YOLOv9 state of the art object detection model, leveraging the TensorRT API for efficient real-time inference.
cd <this project path>/python
python yolov9_trt.py --engine yolov9-c.engine --data images --outdir output
cd <this project path>/build/release
# infer an image
yolov9-tensorrt.exe yolov9-c.engine test.jpg
# infer a folder(images)
yolov9-tensorrt.exe yolov9-c.engine data
# infer a video
yolov9-tensorrt.exe yolov9-c.engine test.mp4 # the video path
The following command will install tensorrt for python:
cd <tensorrt installation path>/python
pip install cuda-python
pip install tensorrt-8.6.0-cp310-none-win_amd64.whl
pip install opencv-python
Refer to our docs/INSTALL.md for detailed installation instructions.
Parameters for inference:
Confidence threshold : 0.2
NMS threshold : 0.3
Model : yolov9-e (with FP32)
Inference result:
Original image: https://www.flickr.com/photos/nicolelee/19041780
This project is based on the following awesome projects: