#include "mediapipe/tasks/cc/core/model_resources.h"
#include <cstddef>
#include <memory>
#include <string>
#include <utility>
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "mediapipe/framework/api2/packet.h"
#include "mediapipe/framework/port/status_macros.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/resource_util.h"
#include "mediapipe/util/resource_util_custom.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/model_builder.h"
#include "tensorflow/lite/tools/verifier.h"
namespace mediapipe {
namespace tasks {
namespace core {
StatusCode;
MakePacket;
Packet;
PacketAdopting;
ModelMetadataExtractor;
bool ModelResources::Verifier::Verify(const char* data, int length,
tflite::ErrorReporter* reporter) { … }
ModelResources::ModelResources(const std::string& tag,
std::unique_ptr<proto::ExternalFile> model_file,
Packet<tflite::OpResolver> op_resolver_packet)
: … { … }
absl::StatusOr<std::unique_ptr<ModelResources>> ModelResources::Create(
const std::string& tag, std::unique_ptr<proto::ExternalFile> model_file,
std::unique_ptr<tflite::OpResolver> op_resolver) { … }
absl::StatusOr<std::unique_ptr<ModelResources>> ModelResources::Create(
const std::string& tag, std::unique_ptr<proto::ExternalFile> model_file,
Packet<tflite::OpResolver> op_resolver_packet) { … }
const tflite::Model* ModelResources::GetTfLiteModel() const { … }
absl::Status ModelResources::BuildModelFromExternalFileProto() { … }
}
}
}