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
271 stars 50 forks source link

Question on using your own data (from opencap to opensim). #124

Closed djinayon closed 2 months ago

djinayon commented 3 months ago

Hi again @davidpagnon, I'm currently following through the 'Use your own data' part of the repository and I'm quite confused on the workflow and unsure if I am doing it right. I have some questions I'd like to ask:

Thank you for taking your time to read this and I really appreciate the hard work you've put in here.

davidpagnon commented 3 months ago

Hi,

djinayon commented 3 months ago

Hi, thank you for your response! I'm pretty sure I copied the right calibration file but I'll check. If it still shows the error, guess I'll start from scratch. Also, looking forward to the video once everything's in place. Good luck and thanks a bunch for the work you do!

davidpagnon commented 3 months ago

If it does not work, do you mind sending me your OpenCap calibration file so that I can have a look?

djinayon commented 3 months ago

Hi again @davidpagnon, I tried the suggestions you mentioned and got it to work, I copied the wrong pickle file (haha). I managed to do the calibration and pose estimations. However when I try to synchronize, I encountered this problem. image I've tried solutions mentioned in https://stackoverflow.com/questions/41994485/how-to-fix-could-not-find-or-load-the-qt-platform-plugin-windows-while-using-m, but nothing seems to work for me. Any idea what causes this or how to solve it? As the thread mentioned, it probably has something to do with the directory of the Qt, but I'm lost haha.

djinayon commented 3 months ago

Hi again @davidpagnon, I tried the suggestions you mentioned and got it to work, I copied the wrong pickle file (haha). I managed to do the calibration and pose estimations. However when I try to synchronize, I encountered this problem. image I've tried solutions mentioned in https://stackoverflow.com/questions/41994485/how-to-fix-could-not-find-or-load-the-qt-platform-plugin-windows-while-using-m, but nothing seems to work for me. Any idea what causes this or how to solve it? As the thread mentioned, it probably has something to do with the directory of the Qt, but I'm lost haha.

I tried running the single person demo and oddly enough the problem in the synchronization showed (which shouldn't happen because I already succeeded in the demo). So I tried removing the environment altogether and started from the beginning (creating the environment and doing the single person demo). It seems to have solved the problem, I don't know how though.

Now, I tried running my trial (me walking filmed with two cameras from opencap) and the synch problem is now gone. But another error showed: image

What does this error tell me?

davidpagnon commented 3 months ago

Hi, I'm glad you fixed the qt issue.

As the new error says, chances are that your issue is related to calibration or synchronization:

djinayon commented 3 months ago

Hi, thanks for responding.

davidpagnon commented 3 months ago

It's hard to tell if there is anything wrong with the calibration file but let's assume it is good. What are the correlation values when you synchronize? Did you play with these parameters to get the highest possible correlation value?

keypoints_to_consider = ['RWrist'] # 'all' if all points should be considered, for example if the participant did not perform any particicular sharp movement. In this case, the capture needs to be 5-10 seconds long at least
                           # ['RWrist', 'RElbow'] list of keypoint names if you want to specify a list of keypoints with sharp vertical motion.
approx_time_maxspeed = 'auto' # 'auto' if you want to consider the whole capture (default, slower if long sequences)
                           # [10.0, 2.0, 8.0, 11.0] list of times (seconds) if you want to specify the approximate time of a clear vertical event for each camera
time_range_around_maxspeed = 2.0 # Search for best correlation in the range [approx_time_maxspeed - time_range_around_maxspeed, approx_time_maxspeed  + time_range_around_maxspeed]
djinayon commented 3 months ago

It's hard to tell if there is anything wrong with the calibration file but let's assume it is good. What are the correlation values when you synchronize? Did you play with these parameters to get the highest possible correlation value?

keypoints_to_consider = ['RWrist'] # 'all' if all points should be considered, for example if the participant did not perform any particicular sharp movement. In this case, the capture needs to be 5-10 seconds long at least
                           # ['RWrist', 'RElbow'] list of keypoint names if you want to specify a list of keypoints with sharp vertical motion.
approx_time_maxspeed = 'auto' # 'auto' if you want to consider the whole capture (default, slower if long sequences)
                           # [10.0, 2.0, 8.0, 11.0] list of times (seconds) if you want to specify the approximate time of a clear vertical event for each camera
time_range_around_maxspeed = 2.0 # Search for best correlation in the range [approx_time_maxspeed - time_range_around_maxspeed, approx_time_maxspeed  + time_range_around_maxspeed]

I haven't played around those yet, I used the same parameters as the single demo for now, but I'll try. Here's the synchronization result from using the same parameters as the single demo: image

davidpagnon commented 2 months ago

Sorry I did not see your answer! The synchronization looks good... Did you figure it out?

djinayon commented 2 months ago

Hi, thank you for replying. I've been working on other stuff so I haven't tried other things here. My professor got it to work with a trial of his own, the error is probably from my opencap data. I will be consulting with him within this week. Thanks again!

davidpagnon commented 2 months ago

Okay! I'm closing it then, don't hesitate to reopen the issue if needed!