This directory contains a setup that allows you to improve character deformation using machine learning.

The files train_and_use.hip and train.py can be used to generate training data, train models and use the trained models.
In addition, there is a separate file pose_using_ml.hip that allows you to try out different poses with a trained ML model.
The directories Example, Fixed, Logs, Models, Poses, Preprocessed, and Skins contain the cached data that is normally generated by train_and_use.hip and train.py.
However, we provide these caches here to allow you to have a look at the generated data and the corresponding models without having to do the generation yourself (which may take several hours).

The file train_and_use.hip is configured to train only on joints that belong to the head, in order to limit the number of training examples that are needed.
This makes the training data generation and training more lightweight compared to training on all the joints, and makes it more feasible for you to experiment with the entire process yourself.

However, it is easy to re-configure the setup to use more joints:
To create an ML model that includes more joints:
1 change the settings on /obj/capybara/INCLUDED_PARTS, /obj/generated_poses/SET_RANDOM_POSE_COUNT in train_and_use.hip,
2 clear out the cached data folders,
3 re-cook /tasks/topnet1/waitforall5

Training for *all* the joints is very computationally intensive;
for good results I recommend increasing the number of random poses to at least 16k.
To allow you to try out models that are trained on all joints without having to do all this data generation yourself, we include a fully posable model in the directory FullyPosableModel.
For reference, we include in this directory the re-configured version of train_and_use.hip that was used to create these models.

