Skip to content

java.lang.IndexOutOfBoundsException: Index 80 out of bounds for length 80 #83

Open
@ZherriDev

Description

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.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclassifyImage Classification issues, PR's

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions