Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) GPU • DeepStream Version 6.2 • JetPack Version (valid for Jetson only) • TensorRT Version • NVIDIA GPU Driver Version (valid for GPU only) • Issue Type( questions, new requirements, bugs) • 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)
Hello, I use the same video source, but internally I create and use one pipeline using 2 sources.
By attaching a preprocess-plugin, I made one source to see the entire frame, and the other to see only a specific area (ROI).
I thought that inference would be better when zoomed in on a specific area, and I’m going to attach the result to another source frame (entire frame).
So, the condition to extract the object to be moved is skipped, and in the end, add and remove are Vector of Pointer data type in obj_meta.
Is it correct way to implement something like below?
could you use a whole media pipeline to describe your use case? we are wondering the plugins’s relationship.
nvprocess plugin supports to do infernece only on ROI, please refer to the sample \opt\nvidia\deepstream\deepstream-6.2\sources\apps\sample_apps\deepstream-preprocess-test
is this your expecting result? there are two pictures, the one shows the original frame, and the other one shows the ROI and the objects in the ROI.
here s a method to remove meta: Cannot remove obj from frame meta
I saw the content that mentioned by link, but it seems to be slightly different.
// For each detected object in the frame.
while (pObjectMetaList)
{
// Check for valid object data
NvDsObjectMeta* pObjectMeta = (NvDsObjectMeta*)(pObjectMetaList->data);
ObjectMetaArray[pObjectMeta->class_id].emplace_back(pObjectMeta);
pObjectMetaList = pObjectMetaList->next;
}
Like the code above, I first put the pointer value for pObjectMeta in ObjectMetaArray. After the logic is executed, the deletion is performed as follows. Can you confirm that there is no awkward part or error enough to delete other obj_meta in this part?
for (auto &x: add) {
nvds_add_obj_meta_to_frame(pSourceZeroFrameMeta, ObjectMetaArray[cls_id], NULL);
nvds_remove_obj_meta_from_frame(pSourceOneFrameMeta, ObjectMetaArray[cls_id]);
}
for (auto &x: remove)
{
nvds_remove_obj_meta_from_frame(pSourceOneFrameMeta, ObjectMetaArray[cls_id]);
}
here is the pipeline: filesrc ! h264parse ! nvv4l2decoder ! tee name=t ! queue ! nvstreammux ! nvdspreprcoess ! nvinfer nvvideoconvert ! nvdsosd ! nveglglessink t. ! nveglglessink, one way is for display, the other way if for inference. is this your expecting result? if no, could you share your media pipeline?
no. I will infer both sources like the config below. And the approximate pipeline is: 2filesrc - nvstreammux ! nvdspreprcoess ! nvinfer! nvtracker! nvvideoconvert! nvdsosd ! nveglglessink
I’m simply trying to select only what I want from the results inferred from roi-params-src-1 and put it (included in a variable called add) into roi-params-src-0
you can use nvds_copy_obj_meta_list to copy object meta from source1 to source0, then use nvds_remove_obj_meta_from_frame to delete object meta from source1.
thanks for the quick and detailed reply
Looking more closely at my situation, if it is necessary to first filter the inference results for source1 under certain conditions, rather than copying all inference results for source1. Eventually, after filtering, the add and remove variable mentioned in the code above are distinguished.
So, combining what you suggested, I can do something like this:
what dose that " std::vector (remove)" mean?
if only want to copy some meta, you can also use nvds_copy_obj_meta, please check \opt\nvidia\deepstream\deepstream-6.2\sources\includes\nvdsmeta.h
no. Thanks to you,
I can plan what I want.However, if the tracker component is not inserted, it can be seen that it is copied accurately, but if iou-tracker is inserted, it seems that 1-2 objects are additionally inserted. I will follow up on this issue later
Below is the resulting image that achieved what I wanted.