Can i use this model on a mobile app ??
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.
- 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. InLoadModel()
you can change the line tomodel = ModelLoader.Load(modelAsset);
- 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!
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.
hello. I am testing on Android using webcamTexture. FPS is 6.5. Could this be a problem with the ONNX model? I tested it on Galaxy 22.