Classification Model#

class ClassificationModel : public ImageModel#

Public Functions

ClassificationModel(std::shared_ptr<ov::Model> &model, const ov::AnyMap &configuration)#
ClassificationModel(std::shared_ptr<InferenceAdapter> &adapter, const ov::AnyMap &configuration = {})#
virtual std::unique_ptr<ResultBase> postprocess(InferenceResult &infResult) override#
virtual std::unique_ptr<ClassificationResult> infer(const ImageInputData &inputData)#
virtual std::vector<std::unique_ptr<ClassificationResult>> inferBatch(const std::vector<ImageInputData> &inputImgs)#

Public Static Functions

static std::unique_ptr<ClassificationModel> create_model(const std::string &modelFile, const ov::AnyMap &configuration = {}, bool preload = true, const std::string &device = "AUTO")#
static std::unique_ptr<ClassificationModel> create_model(std::shared_ptr<InferenceAdapter> &adapter)#

Public Static Attributes

static std::string ModelType = "Classification"#

Probabilistic Labels Resolver#

class ProbabilisticLabelsResolver : public GreedyLabelsResolver#

Public Functions

ProbabilisticLabelsResolver() = default#
ProbabilisticLabelsResolver(const HierarchicalConfig&)#
virtual std::map<std::string, float> resolve_labels(const std::vector<std::reference_wrapper<std::string>> &labels, const std::vector<float> &scores)#
std::unordered_map<std::string, float> add_missing_ancestors(const std::unordered_map<std::string, float>&) const#
std::map<std::string, float> resolve_exclusive_labels(const std::unordered_map<std::string, float>&) const#
void suppress_descendant_output(std::map<std::string, float>&)#

Greedy Labels Resolver#

class GreedyLabelsResolver#

Subclassed by ProbabilisticLabelsResolver

Public Functions

GreedyLabelsResolver() = default#
GreedyLabelsResolver(const HierarchicalConfig&)#
virtual std::map<std::string, float> resolve_labels(const std::vector<std::reference_wrapper<std::string>> &labels, const std::vector<float> &scores)#

Simple Labels Graph#

class SimpleLabelsGraph#

Public Functions

SimpleLabelsGraph() = default#
SimpleLabelsGraph(const std::vector<std::string> &vertices_)#
void add_edge(const std::string &parent, const std::string &child)#
std::vector<std::string> get_children(const std::string &label) const#
std::string get_parent(const std::string &label) const#
std::vector<std::string> get_ancestors(const std::string &label) const#
std::vector<std::string> get_labels_in_topological_order()#