Exporting models to ONNX to be usable with Sentis

Hello!
I’m aware that there are existing models for this (unity/sentis-whisper-tiny · Hugging Face), but I’d like to export my own model. The last few days I was trying to do this with openai/whisper-small, but had no success so far. Are there any examples or docs, how the Unity-Sentis ONNX models were created?

Thanks!

As a bit more context to this.
Other than the Whisper model, I’m also trying to export a custom multiclass classifier model, it is working fine on Google Colab and I’m trying to follow the linked docs here:

However, after saving the onnx model, it can’t be assigned to the runtime model “ModelAsset” (Though this can’t be done with the linked whisper.sentis model either), and I can’t use the ModelLoader.Load() with a filename path as it gives this error:

NotSupportedException: Format version not supported: 135399688, please reimport model.

Error says you should re-import the model. Did you try right click re-import?

So, short progress.

The model inspector window doesn’t come up when looking at models in the StreamingAssets folder, only outside (then there is the Serialize to StreamingAssets button).

Now (Whisper runs fine) I can see the errors of my custom model:

  • LinearClassifier not supported
  • Normalizer not supported
  • ZipMap not supported

I’m aware of some limitations mentioned under Import a model file | Sentis | 1.3.0-pre.3, but frankly, I’m kind of a newbie in this field and not getting many things here.

My model uses the sklearn library, CountVectorizer and LogisticRegression.
Does it mean these are not supported?

This is known internally as Task 464.