Gait Analysis Code Fail

New project for OpenCap, which is a new software package to estimate 3D human movement dynamics from smartphone videos. OpenCap strongly relies on OpenSim.
POST REPLY
User avatar
Hyejoon Lee
Posts: 12
Joined: Tue Mar 19, 2024 6:57 pm

Gait Analysis Code Fail

Post by Hyejoon Lee » Tue Apr 09, 2024 10:41 pm

Hello, when I execute the code from
https://github.com/stanfordnmbl/openca ... nalysis.py for overground gait analysis, I am getting error message like shown in the image. Do you have an idea what is going on?
Attachments
Screenshot 2024-04-09 at 10.37.42 PM.png
Screenshot 2024-04-09 at 10.37.42 PM.png (57.25 KiB) Viewed 1026 times

User avatar
Antoine Falisse
Posts: 422
Joined: Wed Jan 07, 2015 2:21 am

Re: Gait Analysis Code Fail

Post by Antoine Falisse » Wed Apr 10, 2024 9:03 am

You are probably not in the right conda environment (base instead of opencap-processing) or something like this.

User avatar
Hyejoon Lee
Posts: 12
Joined: Tue Mar 19, 2024 6:57 pm

Re: Gait Analysis Code Fail

Post by Hyejoon Lee » Thu Apr 11, 2024 1:43 pm

I created a conda environment called opencap-processing. Is there any packages I need to download in that environment?

User avatar
Hyejoon Lee
Posts: 12
Joined: Tue Mar 19, 2024 6:57 pm

Re: Gait Analysis Code Fail

Post by Hyejoon Lee » Fri Apr 12, 2024 12:51 am

After I created new conda environment called opencap-processing, I installed requirements.txt from my terminal. Is there anything I need to do further than this? or Is this not a right way to set this up?
Last edited by Hyejoon Lee on Fri Apr 12, 2024 12:53 am, edited 1 time in total.

User avatar
Hyejoon Lee
Posts: 12
Joined: Tue Mar 19, 2024 6:57 pm

Re: Gait Analysis Code Fail

Post by Hyejoon Lee » Fri Apr 12, 2024 12:53 am

After I created new conda environment called opencap-processing, I installed requirements.txt. Is there anything I need to do further than this? or Is this not a right way to set this up?
Attachments
Screenshot 2024-04-12 at 12.52.06 AM.png
Screenshot 2024-04-12 at 12.52.06 AM.png (290.48 KiB) Viewed 973 times

User avatar
Matt Petrucci
Posts: 68
Joined: Fri Feb 24, 2012 11:49 am

Re: Gait Analysis Code Fail

Post by Matt Petrucci » Fri Apr 12, 2024 9:49 am

Hi Hyejoon, you need follow the instructions here: https://github.com/stanfordnmbl/opencap ... le#general

User avatar
Hyejoon Lee
Posts: 12
Joined: Tue Mar 19, 2024 6:57 pm

Re: Gait Analysis Code Fail

Post by Hyejoon Lee » Sun Apr 14, 2024 11:13 pm

Thank you, it works now. Also, Is it possible to get a csv data for stide length over time? or is it impossible in this gait analysis system?

User avatar
Matt Petrucci
Posts: 68
Joined: Fri Feb 24, 2012 11:49 am

Re: Gait Analysis Code Fail

Post by Matt Petrucci » Tue Apr 16, 2024 1:36 pm

Hi Hyejoon, you should be able to modify the gait analysis python code to export the results to a .csv file.

User avatar
Hyejoon Lee
Posts: 12
Joined: Tue Mar 19, 2024 6:57 pm

Re: Gait Analysis Code Fail

Post by Hyejoon Lee » Tue Apr 16, 2024 11:48 pm

My question is right now when I extract csv file from it, it looks like the screenshot I am attaching. But what I want is csv file with time variables so it shows the values changing over time. (for example, like the csv file I can get from this file. https://github.com/stanfordnmbl/opencap ... example.py) Is this because of my code or the gait analysis cannot do that?
Attachments
Screenshot 2024-04-16 at 11.40.50 PM.png
Screenshot 2024-04-16 at 11.40.50 PM.png (115.34 KiB) Viewed 877 times

User avatar
Matt Petrucci
Posts: 68
Joined: Fri Feb 24, 2012 11:49 am

Re: Gait Analysis Code Fail

Post by Matt Petrucci » Wed Apr 17, 2024 11:04 am

Hi Hyejoon, yes the gait_analysis class is called starting here: https://github.com/stanfordnmbl/opencap ... sis.py#L72

In the gait_analysis class, the Stride lengths are calculated here: https://github.com/stanfordnmbl/opencap ... is.py#L140

You'll have to modify the code to export those values.

POST REPLY