Unable to process .onnx model using studio

Question/Issue:
I have a .onnx model I’m trying to convert to FOMO.

Project ID:
275277
Context/Use case:
I’ve uploaded the .onnx saved model, but get an error when trying to generate a FOMO model.

Steps Taken:

  1. Upload model
  2. Select model input as “Image (RGB)”
  3. Try various options for “How is your input scaled”
  4. Model output is “Object detection”
  5. Selecting FOMO as the output layer
    Causes the error: Expected output shape to have 3 dimensions for FOMO

The BYOM documentation just says upload your model in one various formats, of which .onnx is one.
Is there something I’m missing?

Reproducibility:

  • [ x ] Always
  • [ ] Sometimes
  • [ ] Rarely

Environment:

  • Platform: [e.g., Raspberry Pi, nRF9160 DK, etc.]
  • Build Environment Details: [e.g., Arduino IDE 1.8.19 ESP32 Core for Arduino 2.0.4]
  • OS Version: [e.g., Ubuntu 20.04, Windows 10]
  • Edge Impulse Version (Firmware): [e.g., 1.2.3]
  • To find out Edge Impulse Version:
  • if you have pre-compiled firmware: run edge-impulse-run-impulse --raw and type AT+INFO. Look for Edge Impulse version in the output.
  • if you have a library deployment: inside the unarchived deployment, open model-parameters/model_metadata.h and look for EI_STUDIO_VERSION_MAJOR, EI_STUDIO_VERSION_MINOR, EI_STUDIO_VERSION_PATCH
  • Edge Impulse CLI Version: [e.g., 1.5.0]
  • Project Version: [e.g., 1.0.0]
  • Custom Blocks / Impulse Configuration: [Describe custom blocks used or impulse configuration]
    Logs/Attachments:
    [Include any logs or screenshots that may help in diagnosing the issue]

Additional Information:
[Any other information that might be relevant]

Hi @edgeimpuls_nospam

I’m not sure if you can convert a model from one format to FOMO, there are specific constraints on FOMO and its not a typical object detection model.

It wont work in a way that can be converted from YOLO for example.

Can you try converting to another object detection model?

Best

Eoin

1 Like

Hi @edgeimpuls_nospam - building on top of @Eoin’s response.

BYOM is not meant for converting one type of model architecture to another. The idea behind the the “Output layer” parameter when the model output is set to object detection is to select the value that corresponds to the model architecture that you uploaded.

For example,

  • If you uploaded a FOMO model, you would select FOMO
  • If you uploaded a YOLOv7 model, you would select YOLOv7
  • and so on…

I hope this helps clear up any confusion!

1 Like