detection.proto 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. syntax = "proto3";
  15. package google.cloud.automl.v1;
  16. import "google/cloud/automl/v1/geometry.proto";
  17. option csharp_namespace = "Google.Cloud.AutoML.V1";
  18. option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl";
  19. option java_multiple_files = true;
  20. option java_package = "com.google.cloud.automl.v1";
  21. option php_namespace = "Google\\Cloud\\AutoMl\\V1";
  22. option ruby_package = "Google::Cloud::AutoML::V1";
  23. // Annotation details for image object detection.
  24. message ImageObjectDetectionAnnotation {
  25. // Output only. The rectangle representing the object location.
  26. BoundingPoly bounding_box = 1;
  27. // Output only. The confidence that this annotation is positive for the parent example,
  28. // value in [0, 1], higher means higher positivity confidence.
  29. float score = 2;
  30. }
  31. // Bounding box matching model metrics for a single intersection-over-union
  32. // threshold and multiple label match confidence thresholds.
  33. message BoundingBoxMetricsEntry {
  34. // Metrics for a single confidence threshold.
  35. message ConfidenceMetricsEntry {
  36. // Output only. The confidence threshold value used to compute the metrics.
  37. float confidence_threshold = 1;
  38. // Output only. Recall under the given confidence threshold.
  39. float recall = 2;
  40. // Output only. Precision under the given confidence threshold.
  41. float precision = 3;
  42. // Output only. The harmonic mean of recall and precision.
  43. float f1_score = 4;
  44. }
  45. // Output only. The intersection-over-union threshold value used to compute
  46. // this metrics entry.
  47. float iou_threshold = 1;
  48. // Output only. The mean average precision, most often close to au_prc.
  49. float mean_average_precision = 2;
  50. // Output only. Metrics for each label-match confidence_threshold from
  51. // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
  52. // derived from them.
  53. repeated ConfidenceMetricsEntry confidence_metrics_entries = 3;
  54. }
  55. // Model evaluation metrics for image object detection problems.
  56. // Evaluates prediction quality of labeled bounding boxes.
  57. message ImageObjectDetectionEvaluationMetrics {
  58. // Output only. The total number of bounding boxes (i.e. summed over all
  59. // images) the ground truth used to create this evaluation had.
  60. int32 evaluated_bounding_box_count = 1;
  61. // Output only. The bounding boxes match metrics for each
  62. // Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
  63. // and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
  64. // pair.
  65. repeated BoundingBoxMetricsEntry bounding_box_metrics_entries = 2;
  66. // Output only. The single metric for bounding boxes evaluation:
  67. // the mean_average_precision averaged over all bounding_box_metrics_entries.
  68. float bounding_box_mean_average_precision = 3;
  69. }