A brief description of how to use deepstream 6.1 with Yolo V5. This repo based on multiple blogposts:
Here implemented two pipelines - with and without tiling. Both pipeline process video files and produce resulting videos with detections. Also, the pipeline use different trackers:
- NvDCF - python based pipeline with tiling
- DeepSORT - C++ based pipeline without tiling
The config files placed in deepstream-example/configs
- Detector:
yolov5.txt
- Trackers
- NvDCF:
nvdcf.txt
,tracker_config.yml
- DeepSORT:
DeepSORT_config.yml
- NvDCF:
- Preprocess(tiler):
preprocess.txt
- Whole pipeline:
pipeline.txt
- Clone the repo and init submodules
git clone https://github.com/klymya/deepstream-example.git && cd deepstream-example && git git submodule init
-
Download and convert yolov5 weights. The instruction and script for this are here. Put the conversion artifats(
.cfg
and.wts
files) todeepstream-example/weights
. -
Build the docker image with required environment
docker build . -t deepstream-example
- Run the docker container
docker run -it --rm --gpus all -v ${PWD}:/app -w /app deepstream-example bash
- Run examples
- Python pipeline with tiling
export PYTHONPATH=/app/code/boilerplate/deepstream && python3 code/main.py
- C++ pipeline
deepstream-app -c configs/pipeline.txt
Tiling links:
- https://developer.nvidia.com/blog/applying-inference-over-specific-frame-regions-with-nvidia-deepstream/
- https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvdspreprocess.html
Other useful links: