lambdaloop / anipose

🐜🐀🐒🚶 A toolkit for robust markerless 3D pose estimation
http://anipose.org
BSD 2-Clause "Simplified" License
347 stars 65 forks source link

label-3d video upside down #115

Open RiSpa5 opened 10 months ago

RiSpa5 commented 10 months ago

Hi! I'm a rather new user of DLC and Anipose and in the past months I've been working on multicamera 3D, managing to successfully reconstruct all my keypoints in a pretty stable 3D video. However, the video I obtain from label-3d command happens to be flipped upside down and I was wondering if anyone and in particular @lambdaloop could help me understand if this problem might be due to the camera setup itself or to an unproper calibration. The camera setup is composed of 8 cameras disposed at two different heights in a "surround" fashion. Due to the way they have been mounted on the support, the video I obtain from the lower cameras result to be flipped 90 or 180 degrees with respect to those I obtain from the higher cameras. Conserning camera calibration, I showed a ChAruCo board to all 8 cameras and also moved it in way that smaller groups of cameras could have a better view (e.g. just the higher ones, or just the ones from one side). This way I managed to get what appeared to be a pretty good amount of board detections and a small reprojection error. These are the two main possible reasons I came up with to explain the flipped label-3d video, but of course there might be other ones I'm not considering. I can provide any additional information if needed. Any help or opinion is deeply appreciated!

lambdaloop commented 9 months ago

In your config.toml, are you specifying a coordinate system for your 3D points?

You can see some documentation for that here: https://anipose.readthedocs.io/en/latest/start3d.html#configuring-the-standardized-3d-pose

RiSpa5 commented 9 months ago

Hi @lambdaloop and thank you for answering me! Currently I'm not specifying any coordinates system since all the points I track are on a freely moving monkey and, as far as I understood from issue #5 , it is not recommended to use bodyparts as reference points. Do you suggest adding more static points in DeepLabCut to use as reference in order to solve the problem?

lambdaloop commented 9 months ago

Hi @RiSpa5 , that's a pretty old issue. If you have not too much movement in some keypoints, it's okay to use the bodyparts as reference. It will take the median of the position within each trial as a reference.

That said, yeah, it's best to use the static points in DLC. If you can label 3 more points in your reg to act as a reference frame, that would be the best way forward.

RiSpa5 commented 9 months ago

Ok, perfect. I'll try adding 3 static points and will let you know if everything turns out fine! Thanks a lot :)