Move ImagePreprocessing to "processors" folder.

PiperOrigin-RevId: 490444821
This commit is contained in:
MediaPipe Team
2022-11-23 02:08:37 -08:00
committed by Copybara-Service
parent c5ce523697
commit b5189758f7
23 changed files with 493 additions and 150 deletions
@@ -49,3 +49,13 @@ mediapipe_proto_library(
"//mediapipe/tasks/cc/components/calculators:tensors_to_embeddings_calculator_proto",
],
)
mediapipe_proto_library(
name = "image_preprocessing_graph_options_proto",
srcs = ["image_preprocessing_graph_options.proto"],
deps = [
"//mediapipe/calculators/tensor:image_to_tensor_calculator_proto",
"//mediapipe/framework:calculator_options_proto",
"//mediapipe/framework:calculator_proto",
],
)
@@ -0,0 +1,40 @@
/* Copyright 2022 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 = "proto2";
package mediapipe.tasks.components.processors.proto;
import "mediapipe/calculators/tensor/image_to_tensor_calculator.proto";
import "mediapipe/framework/calculator.proto";
message ImagePreprocessingGraphOptions {
extend mediapipe.CalculatorOptions {
optional ImagePreprocessingGraphOptions ext = 456882436;
}
// Options for the ImageToTensor calculator encapsulated by the
// ImagePreprocessing subgraph.
optional mediapipe.ImageToTensorCalculatorOptions image_to_tensor_options = 1;
// The required image processing backend type. If not specified or set to
// default, use the backend that the input image data is already on.
enum Backend {
DEFAULT = 0;
CPU_BACKEND = 1;
GPU_BACKEND = 2;
}
optional Backend backend = 2 [default = DEFAULT];
}