Can i use this model on a mobile app ??

#7
by Kamizuru00 - opened

Can i use this model on a mobile app ?? cause im trying to build a object detection mobile app but it does not work in mobile build but works in pc??

same for me . My Application is working fine on PC . what modification is needed?

Hello, there are two things that you need to change to use this code on a smartphone.

  1. You need a variable public ModelAsset modelAsset; which you can assign your onnx model (not sentis) to. Giving the ModelLoader the path to the model does not work on smartphones. In LoadModel() you can change the line to model = ModelLoader.Load(modelAsset);
  2. Instead of using a Video you need a WebcamTexture to give as an input to the model.

I am able to run the project on my smartphone with these changes.

Thank you So much for the infomation it works now!

Kamizuru00 changed discussion status to closed
Kamizuru00 changed discussion status to open

Hello @Kamizuru00 can you please post the changes you made?
Thanks

sure first you have to put onnx model into assests then use this in your code

public ModelAsset modelasset;
//Load model
model = ModelLoader.Load(modelasset);

@Kamizuru00 possible to share your complete implementation including the association with UI element for this webcam texture
Thanks in advance@

Hello @Kamizuru00 ,
Two questions :
(1) Did you put the onnx model and also click "serialize to streaming assets"? or only placed in the Assets?
(2) "You need a variable public ModelAsset modelAsset; which you can assign your onnx model (not sentis) to " > This you are doing in the inspector window or C# code?

Regards,
S

@Melo36 Hello, how do you do the second point? Can you describe it in more detail? Thank you so much.
Instead of using a Video you need a WebcamTexture to give as an input to the model.

Sign up or log in to comment