Skip to content

Add detector_eval_interval to train_from_coco - #3436

Merged
deruyter92 merged 1 commit into
DeepLabCut:devfrom
juan-cobos:feat/detector-eval-interval
Aug 31, 2026
Merged

deruyter92 merged 1 commit into
DeepLabCut:devfrom
juan-cobos:feat/detector-eval-interval

Conversation

@juan-cobos

Copy link
Copy Markdown
Contributor

Enable to select eval interval for the detector when running adaption_train inside train_from_coco. Currently, there is an eval_interval param which only applies to the pose estimation head. I patched it by adding a new parameter which allows to change eval interval for the detector too. Alternatively, you could standardize eval_interval for both, but I followed the current approach of "detector_" prefix params.

…t of fixed eval_interval=10 for the detector as in base config

@deruyter92 deruyter92 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good addition to me! This parameter was missing. The implementation is consistent with other parameters.

@deruyter92

Copy link
Copy Markdown
Collaborator

Side note:
We could even consider adding this parameter to train.py and compat.py, but not strictly necessary as the eval interval can also be set via pose_cfg_updates. As the main API is being revisited anyway in #3382 and related PRs, we can keep separate from the current PR.

@juan-cobos

Copy link
Copy Markdown
Contributor Author

@deruyter92 I think I would keep this minimal. The main issue here was the default detector eval_interval=10 is greater than the default number of epochs in adaptation_train (4), resulting in never saving best.
On the side note, I would lean towards keeping it an explicit field on the config rather than adding params to the functions. From what I've inspected, it touches multiple things so I agree it should be kept in mind for the main API.

@C-Achard C-Achard added this to the v3.0.2 milestone Aug 13, 2026
@deruyter92 deruyter92 added the 3.1 label Aug 28, 2026
@deruyter92
deruyter92 changed the base branch from main to dev August 31, 2026 11:57
@deruyter92
deruyter92 merged commit 85fe2c0 into DeepLabCut:dev Aug 31, 2026
11 checks passed
@juan-cobos
juan-cobos deleted the feat/detector-eval-interval branch August 31, 2026 22:42
@deruyter92 deruyter92 added 3.0.2 and removed 3.1 labels Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants