Image Model#

class ImageModel : public ModelBase#

Subclassed by AnomalyModel, ClassificationModel, DetectionModel, KeypointDetectionModel, MaskRCNNModel, SegmentationModel

Public Functions

ImageModel(const std::string &modelFile, const std::string &resize_type, bool useAutoResize, const std::string &layout = "")#

Constructor

Parameters:
  • modelFile – name of model to load

  • useAutoResize – - if true, image is resized by openvino

  • layout – - model input layout

ImageModel(std::shared_ptr<ov::Model> &model, const ov::AnyMap &configuration)#
ImageModel(std::shared_ptr<InferenceAdapter> &adapter, const ov::AnyMap &configuration = {})#
virtual std::shared_ptr<InternalModelData> preprocess(const InputData &inputData, InferenceInput &input) override#
std::shared_ptr<ov::Model> embedProcessing(std::shared_ptr<ov::Model> &model, const std::string &inputName, const ov::Layout&, RESIZE_MODE resize_mode, const cv::InterpolationFlags interpolationMode, const ov::Shape &targetShape, uint8_t pad_value, bool brg2rgb, const std::vector<float> &mean, const std::vector<float> &scale, const std::type_info &dtype = typeid(int))#
virtual void inferAsync(const ImageInputData &inputData, const ov::AnyMap &callback_args = {})#
std::unique_ptr<ResultBase> inferImage(const ImageInputData &inputData)#
std::vector<std::unique_ptr<ResultBase>> inferBatchImage(const std::vector<ImageInputData> &inputData)#
ModelBase(const std::string &modelFile, const std::string &layout = "")#
ModelBase(std::shared_ptr<InferenceAdapter> &adapter, const ov::AnyMap &configuration = {})#
ModelBase(std::shared_ptr<ov::Model> &model, const ov::AnyMap &configuration)#

Public Static Functions

static std::vector<std::string> loadLabels(const std::string &labelFilename)#