chromium/third_party/mediapipe/src/mediapipe/calculators/tflite/tflite_tensors_to_segmentation_calculator.proto

// Copyright 2019 The MediaPipe Authors.
//
// 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 mediapipe;

import "mediapipe/framework/calculator.proto";

message TfLiteTensorsToSegmentationCalculatorOptions {
  extend mediapipe.CalculatorOptions {
    optional TfLiteTensorsToSegmentationCalculatorOptions ext = 252526026;
  }

  // Dimensions of input segmentation tensor to process.
  optional int32 tensor_width = 1;     // required
  optional int32 tensor_height = 2;    // required
  optional int32 tensor_channels = 3;  // required

  // How much to use previous mask when computing current one; range [0-1].
  // This is a tradeoff between responsiveness (0.0) and accuracy (1.0).
  optional float combine_with_previous_ratio = 4 [default = 1.0];

  // Model specific: Channel to use for processing tensor.
  optional int32 output_layer_index = 5 [default = 1];

  // Flip result image mask along y-axis.
  optional bool flip_vertically = 6;
}