Skip to content

Commit

Permalink
SOMA genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
Nima Ghorbani committed Oct 9, 2021
1 parent 24a6777 commit 6c7da47
Show file tree
Hide file tree
Showing 76 changed files with 21,607 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/soma_public.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 79 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
License

Software Copyright License for non-commercial scientific research purposes

Please read carefully the following terms and conditions and any accompanying documentation before you download and/or
use the SOMA data and software, (the "Data & Software"),
including 3D meshes, images, videos, textures, software, scripts, and animations.
By downloading and/or using the Data & Software
(including downloading, cloning, installing, and any other use of the corresponding github repository),
you acknowledge that you have read these terms and conditions, understand them, and agree to be bound by them.
If you do not agree with these terms and conditions, you must not download and/or use the Data & Software.
Any infringement of the terms of this agreement will automatically terminate your rights under this License.

Ownership / Licensees
The Data & Software and the associated materials has been developed at the
Max Planck Institute for Intelligent Systems (hereinafter “MPI”).
Any copyright or patent right is owned by and proprietary material of the
Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (hereinafter “MPG”; MPI and MPG hereinafter collectively “Max-Planck” or “Licensor”).

License Grant
Licensor grants you (Licensee) personally a single-user, non-exclusive, non-transferable, free of charge right:
To install the Data & Software on computers owned, leased or otherwise controlled by you and/or your organization;
To use the Data & Software for the sole purpose of performing non-commercial scientific research, non-commercial education, or non-commercial artistic projects;
Any other use, in particular any use for commercial, pornographic, military, or surveillance, purposes is prohibited.
This includes, without limitation, incorporation in a commercial product, use in a commercial service, or production of
other artefacts for commercial purposes. The Data & Software may not be used to create fake, libelous, misleading, or
defamatory content of any kind excluding analyses in peer-reviewed scientific research. The Data & Software may not be
reproduced, modified and/or made available in any form to any third party without Max-Planck’s prior written permission.

The Data & Software may not be used for pornographic purposes or to generate pornographic material whether commercial or not.
This license also prohibits the use of the Data & Software to train methods/algorithms/neural networks/etc.
for commercial, pornographic, military, surveillance, or defamatory use of any kind.
By downloading the Data & Software, you agree not to reverse engineer it.

No Distribution
The Data & Software and the license herein granted shall not be copied, shared, distributed, re-sold, offered for re-sale, transferred or sub-licensed in whole or in part except that you may make one copy for archive purposes only.

Disclaimer of Representations and Warranties
You expressly acknowledge and agree that the Data & Software results from basic research, is provided “AS IS”, may contain errors, and that any use of the Data & Software is at your sole risk.
LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE DATA & SOFTWARE, NEITHER EXPRESS NOR IMPLIED, AND THE ABSENCE OF ANY LEGAL OR ACTUAL DEFECTS, WHETHER DISCOVERABLE OR NOT.
Specifically, and not to limit the foregoing, licensor makes no representations or warranties
(i) regarding the merchantability or fitness for a particular purpose of the Data & Software,
(ii) that the use of the Data & Software will not infringe any patents, copyrights or other intellectual property rights of a third party, and
(iii) that the use of the Data & Software will not cause any damage of any kind to you or a third party.

Limitation of Liability
Because this Data & Software License Agreement qualifies as a donation, according to Section 521 of the
German Civil Code (Bürgerliches Gesetzbuch – BGB) Licensor as a donor is liable for intent and gross negligence only.
If the Licensor fraudulently conceals a legal or material defect, they are obliged to compensate the Licensee for the resulting damage.
Licensor shall be liable for loss of data only up to the amount of typical recovery costs which would have arisen had proper
and regular data backup measures been taken. For the avoidance of doubt Licensor shall be liable in accordance with the
German Product Liability Act in the event of product liability. The foregoing applies also to Licensor’s legal representatives
or assistants in performance. Any further liability shall be excluded. Patent claims generated through the usage of the
Data & Software cannot be directed towards the copyright holders. The Data & Software is provided in the state of development
the licensor defines. If modified or extended by Licensee, the Licensor makes no claims about the fitness of the Data & Software and is not responsible for any problems such modifications cause.

