1/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 2 3Licensed under the Apache License, Version 2.0 (the "License"); 4you may not use this file except in compliance with the License. 5You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9Unless required by applicable law or agreed to in writing, software 10distributed under the License is distributed on an "AS IS" BASIS, 11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12See the License for the specific language governing permissions and 13limitations under the License. 14==============================================================================*/ 15 16syntax = "proto2"; 17 18package tflite.task.vision; 19 20// A single classification result. 21message Class { 22 // The index of the class in the corresponding label map, usually packed in 23 // the TFLite Model Metadata [1]. 24 // 25 // [1]: https://www.tensorflow.org/lite/convert/metadata 26 optional int32 index = 1; 27 // The score for this class e.g. (but not necessarily) a probability in [0,1]. 28 optional float score = 2; 29 // A human readable name of the class filled from the label map. 30 optional string display_name = 3; 31 // An ID for the class, not necessarily human-readable (e.g. a Google 32 // Knowledge Graph ID [1]), filled from the label map. 33 // 34 // [1]: https://developers.google.com/knowledge-graph 35 optional string class_name = 4; 36} 37