This repository enables real-time object detection using YOLOv11 integrated into the NVIDIA DeepStream SDK (7.1) via the official container from NGC (NVIDIA GPU Cloud).
deepstream_yolov11/
├── Dockerfile # Docker container setup based on DeepStream 7.1
├── setup.sh # Script to export YOLOv11 to ONNX and generate TRT engine
├── deepstream_app_config.txt # DeepStream application pipeline config
├── config_infer_primary_yoloV11.txt # YOLOv11 model configuration for DeepStream inference
├── weights/
│ └── yolo11s.pt # 🔁 Place your YOLOv11 PyTorch model weights here manually
└── README.md # This file
- Convert YOLOv11 PyTorch model to ONNX
- Integrate into DeepStream 7.1 pipeline
- Run object detection on video using optimized TensorRT engine
- NVIDIA GPU with drivers installed
- Docker
- NVIDIA Container Toolkit
- Linux system (tested on Ubuntu 22.04)
- Model weights:
yolo11s.ptfrom Ultralytics
git clone https://github.com/T-DevH/deepstream_yolov11.git
cd deepstream_yolov11Manually download yolo11s.pt from the official Ultralytics release page and place it in the weights/ folder:
mv ~/Downloads/yolo11s.pt weights/docker build -t deepstream-yolov11 .Allows GUI video display by forwarding X11 and mounting video source
xhost +local:root
docker run --gpus all -it --rm --net=host --runtime=nvidia -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd):/workspace deepstream-yolov11Run the setup script to:
- Export
yolo11s.pt→ONNX - Build a TensorRT
.engine - Prepare DeepStream inference pipeline
./setup.shdeepstream-app -c deepstream_app_config.txtYou should see real-time object detection running on the provided video (edit deepstream_app_config.txt to change video source).
This project integrates with the excellent DeepStream-Yolo project to:
- ✅ Export YOLOv11 models from PyTorch to ONNX using
utils/export_yoloV8.py - ✅ Compile a custom DeepStream plugin
libnvdsinfer_custom_impl_Yolo.soto parse YOLO outputs - ✅ Reuse tried-and-tested configuration formats for DeepStream compatibility
These steps are handled automatically:
- The repository is cloned in the Dockerfile.
- The plugin is compiled during container build.
- The ONNX export is performed in
setup.sh. - The
.soplugin is referenced insideconfig_infer_primary_yoloV11.txt.
No manual steps are needed — everything is automated within the Docker container.
This project uses open-source components under their respective licenses (YOLO, DeepStream, Ultralytics).
Feel free to open an issue or reach out if you need help with DeepStream, YOLO export, or pipeline tuning!