Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Official Unity Sentis

Discussion in 'Barracuda' started by Aurimasp, Jun 29, 2023.

  1. Aurimasp

    Aurimasp

    Unity Technologies

    Joined:
    Oct 20, 2015
    Posts:
    10
    NeuralNotworks likes this.
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,393
    Will sentis allow similar results?
     
  3. Aurimasp

    Aurimasp

    Unity Technologies

    Joined:
    Oct 20, 2015
    Posts:
    10
    yes
     
    DevDunk likes this.
  4. Deleted User

    Deleted User

    Guest

    Not sure where I should put this, but there's an error in your documentation.

    In here: https://docs.unity3d.com/Packages/c...un-a-model.html#run-a-model-a-layer-at-a-time

    It says that the script runs the model one layer per frame. However, that's not true. It loops in the middle of the Update call so it blocks the thread. You can fix it by changing the Update method to

    Code (CSharp):
    1. void Update()
    2. {
    3.  
    4.     if (!started)
    5.     {
    6.         modelEnumerator = worker.StartManualSchedule(inputTensor);
    7.         started = true;
    8.     }
    9.  
    10.     // Iterate running the model once per frame
    11.     // In each iteration of the do-while loop, use the IEnumerator object to run the next layer of the model
    12.     if (hasMoreModelToRun)
    13.     {
    14.         hasMoreModelToRun = modelEnumerator.MoveNext();
    15.         Debug.Log(worker.scheduleProgress);
    16.     }
    17.     else
    18.     {
    19.         // Get the output tensor
    20.         var outputTensor = worker.PeekOutput() as TensorFloat;
    21.         outputTensor.PrepareCacheForAccess(blocking: true);
    22.         float[] outputArray = outputTensor.ToReadOnlyArray();
    23.         // turn off the component once the tensor is obtained
    24.         enabled = false;
    25.     }
    26. }
    EDIT: reported it as a problem to the documentation, but keeping it here so people can have a workaround.
     
    Last edited by a moderator: Jun 30, 2023
    hopeful likes this.
  5. airoll

    airoll

    Joined:
    Jan 12, 2021
    Posts:
    37
    How does this work with MLAgents?
     
  6. unity_UmihkUVVzIbHtg

    unity_UmihkUVVzIbHtg

    Unity Technologies

    Joined:
    Sep 2, 2021
    Posts:
    6
    Deleted User likes this.
  7. kankane

    kankane

    Joined:
    Feb 22, 2013
    Posts:
    19
    What are the requirements for getting closed beta access? I've signed up as soon as it was announced and I'd love to use it in order to bring this to reality. I've been using Barracuda but struggling to get some of the newer object detection models running.
     
  8. OmarVector

    OmarVector

    Joined:
    Apr 18, 2018
    Posts:
    114
    Does anyone by any chance able to test Sentis with Webgl and compare the performance with Barracuda?
     
  9. NeuralNotworks

    NeuralNotworks

    Joined:
    Jul 22, 2023
    Posts:
    6
    Hi Aurimasp, thanks to the team for this great piece of work! May I ask how long it usually takes to get approval for using the Sentis package? Now I'm working on a project that needs more flexible tensor operations, which can't seem to be satisfied by the current Barracuda package.
     
  10. alexandreribard_unity

    alexandreribard_unity

    Unity Technologies

    Joined:
    Sep 18, 2019
    Posts:
    53
  11. OmarVector

    OmarVector

    Joined:
    Apr 18, 2018
    Posts:
    114
    I did, still waiting:))
     
  12. NeuralNotworks

    NeuralNotworks

    Joined:
    Jul 22, 2023
    Posts:
    6
    Thanks for replying! I also signed up already, so I'll keep waiting then.
     
  13. unity_UmihkUVVzIbHtg

    unity_UmihkUVVzIbHtg

    Unity Technologies

    Joined:
    Sep 2, 2021
    Posts:
    6
  14. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    172
    Hi there! I've been pestering the signup form for about two or three weeks now trying to get access to Sentis. I got in for Muse (which I really don't care about) but nothing from Sentis. I've actually spent the last two months trying to get an ONNX runtime working. Because Unity's mono/C# version is so old, most modern NuGet libraries don't work for this. They work fine in a console app, though. I tried literally all of them from Microsoft.AI.MachineLearning and various OnnxRuntime packages, to pulling apart packages and manually dropping .dll's into plugin folders and trying to satisfy their dependencies. The last resort was building out my own ONNX runtime server as a separate process talking to it over named pipes, which was a huge pain. We're doing some amazing stuff on our project (a first person MMO with positional audio, doing speech-to-text, then regenerating the voice on the far side of the network with TTS). But without Sentis, this will be incredibly painful.
     
    phlipwhip likes this.
  15. liutaurasvysniauskas_unity

    liutaurasvysniauskas_unity

    Unity Technologies

    Joined:
    Jun 14, 2022
    Posts:
    7
    Sentis is in Open Beta now, you should be able to install the package by following the steps in this thread.