1// Copyright 2021 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.automl.v1; 18 19import "google/cloud/automl/v1/geometry.proto"; 20 21option csharp_namespace = "Google.Cloud.AutoML.V1"; 22option go_package = "cloud.google.com/go/automl/apiv1/automlpb;automlpb"; 23option java_multiple_files = true; 24option java_package = "com.google.cloud.automl.v1"; 25option php_namespace = "Google\\Cloud\\AutoMl\\V1"; 26option ruby_package = "Google::Cloud::AutoML::V1"; 27 28// Annotation details for image object detection. 29message ImageObjectDetectionAnnotation { 30 // Output only. The rectangle representing the object location. 31 BoundingPoly bounding_box = 1; 32 33 // Output only. The confidence that this annotation is positive for the parent example, 34 // value in [0, 1], higher means higher positivity confidence. 35 float score = 2; 36} 37 38// Bounding box matching model metrics for a single intersection-over-union 39// threshold and multiple label match confidence thresholds. 40message BoundingBoxMetricsEntry { 41 // Metrics for a single confidence threshold. 42 message ConfidenceMetricsEntry { 43 // Output only. The confidence threshold value used to compute the metrics. 44 float confidence_threshold = 1; 45 46 // Output only. Recall under the given confidence threshold. 47 float recall = 2; 48 49 // Output only. Precision under the given confidence threshold. 50 float precision = 3; 51 52 // Output only. The harmonic mean of recall and precision. 53 float f1_score = 4; 54 } 55 56 // Output only. The intersection-over-union threshold value used to compute 57 // this metrics entry. 58 float iou_threshold = 1; 59 60 // Output only. The mean average precision, most often close to au_prc. 61 float mean_average_precision = 2; 62 63 // Output only. Metrics for each label-match confidence_threshold from 64 // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is 65 // derived from them. 66 repeated ConfidenceMetricsEntry confidence_metrics_entries = 3; 67} 68 69// Model evaluation metrics for image object detection problems. 70// Evaluates prediction quality of labeled bounding boxes. 71message ImageObjectDetectionEvaluationMetrics { 72 // Output only. The total number of bounding boxes (i.e. summed over all 73 // images) the ground truth used to create this evaluation had. 74 int32 evaluated_bounding_box_count = 1; 75 76 // Output only. The bounding boxes match metrics for each 77 // Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 78 // and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 79 // pair. 80 repeated BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; 81 82 // Output only. The single metric for bounding boxes evaluation: 83 // the mean_average_precision averaged over all bounding_box_metrics_entries. 84 float bounding_box_mean_average_precision = 3; 85} 86