I am trying to run the sample app from tensorflow for image segmentation with a different model.
I would like to run it with the model shufflenetv2 with dpc.
So I copied the model, and changed imageSize to 225 in ImageSegmentationModelExecutor.kt.
Then I am getting the error
something went wrong: y + height must be <= bitmap.height()
Doing some small adjustments in the function scaleBitmapAndKeepRatio of ImageUtils.kt solves the problem. (Just changed targetBmp.width to height twice, once in the matrix and 2nd time in the return.) This brings the next error
something went wrong: Cannot convert between a TensorFlowLite buffer with 202500 bytes and a Java Buffer with 4252500 bytes.
The ratio of these 2 numbers is the NUM_CLASSES. Not sure if this is the right way to get it running or how to continue from here. Any ideas or suggestions?