Please provide complete information as applicable to your setup.
• GPU: GTX 1660ti
• Deepstream Version: 7.1
• Nvidia-Driver Version: 566.14 | CUDA Version: 12.7
• Issue Type: Modifying the output message structure of deepstream-test-app-5
Hello,
Currently I have the deepstream-test-app-5 (Path: /opt/nvidia/deepstream/deepstream-7.1/sources/apps/sample_apps/deepstream-test5) setup and running with my deepstream_config file to perform inference and send the results to kafka. My application succesfully connects and publishes messages to kafka.
The current issue I am facing is with the default message structure that I am receiving in kafka.
Right now, I am getting the following sample output:
{
"messageid": "b201cefc-7f6b-4c93-9739-64579900399e",
"mdsversion": "1.0",
"@timestamp": "1970-01-01T00:00:00.000Z",
"place": {
"id": "0",
"name": "HWY_20_AND_LOCUST__EBA",
"type": "intersection/road",
"location": {
"lat": 30.32,
"lon": -40.549999999999997,
"alt": 100.0
},
"entrance": {
"name": "C_127_158",
"lane": "Lane 1",
"level": "P1",
"coordinate": {
"x": 1.0,
"y": 2.0,
"z": 3.0
}
}
},
"sensor": {
"id": "HWY_20_AND_LOCUST__EBA__4_11_2018_4_59_59_508_AM_UTC-07_00",
"type": "Camera",
"description": "Aisle Camera",
"location": {
"lat": 45.293701446999997,
"lon": -75.830391449900006,
"alt": 48.155747933800001
},
"coordinate": {
"x": 5.2000000000000002,
"y": 10.1,
"z": 11.199999999999999
}
},
"analyticsModule": {
"id": "XYZ_1",
"description": "Vehicle Detection and License Plate Recognition",
"source": "OpenALR",
"version": "1.0"
},
"object": {
"id": "0",
"speed": 0.0,
"direction": 0.0,
"orientation": 0.0,
"backpack": {},
"bbox": {
"topleftx": 1,
"toplefty": 480,
"bottomrightx": 99,
"bottomrighty": 668
},
"location": {
"lat": 0.0,
"lon": 0.0,
"alt": 0.0
},
"coordinate": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"pose": {}
},
"event": {
"id": "6c092e9e-5a98-474f-82b3-da28f624505c",
"type": "entry"
},
"videoPath": ""
}
I would like to modify the application to receive the base 64 encoded frame, frame ID, detections (tracking ID, class label, confidence threshold, bbox [top_left_x, top_left_y, bottom_right_x, bottom_right_y])
A sample of this structure that I want to receive would look like:
{
"frame_ID": "frame_001",
"detections": [
{
"tracking_ID": "track_001",
"class_label": "Vehicle",
"confidence_threshold": 0.95,
"bbox": {
"topleftx": 1,
"toplefty": 480,
"bottomrightx": 99,
"bottomrighty": 668
}
},
{
"tracking_ID": "track_002",
"class_label": "Person",
"confidence_threshold": 0.89,
"bbox": {
"topleftx": 120,
"toplefty": 300,
"bottomrightx": 200,
"bottomrighty": 400
}
}
],
"frame": "base64_encoded_frame_data"
}
I have attempted to make changes in the deepstream_test5_app_main.c file and recompile it to achieve the desired effect, but I have run into a lot of errors since I am not an adept C language developer.
Are there built in parameters in the deep stream config file that I can change/add to achieve this?
Is there any example of how to modify the code to achieve this output?
I am attaching my main files for reference:
cfg_conv.txt (2.0 KB)
cfg_kafka.txt (42 Bytes)
deepstream_app_config.txt (2.3 KB)
Please let me know if any additional information is needed.
Any help is highly appreciated.