title: How to interpret mobilenetv2 segmentation result output on Android?
body: <p>I trained a quantized semantic segmentation model with my own dataset using the python scripts available on <a href="https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/quantize.md" rel="nofollow noreferrer">Deeplab's</a> official Github page. I used the <a href="http://download.tensorflow.org/models/deeplabv3_mnv2_pascal_train_aug_2018_01_29.tar.gz" rel="nofollow noreferrer">mobilenetv2_coco_voc_trainaug</a> backbone. I checked the result model in <a href="https://lutzroeder.github.io/netron/" rel="nofollow noreferrer">Netron</a> and this how the input an output looks:</p>
  <p><a href="https://i.stack.imgur.com/4qbGc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4qbGc.png" alt="netron visualization" /></a></p>
  <p>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.</p>
  <pre><code>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)
    }  
  </code></pre>
  <p>}</p>
  <p><a href="https://i.stack.imgur.com/55MyE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/55MyE.jpg" alt="input image" /></a>
  <a href="https://i.stack.imgur.com/o8XVY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o8XVY.jpg" alt="segmentation result" /></a></p>
  <p>The result is not that accurate either, since I'm getting segmentation values where I shouldn't.
  Any help would be appreciated!</p>