Models: Documentation: How do I get class probabilities for Deeplab v3+?

Created on 21 Apr 2018  路  4Comments  路  Source: tensorflow/models

System information

  • What is the top-level directory of the model you are using: models/research/deeplab
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): no
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Ubuntu 16.04
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 1.6
  • Bazel version (if compiling from source):
  • CUDA/cuDNN version: 8.0
  • GPU model and memory: GeForce 1080 Ti 11GB
  • Exact command to reproduce: ?

Describe the problem

The model currently outputs a numpy array containing the class for each pixel. I would like to get access to the complete list of all probabilities for all classes for each pixel.

awaiting maintainer

Most helpful comment

Please check the code for details.
https://github.com/tensorflow/models/blob/master/research/deeplab/model.py#L151
You could use the predictions before taking argmax.

All 4 comments

I'd add some people who might be able to help.

Please check the code for details.
https://github.com/tensorflow/models/blob/master/research/deeplab/model.py#L151
You could use the predictions before taking argmax.

Hello ! I have the same question here, I don't really understand how the line that you have specified can answer to the question. Is it possible to change the model so that it can output the class probabilities after exporting the model instead of returning the class of each pixel ?

@younesbelkada currently that line is changed to 163. What you need is the 'predictions' inline 163.

@aquariusjay How to get the class probabilities using forzen_inference_graph.pb. Not able to understand how to get the output of class probabilities in demo.ipynb.
Can this be done by changing OUTPUT_TENSOR_NAME = 'SemanticPredictions:0' to _OUTPUT_PROB_NAME = 'SemanticProbabilities' (# Output name of the exported probabilities). What are SemanticProbabilities?

Thanks in advance

Was this page helpful?
0 / 5 - 0 ratings