Skip to content

utahmobl/opencap-processing-grf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

447 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCap Processing GRF

This repository enables the post-processing of human movement kinematics collected using OpenCap. You can run kinematic analyses, download multiple sessions using scripting, and run simulations to estimate kinetics. Building on the original OpenCap processing repository, this codebase implements the hybrid machine learning–simulation pipeline described in Miller et al., improving estimation of ground reaction forces, joint moments, and joint contact forces.

Publications

More information is available in our preprint on biorxiv

Miller EY, Tan T, Falisse A, Uhlrich SD, 2025. Integrating Machine Learning with Musculoskeletal Simulation Improves OpenCap Video-Based Dynamics Estimation

Uhlrich SD*, Falisse A*, Kidzinski L*, Ko M, Chaudhari AS, Hicks JL, Delp SL, 2022. OpenCap: Human movement dynamics from smartphone videos. PLoS Comput Biol 19(10): e1011462. https://doi.org/10.1371/journal.pcbi.1011462. *contributed equally

Install requirements

General

  1. Install Anaconda
  2. Open Anaconda prompt
  3. Create environment (python 3.11 recommended): conda create -n opencap-processing-grf python=3.11
  4. Activate environment: conda activate opencap-processing-grf
  5. Install OpenSim: conda install -c opensim-org opensim=4.5=py311np123
    • Test that OpenSim was successfully installed:
      • Start python: python
      • Import OpenSim: import opensim
        • If you don't get any error message at this point, you should be good to go.
      • You can also double check which version you installed : opensim.GetVersion()
      • Exit python: quit()
    • Visit this webpage for more details about the OpenSim conda package.
  6. (Optional): Install an IDE such as Spyder: conda install spyder
  7. Clone the repository to your machine:
    • Navigate to the directory where you want to download the code: eg. cd Documents. Make sure there are no spaces in this path.
    • Install git if you have not already: conda install -c conda-forge git
    • Clone the repository: git clone https://github.com/utahmobl/opencap-processing-grf.git
    • Navigate to the directory: cd opencap-processing-grf
  8. Install required packages: python -m pip install -r requirements.txt
  9. Run python createAuthenticationEnvFile.py
    • An environment variable (.env file) will be saved after authenticating.

Simulations

  1. Windows only: Install Visual Studio
    • The Community variant is sufficient and is free for everyone.
    • During the installation, select the workload Desktop Development with C++.
    • The code was tested with the 2017, 2019, and 2022 Community editions.
  2. Linux only: Install OpenBLAS libraries
    • sudo apt-get install libopenblas-base

Examples

  • Run batchDownload_ForGRFTrack.py for example of how to download data and predict GRFs/COPs
  • Run example_walking_opensimAD_GRF.py in the Example_GRFTrack folder for an example of how to generate hybrid simulations

Graphical abstract

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors