Skip to content

Handle DLC uniquebodyparts in pose loading#994

Draft
niksirbi wants to merge 2 commits into
mainfrom
handle-unique-keypoints
Draft

Handle DLC uniquebodyparts in pose loading#994
niksirbi wants to merge 2 commits into
mainfrom
handle-unique-keypoints

Conversation

@niksirbi
Copy link
Copy Markdown
Member

@niksirbi niksirbi commented May 26, 2026

Summary

  • Adds a design document (design/issue-977-uniquebodyparts.md) analysing the silent data corruption bug when loading DLC files with uniquebodyparts, and proposing solutions
  • Adds a test fixture (dlc_csv_file_with_uniquebodyparts) that reproduces the bug with a minimal DLC-style CSV
  • Adds design/*.md to check-manifest ignore list for now (we can decide to either git track such design docs, or delete them before merging)

Note

This is a design-first PR, so no fix yet.

Following @sfmig's suggestion, we're experimenting with a new way of collectively using AI as a team, i.e. reviewing design docs co-authored by AI, before moving to actual implementation.

The design doc was generated by CLAUDE, so its claims should not be immediately taken at face value.
Please review the design doc and comment on the proposed approach before implementation begins.

Context

See #977.

When a DLC multi-animal project uses uniquebodyparts, the output file has a ragged multi-index (not every individual has every bodypart). Our from_dlc_style_df does a blind reshape assuming a full rectangular grid, which silently corrupts data when the element counts happen to divide evenly (frame count halved, values scrambled across individuals/keypoints).

The design doc covers:

  • How the corruption works
  • Evidence that this is DLC-specific (according to CLAUDE, no other supported software can produce ragged keypoints)
  • Three solution options with pros/cons
  • Recommendation for Option 2 (kwarg to select bodypart type)

niksirbi and others added 2 commits May 26, 2026 12:07
Documents the silent data corruption bug when loading DLC files
with uniquebodyparts, investigates whether the issue affects other
source software (it does not), and proposes three solution options
with a recommendation for the kwarg-based approach (Option 2).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant