DS 6.4 Unable to send MQTT messages after using the yolov5 model

Please provide complete information as applicable to your setup.

• Hardware Platform (GPU)
• DeepStream Version:6.4
• TensorRT Version: 8.6
• NVIDIA GPU Driver Version : 12.4

I can use the deepstream app to run the YOLOv5 model display screen, but when I configure it to mqtt, it cannot be sent.
At the beginning, it displayed a send connection, but no message was sent until the screen came out.
After terminating the program, the log shows that the connection to the mqtt server was successful.
All configuration files :
deepstream_app_config-mqtt.txt (1.3 KB)
config_infer_primary_yoloV5-test.txt (626 Bytes)
cfg_mqtt.txt (221 Bytes)
cfg_msgconv.txt (444 Bytes)
dstest5_msgconv_sample_config.txt (2.6 KB)

The log file :
log.log (17.0 KB)

Hope to receive your reply , thank you.

please make sure objects are detected first. could you try the file /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4? from the log.log, the application did not send payload to the server because there is no the relevant mosq_mqtt_log_callback printing. please refer to this topic.

1 Like

thanks to reply.

when i try this topic .

modify the following code in opt\nvidia\deepstream\deepstream\sources\gst-plugins\gst-nvmsgbroker\gstnvmsgbroker.cpp

the log display should be correct.

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8555/ds-test ***

[mosq_mqtt_log_callback] Client deepstreams sending CONNECT
[mosq_mqtt_log_callback] Client deepstreams received CONNACK (0)
mqtt connection success; ready to send data
Deserialize yoloLayer plugin: yolo
0:00:06.671849658 4010780 0x5ee5a35ac4a0 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2092> [UID = 1]: deserialized trt engine from :/home/edyang/code/DeepStream-Yolo-master/ds-app-config/yolov5m-official/model_b1_gpu0_fp32.engine
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 5
0   INPUT  kFLOAT data            3x640x640       
1   OUTPUT kFLOAT num_detections  1               
2   OUTPUT kFLOAT detection_boxes 25200x4         
3   OUTPUT kFLOAT detection_scores 25200           
4   OUTPUT kFLOAT detection_classes 25200           

0:00:06.799287975 4010780 0x5ee5a35ac4a0 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2195> [UID = 1]: Use deserialized engine model: /home/edyang/code/DeepStream-Yolo-master/ds-app-config/yolov5m-official/model_b1_gpu0_fp32.engine
0:00:06.802746066 4010780 0x5ee5a35ac4a0 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/home/edyang/code/DeepStream-Yolo-master/ds-app-config/yolov5m-official/config_infer_primary_yoloV5-test.txt sucessfully

Runtime commands:
        h: Print this help
        q: Quit

        p: Pause
        r: Resume

NOTE: To expand a source in the 2D tiled display and view object details, left-click on the source.
      To go back to the tiled display, right-click anywhere on the window.


**PERF:  FPS 0 (Avg)
**PERF:  0.00 (0.00)
** INFO: <bus_callback:301>: Pipeline ready

Warning: Color primaries 5 not present and will be treated BT.601
** INFO: <bus_callback:287>: Pipeline running

mimetype is video/x-raw
**PERF:  25.56 (25.35)
**PERF:  24.99 (25.17)
**PERF:  25.00 (25.11)
**PERF:  24.95 (25.08)
**PERF:  24.99 (25.06)
**PERF:  24.99 (25.05)
**PERF:  24.97 (25.04)
**PERF:  25.00 (25.04)
**PERF:  24.95 (25.03)
**PERF:  25.00 (25.03)
[mosq_mqtt_log_callback] Client deepstreams sending PINGREQ
[mosq_mqtt_log_callback] Client deepstreams received PINGRESP
**PERF:  24.99 (25.03)
**PERF:  24.96 (25.02)
**PERF:  25.00 (25.02)
**PERF:  24.99 (25.02)
**PERF:  24.96 (25.01)
**PERF:  25.00 (25.01)
**PERF:  24.96 (25.00)
**PERF:  24.99 (25.00)
**PERF:  24.99 (25.00)

but the mqtt message has not been sent yet. Is it necessary to perform related mate data processing after the YOLO model conversion? How should we handle it specifically? or is there something wrong with my configuration.

  1. you can set msg-conv-msg2p-new-api=1. please refer to the discrepancy in the doc.
  2. if you need to set msg-conv-msg2p-new-api=0, please use deeptream-testr5, which will call call generate_event_msg_meta to add event messages.
1 Like

Great, that’s it
Thank you.

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