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
260 stars 49 forks source link

TRC file question on OpenSim #55

Closed bin851007 closed 9 months ago

bin851007 commented 10 months ago

Hello David,

I'm Jack.

I am trying to test your pose2sim program.

I'm using 5 camera Calibration but the results are not great, both int and ext are over 0.5px, I choose to ignore it :)

Then using the triangulation equation for OpenPose json of Body_25, I get an error of less than 15px, so,I filter trc file.

When using OpenSim, I have no problem of scaling, but using IK,I get upside down and jittery or distorted motion. I think the reverse can be solved by conversion, but there is no other solution.

I have sent you the Empty_project file to you(contact@david-pagnon.com), which contains my data ,basic information, andtrc file. If you see it, I will be very happy, because it will be a big help for my research.

my emailaddress (bin851007@gmail.com)

handstand

davidpagnon commented 10 months ago

Hi there, sorry I'm kind of in a rush right now but I'll check it by the end of this week or the following!

davidpagnon commented 10 months ago

So I found a bit of time to have a look at your folder :)

Keep me updated!

davidpagnon commented 10 months ago

Hi @bin851007, did you have a chance to try it again?

bin851007 commented 10 months ago

Sorry David, I was busy writing my thesis,so I forget to reply you.

I tried it again and got a different result,it's better than the first one.

But there are still some littile problems.

I will respond on github

Maybe I transfor dates for you first.

David PAGNON @.***> 於 2023年12月27日 週三 上午12:36寫道:

Hi @bin851007 https://github.com/bin851007, did you have a chance to try it again?

— Reply to this email directly, view it on GitHub https://github.com/perfanalytics/pose2sim/issues/55#issuecomment-1869652625, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY3JZCWZPOM45QGMKDATMVDYLL4HVAVCNFSM6AAAAABAQME72GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZGY2TENRSGU . You are receiving this because you were mentioned.Message ID: @.***>

davidpagnon commented 10 months ago

Okay, tell me when you need it!

bin851007 commented 10 months ago

I don’t have any GoPro, or other cameras, so I can only use the same camera to calibrate. I followed your suggestion and used scenes for extrinsic calibration. Although, it wasn’t perfect, it was better than the first time. For intrinsic calibration, I code a simple camera calibration with Python to get distortions, and copied them to Calib_toml, then,the errors reduced 1~2px, but it still couldn't get less than 0.5px.Also, I used the Matlab Calibration app, but there were no distortions p1 p2 , so I gave up. Thus, there is still no solution for intrinsic calibration. S__60669963

Regarding IK, I successfully generated the correct pose, which makes me happy, but there are still some little problems, such as the head and left toe are in the wrong site, or the body looks it's shaking. Is there any solution?

I also sent the data for you :)

standup

davidpagnon commented 10 months ago

Okay, so let's talk about each step one after the other:

Overall, I would tend to think your OpenPose results might actually be the main issue. Maybe you could try to put your cameras more at chest level?

davidpagnon commented 10 months ago

Hi @bin851007, I used your data as an example to better handle camera distortions (beware that currently, it is still better to leave that undistort_points parameter to false), and I got better calibration results with my tool, even when calibrating intrinsic parameters with the board:

--> Residual (RMS) calibration errors for each camera are respectively [1.711, 1.21, 1.867, 1.217, 1.775] px, 
which corresponds to [7.088, 3.876, 6.105, 4.654, 7.166] mm.

If you want the person to not be upside down, you need to click the checkerboard points while keeping in mind the "right-hand rule": the first row of corners will represent your X axis, the columns will be the Y axis, and they need to be chosen so that the Z axis points up.

The motion looks rather good despite I did not take distortions into account, and despite some points on the feet being occluded at the deepest point of your squatting motion.

I'm still hoping I will find time to better handle distortions, but right now I need to work on other stuff. Just in case, make sure you upgrade to the last version by entering pip install pose2Sim --upgrade.

davidpagnon commented 9 months ago

Handled by email