Skip to content

add support for mmdet tracking#1404

Closed
rolson24 wants to merge 3 commits intoroboflow:developfrom
rolson24:support_mmdet_trackers
Closed

add support for mmdet tracking#1404
rolson24 wants to merge 3 commits intoroboflow:developfrom
rolson24:support_mmdet_trackers

Conversation

@rolson24
Copy link
Copy Markdown
Contributor

Description

Feature request from #1381

Add support for MMDetection trackers by modifying from_mmdetection to support importing MMDetection TrackDataSamples into supvervision Detections. This also allows for easy integration with the [MASA tracker] (https://github.com/siyuanliii/masa/tree/1d5d42cdd75276c9a8e918639907916f75a761da)

Type of change

  • New feature (non-breaking change which adds functionality)

How has this change been tested, please provide a testcase or example of how you tested the change?

Tested with this colab notebook

Any specific deployment considerations

Right now the pre-trained MMDetection models are performing quite poorly for tracking, and the built in config files need to be fixed, but if you train your own detection model and write your own config, they work. All you have to do is call `tracker = init_track_model(TRACKER_CONFIG, device=device)' and then for each frame call:

track_result = inference_mot(tracker, frame,
                        frame_id=frame_idx,
                        video_len=video_info.total_frames,
                        )

@onuralpszr
Copy link
Copy Markdown
Contributor

@rolson24 is there chance tracker can be empty ? If yes we should do same thing we did for mask as well.

@onuralpszr onuralpszr added enhancement New feature or request API:detection labels Jul 26, 2024
@SkalskiP SkalskiP requested a review from LinasKo July 26, 2024 06:50
@SkalskiP
Copy link
Copy Markdown
Collaborator

@rolson24 I won't be able to test it today. I'll leave it to @LinasKo. He should be back on Monday.

@rolson24
Copy link
Copy Markdown
Contributor Author

@rolson24 is there chance tracker can be empty ? If yes we should do same thing we did for mask as well.

I tested it and it seems like if there are no tracks, then pred_track_instances won't exist, so it will just use the pred_instances which are the detection results. But it probably wouldn't hurt to add it especially if there is a tracker that implements pred_track_instances slightly differently.

@Borda
Copy link
Copy Markdown
Member

Borda commented Apr 16, 2026

Thanks for working on this and the related issue #1381! Since we're deprecating the tracker module in supervision (see #2215) in favor of the new standalone trackers package, tracking integrations like this are best continued there. The from_mmdetection Detections support part may still be relevant separately — feel free to open a focused PR for that if needed. Thanks for your contribution! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants