Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Loading Model #23

Closed
Zia-Bashir opened this issue May 2, 2023 · 8 comments
Closed

Error in Loading Model #23

Zia-Bashir opened this issue May 2, 2023 · 8 comments

Comments

@Zia-Bashir
Copy link

I'm trying to load the model for a day. I tried it around 6 months ago for object detection but that time package didn't support YOLO V8. Now I'm trying to upload tflite mode of esrgan-tf2 super image resolution. But the model didn't load error is coming. I double-checked everything like imports, pub, and address but I'm unable to load it. Can u please make an example that how to work with super image model

CONSOLE

I/Timeline(32066): Timeline: Activity_launch_request time:451900404
I/GED (32066): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 27, oppidx_max 27, oppidx_min 0
V/PhoneWindow(32066): DecorView setVisiblity: visibility = 4, Parent = android.view.ViewRootImpl@d044a7d, this = DecorView@333fd72[MainActivity]
2
V/PhoneWindow(32066): DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@d044a7d, this = DecorView@333fd72[MainActivity]
[log] ++++++++++ Process Image +++++++
D/skia (32066): SkJpegCodec::onGetPixels +
D/skia (32066): SkJpegCodec::onGetPixels -
I/flutter (32066): Error processing image: Unable to load asset: "assets/assets/model/sr_model.tflite".
I/flutter (32066): The asset does not exist or has empty data.

@mlopez0
Copy link
Contributor

mlopez0 commented May 3, 2023

I see the error message "assets/assets/model/sr_model.tflite".

Do you have an assets folder inside the assets folder? Just to double check :)

@Zia-Bashir
Copy link
Author

Zia-Bashir commented May 3, 2023

I see the error message "assets/assets/model/sr_model.tflite".

Do you have an assets folder inside the assets folder? Just to double check :)

Yes It's okay from pub and from the assets folder

@yeikel16
Copy link

yeikel16 commented May 16, 2023

The method of loading the model from the assets already contains the asset name explicitly, so you shouldn't put it yourself. Try removing assets from the path to your model.

Captura de pantalla 2023-05-15 a la(s) 10 04 35 p m

Try in you code:
After: "assets/assets/model/sr_model.tflite"
Before: "assets/model/sr_model.tflite"

@luiscib3r
Copy link
Contributor

@Zia-Bashir, in this PR #49 I added an example for super resolution using esrgan. You can also check it in my fork https://github.com/luiscib3r/flutter-tflite/tree/develop/example/super_resolution_esrgan. Any questions, suggestions, or bug reports are welcome.

@luiscib3r
Copy link
Contributor

Try with tflite_flutter: ^0.10.0

@bdytx5
Copy link

bdytx5 commented May 25, 2023

just thought i'd add, i feel most users using tflite in a mobile app will be either interested in language models or some sort of detection. I think a yolo demo/example would be awesome, and it seems like most of the groundwork has already been completed in the image classification demo!

@PaulTR
Copy link
Collaborator

PaulTR commented Jun 1, 2023

@bdytx5 Object detection example is now in :)

@PaulTR
Copy link
Collaborator

PaulTR commented Jun 1, 2023

Going to leave this issue open for a minute.

Action item for me: Document the new path in the wiki

@PaulTR PaulTR closed this as completed Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants