NVDS_OBJ_ATTR_STORAGE (savant/deepstream/utils/attribute.py:12) is a process-global dict keyed by object UID, holding AttributeMeta lists that shadow DeepStream object metas. UIDs come from a monotonic counter (savant/deepstream/utils/object.py:24) and are never reused.
Entries are inserted by nvds_add_attr_meta_to_obj (attribute.py:35-38) and nvds_replace_obj_attr_meta_list (attribute.py:119-124), reached from buffer_processor.py:229, nvinfer/processor.py:509, nvinfer/processor.py:585, meta/object.py:202, meta/object.py:165.
The outer key is deleted only by nvds_remove_obj_attrs (attribute.py:157), called from two places: NvDsFrameMeta.remove_obj_meta (meta/frame.py:242) and NvDsPipeline._update_meta_for_single_frame (pipeline.py:1001). The latter iterates only objects still present in nvds_frame_meta.obj_meta_list at the demuxer sink peer pad probe (pipeline.py:1218).
Any object whose NvDsObjectMeta leaves the frame's object list between attribute attachment and that probe therefore leaves a permanent entry — e.g. objects dropped by nvtracker during the track probation period, which happens in C with no Python notification.
Contributing details:
- nvds_remove_obj_attr_meta_list (attribute.py:143) removes only the (element_name, attr_name) key and leaves the outer uid dict, empty or not.
- There is no size bound, TTL, per-source scoping, cleanup on EOS (on_last_pad_eos / _remove_output_elements do not touch the dict), or cleanup on shutdown.
- The dict is global and unlocked, shared across all sources and batches. #
NVDS_OBJ_ATTR_STORAGE (savant/deepstream/utils/attribute.py:12) is a process-global dict keyed by object UID, holding AttributeMeta lists that shadow DeepStream object metas. UIDs come from a monotonic counter (savant/deepstream/utils/object.py:24) and are never reused.
Entries are inserted by nvds_add_attr_meta_to_obj (attribute.py:35-38) and nvds_replace_obj_attr_meta_list (attribute.py:119-124), reached from buffer_processor.py:229, nvinfer/processor.py:509, nvinfer/processor.py:585, meta/object.py:202, meta/object.py:165.
The outer key is deleted only by nvds_remove_obj_attrs (attribute.py:157), called from two places: NvDsFrameMeta.remove_obj_meta (meta/frame.py:242) and NvDsPipeline._update_meta_for_single_frame (pipeline.py:1001). The latter iterates only objects still present in nvds_frame_meta.obj_meta_list at the demuxer sink peer pad probe (pipeline.py:1218).
Any object whose NvDsObjectMeta leaves the frame's object list between attribute attachment and that probe therefore leaves a permanent entry — e.g. objects dropped by nvtracker during the track probation period, which happens in C with no Python notification.
Contributing details: