Metadata: Generate csv detections with DeepStream-Yolo

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 7.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 10.3.0.26
• NVIDIA GPU Driver Version (valid for GPU only) 560.35.03
• 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)

Hi,

I am working with DeepStream and Yolo after cloning the repository GitHub - marcoslucianops/DeepStream-Yolo: NVIDIA DeepStream SDK 7.1 / 7.0 / 6.4 / 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models into a docker container with DeepStream SDK 7.1 triton-devel and in general everything is going well, videos are being processed correctly with the different versions of Yolo included in the repository. However, when I try to get a record of the detections performed, I find that the processing (deepstream-app -c deepstream_app_config.txt) is carried out from a precompiled binary to which I do not have access to and therefore I am not being able to intervene in the code to generate a file with the log of the detections made.

The instructions from the repository itself say:

"Extract metadata

You can get metadata from DeepStream using Python and C/C++. For C/C++, you can edit the deepstream-app or deepstream-test codes. For Python, you can install and edit deepstream_python_apps.

Basically, you need to manipulate the NvDsObjectMeta (Python / C/C++) and NvDsFrameMeta (Python / C/C++) to get the label, position, etc. of bboxes."

However, this I do not understand. NvDsObjectMeta and NvDsFrameMeta are not accessible within the repository itself. Yes, I can access them at the .py test files in the DeepStream tests folder and ensure an output file with detections, but these tests do not work with Yolo and configuring them to work with Yolo implies redoing all the work of the repository author and, in my case, leads to errors.

So on the one hand I get a csv with detections but without yolo and on the other I have yolo but without any file that records the detections and tracks got by yolo and NvDCF tracker. And what I am trying is to achieve both at the same time.

Is there a more or less direct way to solve this that I’m leaving out?

Thank you so much in advance,
Enrique

could you elaborate on the issue? AYK, the inference results will be saved in meta data. you can get inference results from NvDsFrameMeta and NvDsObjectMeta. if using deepstream-app, Since deepstream-app is opensource, you can modfy the code to access meta data in Gstreamer probe functon.

Yes, of course, I can elaborate. There is clearly something simple that I am not seeing.

I have at least two ways to test the DeepStream SDK examples.

1- Since I work in Python, one option is to go to the test2 folder, for example, and run “python3 deepstream_python_test2.py <my_video>”.

2- Go to the DeepStream-Yolo folder and run “deepstream-app -c deepstream_app_config.txt”.

In both cases, the example runs successfully and displays detections and tracks on screen while processing the video. However, at the end of the process, I do not get any output file that stores the results of that process.

In case 1, I am able to intervene on NvDsFrameMeta and NvDsObjectMeta in deepstream_python_test2.py and when I rerun the process, I get an output file in csv with the detections. That case is fine and gives me the results for ResNet detection and NvDCF tracking.

In case 2, which is the one that allows me to process the video with Yolo+NvDCF, I do not see a “.py” or “.c” file that I can intervene on NvDsFrameMeta and NvDsObjectMeta, and therefore, I cannot generate a file that records the detections.

So, in case 1, I know how to intervene and obtain detections but I do not have Yolo detection, and in case 2, I have Yolo but I cannot find a way to intervene to save a record with the detections. I probably missed a simple step in the documentation that allows generating a file with metadata from the txt configuration files, or something similar. But I am not finding it. I am aware that my level in these topics is quite limited, so I apologize if I lead to misunderstandings when explaining myself or if I missed an explicit answer in the documentation.

Also, I find no object_id or tracker_id tag while running with DeepSream with Yolo following the instructions in the repository.

The most I got was to include this

gie-kitti-output-dir=./metadata

in the [application] section of deepstream_app_config.txt.

With this, I get a txt file for each frame with position coordenates, class name, confidence, but no tracker or object ID.

Thank you very much again, best regards.

  1. yon can set kitti-track-output-dir under in [application] to dump tracker information. please refer to ths doc.
  2. DeepStream-Yolo uses deepstream-app, which is opensource. the code path is /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-app/deepstream_app.c. similarily you can can access meta data in probe function gie_processing_done_buf_prob or analytics_done_buf_prob. especially please build the code accorrding to readme after modifying the code. please refer to osd_sink_pad_buffer_probe of deepstream-test1 for how to access metadata in C code.
1 Like

Thank you so much

Sorry for the late reply, Is this still an DeepStream issue to support? Thanks!

No, it is not. Thank you

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