wmuron / motpy

Library for tracking-by-detection multi object tracking implemented in python
MIT License
510 stars 60 forks source link

Should matching follows after tracker.predict()? #19

Closed IreneLian closed 3 years ago

IreneLian commented 3 years ago
        # filter out empty detections
        detections = [det for det in detections if det.box is not None]

        logger.debug('step with %d detections' % len(detections))
        matches = self.matching_fn(self.trackers, detections)
        logger.debug('matched %d pairs' % len(matches))

        # all trackers: predict
        for t in self.trackers:
            t.predict()

Now it precedes prediction which seems conflict with MOT pipeline:

image

wmuron commented 3 years ago

It sounds like a reasonable adjustment to the overall algorithm, although I am not sure to what extent inverting these two steps affects the final performance. Did you run any experiments that might quantify that?

IreneLian commented 3 years ago

I got some bad cases on fast moving objects. It highly overlaps with predicted bounding box but has zero IOU with previous frame bounding box. Matching before predict() causes id switch in this situation.

wmuron commented 3 years ago

I did some tests and there seems to be a minor improvement, so I merged the fix to master.