-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Swap button added to the track refinement GUI #2680
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
Conversation
|
Hi @JulianAlvarezdeGiorgi, thanks a lot for your PR, I'm reviewing it! The UI part looks good so far. |
|
Hello @jeylau , I created this function because I had originally created a dataset with 14 body parts. Later I decided to make another project, where I kept the body parts of the previous project (these 14) but added new body parts. As I already had many frames with the 14 labels, I wanted to be able to transfer them to the new project, and only have to label the new body parts. For this, I created a new project, with all the body parts I was interested in (old and new), I kept the “labeled-data” folder of the old project, and I used the I didn't manage to do this by adding the new body parts to the config file, but I may have skipped a step. |
|
I understand better. Normally, after adding new body parts to your config and opening the labeling GUI, you should automatically be warned that new body parts were detected, and asked whether or not you want to display all of them or only the new ones while labeling. |
|
Is this true with DLC 2.3.9? |
|
Yes, it's a feature we had even before the napari-deeplabcut labeling plugin. I tested it this morning again. Maybe try |
jeylau
left a comment
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 code looks good, @JulianAlvarezdeGiorgi, thanks a lot! I'm not sure there is a need for adapt_labeled_data_to_new_project, but I'll leave it up to @MMathisLab to decide.
Before merging, could you please run black to automatically correct a couple of formatting inconsistencies?
|
If useful, seems okay to me! |
|
Perfect, I'll try updating deeplabcut then. I've just run the black formatting, however, it changed a lot of files that I didn't even touch, should I have run it with a specific flag/configuration? Thank you very much for your help and your willingness to collaborate ! |
A new Swap identities button was added to the track refinement GUI. Two text boxes were added to choose the animal identities you want to swap, and some options to select the frames to swap:
Also, a function called
adapt_labeled_data_to_new_projectwas added, it allows you to adapt up to some point old dataset, for example, if you have an old dataset with some body parts and now you want to add body parts to the project, this function keeps the old points while allowing the new ones to be labeled. It was useful for me.