################################################################################
#
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
This sample shows how to integrate YOLOv4 with customized output layer parsing for detected objects with DeepStreamSDK.
deepstream_app_config_yolov4.txt
: DeepStream reference app configuration file for using YOLOv4 model as the primary detector.config_infer_primary_yolov4.txt
: Configuration file for the GStreamer nvinfer plugin for the Yolo detector model.nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.cpp
: Output layer parsing function for detected objects for the Yolo model.
-
Go to this pytorch repository https://github.com/Tianxiaomo/pytorch-YOLOv4 where you can convert YOLOv4 Pytorch model into ONNX and TensorRT engine
-
Other famous YOLOv4 pytorch repositories as references:
3.1 Copy this directory deepstream_yolov4
into <where_deepstream_is_installed>/deepstream-5.0/sources
$ export CUDA_VER=<CUDA version of your environment, e.g. 10, 10.2, 11, etc>
$ make
3.3 Copy the TensorRT engine into your working directory (<where_deepstream_is_installed>/deepstream-5.0/sources/deepstream_yolov4
)
-
[property]
- model-engine-file
- labelfile-path
- batch-size
- network-mode
-
[class-attrs-all]
- nms-iou-threshold
- pre-cluster-threshold
Please refer to DeepStream plugin document for more information about plugin options
-
[tiled-display]
- width
- height
-
[streammux]
- batch-size
- width
- height
-
[primary-gie]
- model-engine-file (the same as in [property])
- labelfile-path (the same as in [property])
- batch-size (the same as in [property])
-
[tracker]
- tracker-width
- tracker-height
Please refer to DeepStream plugin document for more information about plugin options
$ deepstream-app -c deepstream_app_config_yoloV4.txt