Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official 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

    ReJ

    Unity Technologies

    Joined:
    Nov 1, 2008
    Posts:
    378
    barracuda-style-transfer.compressed.gif
    Introduction
    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.

    Philosophy
    • 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
    Features
    • 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
    Requirements
    • The minimum required Unity version is 2020.3 (LTS)

    Installation

    1. Download Unity LTS version (2020.x or later) 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. Click on the "+" symbol and select "Add package from git URL...".
    4. Add "https://github.com/Unity-Technologies/barracuda-release.git" to the adress line.

    Getting started


    Follow the Getting started guide through a short, complete tutorial on how to run your network in Unity with Barracuda. You can also check some basic examples.

    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.


    Feedback

    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.
     
    Last edited by a moderator: Aug 26, 2022
    M_MG_S, cecarlsen, fcayeclld and 7 others like this.
Thread Status:
Not open for further replies.