cfotache / pytorch_objectdetecttrack

Object detection in images, and tracking across video frames
483 stars 253 forks source link

Tracking ID changes between frames even when objects remain the same #36

Open jamesheatonrdm opened 1 year ago

jamesheatonrdm commented 1 year ago

I have noticed that when tracking people, if one person walks in front of another there are a couple of frames where the person behind is not detected, and then detected again when the person in front has moved away. However, when this happens the ID of the person has changed. Is there any way to resolve this issue? I suppose not in this instance as there would be no reliable way to tell if this is a new person or not.

I have also noticed it occur on consecutive frames on the same person where one frame has not made a correct detection. In this case would it just be best to lower the detection threshold?

Thanks in advance

jamesheatonrdm commented 1 year ago

For those with the same problem. I have found that increasing the max_age argument into the Sort() constructor overcomes the issue with missing occassional detections between frames. However when it comes to occlusion, increasing this means that the ID can 'swap' from one object to another as it becomes unoccluded again. The original author noted that this method does not handle occlusion, so something else needs to be done to handle this.