Saving tracking results from DeepStream 5.0 in a txt file

I’m using this setup to run the tracking model on a RTSP link to track the passing vehicles.

• Hardware Platform (GPU)
• DeepStream Version 5.0 (docker)
• NVIDIA GPU Driver Version 440.33.01

To do so I’m running "source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8_gpu1.txt " in the docker and what I need is to save tracking results (Including at least frame number, track ID, and Bounding box location) somewhere such as a txt file. I need this to be done in a real time manner, which means as soon as we tracked something save the result in the mentioned file.
To do so I added kitti-track-output-dir=/home/name/Desktop/results.txt in the application group. But I couldn’t get the result there. I also tried to create the same file in the docker container in the same directory which I’m running the file and give that directory in the application group but still I couldn’t get any output in that file.
Would you please help me how I can save these results?

Thanks in advance

Can you set the debug output with “export GST_DEBUG=3” to get more information before you run this case?

You need to set kitti-track-output-dir=/home/name/Desktop but not kitti-track-output-dir=/home/name/Desktop/results.txt. It should be a directory but not a file. You will get many log files in this directory after run.

Thanks for the help. As you said I have tried to give a directory but It doesn’t save the results in that directory. The only way that I could save the results was giving a directory inside the docker container and in that directory for each frame one txt file is created. Is there any mode that I can stack each new tracking result in one txt file (for example save everything in results.txt file) and save it in the local directory?
Also when I try RTSP something strange is happening. If I put the num-sources=1 it gives me this error:
Debug info: gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstEglGlesSink:sink_sub_bin_sink1: There may be a timestamping problem, or this computer is too slow.
But if I put the num-sources=4 it works fine. Same problem happens when I use http link of the same camera. I believe the problem is that the model is faster than the camera (its performance on my machine is more than 120 fps) and when there is no input with that speed it gives me that error. Is there any way that I can overcome this issue?

Thanks again

  1. The tracking information is saved in different files in current implementation. The source codes of deepstream-app are available in /opt/nvidia/deepstream/deepstream-5.0/sources/apps, you can modify the codes to output the information as you like.
  2. As to the resource number problem, if you want to change the source number, you also need to change batch-size with streammux, it has nothing to do with the speed of processing. Please refer to the sample of source1_usb_dec_infer_resnet_int8.txt.