Share

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:

  1. Use a Bifrost graph to generate a set of training data.
  2. Export the data using the NumPy nodes.
  3. Train a neural network on the exported data using a library like PyTorch or TensorFlow.
  4. Import the resulting weights and implement model inference in another Bifrost graph.
  5. 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.

Was this information helpful?