chromium/third_party/mediapipe/src/mediapipe/tasks/cc/components/processors/proto/detection_postprocessing_graph_options.proto

/* Copyright 2023 The MediaPipe 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 = "proto3";

package mediapipe.tasks.components.processors.proto;

import "mediapipe/calculators/tensor/tensors_to_detections_calculator.proto";
import "mediapipe/calculators/tflite/ssd_anchors_calculator.proto";
import "mediapipe/calculators/util/detection_label_id_to_text_calculator.proto";
import "mediapipe/calculators/util/non_max_suppression_calculator.proto";
import "mediapipe/framework/calculator.proto";
import "mediapipe/tasks/cc/components/calculators/score_calibration_calculator.proto";

message DetectionPostprocessingGraphOptions {
  // Optional SsdAnchorsCalculatorOptions for models without
  // non-maximum-suppression in tflite model graph.
  optional mediapipe.SsdAnchorsCalculatorOptions ssd_anchors_options = 1;

  // Optional TensorsToDetectionsCalculatorOptions for models without
  // non-maximum-suppression in tflite model graph.
  optional mediapipe.TensorsToDetectionsCalculatorOptions
      tensors_to_detections_options = 2;

  // Optional NonMaxSuppressionCalculatorOptions for models without
  // non-maximum-suppression in tflite model graph.
  optional mediapipe.NonMaxSuppressionCalculatorOptions
      non_max_suppression_options = 3;

  // Optional score calibration options for models with non-maximum-suppression
  // in tflite model graph.
  optional ScoreCalibrationCalculatorOptions score_calibration_options = 4;

  // Optional detection label id to text calculator options.
  optional mediapipe.DetectionLabelIdToTextCalculatorOptions
      detection_label_ids_to_text_options = 5;

  // Whether output tensors are quantized (kTfLiteUint8) or not (kFloat32).
  optional bool has_quantized_outputs = 6;
}