Skip to content

JUNOHINATA/SACANet

Repository files navigation

Requirements

python3
pytorch
scipy
chumpy
psbody.mesh

Code works with psbody.mesh v0.4 , pytorch >= v1.0 , chumpy v0.7 and scipy v1.3 .

How to Run

  • 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.
  • 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.)

Training by yourself

  • 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 run python trainer/base_trainer.py to train SACANetNet MLP baseline.
  • Similarly, run python trainer/lf_trainer.py to train low frequency predictor and trainer/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. See DATA_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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages