Biomechanical modeling in Google Colab using OpenSim
This project aims to make the life of a researcher a bit easier in dealing with Bio-mechanical models. OpenSim has got ๐๐ฆ๐๐ณ๐ข๐ง๐ ๐๐ง๐ญ๐๐ซ๐๐๐๐๐ฌ including C++, Python, and Matlab. Normally, the user installs them on their PC.
This project adds another interface where one can ๐ซ๐ฎ๐ง ๐ง๐๐ฎ๐ซ๐จ๐ฆ๐ฎ๐ฌ๐๐ฎ๐ฅ๐จ๐ฌ๐ค๐๐ฅ๐๐ญ๐๐ฅ ๐ฆ๐จ๐๐๐ฅ๐ข๐ง๐ & ๐ฌ๐ข๐ฆ๐ฎ๐ฅ๐๐ญ๐ข๐จ๐ง๐ฌ ๐จ๐ง ๐ญ๐ก๐ ๐ฐ๐๐ (particularly on ๐๐จ๐จ๐ ๐ฅ๐ ๐๐จ๐ฅ๐๐). You can imagine ๐๐จ๐จ๐ ๐ฅ๐ ๐๐จ๐๐ฌ (๐จ๐ง ๐ญ๐ก๐ ๐ฐ๐๐) ๐ฏ๐ฌ. ๐๐ข๐๐ซ๐จ๐ฌ๐จ๐๐ญ ๐๐จ๐ซ๐ (๐จ๐ง ๐ ๐๐): https://simtk.org/projects/opencolab
๐๐จ๐จ๐ ๐ฅ๐ ๐๐จ๐ฅ๐๐: "๐๐จ๐ฅ๐๐๐จ๐ซ๐๐ญ๐จ๐ซ๐ฒ, ๐จ๐ซ "๐๐จ๐ฅ๐๐" for short, allows you to write and execute Python in your browser, ๐ฐ๐ข๐ญ๐ก ๐๐๐ซ๐จ ๐๐จ๐ง๐๐ข๐ ๐ฎ๐ซ๐๐ญ๐ข๐จ๐ง ๐ซ๐๐ช๐ฎ๐ข๐ซ๐๐, ๐ ๐ซ๐๐ ๐๐๐๐๐ฌ๐ฌ ๐ญ๐จ ๐๐๐๐ฌ, ๐๐๐ฌ๐ฒ ๐ฌ๐ก๐๐ซ๐ข๐ง๐ . Whether you're a student, a data scientist, or an AI researcher, Colab can make your work easier. Watch Introduction to Colab to learn more, or just get started below! https://colab.research.google.com/ "
If you are new to modeling, or even an expert in computational and human/animal movement science, you may have to deal with the installation of several packages, set up a new environment on your computer which usually keeps you away from the actual research.
In this project, we use Google Cloud (esp. Google Colab notebooks) and ๐ข๐ง๐ฌ๐ญ๐๐ฅ๐ฅ ๐๐ฉ๐๐ง๐๐ข๐ฆ (https://opensim.stanford.edu/) via Anaconda Cloud easily (<๐๐ฆ๐ข๐ง) so that we can use it without any issue at any computer, collaborate with others and share models fast without even a need to install OpenSim on your computer. ๐๐๐ ๐๐๐๐ ๐๐๐๐ ๐๐ ๐๐๐๐ ๐๐๐๐๐๐ ๐๐ ๐๐๐ ๐๐๐๐๐๐๐๐ ๐๐๐ ๐ฎ๐๐๐๐ ๐๐๐๐๐๐๐. The ๐ข๐ง๐ข๐ญ๐ข๐๐ฅ ๐ฌ๐๐ญ๐ฎ๐ฉ ๐ฐ๐จ๐ฎ๐ฅ๐ ๐ญ๐๐ค๐ <๐ ๐ฆ๐ข๐ง.
That is it! Enjoy OpenColabing!
We also created several ๐ฏ๐ข๐๐๐จ ๐ญ๐ฎ๐ญ๐จ๐ซ๐ข๐๐ฅ๐ฌ (e.g. https://youtu.be/iEjd7OSOitg) to learn Google Colab (basic python programming on the web) and OpenColab (๐๐ฉ๐๐ง๐๐ข๐ฆ + ๐๐จ๐จ๐ ๐ฅ๐ ๐๐จ๐ฅ๐๐): www.tinyurl.com/xukhmnez
๐๐จ๐ฐ ๐๐ฉ๐๐ง๐๐จ๐ฅ๐๐ ๐ฐ๐จ๐ซ๐ค๐ฌ ๐๐ง๐ ๐ก๐จ๐ฐ ๐๐จ ๐ฐ๐ ๐ฏ๐๐ฅ๐ข๐๐๐ญ๐ ๐ข๐ญ?
The image below shows how we developed and validated OpenColab. As mentioned, the Conda package was developed to install OpenSim on Colab. For validation, we compared the GUI results (for Scaling, IK, ID, RRA, SO, and CMC) with OpenColab results. The outcomes matched very well.
๐๐จ๐ญ๐๐๐จ๐จ๐ค๐ฌ: To download the latest Ipython notebook (OpenColab.ipynb), please visit Github: https://github.com/hmok/OpenColab
๐๐จ๐ฐ ๐ญ๐จ ๐ฌ๐๐ญ ๐ฎ๐ฉ ๐ข๐ง <๐๐ฆ๐ข๐ง ๐๐ง๐ ๐ซ๐ฎ๐ง ๐ข๐ง๐ฏ๐๐ซ๐ฌ๐ ๐ฉ๐ซ๐จ๐๐ฅ๐๐ฆ ๐ข๐ง ๐๐ฉ๐๐ง๐๐จ๐ฅ๐๐? Please follow the following steps to start running OpenSim simulations in < 1 min. Go to this website: https://colab.research.google.com/
a) Upload the following file from Supplementary Material 2: โOpenColab.ipynbโ or from this link https://github.com/hmok/OpenColab/blob/main/OpenColab.ipynb
b) Wait till the file is loaded.
c) Press Ctrl+F9 or Runtime ---> Run all (setup finished in < 1 min)
d) No action needed by the user: OpenSim will be installed (5-7 min)
e) The simulations will generate the results of this paper.
If you are interested in contributing, please feel free to reach out at ๐ฆ๐จ๐ค๐ก๐ญ๐๐ซ๐ณ๐๐๐๐ก ๐๐๐ ๐ก๐จ๐ฌ๐ฌ๐๐ข๐ง ๐๐ ๐๐ฆ๐๐ข๐ฅ ๐๐๐ ๐๐จ๐ฆ.
To cite this article:
Hossein Mokhtarzadeh, Fangwei Jiang, Shengzhe Zhao & Fatemeh Malekipour (2022): OpenColab project: OpenSim in Google colaboratory to explore biomechanics on the web, Computer Methods in Biomechanics and Biomedical Engineering, DOI: 10.1080/10255842.2022.2104607 To link to this article: https://doi.org/10.1080/10255842.2022.2104607
Mokhtarzadeh, Hossein, Fangwei Jiang, Shengzhe Zhao, and Fatemeh Malekipour. 2021. โOpencolab Project: Opensim in Google Colaboratory to Explore Biomechanics on the Web.โ engrXiv. September 30. doi:10.31224/osf.io/f8a3h.