We are running our own nails detection custom model using runModelOnBinary method but it is not doing segmentation on nails.
Even there is no crash no warning showing in logs but still it is not doing segmentation.
Example App deeplab segmentation model is working with 'runSegmentationOnImage' method but when I use this method with my own custom model it gives me bellow error.
Cannot convert between a TensorFlowLite buffer with 196608 bytes and a Java Buffer with 786432 bytes.org.tensorflow.lite.Tensor.throwIfShapeIsIncompatible
Is runModelOnBinary method support segmentation or not ?
Bellow is the code I'm using
var recognitions = await Tflite.runSegmentationOnBinary(binary: imageToByteListUint8(resizedImage, 128),labelColors: [colorbackground,colorbase,colornail,colortip],outputType: "jpg",);print('Output of our model recognitions $recognitions');
Hello Qian @shaqian
We are running our own nails detection custom model using
runModelOnBinary
method but it is not doing segmentation on nails.Even there is no crash no warning showing in logs but still it is not doing segmentation.
Example App deeplab segmentation model is working with 'runSegmentationOnImage' method but when I use this method with my own custom model it gives me bellow error.
Cannot convert between a TensorFlowLite buffer with 196608 bytes and a Java Buffer with 786432 bytes.org.tensorflow.lite.Tensor.throwIfShapeIsIncompatible
Is
runModelOnBinary
method support segmentation or not ?Bellow is the code I'm using
var recognitions = await Tflite.runSegmentationOnBinary(
binary: imageToByteListUint8(resizedImage, 128),
labelColors: [colorbackground,colorbase,colornail,colortip],
outputType: "jpg",);
print('Output of our model recognitions $recognitions');
Output returning from model is
I/flutter (15954): Output of our model recognitions [0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0,
Thanks Ehtasham Ali