0

I trained a quantized semantic segmentation model with my own dataset using the python scripts available on Deeplab's official Github page. I used the mobilenetv2_coco_voc_trainaug backbone. I checked the result model in Netron and this how the input an output looks:

netron visualization

As you can see, the output is an array of int64 with size of 257x257. From my understanding this array should contain the index of label with the highest probability at every array index, or am I missing something? But when when I try to read this in Android, I got just zeros and ones, indiferent of what is in picture, people, cow, etc.

for (y in 0 until imageHeight) {
  for (x in 0 until imageWidth) {
    // resultBuffer is a ByteBuffer of size imageSize * imageSize * 8
    val value  = resultBuffer.getLong((y * imageWidth  + x) * 8)
  }  

}

input image segmentation result

The result is not that accurate either, since I'm getting segmentation values where I shouldn't. Any help would be appreciated!

blade
  • 804
  • 1
  • 9
  • 18

1 Answers1

0

Cant comment yet, lets try guess.

You are trying to use quantized model with int64 output. Output should be 8bit type

And yes, accuracy will drop with quantized model

Alex K.
  • 842
  • 7
  • 17