A processor that uses an Inception model to classify in real-time images into different categories (e.g. labels).
Model implements a deep Convolutional Neural Network that can achieve reasonable performance on hard visual recognition tasks - matching or exceeding human performance in some domains like image recognition.
The input of the model is an image as binary array.
The output is a Tuple (or JSON) message in this format:
{
"labels" : [
{"giant panda":0.98649305}
]
}
Result contains the name of the recognized category (e.g. label) along with the confidence (e.g. confidence) that the image represents this category.
If the response-seize
is set to value higher then 1, then the result will include the top response-seize
probable labels. For example response-size=3
would return:
{
"labels": [
{"giant panda":0.98649305},
{"badger":0.010562794},
{"ice bear":0.001130851}
]
}
The image-recognition processor has the following options:
- tensorflow.expression
-
How to obtain the input data from the input message. If empty it defaults to the input message payload. The payload.myInTupleName expression treats the input payload as a Tuple, and myInTupleName stands for a Tuple key. The headers[myHeaderName] expression to get input data from message's header using myHeaderName as a key. (Expression, default:
<none>
) - tensorflow.image.recognition.draw-labels
-
When set to true it augment the input image with the predicted labels (Boolean, default:
true
) - tensorflow.image.recognition.labels
-
The text file containing the category names (e.g. labels) of all categories that this model is trained to recognize. Every category is on a separate line. (Resource, default:
<none>
) - tensorflow.image.recognition.response-size
-
Number of top K alternatives to add to the result. Only used when the responseSize > 0. (Integer, default:
1
) - tensorflow.mode
-
Defines how to store the output data and if the input payload is passed through or discarded. Payload (Default) stores the output data in the outbound message payload. The input payload is discarded. Header stores the output data in outputName message's header. The the input payload is passed through. Tuple stores the output data in an Tuple payload, using the outputName key. The input payload is passed through in the same Tuple using the 'original.input.data'. If the input payload is already a Tuple that contains a 'original.input.data' key, then copy the input Tuple into the new Tuple to be returned. (OutputMode, default:
<none>
, possible values:payload
,tuple
,header
) - tensorflow.model
-
The location of the TensorFlow model file. (Resource, default:
<none>
) - tensorflow.model-fetch
-
The TensorFlow graph model outputs. Comma separate list of TensorFlow operation names to fetch the output Tensors from. (List<String>, default:
<none>
) - tensorflow.output-name
-
The output data key used in the Header or Tuple modes. (String, default:
result
)