I've using Vision (GCP feature) to generated a custom object detection model and use it in my app (according to this library: https://developers.google.com/ml-kit/vision/object-detection/custom-models/android)
But when I use it, it said:
Failed to initialize detector. Unexpected number of dimensions for output index 0: got 3D, expected either 2D (BxN with B=1) or 4D (BxHxWxN with B=1, W=1, H=1).
So I decided to use the TFLite task library. It looks fine when I took a picture in an empty black image. But when I try to take a picture with objects, it getting an error: Expected locations tensor with dimensions [1,35,4] at index 0, found [1,40,4]
Is there any way to solve this? Or can you suggest any good way to make this work?
P.S. I've looked and try to solve with the information from Standard TFlite object detection model not working in MLKit