-
Notifications
You must be signed in to change notification settings - Fork 283
Open
Labels
cliLI commands and terminal interfaceLI commands and terminal interfacehelp wantedExtra attention is neededExtra attention is needed
Description
Description
Add a trackers tune CLI subcommand that runs hyperparameter optimization for any registered tracker. The tuner takes pre-computed detections (MOT format) and ground-truth annotations, repeatedly instantiates the tracker with different parameter configurations proposed by Optuna, evaluates each configuration using the existing evaluate_mot_sequences engine, and reports the best-found parameters.
# Basic usage — tune ByteTrack on MOT17 with 100 trials
trackers tune \
--tracker bytetrack \
--gt-dir path/to/gt/ \
--detections-dir path/to/detections/ \
--n-trials 100
# Pick objective metric and metric families to compute
trackers tune \
--tracker sort \
--gt-dir path/to/gt/ \
--detections-dir path/to/detections/ \
--metrics HOTA MOTA IDF1 \
--objective HOTA \
--n-trials 200Search space definition
Each tracker declares a search_space class variable alongside its __init__ parameters.
class ByteTrackTracker(BaseTracker):
search_space: ClassVar[dict[str, dict]] = {
"lost_track_buffer": {"type": "randint", "range": [10, 61]},
"track_activation_threshold": {"type": "uniform", "range": [0.5, 0.9]},
"minimum_iou_threshold": {"type": "uniform", "range": [0.05, 0.5]},
"high_conf_det_threshold": {"type": "uniform", "range": [0.3, 0.8]},
}Tasks
- Define
search_space: ClassVar[dict[str, dict]]onSORTTrackerandByteTrackTrackerwith sensible ranges for each tunable parameter. Validate that every key insearch_spacematches a parameter name in__init__. - Implement a
Tunerclass that wraps an Optuna study: convertssearch_spaceto Optuna distributions, runs trials calling the objective function. - Register the
tunesubcommand intrackers/scripts/__main__.pywith arguments:--tracker,--gt-dir,--detections-dir,--metrics,--objective,--n-trials,--output,--resume. - Add
optunaas an optional dependency undertrackers[tune]inpyproject.toml. - Document usage: expected input format for detections-dir and gt-dir, how to generate detections with
trackers track, example commands, and the meaning of output files.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cliLI commands and terminal interfaceLI commands and terminal interfacehelp wantedExtra attention is neededExtra attention is needed