Spaces:
Sleeping
A newer version of the Gradio SDK is available:
5.12.0
Installation
Requirements
- Linux
- Python 3.7+
- PyTorch 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0 or 1.9.1.
- CUDA 9.2+
- GCC 5+
- MMCV (Please install mmcv-full>=1.3.17,<1.6.0 for GPU)
Prepare environment
a. Create a conda virtual environment and activate it.
conda create -n motiondiffuse python=3.7 -y
conda activate motiondiffuse
b. Install PyTorch and torchvision following the official instructions.
conda install pytorch={torch_version} torchvision cudatoolkit={cu_version} -c pytorch
E.g., install PyTorch 1.7.1 & CUDA 10.1.
conda install pytorch=1.7.1 torchvision cudatoolkit=10.1 -c pytorch
Important: Make sure that your compilation CUDA version and runtime CUDA version match.
c. Build mmcv-full
- mmcv-full
We recommend you to install the pre-build package as below.
For CPU:
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/{torch_version}/index.html
Please replace {torch_version}
in the url to your desired one.
For GPU:
pip install "mmcv-full>=1.3.17,<=1.5.3" -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
Please replace {cu_version}
and {torch_version}
in the url to your desired one.
For example, to install mmcv-full with CUDA 10.1 and PyTorch 1.7.1, use the following command:
pip install "mmcv-full>=1.3.17,<=1.5.3" -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.1/index.html
See here for different versions of MMCV compatible to different PyTorch and CUDA versions. For more version download link, refer to openmmlab-download.
d. Install other requirements
pip install -r requirements.txt
Data Preparation
a. Download datasets
For both the HumanML3D dataset and the KIT-ML dataset, you could find the details as well as download link [here].
b. Download pretrained weights for evaluation
We use the same evaluation protocol as this repo. You should download pretrained weights of the contrastive models in t2m and kit for calculating FID and precisions. To dynamically estimate the length of the target motion, length_est_bigru
and Glove data are required.
c. Download pretrained weights for MotionDiffuse
The pretrained weights for our proposed MotionDiffuse can be downloaded from here
Download the above resources and arrange them in the following file structure:
MotionDiffuse
βββ text2motion
βββ checkpoints
β βββ kit
β β βββ kit_motiondiffuse
β β βββ meta
β β β βββ mean.npy
β β β βββ std.npy
β β βββ model
β β β βββ latest.tar
β β βββ opt.txt
β βββ t2m
β βββ t2m_motiondiffuse
β βββ meta
β β βββ mean.npy
β β βββ std.npy
β βββ model
β β βββ latest.tar
β βββ opt.txt
βββ data
βββ glove
β βββ our_vab_data.npy
β βββ our_vab_idx.pkl
β βββ out_vab_words.pkl
βββ pretrained_models
β βββ kit
β β βββ text_mot_match
β β βββ model
β β βββ finest.tar
β βββ t2m
β β βββ text_mot_match
β β β βββ model
β β β βββ finest.tar
β β βββ length_est_bigru
β β βββ model
β β βββ finest.tar
βββ HumanML3D
β βββ new_joint_vecs
β β βββ ...
β βββ new_joints
β β βββ ...
β βββ texts
β β βββ ...
β βββ Mean.npy
β βββ Std.npy
β βββ test.txt
β βββ train_val.txt
β βββ train.txt
β βββ val.txt
βββ KIT-ML
βββ new_joint_vecs
β βββ ...
βββ new_joints
β βββ ...
βββ texts
β βββ ...
βββ Mean.npy
βββ Std.npy
βββ test.txt
βββ train_val.txt
βββ train.txt
βββ val.txt