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