/* Copyright 2022 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. ==============================================================================*/ #ifndef MEDIAPIPE_TASKS_CC_CORE_MODEL_RESOURCES_H_ #define MEDIAPIPE_TASKS_CC_CORE_MODEL_RESOURCES_H_ #include <cstddef> #include <functional> #include <memory> #include <string> #include "absl/memory/memory.h" #include "absl/status/status.h" #include "absl/status/statusor.h" #include "mediapipe/framework/api2/packet.h" #include "mediapipe/tasks/cc/common.h" #include "mediapipe/tasks/cc/core/external_file_handler.h" #include "mediapipe/tasks/cc/core/proto/external_file.pb.h" #include "mediapipe/tasks/cc/metadata/metadata_extractor.h" #include "mediapipe/util/tflite/error_reporter.h" #include "tensorflow/lite/core/api/error_reporter.h" #include "tensorflow/lite/core/api/op_resolver.h" #include "tensorflow/lite/kernels/register.h" #include "tensorflow/lite/model.h" #include "tensorflow/lite/model_builder.h" #include "tensorflow/lite/tools/verifier.h" namespace mediapipe { namespace tasks { namespace core { // The mediapipe task model resources class. // A ModelResources object, created from an external file proto, bundles the // model-related resources that are needed by a mediapipe task. As the // resources, including flatbuffer model, op resolver, model metadata extractor, // and external file handler, are owned by the ModelResources object, callers // must keep ModelResources alive while using any of the resources. class ModelResources { … }; } // namespace core } // namespace tasks } // namespace mediapipe #endif // MEDIAPIPE_TASKS_CC_CORE_MODEL_RESOURCES_H_