python3
pytorch
scipy
chumpy
psbody.mesh
Code works with psbody.mesh v0.4 , pytorch >= v1.0 , chumpy v0.7 and scipy v1.3 .
- Download and prepare SMPL model and data from dataset repository.
- Set DATA_DIR and SMPL paths in
global_var.py
file accordingly. - Download trained model weights in a directory and set its path to MODEL_WEIGHTS_PATH variable in
global_var.py
.- old-t-shirt_female_weights (4.1 GB)
- t-shirt_male_weights (2.0 GB)
- t-shirt_female_weights (2.0 GB)
- shirt_female_weights (2.5 GB)
- shirt_male_weights (2.5 GB)
- This link has all the weights listed above as well as the following:
- pant_female_weights
- pant_male_weights
- short-pant_female_weights
- short-pant_male_weights
- skirt_female_weights
- Set output path in
run_SACANet.py
and run it to predict garments on some random inputs. You can play with different inputs. You can also run inference on motion sequence data. - To visualize predicted garment using blender, run
python run_SACANet.py render
. (Blender 2.79 needs to be installed.)
- Set global variables in
global_var.py
, especially LOG_DIR where training logs will be stored. - Set config variables like gender and garment class in
trainer/base_trainer.py
(or pass them via command line) and runpython trainer/base_trainer.py
to train SACANetNet MLP baseline. - Similarly, run
python trainer/lf_trainer.py
to train low frequency predictor andtrainer/ss2g_trainer.py
to train shape-style-to-garment(in canonical pose) model. - Run
python trainer/hf_trainer.py --shape_style <shape1>_<style1> <shape2>_<style2> ...
to train pivot high frequency predictors for pivots<shape1>_<style1>
,<shape2>_<style2>
, and so on. SeeDATA_DIR/<garment_class>_<gender>/pivots.txt
to know available pivots.
1.No module named 'smpl_lib' :export PYTHONPATH=/.../TailorNet_dataset:$PYTHONPATH
2.No blender :export PATH="/home/cyx/cyx/blender-2.79-linux-glibc219-x86_64:$PATH"(your own path)
We have provided three available models for selection.