A Simple Toolset for Creating a Model and Predicting 3D Polygon Vertex Data using PyTorch and Maya
- Initialize Test Data Scene
- Export Training Data
- Build Model
- Predict and Import Data
-
Clone or Download Source and Unzip to Local Machine
-
Open a Terminal or Command Prompt and Navigate to the top bshagegen directory
Windows ie.
c:/dev/src/bshapegen
Mac ie.
~\dev\src\bshapegen
-
Windows - in command prompt run:
.\cmd\init_env_conda.bat
MacOs M1 - in terminal run:
source ./sh/init_env_conda_M1.sh
-
Confirm PyTorch is Installed by running the following from the same shell
python -c "import torch;print(torch.__version__)"
Successful return should look like this (versions might differ)
2.1.0
- Clone Repo Locally
- Launch Maya
- Run this in a python tab in the script editor (change
bsg_py_path
to your local machine location)
import os
import sys
#
bsg_py_path = '/Users/zoshua/src/bshapegen/py'
sys.path.append(bsg_py_path)
#
from bshapegen.maya import bsg_ui
#
bsg_ui = bsg_ui.BSG_UI();
bsg_ui.show(dockable=True);
- Dock the
BlendShapeGen
dialog if needed - Update the
Work Dir
location if needed - Click the
Build Test Scene
button - Click the
Export Training Data
button - Click the
Build Model
button - Click the
Export > Predict > Import Data
button
Color Guide:
- yellow = training input neutral data (model build)
- orange = training output pose data (model build)
- cyan = neutral input data (model prediction)
- blue = reference pose data (used to measure and visualize model accuracy)
- magenta = pose output data (model prediction)
train samples | neurons | epochs | learning rate | loss | validation | predict samples | predict err sum |
---|---|---|---|---|---|---|---|
100 | 512 | 150 | 0.001 | 0.007996 | 0.007446 | 5 | 3.16174 |
100 | 1024 | 150 | 0.001 | 0.002554 | 0.002974 | 5 | 2.92702 |
100 | 1024 | 300 | 0.001 | 0.000129 | 0.000123 | 5 | 2.98027 |
- Explore alternate model configurations
- Explore higher resolution mesh data