Giter VIP home page Giter VIP logo

opencap-processing's Introduction

OpenCap Processing

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 muscle-driven simulations to estimate kinetics.

Publication

More information is available in our preprint:

Uhlrich SD*, Falisse A*, Kidzinski L*, Ko M, Chaudhari AS, Hicks JL, Delp SL, 2022. OpenCap: 3D human movement dynamics from smartphone videos. biorxiv. https://doi.org/10.1101/2022.07.07.499061. *contributed equally

Install requirements

General

  1. Install Anaconda
  2. Open Anaconda prompt
  3. Create environment (python 3.9 recommended): conda create -n opencap-processing python=3.9
  4. Activate environment: conda activate opencap-processing
  5. Install OpenSim: conda install -c opensim-org opensim=4.4=py39np120
    • 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.
    • Clone the repository: git clone https://github.com/stanfordnmbl/opencap-processing.git
    • Navigate to the directory: cd opencap-processing
  8. Install required packages: python -m pip install -r requirements.txt

Muscle-driven simulations

  1. Install CMake
    • Windows only: Add CMake to system path. During the installation, select Add CMake to the system PATH for all users
  2. 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.
  3. Run createAuthenticationEnvFile.py
    • An environment variable (.env file) will be saved after authenticating.

Examples

  • Run example.py for examples of how to run kinematic analyses
  • Run example_kinetics.py for examples of how to generate muscle-driven simulations
  • Moco

Download OpenCap data

Using Colab

  • Open batchDownload.ipynb in Colab and follow the instructions
    • You do not need to follow the install requirements above.

Locally

  • Follow the install requirements above
  • (Optional): Run createAuthenticationEnvFile.py
    • An environment variable (.env file) will be saved after authenticating. You can proceed without this, but you will be required to login every time you run a script.
  • Open batchDownload.py and follow the instructions

opencap-processing's People

Contributors

antoinefalisse avatar suhlrich avatar mattpetrucci avatar reubenlindroos avatar carmichaelong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.