detection.proto 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. // Copyright 2020 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.v1beta1;
  16. import "google/cloud/automl/v1beta1/geometry.proto";
  17. import "google/protobuf/duration.proto";
  18. import "google/api/annotations.proto";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
  20. option java_multiple_files = true;
  21. option java_package = "com.google.cloud.automl.v1beta1";
  22. option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
  23. option ruby_package = "Google::Cloud::AutoML::V1beta1";
  24. // Annotation details for image object detection.
  25. message ImageObjectDetectionAnnotation {
  26. // Output only. The rectangle representing the object location.
  27. BoundingPoly bounding_box = 1;
  28. // Output only. The confidence that this annotation is positive for the parent example,
  29. // value in [0, 1], higher means higher positivity confidence.
  30. float score = 2;
  31. }
  32. // Annotation details for video object tracking.
  33. message VideoObjectTrackingAnnotation {
  34. // Optional. The instance of the object, expressed as a positive integer. Used to tell
  35. // apart objects of the same type (i.e. AnnotationSpec) when multiple are
  36. // present on a single example.
  37. // NOTE: Instance ID prediction quality is not a part of model evaluation and
  38. // is done as best effort. Especially in cases when an entity goes
  39. // off-screen for a longer time (minutes), when it comes back it may be given
  40. // a new instance ID.
  41. string instance_id = 1;
  42. // Required. A time (frame) of a video to which this annotation pertains.
  43. // Represented as the duration since the video's start.
  44. google.protobuf.Duration time_offset = 2;
  45. // Required. The rectangle representing the object location on the frame (i.e.
  46. // at the time_offset of the video).
  47. BoundingPoly bounding_box = 3;
  48. // Output only. The confidence that this annotation is positive for the video at
  49. // the time_offset, value in [0, 1], higher means higher positivity
  50. // confidence. For annotations created by the user the score is 1. When
  51. // user approves an annotation, the original float score is kept (and not
  52. // changed to 1).
  53. float score = 4;
  54. }
  55. // Bounding box matching model metrics for a single intersection-over-union
  56. // threshold and multiple label match confidence thresholds.
  57. message BoundingBoxMetricsEntry {
  58. // Metrics for a single confidence threshold.
  59. message ConfidenceMetricsEntry {
  60. // Output only. The confidence threshold value used to compute the metrics.
  61. float confidence_threshold = 1;
  62. // Output only. Recall under the given confidence threshold.
  63. float recall = 2;
  64. // Output only. Precision under the given confidence threshold.
  65. float precision = 3;
  66. // Output only. The harmonic mean of recall and precision.
  67. float f1_score = 4;
  68. }
  69. // Output only. The intersection-over-union threshold value used to compute
  70. // this metrics entry.
  71. float iou_threshold = 1;
  72. // Output only. The mean average precision, most often close to au_prc.
  73. float mean_average_precision = 2;
  74. // Output only. Metrics for each label-match confidence_threshold from
  75. // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
  76. // derived from them.
  77. repeated ConfidenceMetricsEntry confidence_metrics_entries = 3;
  78. }
  79. // Model evaluation metrics for image object detection problems.
  80. // Evaluates prediction quality of labeled bounding boxes.
  81. message ImageObjectDetectionEvaluationMetrics {
  82. // Output only. The total number of bounding boxes (i.e. summed over all
  83. // images) the ground truth used to create this evaluation had.
  84. int32 evaluated_bounding_box_count = 1;
  85. // Output only. The bounding boxes match metrics for each
  86. // Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
  87. // and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
  88. // pair.
  89. repeated BoundingBoxMetricsEntry bounding_box_metrics_entries = 2;
  90. // Output only. The single metric for bounding boxes evaluation:
  91. // the mean_average_precision averaged over all bounding_box_metrics_entries.
  92. float bounding_box_mean_average_precision = 3;
  93. }
  94. // Model evaluation metrics for video object tracking problems.
  95. // Evaluates prediction quality of both labeled bounding boxes and labeled
  96. // tracks (i.e. series of bounding boxes sharing same label and instance ID).
  97. message VideoObjectTrackingEvaluationMetrics {
  98. // Output only. The number of video frames used to create this evaluation.
  99. int32 evaluated_frame_count = 1;
  100. // Output only. The total number of bounding boxes (i.e. summed over all
  101. // frames) the ground truth used to create this evaluation had.
  102. int32 evaluated_bounding_box_count = 2;
  103. // Output only. The bounding boxes match metrics for each
  104. // Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
  105. // and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
  106. // pair.
  107. repeated BoundingBoxMetricsEntry bounding_box_metrics_entries = 4;
  108. // Output only. The single metric for bounding boxes evaluation:
  109. // the mean_average_precision averaged over all bounding_box_metrics_entries.
  110. float bounding_box_mean_average_precision = 6;
  111. }