No Maintenance Services
You understand and agree that Licensor is under no obligation to provide either maintenance services, update services, notices of latent defects, or corrections of defects with regard to the Data & Software. Licensor nevertheless reserves the right to update, modify, or discontinue the Data & Software at any time. Defects of the Data & Software must be notified in writing to the Licensor with a comprehensible description of the error symptoms. The notification of the defect should enable the reproduction of the error. The Licensee is encouraged to communicate any use, results, modification or publication.

Subjects' Consent
All subjects gave informed written consent to share their data for research purposes.
You further agree to delete data or change their use, in case a subject changes or withdraws their consent.

Publications using the Data & Software
You acknowledge that the Data & Software is a valuable scientific resource and agree to appropriately reference the following paper in any publication making use of the Data & Software:

@inproceedings{SOMA:ICCV:2021,
title = {{SOMA}: Solving Optical Marker-Based MoCap Automatically},
author = {Ghorbani, Nima and Black, Michael J.},
booktitle = {Proceedings of IEEE/CVF International Conference on Computer Vision (ICCV)},
month = oct,
year = {2021},
doi = {},
month_numeric = {10}}

Commercial licensing opportunities
For commercial uses of the Data & Software, please send email to [email protected]

This Agreement shall be governed by the laws of the Federal Republic of Germany except for the UN Sales Convention.
13 changes: 13 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
recursive-include support_data *.npz
recursive-include support_data *.ply
recursive-include support_data/conf *.yaml
# added by check-manifest
include *.txt
recursive-include src *.cpp
recursive-include src *.h
recursive-include src *.md
recursive-include src *.py
recursive-include src *.pyx
recursive-include src *.txt
recursive-include src *.whl
recursive-include src Makefile
95 changes: 93 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,93 @@
# soma
Solving Optical MoCap Automatically
# SOMA: Solving Optical Marker-Based MoCap Automatically, ICCV'21

This repository contains the official PyTorch implementation of:

SOMA: Solving Optical Marker-Based MoCap Automatically\
Nima Ghorbani and Michael J. Black\
Full paper | Video | Project website | Poster

