abewley / sort

Simple, online, and realtime tracking of multiple objects in a video sequence.
GNU General Public License v3.0
3.92k stars 1.09k forks source link

Multiple object IDs for same object #82

Open sbanerj2 opened 4 years ago

sbanerj2 commented 4 years ago
Screen Shot 2019-12-23 at 15 09 42 Screen Shot 2019-12-23 at 15 10 00 Screen Shot 2019-12-23 at 15 10 16

Hi, I am trying to use SORT for tracking a fishes across frames. For detection I am using YoloV3. The problem is when I am trying to track a same fish across frames, SORT returns multiple IDs for the same object. Is there a way to solve this? The attached files show the problem. There is only a single fish in this tank. However, the IDs are different for different frames. I didn't take consecutive frames' screenshot .

vistar-terry commented 4 years ago

Hello, SORT uses the Hungarian algorithm to improve efficiency. In this way, if consecutive frames do not achieve the IOU match between the predicted position of the tracked target and the detection frame, the target is considered to disappear, the target is deleted, and then the detection and tracking are re-run, eventually resulting in frequent ID switching. It is recommended to use Deep SORT. I'm also doing fish tracking and glad to communicate with you.

varma88 commented 4 years ago

Hi Holsey or abewley, Actually this is not exactly similar to the problem mentioned above. But I am also working on fish tracking and was trying to integrate SORT with detections of fish that I got. So I have saved the detections from Faster-RCNN into a an array called detections3 in the format of [ frame_num, -1, xmin, ymin, width, height, conf_score, -1, -1, -1 ] and updated into the tracker. But, I am having some weird problems that the output bounding boxes are really large and keep shrinking until they disappear soon. Could you please have a look at my code and tell me what I am doing wrong? Sorry, if the code is a bit unorganized, I am a little new to python. I would be grateful if you could point me in the right direction.
Screenshot (2) Screenshot (3) Screenshot (4) Screenshot (5) Screenshot (6) Screenshot (7) Screenshot (8)