Please provide complete information as applicable to your setup.
**• Hardware Platform (Jetson / GPU)GPU
**• DeepStream Version 5.0
• JetPack Version (valid for Jetson only)
**• TensorRT Version 7.0
**• NVIDIA GPU Driver Version (valid for GPU only) 460
**• Issue Type( questions, new requirements, bugs)questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
Dear professor:
I am sorry to create a new topic to ask help for my problem.
My problem is to make preprocessing for the input video of deepstream.
My model is YoloV4. I hope the pipline like this:
input video —> decoder----->preprocessing -----> infer ------> output.
In the last topic, I understand that I can create a GStream plugin such as dsexample to be a processor. And I understand the code of gst-dstexample.cpp. But I found that code is just for the post processing.
In the forum, I nearly found all the similar answer, however, it is not clear.
Now I have two methods, maybe they are wrong.
(1) I modify the “nvdinfer_context_impl.cpp”, but it is said that the data in this file is based on CUDA. So, If I use this method, could I need to refer the method in gst-dstexample.cpp and transform the data into CPU mat? That I can use opencv
(2) If I create a new GStream plugin. I use YoloV4, there are just engine and configuration files. I don’t know where is port that I can put. Or which variable should I modify in the “gst-dstexample.cpp” , then “gst-dstexample.cpp” can be put behind the decoder.
This problem make me worry. And I stop here 4 days. Thank you very much. Please kindly give me some help.
The configuration as below:
[ds-example]
enable=1
processing-width=1280
processing-height=760
full-frame=1
#batch-size for batch supported optimized plugin
batch-size=1
unique-id=15
gpu-id=0
[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5
#gie-kitti-output-dir=streamscl
[tiled-display]
enable=1
rows=2
columns=2
width=1280
height=720
gpu-id=0
nvbuf-memory-type=0
[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI
type=3
uri=file:/opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_1080p_h264.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0
[source1]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI
type=3
uri=file:/opt/nvidia/deepstream/deepstream-5.0/sources/deepstream_yolov4/test4.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0
[source2]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI
type=3
uri=file:/opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_qHD.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0
[source3]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI
type=3
uri=file:/opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_cam5.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0
[osd]
enable=1
gpu-id=0
border-width=1
text-size=12
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0
[streammux]
gpu-id=0
##Boolean property to inform muxer that sources are live
live-source=0
batch-size=1
##time out in usec, to wait after the first buffer is available
##to push the batch even if the complete batch is not formed
batched-push-timeout=40000
Set muxer output width and height
#width=1280
#height=720
width=1280
height=720
##Enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding=0
nvbuf-memory-type=0
config-file property is mandatory for any gie section.
Other properties are optional and if set will override the properties set in
the infer config file.
[primary-gie]
enable=1
gpu-id=0
model-engine-file=/home/yangyi/PycharmProjects/pytorch-YOLOv4/yolov4-new.engine
labelfile-path=labels.txt
batch-size=1
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
interval=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV4.txt
[tracker]
enable=0
tracker-width=512
tracker-height=320
ll-lib-file=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_mot_klt.so
gpu-id=0
enable-batch-process=1
enable-past-frame=0
display-tracking-id=1
[sink0]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File
type=3
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=0
#1=mp4 2=mkv
container=1
#1=h264 2=h265
codec=1
output-file=yolov4.mp4
[sink1]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=2
sync=1
source-id=0
gpu-id=0
nvbuf-memory-type=0
[sink2]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=2
sync=1
source-id=1
gpu-id=0
nvbuf-memory-type=0
[sink3]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=2
sync=1
source-id=2
gpu-id=0
nvbuf-memory-type=0
[sink4]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=2
sync=1
source-id=3
gpu-id=0
nvbuf-memory-type=0
[tests]
file-loop=0