#include "tensorflow_lite_support/cc/task/vision/image_classifier.h"
#include "absl/algorithm/container.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "flatbuffers/flatbuffers.h"
#include "tensorflow_lite_support/cc/common.h"
#include "tensorflow_lite_support/cc/port/integral_types.h"
#include "tensorflow_lite_support/cc/port/status_macros.h"
#include "tensorflow_lite_support/cc/task/core/task_api_factory.h"
#include "tensorflow_lite_support/cc/task/core/task_utils.h"
#include "tensorflow_lite_support/cc/task/core/tflite_engine.h"
#include "tensorflow_lite_support/cc/task/vision/core/label_map_item.h"
#include "tensorflow_lite_support/cc/task/vision/proto/class_proto_inc.h"
#include "tensorflow_lite_support/cc/task/vision/utils/frame_buffer_utils.h"
#include "tensorflow_lite_support/metadata/cc/metadata_extractor.h"
#include "tensorflow_lite_support/metadata/metadata_schema_generated.h"
namespace tflite {
namespace task {
namespace vision {
namespace {
StatusCode;
ModelMetadataExtractor;
CreateStatusWithPayload;
StatusOr;
TfLiteSupportStatus;
AssertAndReturnTypedTensor;
TaskAPIFactory;
TfLiteEngine;
}
StatusOr<std::unique_ptr<ImageClassifier>> ImageClassifier::CreateFromOptions(
const ImageClassifierOptions& options,
std::unique_ptr<tflite::OpResolver> resolver) { … }
absl::Status ImageClassifier::SanityCheckOptions(
const ImageClassifierOptions& options) { … }
absl::Status ImageClassifier::Init(
std::unique_ptr<ImageClassifierOptions> options) { … }
absl::Status ImageClassifier::PreInit() { … }
absl::Status ImageClassifier::PostInit() { … }
absl::Status ImageClassifier::CheckAndSetOutputs() { … }
absl::Status ImageClassifier::CheckAndSetClassNameSet() { … }
absl::Status ImageClassifier::InitScoreCalibrations() { … }
StatusOr<ClassificationResult> ImageClassifier::Classify(
const FrameBuffer& frame_buffer) { … }
StatusOr<ClassificationResult> ImageClassifier::Classify(
const FrameBuffer& frame_buffer, const BoundingBox& roi) { … }
StatusOr<ClassificationResult> ImageClassifier::Postprocess(
const std::vector<const TfLiteTensor*>& output_tensors,
const FrameBuffer& , const BoundingBox& ) { … }
absl::Status ImageClassifier::FillResultsFromLabelMaps(
ClassificationResult* result) { … }
}
}
}