neuroinformatics-unit / movement

Python tools for analysing body movements across space and time
http://movement.neuroinformatics.dev
BSD 3-Clause "New" or "Revised" License
96 stars 8 forks source link

Detect outliers using a heuristic about the temporal smoothness of motion #151

Open niksirbi opened 6 months ago

Lauraschwarz commented 3 months ago

This would help a lot with understanding and exploring how well ones model actually works. Being able to explore the data and seeing how many of the nodes jump around a lot (e.g. from mouse1 to mouse2) can help compare the models own internal metrics of performance with its actual performance. Additionally to using velocity of single keypoints the amount of NANs (not detected keypoints) in a given prediction output file could also help. (Keypoint moseq has sth like this implemented here: https://keypoint-moseq.readthedocs.io/en/latest/FAQs.html#high-proportion-of-nans )

niksirbi commented 3 months ago

Thanks @Lauraschwarz , this is helpful!

We plan to use several heuristics as quality-control metrics for the predictions (and to detect outliers):

We've borrowed these ideas from LightningPose, and they're described here. We haven't implemented these yet, but hopefully we'll start working on them soon.

Regarding the reporting of NaN values, we already have a function for that. I'd encourage you to read the two example below, to see this feature in action.