Skip to content

Conversation

@n-poulsen
Copy link
Contributor

Adds an option to select the pcutoff for each bodypart individually for models trained with the PyTorch engine.

The pcutoff can be set as a float, a list or a dict. Examples for a project where there are 5 bodyparts: ["snout", "left_ear", "right_ear", "mid", "tail_base"].

Example 1: Using the same pcutoff for all bodyparts

deeplabcut.evaluate_network(config, ..., pcutoff=0.6),

Example 2: Using a list to set the pcutoff

deeplabcut.evaluate_network(config, ..., pcutoff=[0.6, 0.8, 0.8, 0.6, 0.6]),

Example 3: Changing the pcutoff for the ears to 0.8, and otherwise keeping the same values as set in the project config.yaml:

deeplabcut.evaluate_network(config, ..., pcutoff={"left_ear": 0.8, "right_ear": 0.8})

Tests were added for evaluation.

@n-poulsen n-poulsen added enhancement New feature or request DLC3.0🔥 labels Feb 18, 2025
@MMathisLab
Copy link
Member

Awesome! this is a super useful feature for videos and evaluation, etc! Can we add into the DOC PR the changes too?

@MMathisLab MMathisLab merged commit cfbaaf6 into pytorch_dlc Feb 21, 2025
1 check passed
@n-poulsen n-poulsen deleted the niels/variable_pcutoff branch February 24, 2025 15:23
@maximpavliv maximpavliv changed the title Set pcutoff per-bodypart with the when evaluating PyTorch models Set pcutoff per-bodypart when evaluating PyTorch models May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DLC3.0🔥 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants