googlesamples / arcore-ml-sample

Apache License 2.0
75 stars 32 forks source link

Unable to use custom object detection model #1

Open xinrui98 opened 3 years ago

xinrui98 commented 3 years ago

Hello! When I try to use my custom object detection model, the app crashes and I obtain this error. Would really appreciate it if you could help. Thank you so much! Screenshot 2021-05-28 at 4 21 02 PM

devbridie commented 3 years ago

Sorry, I was out of office this week. It seems like your model isn't meant for classifying images; here's an example of one that this sample supports: https://tfhub.dev/tensorflow/lite-model/inception_v4/1/default/1

note the input type:

Image data: ByteBuffer sized 299 x 299 x 3 x PIXEL_DEPTH, where PIXEL_DEPTH is 4 for float model, and 1 for quantized model.