kingardor / yolov8-deepstream-6-1

YOLOv8 by Ultralytics in DeepStream 6.1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NVIDIA DeepStream with Ultralytics YOLOv8

Run the latest object-detection SOTA model YOLOv8 with DeepStream!

FPS

Repository setup

This is a straightforward step, however, if you are new to git, I recommend glancing threw the steps.

First, install git

sudo apt install git

Next, clone the repository

https://github.com/kn1ghtf1re/yolov8-deepstream-6-1.git

Download the model files

You can run the download-models.sh script to download onnx yolov8 models

cd models
chmod 0777 download-models.sh
./download-models.sh

Docker image build

This repository is tested and used with docker. For docker setup with nvidia, click here.

1. Build the image

cd docker/dgpu

docker build . -t ds-6.1:custom-1

2. Start a container

xhost +

export DISPLAY=:0

docker run -it --rm --net=host --runtime nvidia -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix -v /home/kn1ght/Projects/yolov8-deepstream-6-1:/app ds-6.1:custom-1

Running the Application

1. Build the application

make clean && make -j$(nproc)

2. Start the application

Next, create a file called inputsources.txt and paste the path of videos or rtsp url.

file:///home/astr1x/Videos/sample.mp4
rtsp://admin:admin%40123@192.168.1.1:554/stream

Now, run the application by running the following command:

# For barebones
./ds-yolov8

# For system76 hybrid graphics
__NV_PRIME_RENDER_OFFLOAD=1 ./ds-yolov8

Citations

About

YOLOv8 by Ultralytics in DeepStream 6.1

License:GNU General Public License v3.0


Languages

Language:C++ 90.4%Language:Makefile 6.6%Language:Dockerfile 1.6%Language:Shell 1.4%