Application using Sentis for Yolo object recognition hangs 16 seconds

Hi,

I published a little sample on how to cross-platform run Yolo object recognition on a Magic Leap 2 and HoloLens 2, using a local ONNX model and the (relatively) new Unity Sentis inference engine. In object recognition, Magic Leap 2 now outperforms HoloLens 2. That is nice to see.

However, there's on oddity. When I run the app, it goes to a few stages. Right before it goes into loading the model, it tries to get a camera. Apparently it succeeds in that, as it shows the red dot, but then then any hologram displayed disappears completely. The only thing displayed is that red dot. This goes on for about 16 seconds. Then the app resumes displaying stuff and runs at full speed.

I have not been able to find out where it hangs. I have placed multiple debug statements in that are written to a file, but I can't put a finger on what exactly causes it. The sample is described here, the repo is here. If you decided to have a look, make sure to have look at the crossplat-sentis. Any ideas/suggestions?

OS 1.10.0
Unity 2022.3.38f1
SDK 2.5.0
ML MRTK 1.3.0

Hi @localjoost,

Thanks for reaching out about this. It's always interesting to hear good news about our headset's performance. I think that the best way to go about this would be to take a look at the Unity Profiler to see what may be causing this to hang. If you do find that this paused period is necessary, I would recommend some sort of loading indicator. You can also try to use Unity's Graphics Jobs in the player settings. This may help speed up startup times.