Trying to run yolov9 on deepstream with kafka but cant figure out the configuration or pipeline

hi everyone, im new to deepstream just started with getting to know the platform recently, i am using deepstream 7.0 on rtx4090 and running deepstream via docker locally.

i have been successful on connecting deepstream-test4 to my local kafka server, so i built the kafka adapter and went through all the configurations required to make use of the nvmsgconv and nvmsgbroker on the python test-4 app.

now i want to connect a custom detection model that will report to kafka on detections. i found this end to end github repository with end to end solution for deepstream: ( GitHub - levipereira/deepstream-yolo-e2e: Implementation of End-to-End YOLO Models for DeepStream ) - in this repository they have implemented and configured nvdsinfer_yolo into the deepstream app itself.
i followed the guide along and made it to where im running yolov9 on deepstream using the config file deepstream_yolo_det.txt
that comes in the repository.

i tried to configure this file to enable the nvmsgconv and nvmsgbroker plugins to make contact with my local kafka server just as i did in deepstream-test-4.

i edited the configuration file to be the following:

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5

[tiled-display]
enable=1
rows=2
columns=1
width=1280
height=720
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=3
uri=rtsp-address
num-sources=1
gpu-id=0
cudadec-memtype=0

[source1]
enable=1
type=3
uri=rtsp-address
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=1
type=2
sync=1
gpu-id=0
nvbuf-memory-type=0

[sink1]
enable=0
type=3
container=1
codec=2
enc-type=0
sync=0
bitrate=10000000
profile=0
output-file=out.mp4
source-id=0

[osd]
enable=1
gpu-id=0
border-width=3
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
live-source=0
batch-size=2
batched-push-timeout=40000
width=1920
height=1080
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_pgie_yolo_det.txt
bbox-border-color80=0.0;0.7529411764705882;0.796078431372549;1
bbox-border-color1=1.0;1.0;0.0;1
bbox-border-color2=1.0;0.0;0.0;1
bbox-border-color3=0.0;0.0;1.0;1
bbox-border-color4=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color5=1.0;1.0;0.0;1
bbox-border-color6=1.0;0.0;0.0;1
bbox-border-color7=0.0;0.0;1.0;1
bbox-border-color8=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color9=1.0;1.0;0.0;1
bbox-border-color10=1.0;0.0;0.0;1
bbox-border-color11=0.0;0.0;1.0;1
bbox-border-color12=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color13=1.0;1.0;0.0;1
bbox-border-color14=1.0;0.0;0.0;1
bbox-border-color15=0.0;0.0;1.0;1
bbox-border-color16=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color17=1.0;1.0;0.0;1
bbox-border-color18=1.0;0.0;0.0;1
bbox-border-color19=0.0;0.0;1.0;1
bbox-border-color20=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color21=1.0;1.0;0.0;1
bbox-border-color22=1.0;0.0;0.0;1
bbox-border-color23=0.0;0.0;1.0;1
bbox-border-color24=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color25=1.0;1.0;0.0;1
bbox-border-color26=1.0;0.0;0.0;1
bbox-border-color27=0.0;0.0;1.0;1
bbox-border-color28=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color29=1.0;1.0;0.0;1
bbox-border-color30=1.0;0.0;0.0;1
bbox-border-color31=0.0;0.0;1.0;1
bbox-border-color32=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color33=1.0;1.0;0.0;1
bbox-border-color34=1.0;0.0;0.0;1
bbox-border-color35=0.0;0.0;1.0;1
bbox-border-color36=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color37=1.0;1.0;0.0;1
bbox-border-color38=1.0;0.0;0.0;1
bbox-border-color39=0.0;0.0;1.0;1
bbox-border-color40=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color41=1.0;1.0;0.0;1
bbox-border-color42=1.0;0.0;0.0;1
bbox-border-color43=0.0;0.0;1.0;1
bbox-border-color44=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color45=1.0;1.0;0.0;1
bbox-border-color46=1.0;0.0;0.0;1
bbox-border-color47=0.0;0.0;1.0;1
bbox-border-color48=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color49=1.0;1.0;0.0;1
bbox-border-color50=1.0;0.0;0.0;1
bbox-border-color51=0.0;0.0;1.0;1
bbox-border-color52=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color53=1.0;1.0;0.0;1
bbox-border-color54=1.0;0.0;0.0;1
bbox-border-color55=0.0;0.0;1.0;1
bbox-border-color56=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color57=1.0;1.0;0.0;1
bbox-border-color58=1.0;0.0;0.0;1
bbox-border-color59=0.0;0.0;1.0;1
bbox-border-color60=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color61=1.0;1.0;0.0;1
bbox-border-color62=1.0;0.0;0.0;1
bbox-border-color63=0.0;0.0;1.0;1
bbox-border-color64=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color65=1.0;1.0;0.0;1
bbox-border-color66=1.0;0.0;0.0;1
bbox-border-color67=0.0;0.0;1.0;1
bbox-border-color68=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color69=1.0;1.0;0.0;1
bbox-border-color70=1.0;0.0;0.0;1
bbox-border-color71=0.0;0.0;1.0;1
bbox-border-color72=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color73=1.0;1.0;0.0;1
bbox-border-color74=1.0;0.0;0.0;1
bbox-border-color75=0.0;0.0;1.0;1
bbox-border-color76=1.0;0.7529411764705882;0.796078431372549;1
bbox-border-color77=1.0;1.0;0.0;1
bbox-border-color78=1.0;0.0;0.0;1
bbox-border-color79=0.0;0.0;1.0;1

[tracker]
enable=1
tracker-width=640
tracker-height=384
ll-lib-file=/opt/nvidia/deepstream/deepstream-7.0/lib/libnvds_nvmultiobjecttracker.so
ll-config-file=./tracker/config_tracker_NvDCF_perf.yml
gpu-id=0
display-tracking-id=1

[tests]
file-loop=0

[msgconv]
enable=1
msg2p-lib=/opt/nvidia/deepstream/deepstream-7.0/lib/libnvds_msgconv.so
config-file=/apps/deepstream-yolo-e2e/deepstream-yolo-e2e/kafka_configs/msgconv_config.txt
payload-type=1
comp-id=2

[msgbroker]
enable=1
proto-lib=/opt/nvidia/deepstream/deepstream-7.0/lib/libnvds_kafka_proto.so
conn-str=localhost;9092;quickstart-events
topic=quickstart-events
config=./kafka_configs/broker_config.cfg
comp-id=2
new-api=1

to run the app im running the following command in terminal:

deepstream-app -c deepstream_yolo_det.txt

the app runs, but nothing about the plugins i added (msgconv/broker) had any output indication that it runs or not.

i think the plugins were not added to the pipeline in the deepstream-app.

my question is basically how to add these plugins to the pipeline ?
which files do i edit to make deepstream-app command include the plugins?

alternative thought that i had is asking how to integrate the nvinfer_yolo into the deepstream-test4 app that allready comunicates with kafka?
what am i missing?
since im new to this im sure its something to do with the plugins.
went through the documentation for multiple days now and cant figure this one out. !

if using deepstream-app, you can set type=6 in sink setting. please refer to C:\zhangfan\code\nv-opt\nvidia\deepstream\deepstream-7.0\sources\apps\sample_apps\deepstream-test5\configs\test5_config_file_src_infer.txt

after looking into other config files and comparing i found i had to make these changes to the config file to publish messages on the kafka topic:

[sink1]
type=6
msg-conv-msg2p-new-api=1

after tinkering with more configurations i made it to get the outputs from yolov9 on kafka, thanks !

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.