How to have constant or persistent object id even if it moves or is covered for few seconds

Hello All,
I am using a YOLOv8 code where I am detecting some object. What I have noticed is that the object ID changes frequently on the same object. I want it to stay persistent through the project. In my case the object gets covered or is moved.

Can someone guide me what am I doing wrong? or what should I change?

Regards.

detector.py (13.3 KB)

Hi @tmehta,

As you have noticed, our tracking algorithm does not save any features of tracked objects to be able to recover from occlusions.

I would recommend looking into deep learning solutions such as Deep SORT or others that allow to track object features and be more robust to occlusions:

Hello @mattrouss,
Thank you for the idea. I have tried using deep sort. The results are not 100% stable but works. only if i cover my object the ID changes. I dont know if thats normal or not.

I have another doubt. I am using the following code, I am getting the window of point cloud and depth map open with ZED object detection. Unfortunately I am not seeing any output in those window. So I cant understand if the Point cloud and Depth map is working or not. Can you help me improve or tell me what mistake i am making?

Regards.

detector_v9.py (13.7 KB)