Hello,
I am a first-year graduate student who has just studied sports biomechanics. Now I have some questions and I really hope to get your answers.
I tried using "example_gait_analysis.py" to run the local data I recorded via Opencap, but it failed. I changed the local code location, session id ,the number of "n_gait_cycles = -1"and trial name in the "example_gait_analysis.py" code, but the operation failed. Python showed that it could not recognize the gait cycle and other problems. I am not sure whether it was because I changed the wrong things. The run failed.
And I would like to get the gait cycle and other information and process the data I downloaded from opencap through opensim, but I don't find the gait analysis tool in Opensim
It's my great honor to getting your answer.
Thank you!!
Here is the error code issue I'm having:
Failed to run gait analysis through Python
- jintao Pan
- Posts: 9
- Joined: Thu Nov 02, 2023 1:06 am
- Antoine Falisse
- Posts: 439
- Joined: Wed Jan 07, 2015 2:21 am
Re: Failed to run gait analysis through Python
hi, I just tested and the gait analysis tool does not seem to be working for your trial with data from children. I have opened an issue, and I will look into that within the next few weeks. https://github.com/stanfordnmbl/opencap ... issues/119. I will report back here if I find a solution. Antoine
- jintao Pan
- Posts: 9
- Joined: Thu Nov 02, 2023 1:06 am
Re: Failed to run gait analysis through Python
Thanks doc
Thank you very much for your reply, looking forward to success
Best
jIntao Pan
Thank you very much for your reply, looking forward to success
Best
jIntao Pan
- jintao Pan
- Posts: 9
- Joined: Thu Nov 02, 2023 1:06 am
Re: Failed to run gait analysis through Python
Hi
I attempted to modify the prominence" code in "gait_analysis.py", setting the threshold to "0.2, 0.15, 0.1, 0.05, 0.03, 0.02, 0.01, 0.008, 0.005" and successfully processed several local data. There are still some data that cannot be processed, spikes cannot be detected, and therefore no gait data can be obtained.
I am very much looking forward to your reply.
Best
Jintao Pan
I attempted to modify the prominence" code in "gait_analysis.py", setting the threshold to "0.2, 0.15, 0.1, 0.05, 0.03, 0.02, 0.01, 0.008, 0.005" and successfully processed several local data. There are still some data that cannot be processed, spikes cannot be detected, and therefore no gait data can be obtained.
I am very much looking forward to your reply.
Best
Jintao Pan
- Antoine Falisse
- Posts: 439
- Joined: Wed Jan 07, 2015 2:21 am
Re: Failed to run gait analysis through Python
Hi that sounds good. It is very difficult to find settings that work for all cases. Playing with the settings of the detect_gait_peaks function is probably the way to go: https://github.com/stanfordnmbl/opencap ... 90C13-L703
Best, Antoine
Best, Antoine
- jintao Pan
- Posts: 9
- Joined: Thu Nov 02, 2023 1:06 am
Re: Failed to run gait analysis through Python
Hi
There are still a few questions that I can't figure out.
Is the value of prominence based on HS or TO? How is this threshold determined? Is it by calculating the force value? like 1N=1kg m/s2
And how can I change the visualization output to data output in CSV format?
Thank you very much for your reply!
Best
Jintao Pan
There are still a few questions that I can't figure out.
Is the value of prominence based on HS or TO? How is this threshold determined? Is it by calculating the force value? like 1N=1kg m/s2
And how can I change the visualization output to data output in CSV format?
Thank you very much for your reply!
Best
Jintao Pan
- Antoine Falisse
- Posts: 439
- Joined: Wed Jan 07, 2015 2:21 am
Re: Failed to run gait analysis through Python
We are looking at peaks in processed marker data.
> And how can I change the visualization output to data output in CSV format?
There are some python modules to output csv files.
Best, Antoine
> And how can I change the visualization output to data output in CSV format?
There are some python modules to output csv files.
Best, Antoine
- jintao Pan
- Posts: 9
- Joined: Thu Nov 02, 2023 1:06 am
Re: Failed to run gait analysis through Python
Thanks doc
Thank you very much for your help.I will continue to dig deeper into opencap.
Best
Jintao Pan
Thank you very much for your help.I will continue to dig deeper into opencap.
Best
Jintao Pan
- Antoine Falisse
- Posts: 439
- Joined: Wed Jan 07, 2015 2:21 am
Re: Failed to run gait analysis through Python
Sound good.