plugin  0.1.0
Classes | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ModelRetinaFace Class Reference
Inheritance diagram for ModelRetinaFace:
Inheritance graph
[legend]
Collaboration diagram for ModelRetinaFace:
Collaboration graph
[legend]

Classes

struct  AnchorCfgLine
 

Public Member Functions

 ModelRetinaFace (const std::string &model_name, float confidenceThreshold, bool useAutoResize, float boxIOUThreshold, const std::string &layout="")
 
std::unique_ptr< ResultBasepostprocess (InferenceResult &infResult) override
 
- Public Member Functions inherited from DetectionModel
 DetectionModel (const std::string &modelFileName, float confidenceThreshold, bool useAutoResize, const std::vector< std::string > &labels, const std::string &layout="")
 
- Public Member Functions inherited from ImageModel
 ImageModel (const std::string &modelFileName, bool useAutoResize, const std::string &layout="")
 
std::shared_ptr< InternalModelDatapreprocess (const InputData &inputData, ov::InferRequest &request) override
 
- Public Member Functions inherited from ModelBase
 ModelBase (const std::string &modelFileName, const std::string &layout="")
 
virtual ov::CompiledModel compileModel (const ModelConfig &config, ov::Core &core)
 
virtual void onLoadCompleted (const std::vector< ov::InferRequest > &requests)
 
const std::vector< std::string > & getOutputsNames () const
 
const std::vector< std::string > & getInputsNames () const
 
std::string getModelFileName ()
 
void setInputsPreprocessing (bool reverseInputChannels, const std::string &meanValues, const std::string &scaleValues)
 

Static Public Attributes

static const int LANDMARKS_NUM = 5
 
static const int INIT_VECTOR_SIZE = 200
 

Protected Types

enum  OutputType {
  OUT_BOXES , OUT_SCORES , OUT_LANDMARKS , OUT_MASKSCORES ,
  OUT_MAX
}
 

Protected Member Functions

void generateAnchorsFpn ()
 
void prepareInputsOutputs (std::shared_ptr< ov::Model > &model) override
 
- Protected Member Functions inherited from DetectionModel
std::string getLabelName (size_t labelID)
 
- Protected Member Functions inherited from ModelBase
virtual void setBatch (std::shared_ptr< ov::Model > &model)
 
std::shared_ptr< ov::Model > prepareModel (ov::Core &core)
 
ov::Layout getInputLayout (const ov::Output< ov::Node > &input)
 

Protected Attributes

bool shouldDetectMasks
 
bool shouldDetectLandmarks
 
const float boxIOUThreshold
 
const float maskThreshold
 
float landmarkStd
 
std::vector< std::string > separateOutputsNames [OUT_MAX]
 
const std::vector< AnchorCfgLineanchorCfg
 
std::map< int, std::vector< Anchor > > anchorsFpn
 
std::vector< std::vector< Anchor > > anchors
 
- Protected Attributes inherited from DetectionModel
float confidenceThreshold
 
std::vector< std::string > labels
 
- Protected Attributes inherited from ImageModel
bool useAutoResize
 
size_t netInputHeight = 0
 
size_t netInputWidth = 0
 
cv::InterpolationFlags interpolationMode = cv::INTER_LINEAR
 
RESIZE_MODE resizeMode = RESIZE_FILL
 
- Protected Attributes inherited from ModelBase
InputTransform inputTransform = InputTransform()
 
std::vector< std::string > inputsNames
 
std::vector< std::string > outputsNames
 
ov::CompiledModel compiledModel
 
std::string modelFileName
 
ModelConfig config = {}
 
std::map< std::string, ov::Layout > inputsLayouts
 

Additional Inherited Members

- Static Public Member Functions inherited from DetectionModel
static std::vector< std::string > loadLabels (const std::string &labelFilename)
 

Constructor & Destructor Documentation

◆ ModelRetinaFace()

ModelRetinaFace::ModelRetinaFace ( const std::string &  model_name,
float  confidenceThreshold,
bool  useAutoResize,
float  boxIOUThreshold,
const std::string &  layout = "" 
)

Loads model and performs required initialization

Parameters
model_namename of model to load
confidenceThreshold- threshold to eliminate low-confidence detections. Any detected object with confidence lower than this threshold will be ignored.
useAutoResize- if true, image will be resized by openvino.
boxIOUThreshold- threshold for NMS boxes filtering, varies in [0.0, 1.0] range.
layout- model input layout

The documentation for this class was generated from the following files: