add new way to visualize low-likelihood pose estimates#2158
add new way to visualize low-likelihood pose estimates#2158ludovicbellier wants to merge 5 commits intoDeepLabCut:mainfrom
Conversation
|
HI @ludovicbellier super idea! thanks very much -- I can see where this becomes handy in several ways; @jeylau want to check for maDLC compatibility? otherwise, lgtm also cc @AlexEMG - fine for you? We also need to consider backwards compatibility with config file |
|
This is cool! An alternative would have been to display low-confidence keypoints as unfilled circles (as is done with when viewing outlier keypoints during refinement I think), but I do not see an advantage for doing so. |
jeylau
left a comment
There was a problem hiding this comment.
Remove duplicate argument
| pcutoff=0.6, | ||
| skeleton=[], | ||
| skeleton_color="white", | ||
| dotsize=8, |
There was a problem hiding this comment.
This one should be removed too (causes the test failures)
|
Thanks @MMathisLab and @jeylau for your replies, and glad you like it! Agreed on alternative ways to plot this: I just went for color change as this was the simplest to implement (as labels are plotted using sklearn.draw.disk), but using other markers or mapping dotsize to likelihood (e.g., half the size when below likelihood threshold) would also be efficient at visually conveying this information! |
remove duplicated `dotsize` input argument in function `create_labeled_video`
|
An alternative implementation of this same feature (alpha represents likelihood of keypoints) was added with pull request #2319. |
Hi team DLC!
During a recent project (I work at Inscopix, by the way =)) a colleague was wondering where low-likelihood labels would be placed if we could see them, which made me realize I couldn't find any existing way to visualize that: by default labels with likelihood <= pcutoff are not plotted when creating a labelled video; we can sure drop pcutoff to 0 but then all frames are labeled and there is no way to differentiate between above and below pcutoff labels.
Here is a simple PR keeping the default mode ("hide"), so it won't go in the way of existing scripts, and adding a "darken" mode when label colors are darkened when body part likelihood gets at or below pcutoff.
Also added a way to override pcutoff and dotsize values from config.yaml directly in the function call, so that these parameters could be changed more conveniently and, more importantly, by users without writing access to config.yaml but still wanting to use the related trained model.
Looking forward to discussing these features with you, and again, thank you for putting out there such a great package!
Have a beautiful weekend,
Ludovic