Class ObjectDetectionOutputConverter

java.lang.Object
org.springframework.cloud.fn.object.detection.ObjectDetectionOutputConverter
All Implemented Interfaces:
Function<Map<String,org.tensorflow.Tensor<?>>,List<List<ObjectDetection>>>

public class ObjectDetectionOutputConverter extends Object implements Function<Map<String,org.tensorflow.Tensor<?>>,List<List<ObjectDetection>>>
Converts the Tensorflow Object Detection result into ObjectDetection list. The pre-trained Object Detection models (http://bit.ly/2osxMAY) produce 3 tensor outputs: (1) detection_classes - containing the ids of detected objects, (2) detection_scores - confidence probabilities of the detected object and (3) detection_boxes - the object bounding boxes withing the images. The MASK based models provide to 2 additional tensors: (4) num_detections and (5) detection_masks. All outputs tensors are float arrays, having: - 1 as the first dimension - maxObjects as the second dimension While boxesT will have 4 as the third dimension (2 sets of (x, y) coordinates). This can be verified by looking at scoresT.shape() etc. The format detected classes (e.g. labels) names is defined by the 'string_int_labels_map.proto'. The input list is available at: https://github.com/tensorflow/models/tree/master/research/object_detection/data
Author:
Christian Tzolov