DeepLabCut / napari-deeplabcut

a napari plugin for labeling and refining keypoint data within DeepLabCut projects
GNU Lesser General Public License v3.0
52 stars 22 forks source link

Keypoint Identity Mismatch #73

Closed stofe95 closed 1 year ago

stofe95 commented 1 year ago

It seems the labelling GUI is sporadically switching the identity of keypoints ex: DLC Napari issue In the example, the 'Keypoint selection' indicates the orange point is "tailbase", whereas the 'Color scheme reference' indicates that orange is "back left". I had labelled 9 other folders where the 'Keypoint selection' matched the 'Color scheme reference', but then for this folder it got mixed up. When I exited (without saving) and reopened the folder, the color scheme and keypoint selection were in agreement again.

stofe95 commented 1 year ago

In addition, I managed to label the frames and train, but then went to extract outliers and now I also have this behaviour: image It seems that some frames have two sets of labels (the small dots are machine labels, the large dots are in the collected data layer). I thought this might happen if outlier extraction pulls out a frame that was also labelled manually, but I don't think this frame had been labelled manually. The collected data labels also show the wrong colours as per my original issue.

jeylau commented 1 year ago

Hi @stofe95, could you tell me what version of napari-deeplabcut is installed on your machine?

stofe95 commented 1 year ago

Hi I had this issue on two machines, using 0.1.1 and 0.1.2

stofe95 commented 1 year ago

As for my second point, reading the documentation seems to suggest that in cases where I see two sets of points, I should hide/trash the machine labels. So that is working as intended (though the identities of the collected data labels is still mismatched). Is that right?

jeylau commented 1 year ago

Hiding the machine labels is the correct thing to do; I'll look at the mismatch between the label color and the color scheme reference though, this looks like a bug.

jeylau commented 1 year ago

@stofe95, I could not reproduce the color bug. Does this happen while labeling or upon loading some data?

stofe95 commented 1 year ago

I think that it happens both when you are freshly labelling new data, if you are labelling keypoints A, B, C, if on the first frame of labelling keypoint A isn't in the frame and so you select keypoint B and label it, then the colours get mixed up. This I managed to get around by exiting without saving, then reloading the data and even if the keypoint was not visible, placing the label for all keypoints on the first frame, but the ones that weren't visible. It then also happens after extracting outlier frames when you load the data and is immediately there and I don't know how to fix that.

jeylau commented 1 year ago

@stofe95, what you described was actually fixed recently. Try to update napari-deeplabcut to use the very latest version (still unpublished to pypi) with pip install git+https://github.com/DeepLabCut/napari-deeplabcut.git: this will install the latest fixes 😊