Skip to content

berkgungor/TensorRT-YOLOv9

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TensorRT-YOLOv9

python cuda trt

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.

🚀 Usage

Python

cd <this project path>/python
python yolov9_trt.py --engine yolov9-c.engine --data images --outdir output

C++

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

🛠️ Build

Python

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

C++

Refer to our docs/INSTALL.md for detailed installation instructions.

🖥️ Requirement

  • TensorRT
  • CUDA, CudaNN
  • C++ compiler with C++17 or higher support
  • CMake 3.14 or higher
  • OpenCV

🌱 Examples

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

👏 Acknowledgement

This project is based on the following awesome projects:

  • YOLOv9 - YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information.
  • TensorRT - TensorRT samples and api documentation.
  • TensorRTx - Implementation of popular deep learning networks with TensorRT network definition API.

🔗 See also

  • Yolov9-Bytetrack - Integration of YOLOv9 with ByteTracker using the TensorRT API.

About

Cpp and python implementation of YOLOv9 using TensorRT API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 52.9%
  • Python 37.4%
  • Cuda 7.0%
  • CMake 1.9%
  • C 0.8%