![alt text](https://download.is.tue.mpg.de/soma/tutorials/soma_github_teaser.gif "mocap point clouds (black dots in the back) turned into labeled markers (colored dots)")

SOMA **automatically transforms raw marker-based mocap point clouds** (black dots in the back) into **labeled markers** (colored dots) and **solved bodies**.

## Installation

SOMA is originally developed in Python 3.7, PyTorch 1.8.2 LTS, for Ubuntu 20.04.2 LTS.
Below we prepare the python environment using [Anaconda](https://www.anaconda.com/products/individual),
however, we opt for a simple pip package manager for installing dependencies.

````
sudo apt install libatlas-base-dev
sudo apt install libpython3.7
sudo apt install libtbb2
conda create -n soma python=3.7
conda install -c conda-forge ezc3d
pip3 install torch==1.8.2+cu102 torchvision==0.9.2+cu102 torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
````
ezc3d installation is currently not supported by pip.

Assuming that you have already cloned this repository to your local drive
go to the root directory of SOMA code and run
````
pip install -r requirements.txt
python setup.py develop
````
Copy the precompiled
[smpl-fast-derivatives](https://download.is.tue.mpg.de/download.php?domain=soma&sfile=smpl-fast-derivatives.tar.bz2)
into your python site-packages folder, i.e. ````anaconda3/envs/soma/lib/python3.7/site-packages````.
The final directory should look like ````anaconda3/envs/soma/lib/python3.7/site-packages/psbody/smpl````.

Install the psbody.mesh library following the instructions in [https://github.com/MPI-IS/mesh](https://github.com/MPI-IS/mesh).
Hint: clone the mesh repository and run the following from the anaconda environment: ````python setup.py install ````.

To use the rendering capabilities first install an instance of Blender-2.83 LTS on your machine.
Afterward uncompress contents of the precompiled
[bpy-2.83](https://download.is.tue.mpg.de/download.php?domain=soma&sfile=blender/bpy-2.83-20200908.tar.bz2)
into your python site-packages folder, i.e. ````anaconda3/envs/soma/lib/python3.7/site-packages````.

Last but not least, the current SOMA code relies on [MoSh++](https://amass.is.tue.mpg.de/) mocap solver.
Please install [MoSh++](https://github.com/nghorbani/moshpp) following the guidelines in its repository.


## Using SOMA
There are multiple main parts of the codebase that we try to explain in the [Tutorials](src/tutorials):
- Training SOMA
- Running SOMA on MPC data
- Running MoSh++ on labeled mocaps
- Rendering reconstructed bodies with [Blender](https://docs.blender.org/api/current/info_quickstart.html)
- Evaluating SOMA; i.e. labeling performance and surface reconstruction accuracy

## Citation

Please cite the following paper if you use this code directly or indirectly in your research/projects:

```
@inproceedings{SOMA:ICCV:2021,
title = {{SOMA}: Solving Optical Marker-Based MoCap Automatically},
author = {Ghorbani, Nima and Black, Michael J.},
booktitle = {Proceedings of IEEE/CVF International Conference on Computer Vision (ICCV)},
month = oct,
year = {2021},
doi = {},
month_numeric = {10}}
```

## License

Software Copyright License for **non-commercial scientific research purposes**. Please read carefully
the [terms and conditions](./LICENSE) and any accompanying documentation before you download and/or
use the SOMA data and software, (the "Data & Software"), software, scripts, and animations.
By downloading and/or using the Data & Software (including downloading, cloning, installing, and any other use of this repository),
you acknowledge that you have read these terms
and conditions, understand them, and agree to be bound by them. If you do not agree with these terms and conditions, you
must not download and/or use the Data & Software.
Any infringement of the terms of this agreement will automatically terminate
your rights under this [License](./LICENSE).

## Contact

The code in this repository is developed by [Nima Ghorbani](https://nghorbani.github.io/)
while at [Max-Planck Institute for Intelligent Systems, Tübingen, Germany](https://is.mpg.de/person/nghorbani).
43 changes: 43 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
git+https://github.com/nghorbani/human_body_prior.git@SOMA
git+https://github.com/nghorbani/body_visualizer
git+https://github.com/nghorbani/configer.git
imageio
mkl
mkl-service
mkl_fft
mkl_random
numpy
pyOpenSSL
pillow
scikit-image
scipy
setuptools
loguru
omegaconf
six
tk
toolz
wheel
pytorch3d
notifiers
tqdm
opencv-python
c3d
chumpy
ipython
markdown
omegaconf
pandas
pycodestyle
pytorch-lightning
scikit-learn
tensorboard
threadpoolctl
setuptools
trimesh
colour
seaborn
tables
transforms3d
xlsxwriter
jupyterlab
67 changes: 67 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG),
# acting on behalf of its Max Planck Institute for Intelligent Systems and the
# Max Planck Institute for Biological Cybernetics. All rights reserved.
#
# Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is holder of all proprietary rights
# on this computer program. You can only use this computer program if you have closed a license agreement
# with MPG or you get the right to use the computer program from someone who is authorized to grant you that right.
# Any use of the computer program without a valid license is prohibited and liable to prosecution.
# Contact: [email protected]
#
# If you use this code in a research publication please cite the following:
#
# @inproceedings{SOMA:ICCV:2021,
# title = {{SOMA}: Solving Optical MoCap Automatically},
# author = {Ghorbani, Nima and Black, Michael J.},
# booktitle = {Proceedings of IEEE/CVF International Conference on Computer Vision (ICCV)},
# month = oct,
# year = {2021},
# doi = {},
# month_numeric = {10}}
#
# You can find complementary content at the project website: https://soma.is.tue.mpg.de/
#
# Code Developed by:
# Nima Ghorbani <https://nghorbani.github.io/>
# While at Max-Planck Institute for Intelligent Systems, Tübingen, Germany
#
# 2021.06.18
from setuptools import setup, find_packages
from glob import glob

setup(name='soma',
version='5.0.0',
packages=find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
data_files=[
('soma/support_data', glob('support_data/*.*')),
('soma/support_data/conf/parallel_conf', glob('support_data/conf/parallel_conf/*.*')),
('soma/support_data/github_files', glob('support_data/github_files/*.*')),
('soma/support_data/tests', glob('support_data/tests/*.*')),
('soma/support_data/conf', glob('support_data/conf/*.*'))
],

author='Nima Ghorbani',
author_email='[email protected]',
maintainer='Nima Ghorbani',
maintainer_email='[email protected]',
url='https://github.com/nghorbani/soma',
description='Solving Optical Marker-Based Motion Capture Automatically',
license='See LICENSE.txt',
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
install_requires=[],
dependency_links=[],
classifiers=[
"Intended Audience :: Research",
"Natural Language :: English",
"Operating System :: POSIX",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7", ],
)
Loading

0 comments on commit 6c7da47

Please sign in to comment.