50 lines
1.6 KiB
Protocol Buffer
50 lines
1.6 KiB
Protocol Buffer
syntax = "proto2";
|
|
|
|
package mediapipe;
|
|
|
|
import "mediapipe/framework/calculator.proto";
|
|
|
|
// Full Example:
|
|
//
|
|
// node {
|
|
// calculator: "TfLiteConverterCalculator"
|
|
// input_stream: "IMAGE_IN:input_image"
|
|
// output_stream: "TENSOR_OUT:image_tensor"
|
|
// options {
|
|
// [mediapipe.TfLiteConverterCalculatorOptions.ext] {
|
|
// zero_center: true
|
|
// }
|
|
// }
|
|
// }
|
|
//
|
|
message TfLiteConverterCalculatorOptions {
|
|
extend mediapipe.CalculatorOptions {
|
|
optional TfLiteConverterCalculatorOptions ext = 245817797;
|
|
}
|
|
|
|
// Choose normalization mode for output (not applied for Matrix inputs).
|
|
// true = [-1,1]
|
|
// false = [0,1]
|
|
// Ignored if using quantization.
|
|
optional bool zero_center = 1 [default = true];
|
|
|
|
// Whether the input image should be flipped vertically (along the
|
|
// y-direction). This is useful, for example, when the input image is defined
|
|
// with a coordinate system where the origin is at the bottom-left corner
|
|
// (e.g., in OpenGL) whereas the ML model expects an image with a top-left
|
|
// origin.
|
|
optional bool flip_vertically = 2 [default = false];
|
|
|
|
// Controls how many channels of the input image get passed through to the
|
|
// tensor. Valid values are 1,3,4 only. Ignored for iOS GPU.
|
|
optional int32 max_num_channels = 3 [default = 3];
|
|
|
|
// The calculator expects Matrix inputs to be in column-major order. Set
|
|
// row_major_matrix to true if the inputs are in row-major order.
|
|
optional bool row_major_matrix = 4 [default = false];
|
|
|
|
// Quantization option (CPU only).
|
|
// When true, output kTfLiteUInt8 tensor instead of kTfLiteFloat32.
|
|
optional bool use_quantized_tensors = 5 [default = false];
|
|
}
|