Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DeepLabCut project support #25

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

quantumdot
Copy link
Contributor

Description

Add support for DeepLabCut projects (single- and multi-animal projects)

  • support for reading DLC annotations and conversion to Labels instance via sleap_io.io.dlc.load_dlc() and sleap_io.io.dlc.dlc_to_labels().
  • support conversion of Labels to DLC annotations via sleap_io.io.dlc.write_dlc() and sleap_io.io.dlc.labels_to_dlc()
  • support determining if the DLC project is a single-animal or a multi-animal style project via sleap_io.io.dlc.is_multianimal()
  • support loading Skeleton data from a DLC project via sleap_io.io.dlc.load_skeletons()
  • known issues:
    • Test coverage is missing some lines which are single-animal specific. Need better test data across different project types.
    • DLC does not include edges in their skeleton definitions, so a skeleton with only nodes and no edges is constructed.
    • Video data may not be properly implemented.
      • I think there is no way for us to know a video or image shape without us first loading it.
      • We currently only set the frame index for an annotation to zero. probably we can parse it from the filename?

Types of changes

  • Bugfix
  • New feature
  • Refactor / Code style update (no logical changes)
  • Build / CI changes
  • Documentation Update
  • Other (explain)

Does this address any currently open issues?

[list open issues here]

Outside contributors checklist

  • Review the guidelines for contributing to this repository
  • Add tests that prove your fix is effective or that your feature works
  • Add necessary documentation (if appropriate)

Thank you for contributing to SLEAP-IO!

❤️

@codecov
Copy link

codecov bot commented Oct 26, 2022

Codecov Report

Merging #25 (7e684de) into main (c55f64e) will decrease coverage by 4.53%.
The diff coverage is 70.83%.

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
- Coverage   98.64%   94.11%   -4.54%     
==========================================
  Files          11       12       +1     
  Lines         740      884     +144     
==========================================
+ Hits          730      832     +102     
- Misses         10       52      +42     
Impacted Files Coverage Δ
sleap_io/io/dlc.py 70.83% <70.83%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@quantumdot
Copy link
Contributor Author

CI / Tests are failing on python==3.7 it seems due to pickle protocol version mismatch. See related: DeepLabCut/DLCutils#19. Do you have a DLC dataset which works across the python version 3.8 boundary, where pickle version changed from 4 -> 5?

CI / Tests fail on windows python==3.9 due to an import error for pytables. I don't understand why. Some sort of DLL load error .....

@quantumdot quantumdot marked this pull request as ready for review October 26, 2022 20:01
@talmo talmo mentioned this pull request Nov 10, 2022
9 tasks
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