Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Unity Barracuda package brings Neural Networks to Unity

Discussion in 'Barracuda' started by ReJ, Sep 2, 2020.

Thread Status:
Not open for further replies.
  1. ReJ


    Unity Technologies

    Nov 1, 2008
    The Barracuda package allows you to run Neural Networks (also sometimes called Machine Learning) inside Unity. Barracuda runs on all Unity supported platforms including Desktop, Mobile and Consoles - feat otherwise impossible with 3rd party libraries. Barracuda seamlessly integrates with Unity rendering pipeline to provide fast & easy interoperability between graphics and Machine Learning.

    Barracuda is powered by Unity Compute Shader and Unity Burst compilers. As a result Barracuda can execute Neural Networks fast on both GPU and CPU (and NPU support is in the works).

    Barracuda relies on open-source data exchange format ONNX and supports Neural Networks trained with PyTorch, Tensorflow, Keras and Caffe.

    • Simple API
    • Lightweight - we aim at a very small binary footprint
    • Easy import process - just drag and drop your ONNX file into the Project folder
    • Tight integration with the rest of the engine
    • With source available on GitHub
    • Convolutional Neural Networks (CNN)
    • Autoencoder and Generative Adversarial Networks (GAN)
    • Recurrent (LSTM) and Fully Connected Networks
    • Large variety state-of-the-art models and supported architectures:VGG, ResNet, Inception, SqueezeNet, TinyYolo, MobileNet, Pix2Pix, UNet, SPADE, ESRGAN, etc
    • The minimum required Unity version is 2018.4 (LTS)


    1. Download Unity LTS version (2018.x or 2019.x) through the Hub.
    2. Go to Window > Package Manager.
    3. Select the Barracuda in the list of packages and click install.
    Due to the bug in Package Manager in the 2020.x our package is not visible. We are working on the fix.
    For 2020.x use the following steps:
    1. Download 2020.x or newer through the Hub.
    2. Go to Window > Package Manager.
    3. Select the ML Agents in the list of packages and click install. ML Agents package will install Barracuda as a dependency.

    Getting started

    Follow the Getting started guide through a short, complete tutorial on how to run your network in Unity with Barracuda.

    Read our Manual documentation and FAQ for answers about the design, implementation, and usage of Barracuda.

    You can study the inner workings of Barracuda by reading through our code on GitHub repository.


    Please let us know how it's going by sharing your progress on our forums here. If you have issues running Barracuda in your Unity project, please report them using Unity Bug Reporter or via the Barracuda GitHub issue tracker.
Thread Status:
Not open for further replies.