From d0f0b66a1cb734a537d68ebc03a6df27ceeb853a Mon Sep 17 00:00:00 2001 From: Marcos Luciano Date: Sun, 28 Feb 2021 19:14:03 -0300 Subject: [PATCH] Update to DeepStream 5.1 --- YOLOv5.md | 18 +++++++++++++----- customModels.md | 13 ++++++++++--- multipleInferences.md | 9 ++++++++- readme.md | 18 +++++++++++++----- 4 files changed, 44 insertions(+), 14 deletions(-) diff --git a/YOLOv5.md b/YOLOv5.md index 89fa2c4..5303f2f 100644 --- a/YOLOv5.md +++ b/YOLOv5.md @@ -1,5 +1,5 @@ # YOLOv5 -NVIDIA DeepStream SDK 5.0.1 configuration for YOLOv5 models +NVIDIA DeepStream SDK 5.1 configuration for YOLOv5 models Thanks [DanaHan](https://github.com/DanaHan/Yolov5-in-Deepstream-5.0), [wang-xinyu](https://github.com/wang-xinyu/tensorrtx) and [Ultralytics](https://github.com/ultralytics/yolov5) @@ -153,8 +153,8 @@ sudo ./yolov5 -s 5. Create a custom yolo folder and copy generated files (example for YOLOv5s) ``` -mkdir /opt/nvidia/deepstream/deepstream-5.0/sources/yolo -cp yolov5s.engine /opt/nvidia/deepstream/deepstream-5.0/sources/yolo/yolov5s.engine +mkdir /opt/nvidia/deepstream/deepstream-5.1/sources/yolo +cp yolov5s.engine /opt/nvidia/deepstream/deepstream-5.1/sources/yolo/yolov5s.engine ```
@@ -176,14 +176,22 @@ Edit yolov5.cpp file before compile if you want to change this parameters. ### Compile nvdsinfer_custom_impl_Yolo 1. Run command ``` -sudo chmod -R 777 /opt/nvidia/deepstream/deepstream-5.0/sources/ +sudo chmod -R 777 /opt/nvidia/deepstream/deepstream-5.1/sources/ ``` 2. Donwload [my external/yolov5 folder](https://github.com/marcoslucianops/DeepStream-Yolo/tree/master/external/yolov5) and move files to created yolo folder 3. Compile lib + +* x86 platform ``` -cd /opt/nvidia/deepstream/deepstream-5.0/sources/yolo +cd /opt/nvidia/deepstream/deepstream-5.1/sources/yolo +CUDA_VER=11.1 make -C nvdsinfer_custom_impl_Yolo +``` + +* Jetson platform +``` +cd /opt/nvidia/deepstream/deepstream-5.1/sources/yolo CUDA_VER=10.2 make -C nvdsinfer_custom_impl_Yolo ``` diff --git a/customModels.md b/customModels.md index 6baa74d..e670716 100644 --- a/customModels.md +++ b/customModels.md @@ -14,7 +14,7 @@ How to edit DeepStream files to your custom model ## ### Requirements -* [NVIDIA DeepStream SDK 5.0.1](https://developer.nvidia.com/deepstream-sdk) +* [NVIDIA DeepStream SDK 5.1](https://developer.nvidia.com/deepstream-sdk) * [DeepStream-Yolo Native](https://github.com/marcoslucianops/DeepStream-Yolo/tree/master/native) * [Pre-treined YOLO model](https://github.com/AlexeyAB/darknet) @@ -23,7 +23,7 @@ How to edit DeepStream files to your custom model ### Editing default model 1. Run command ``` -sudo chmod -R 777 /opt/nvidia/deepstream/deepstream-5.0/sources/ +sudo chmod -R 777 /opt/nvidia/deepstream/deepstream-5.1/sources/ ``` 2. Download [my native folder](https://github.com/marcoslucianops/DeepStream-Yolo/tree/master/native), rename to yolo and move to your deepstream/sources folder. @@ -59,7 +59,14 @@ Note: config_infer_primary.txt uses cluster-mode=4 and NMS = 0.45 (via code) whe ### Compiling edited model 1. Check your CUDA version (nvcc --version) 2. Go to deepstream/sources/yolo directory -3. Type command (example for CUDA 10.2 version): +3. Type command to compile: + +* x86 platform +``` +CUDA_VER=11.1 make -C nvdsinfer_custom_impl_Yolo +``` + +* Jetson platform ``` CUDA_VER=10.2 make -C nvdsinfer_custom_impl_Yolo ``` diff --git a/multipleInferences.md b/multipleInferences.md index c4b62fe..adb28fb 100644 --- a/multipleInferences.md +++ b/multipleInferences.md @@ -44,7 +44,14 @@ Note: 2 = sgie1, 3 = sgie2, 4 = sgie3, etc ### Compiling edited models 1. Check your CUDA version (nvcc --version) 2. Go to inference directory. -3. Type command (example for CUDA 10.2 version): +3. Type command to compile: + +* x86 platform +``` +CUDA_VER=11.1 make -C nvdsinfer_custom_impl_Yolo +``` + +* Jetson platform ``` CUDA_VER=10.2 make -C nvdsinfer_custom_impl_Yolo ``` diff --git a/readme.md b/readme.md index 0339aaa..e13dc24 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,5 @@ # DeepStream-Yolo -NVIDIA DeepStream SDK 5.0.1 configuration for YOLO models +NVIDIA DeepStream SDK 5.1 configuration for YOLO models ## @@ -47,13 +47,13 @@ Request ## ### Requirements -* [NVIDIA DeepStream SDK 5.0.1](https://developer.nvidia.com/deepstream-sdk) +* [NVIDIA DeepStream SDK 5.1](https://developer.nvidia.com/deepstream-sdk) * [DeepStream-Yolo Native](https://github.com/marcoslucianops/DeepStream-Yolo/tree/master/native) (for Darknet YOLO based models) * [DeepStream-Yolo External](https://github.com/marcoslucianops/DeepStream-Yolo/tree/master/external) (for PyTorch YOLOv5 based model) ## -### mAP/FPS comparison between models +### mAP/FPS comparison between models (OUTDATED) DeepStream SDK YOLOv4: https://youtu.be/Qi_F_IYpuFQ @@ -215,7 +215,7 @@ pre-cluster-threshold = 0.25 (CONF_THRESH) Run command ``` -sudo chmod -R 777 /opt/nvidia/deepstream/deepstream-5.0/sources/ +sudo chmod -R 777 /opt/nvidia/deepstream/deepstream-5.1/sources/ ``` Download [my native folder](https://github.com/marcoslucianops/DeepStream-Yolo/tree/master/native), rename to yolo and move to your deepstream/sources folder. @@ -239,8 +239,16 @@ Download cfg and weights files from your model and move to deepstream/sources/yo Compile + +* x86 platform ``` -cd /opt/nvidia/deepstream/deepstream-5.0/sources/yolo +cd /opt/nvidia/deepstream/deepstream-5.1/sources/yolo +CUDA_VER=11.1 make -C nvdsinfer_custom_impl_Yolo +``` + +* Jetson platform +``` +cd /opt/nvidia/deepstream/deepstream-5.1/sources/yolo CUDA_VER=10.2 make -C nvdsinfer_custom_impl_Yolo ```