Skip to content

Fix CTD empty conditions edge case#3076

Merged
AlexEMG merged 46 commits intomainfrom
maxim/cond_kpts_bug
Sep 10, 2025
Merged

Fix CTD empty conditions edge case#3076
AlexEMG merged 46 commits intomainfrom
maxim/cond_kpts_bug

Conversation

@maximpavliv
Copy link
Copy Markdown
Contributor

@maximpavliv maximpavliv commented Aug 19, 2025

This Pull Request fixes the edge case in the CTD pipeline when the conditions passed to the CTDInferenceRunner.predict() method are empty. This typically can happen when the FilterLowConfidencePoses processing stage filters out all poses.
Thus, this Pull Request solves #3001.

The following changes were introduced to fix the edge case:

  • Additionally, the TopDownCrop processing stage has been modified to always output images of the cropped shape, even in the case of an empty context["bboxes"] list. The first dimension length of the returned images (corresponding to the number of bounding boxes) obviously remains 0 in that case.

The frames indexes start at 0 and go up to (n_frames - 1)
@maximpavliv maximpavliv added DLC3.0🔥 CTD Contidional Top-Down labels Aug 19, 2025
@maximpavliv maximpavliv requested a review from AlexEMG August 26, 2025 11:05
@arashsm79
Copy link
Copy Markdown
Contributor

arashsm79 commented Sep 10, 2025

Thanks for this.
I ran these changes on the trimouse dataset with the following variants:

  • ctd_prenet_hrnet_*
  • ctd_coam_*

and everything worked as expected.
LGTM.

@AlexEMG AlexEMG merged commit 382cdc7 into main Sep 10, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CTD Contidional Top-Down DLC3.0🔥

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants