-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Cleanup frames #2944
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
base: main
Are you sure you want to change the base?
Cleanup frames #2944
Conversation
|
thanks @gsaaad ! Could I ask you to give me the output of the test script (see contributor guide💜), and if you have a short demo video or screenshots, that would be ideal for to check, also for documentation :D |
|
Please check the following for an output of the test script, followed by a quick walkthrough of the remove-frames functionality built into DLC's environment DLC_Walkthrough.mp4 |
|
I've uploaded a text file of the testscript output and included a quick walkthrough of the remove_frames function in a video format. Please let me know if you need anything else. |
|
Thank you! Looks like a nice visual way to do some clean up post frame extraction! Just to clarify, in general if a user skips a frame it is not used in DLC for training, so they can stay in the directory without any issue. If a frame gets labeled, but then deleted for any reason, we have some helper functions: https://deeplabcut.github.io/DeepLabCut/docs/HelperFunctions.html such as: |
|
Let me know what you require to proceed |
|
Thanks for the contribution -- @maximpavliv is on vacation. We'll discuss it in the next dev meeting when he is back (early May). |
|
Hi @gsaaad Thanks for opening this Pull Request! I noticed that one of the commits applies black formatting to many files unrelated to your changes. While we appreciate clean, formatted code, we try to keep unrelated formatting changes separate from functional changes so it's easier to review and track changes over time. Could you please remove that formatting commit from this PR? Instead, if you could apply black only to the files you modified - that would be perfect! Let me know if you need help with the git steps — happy to guide you! |
…nize frames directly within the dlc environment.
…owing users to remove any frames that are miscallanous or not needed for organizing frames
e40690c to
b6094e6
Compare
|
Undid the Black formatting, focusing only on the changed files now. |
- renamed Image_grid_viewer.py -> image_grid_viewer.py (lowercase) - ran black on image_grid_viewer and label_frames
lamda argument may be changed when function is called. Replacing lambdas with closure functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is useful. Thanks for the contribution!
The code looks fine! added a few minor changes:
- Only applied formatting to the changed files (and renamed to lowercase filename)
- Added error handling (e.g. when files cannot be read)
- Replaced lambdas with closure functions
Required changes:
One of the major things that need to be considered is how to handle removed frames. Just removing them on disk might not be a good idea. e.g. after deletion, associated annotation files (.h5, .pickle) aren't handled.
|
(@deruyter92 Another small thing would be that we may want to move the |
|
Yes, it was added in that section as part of the efficient workflow: |
This contribution introduces a new feature within DeepLabCut that allows users to remove or clean up frames directly in the DLC environment. Specifically:
GUI Grid Image Viewer: A modal window now appears, displaying frames in a grid so that users can visually inspect each image.
Frame Deletion within DLC: Users can select and delete frames from a chosen dataset, enabling easier refinement of curated frames without having to leave the DLC interface.
Smoother workflow, from extracting frames -> cleaning up frames -> labelling frames.