# Motion Extraction From Videos

The motion extraction implementation is adapted from the official [GVHMR codebase [1]](https://github.com/zju3dv/GVHMR).

[1] GVHMR: World-Grounded Human Motion Recovery via Gravity-View Coordinates.


## Setup

Please see [installation](INSTALL.md) for details.

### Demo
Demo entries are provided in `tools/demo`. Use `-s` to skip visual odometry if you know the camera is static, otherwise the camera will be estimated by DPVO.
The script `demo_folder.py` to inference a entire folder.
```shell
python tools/demo/demo.py --video=docs/example_video/tennis.mp4 -s
python tools/demo/demo_folder.py -f inputs/demo/folder_in -d outputs/demo/folder_out -s
```
The results are saved in `outputs/` folder, and the SMPL-format motion files are saved in each result folder, named as `smpl.npz`.