Hi all,

I’m trying to get some analysis after DLC tracking of a mouse and wondered if anybody has ideas on how to get it. We have the info about the 4 limbs, the body, the nose and base of the tail. And here is what we’re trying to get and if possible in Python:

• head movement: I thought about the angle between the vectors head-body and body-base of tail. Or maybe you have better ideas ?
• curvature of the movement of the mouse: I guess I should use the body for that.

If you have any feedback about that and/or any python librairies for it, that would be welcome.

Hi,

By head movement you mean head direction? You can calculate that with the nose position with respect to the position of the front and rear paws. Regarding the curvature of the movement, I am not sure what you mean. Maybe trajectories? you can calculate the centroid of the limbs for that?

Once you have the coordinates of all the points you are tracking, you dont need any python libraries, you just need to do simple algebra operations?

Good luck!

Hi,

How would you go about that ? You would check the distance to each paws and check the lowest one ?

I have the body so I guess I can use that as the centroids no ? And then calculate the trajectory and get the curvature somehow.

Thanks again !

For the head direction you can take the segment P that crosses the two paws (points) and calculate the angle between P and the segment N which connects the nose to the middle of P.

For the trajectories (still not sure what you mean by curvature) you can just concatenate the body centroids…

also check out some user-supplied analysis tools for post-deeplabcut .h5 files here: https://github.com/AlexEMG/DLCutils

there are also a lot of users that post code on github too, if you search “deeplabcut” you’ll find lots of repos where people have placed code

1 Like