fix(tune): accept MOT-layout ground truth in Tuner validation - #563
Draft
AlexBodner wants to merge 1 commit into
Draft
fix(tune): accept MOT-layout ground truth in Tuner validation#563AlexBodner wants to merge 1 commit into
AlexBodner wants to merge 1 commit into
Conversation
`Tuner` passes `gt_dir` straight to `evaluate_mot_sequences`, which
auto-detects both the flat `{seq}.txt` layout and the `{seq}/gt/gt.txt`
layout that MOTChallenge, DanceTrack and SportsMOT ship in. Eager
validation only looked for the flat layout, so a downloaded dataset was
rejected at construction with "Missing ground-truth files" even though
evaluation would have read it fine. The workaround was to flatten the
tree by hand.
Validation now detects the layout with the same helper evaluation uses, so
the two cannot drift apart, and missing files are reported at the path
actually searched.
`_get_paths` is split so the ground-truth rule lives in one place rather
than being restated in the tuner.
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns Tuner ground-truth validation with evaluation’s flat and MOT directory layouts.
Changes:
- Extracts shared ground-truth path resolution.
- Uses format detection during tuner validation.
- Adds regression tests for both layouts and missing-file paths.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/trackers/eval/evaluate.py |
Extracts shared ground-truth path helper. |
src/trackers/tune/tuner.py |
Validates ground truth using detected layout. |
tests/tune/test_tuner.py |
Adds layout validation tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| that would evaluate fine. | ||
| """ | ||
|
|
||
| def test_accepts_mot_layout_ground_truth(self, tmp_path: Path) -> None: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Tunerpassesgt_dirstraight toevaluate_mot_sequences, which auto-detects both the flat{seq}.txtlayout and the{seq}/gt/gt.txtlayout that MOTChallenge, DanceTrack and SportsMOT ship in.Eager validation only looked for the flat layout, so a freshly downloaded dataset was rejected at construction with
Missing ground-truth fileseven though evaluation would have read it fine. The workaround was flattening the tree by hand.Fix
Validation detects the layout with the same helper evaluation uses, so the two cannot drift apart, and missing files are reported at the path actually searched.
_get_pathsis split so the ground-truth path rule lives in one place instead of being restated in the tuner.Tests
FileNotFoundErrorbefore the change).tests/tune,tests/evalandtests/iopass at 171.Notes
Sequence discovery already reads the detections directory, which is always flat, so only ground-truth resolution needed changing.
These tests were skipping locally because
optuna(thetuneextra) was not installed — worth confirming CI installs it, otherwise this whole file is silently skipped.Made with Cursor