perfanalytics / pose2sim

Markerless kinematics with any cameras — From 2D Pose estimation to 3D OpenSim motion
https://perfanalytics.github.io/pose2sim/
BSD 3-Clause "New" or "Revised" License
270 stars 50 forks source link

OpenSim adjust scaled models pose/ joint angles #133

Closed maipatrick closed 1 month ago

maipatrick commented 2 months ago

Hi, First of all thank you for this awesome repo! From my experience with OpenSim and marker data it yields better results when the joint angles of the scaled model are set according to the angles of the static recording inverse kinematics results. In other words the scaled model usually is scaled only and the pose / joint angles are not adjusted (unlike you adding the ik_results from the scaling) when loading the model (it’s scaled but still “stands” as the generic model). However, I created a function that calls the scaled opensim model and adjusting the pose according to the joint angles from the static IK. Let me know if you are interested. BTW I started comparing ID results from marker-based vs markerless tracking with your pipelines. The results are really really promising!

davidpagnon commented 2 months ago

Hi @maipatrick,

Thank you for your message, and I'm glad your results are promising! I'd be interested in knowing more about it.

I am not sure I fully understand your comment though: could you explain it again? Also, don't hesitate to create a pull request if you think it adds something valuable to the toolbox. It is not that easy to seamlessly integrate anything, but we can always try (and I can help).

By the way, if you ever want to try it, I just pushed a new release with fully automatic and integrated OpenSim scaling and inverse kinematics, without a static trial. The scaling part was a bit challenging (see docstrings there to know more about the approach). I tried to make it robust and accurate, but there is quite probably room for improvement. If you ever have a chance to test it and keep me informed about cases where it would go wrong, I'm quite interested in making it better!

davidpagnon commented 1 month ago

This issue has been marked as stale and is now closed. Don't hesitate to reopen it if needed!