Machine Learning
The Machine Learning nodes can help you to create customized AI-based solutions for simulations, deformations, motion control, and other effects in the Bifrost graph. For example, you can replace a known but time-consuming calculation with a faster estimation, or predict the results of an unknown function based on sampled data.
Given weights from a trained MLP (multi-layered perceptron, or deep neural network), you can implement model inference in Bifrost using a variety of activation nodes like ReLU or sigmoid to suit your data. This graph can then be run in a stand-alone fashion, without the need for further input from a machine-learning algorithm.
In addition, you can create your own data for training. The procedural nature of Bifrost makes it convenient to build and refine a solution:
- Use a Bifrost graph to generate a set of training data.
- Export the data using the NumPy nodes.
- Train a neural network on the exported data using a library like PyTorch or TensorFlow.
- Import the resulting weights and implement model inference in another Bifrost graph.
- Iterate as desired.
To help you get started, there are some sample graphs in the Machine Learning category of the Bifrost Browser:
generate_data
uses an FK rig to generate training data for an IK rig and exports it to NumPy.neural_network
implements an IK rig using pre-saved weights generated by training a neural network in PyTorch.
There is also a series of video tutorials that cover this process in detail: Machine Learning in Bifrost.