You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to implement image classification, but it gives me this whole java error. I tried to implement object detection and worked well, but image classification isn't working. Is there any way I can fix this?
D/AndroidRuntime( 7585): Shutting down VM
E/AndroidRuntime( 7585): FATAL EXCEPTION: main
E/AndroidRuntime( 7585): Process: com.example.example, PID: 7585
E/AndroidRuntime( 7585): java.lang.IndexOutOfBoundsException: Index 80 out of bounds for length 80
E/AndroidRuntime( 7585): at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
E/AndroidRuntime( 7585): at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
E/AndroidRuntime( 7585): at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
E/AndroidRuntime( 7585): at java.util.Objects.checkIndex(Objects.java:359)
E/AndroidRuntime( 7585): at java.util.ArrayList.get(ArrayList.java:434)
E/AndroidRuntime( 7585): at com.ultralytics.ultralytics_yolo.predict.classify.TfliteClassifier.runInference(TfliteClassifier.java:245)
E/AndroidRuntime( 7585): at com.ultralytics.ultralytics_yolo.predict.classify.TfliteClassifier.lambda$predict$0$com-ultralytics-ultralytics_yolo-predict-classify-TfliteClassifier(TfliteClassifier.java:179)
E/AndroidRuntime( 7585): at com.ultralytics.ultralytics_yolo.predict.classify.TfliteClassifier$$ExternalSyntheticLambda2.run(Unknown Source:2)
E/AndroidRuntime( 7585): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime( 7585): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 7585): at android.os.Looper.loopOnce(Looper.java:210)
E/AndroidRuntime( 7585): at android.os.Looper.loop(Looper.java:299)
E/AndroidRuntime( 7585): at android.app.ActivityThread.main(ActivityThread.java:8319)
E/AndroidRuntime( 7585): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 7585): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
E/AndroidRuntime( 7585): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1038)
W/example.example( 7585): type=1400 audit(0.0:37540): avc: denied { search } for name="mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
W/example.example( 7585): type=1400 audit(0.0:37541): avc: denied { search } for name="mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
W/example.example( 7585): type=1400 audit(0.0:37542): avc: denied { search } for name="mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
W/example.example( 7585): type=1400 audit(0.0:37543): avc: denied { search } for name="mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
W/example.example( 7585): type=1400 audit(0.0:37544): avc: denied { getattr } for path="/data/mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
W/example.example( 7585): type=1400 audit(0.0:37545): avc: denied { search } for name="mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
I/Process ( 7585): Sending signal. PID: 7585 SIG: 9
Lost connection to device.
The text was updated successfully, but these errors were encountered:
👋 Hello @ZherriDev, thank you for submitting a ultralytics/yolo-flutter-app 🚀 Issue. To help us address your concern efficiently, please ensure you've provided the following details:
For bug reports:
A clear and concise description of the bug
A minimum reproducible example (MRE) [https://docs.ultralytics.com/help/minimum_reproducible_example/] that demonstrates the issue
Your environment details (e.g., Flutter version, mobile OS version, device model)
Expected behavior vs. actual behavior
Any complete error logs or stack traces (thank you for already including the error logs!)
For feature requests:
A clear and concise description of the proposed feature
The problem this feature would solve
Any alternative solutions you've considered
For questions:
Provide as much context as possible about your question
Include any research you've already done on the topic
Specify which parts of the documentation, if any, you've already consulted
In your provided error trace, it seems to be related to the TfliteClassifier during image classification. If you haven't already, please ensure you've set up the correct input parameters and model for classification, as it might differ from object detection.
Lastly, if you haven't already, kindly verify that you've searched existing issues to avoid possible duplicates. An Ultralytics engineer will review your issue and provide further assistance soon. 🚀 Debugging together makes us stronger!
Thank you for contributing to improving the yolo-flutter-app project ❤️
The error suggests an IndexOutOfBoundsException in the TFLite classifier during image classification. This may occur if the model's output classes or label mapping doesn't align with the input data or the model configuration.
To resolve this:
Verify that the model used for classification is correctly exported for its intended task (image classification).
Ensure the correct number of classes is specified in the model's configuration and matches the labels file.
If you're using a custom model, double-check the preprocessing pipeline and ensure compatibility with the classification task.
If the issue persists, please try with the latest version of the Ultralytics package and ensure all dependencies are up to date. For more guidance, refer to the Ultralytics Docs or share additional details about your setup.
I tried to implement image classification, but it gives me this whole java error. I tried to implement object detection and worked well, but image classification isn't working. Is there any way I can fix this?
D/AndroidRuntime( 7585): Shutting down VM
E/AndroidRuntime( 7585): FATAL EXCEPTION: main
E/AndroidRuntime( 7585): Process: com.example.example, PID: 7585
E/AndroidRuntime( 7585): java.lang.IndexOutOfBoundsException: Index 80 out of bounds for length 80
E/AndroidRuntime( 7585): at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
E/AndroidRuntime( 7585): at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
E/AndroidRuntime( 7585): at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
E/AndroidRuntime( 7585): at java.util.Objects.checkIndex(Objects.java:359)
E/AndroidRuntime( 7585): at java.util.ArrayList.get(ArrayList.java:434)
E/AndroidRuntime( 7585): at com.ultralytics.ultralytics_yolo.predict.classify.TfliteClassifier.runInference(TfliteClassifier.java:245)
E/AndroidRuntime( 7585): at com.ultralytics.ultralytics_yolo.predict.classify.TfliteClassifier.lambda$predict$0$com-ultralytics-ultralytics_yolo-predict-classify-TfliteClassifier(TfliteClassifier.java:179)
E/AndroidRuntime( 7585): at com.ultralytics.ultralytics_yolo.predict.classify.TfliteClassifier$$ExternalSyntheticLambda2.run(Unknown Source:2)
E/AndroidRuntime( 7585): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime( 7585): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 7585): at android.os.Looper.loopOnce(Looper.java:210)
E/AndroidRuntime( 7585): at android.os.Looper.loop(Looper.java:299)
E/AndroidRuntime( 7585): at android.app.ActivityThread.main(ActivityThread.java:8319)
E/AndroidRuntime( 7585): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 7585): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
E/AndroidRuntime( 7585): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1038)
W/example.example( 7585): type=1400 audit(0.0:37540): avc: denied { search } for name="mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
W/example.example( 7585): type=1400 audit(0.0:37541): avc: denied { search } for name="mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
W/example.example( 7585): type=1400 audit(0.0:37542): avc: denied { search } for name="mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
W/example.example( 7585): type=1400 audit(0.0:37543): avc: denied { search } for name="mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
W/example.example( 7585): type=1400 audit(0.0:37544): avc: denied { getattr } for path="/data/mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
W/example.example( 7585): type=1400 audit(0.0:37545): avc: denied { search } for name="mqsas" dev="sda18" ino=475 scontext=u:r:untrusted_app:s0:c125,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.example.example
I/Process ( 7585): Sending signal. PID: 7585 SIG: 9
Lost connection to device.
The text was updated successfully, but these errors were encountered: