Skip to content

Add detector_eval_interval to train_from_coco - #3436

Open
juan-cobos wants to merge 1 commit into
DeepLabCut:mainfrom
juan-cobos:feat/detector-eval-interval
Open

Add detector_eval_interval to train_from_coco #3436
juan-cobos wants to merge 1 commit into
DeepLabCut:mainfrom
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants