**• Hardware Platform (Jetson / GPU) : dGPU
**• DeepStream Version : 6.0.1
**• JetPack Version (valid for Jetson only) : None
**• TensorRT Version : 8.0.1
**• NVIDIA GPU Driver Version (valid for GPU only) : 495.29.05
**• 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) : None
**• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description) : None
background
I am working on the emotion net app which uses following pipeline:
pgie(nvinfer, face) → sgie1(nvinfer, landmark recognition) → sgie2(nvdsvideotemplate, emotionNet which uses sgie1 result as input)
I am replacing nvinfer with inferserver+IInferCustomProcessor
landmark metadata (which is used by sgie2) is attached by sgie1’s IInferCustomProcessor::inferenceDone function.
problem
The problem is,
during the processing of sgie2, the metadata that should be inserted by sgie1 cannot be found.
It seems that the sgie2 process is running before the sgie1 metadata-attaching is completed.
Everything works fine and emotion-result is obtained If I insert std::this_thread::sleep_for(std::chrono::seconds(1)) in the sgie2 processing-loop (before accessing to obj_meta->obj_user_meta_list).
But this type of hack is unacceptable for the real-world applications.
How can I address this issue?
what I tried
disabling tracking did not help.
setting async_mode: false of sgie1 did not help (nvinferserver document link)
1 about “I am replacing nvinfer with inferserver+IInferCustomProcessor”, do you means all three nvinfer were replaced with replacing nvinfer with inferserver+IInferCustomProcessor"? please provide your media pipeline?
2 about “during the processing of sgie2, the metadata that should be inserted by sgie1 cannot be found.”, if there is no face and landmark, there will be no landmark meta.
3 about “It seems that the sgie2 process is running before the sgie1 metadata-attaching is completed.”, there is only one async mode sgie , that is sgie + tracker, your case is not this mode, so landmark meta will come with buffer if found face and landmark. please refer to Gst-nvinferserver — DeepStream 6.1.1 Release documentation
I used a movie looping a single image .
the image has 2 faces.
I also confirmed faces are detected by the app.
3
Everything works fine and emotion-result is obtained If I insert std::this_thread::sleep_for(std::chrono::seconds(1)) in the sgie2 processing-loop (before accessing to obj_meta->obj_user_meta_list).
The results of the above experiment suggest that it is a matter of timing.
Could you confirm that the gstbuffer is pushed AFTER IInferCustomProcessor::inferenceDone() completed?
PS:
In nvdsvideotemplate, I implemented a sleep loop so that it waits until the landmark metadata is obtained, and it works.
However, the sleep loop is not an ideal solution and I would like to solve this problem if possible.
1 did you set interval in pgie and sgie? it will skip some frames instead of inference.
2 about " nsert std::this_thread::sleep_for(std::chrono::seconds(1)) in the sgie2 processing-loop (before accessing to obj_meta->obj_user_meta_list).", where did you add that sleep? which function?
1 About your “disabling tracking did not help.”, did your pipeline have tracker? where is position?
2 Only not in async mode, the gstbuffer is pushed AFTER IInferCustomProcessor::inferenceDone() completed.
please provide the full terminal log, thanks, for example: execute export GST_DEBUG=4, then execute: app >1.log 2>1.log
1 set async_mode = true, save the log.
2 set async_mode = false, save the log.
I’m closing this topic due to there is no update from you for a period, assuming this issue was resolved.
If still need the support, please open a new topic. Thanks