|
enum | YoloVersion {
YOLO_V1V2
, YOLO_V3
, YOLO_V4
, YOLO_V4_TINY
,
YOLOF
} |
|
|
| ModelYolo (const std::string &modelFileName, float confidenceThreshold, bool useAutoResize, bool useAdvancedPostprocessing=true, float boxIOUThreshold=0.5, const std::vector< std::string > &labels=std::vector< std::string >(), const std::vector< float > &anchors=std::vector< float >(), const std::vector< int64_t > &masks=std::vector< int64_t >(), const std::string &layout="") |
|
std::unique_ptr< ResultBase > | postprocess (InferenceResult &infResult) override |
|
| DetectionModel (const std::string &modelFileName, float confidenceThreshold, bool useAutoResize, const std::vector< std::string > &labels, const std::string &layout="") |
|
| ImageModel (const std::string &modelFileName, bool useAutoResize, const std::string &layout="") |
|
std::shared_ptr< InternalModelData > | preprocess (const InputData &inputData, ov::InferRequest &request) override |
|
| 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) |
|
|
void | prepareInputsOutputs (std::shared_ptr< ov::Model > &model) override |
|
void | parseYOLOOutput (const std::string &output_name, const ov::Tensor &tensor, const unsigned long resized_im_h, const unsigned long resized_im_w, const unsigned long original_im_h, const unsigned long original_im_w, std::vector< DetectedObject > &objects) |
|
std::string | getLabelName (size_t labelID) |
|
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) |
|
|
static int | calculateEntryIndex (int entriesNum, int lcoords, size_t lclasses, int location, int entry) |
|
static double | intersectionOverUnion (const DetectedObject &o1, const DetectedObject &o2) |
|
|
std::map< std::string, Region > | regions |
|
double | boxIOUThreshold |
|
bool | useAdvancedPostprocessing |
|
bool | isObjConf = 1 |
|
YoloVersion | yoloVersion |
|
const std::vector< float > | presetAnchors |
|
const std::vector< int64_t > | presetMasks |
|
ov::Layout | yoloRegionLayout = "NCHW" |
|
float | confidenceThreshold |
|
std::vector< std::string > | labels |
|
bool | useAutoResize |
|
size_t | netInputHeight = 0 |
|
size_t | netInputWidth = 0 |
|
cv::InterpolationFlags | interpolationMode = cv::INTER_LINEAR |
|
RESIZE_MODE | resizeMode = RESIZE_FILL |
|
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 |
|
|
static std::vector< std::string > | loadLabels (const std::string &labelFilename) |
|
◆ ModelYolo()
ModelYolo::ModelYolo |
( |
const std::string & |
modelFileName, |
|
|
float |
confidenceThreshold, |
|
|
bool |
useAutoResize, |
|
|
bool |
useAdvancedPostprocessing = true , |
|
|
float |
boxIOUThreshold = 0.5 , |
|
|
const std::vector< std::string > & |
labels = std::vector<std::string>() , |
|
|
const std::vector< float > & |
anchors = std::vector<float>() , |
|
|
const std::vector< int64_t > & |
masks = std::vector<int64_t>() , |
|
|
const std::string & |
layout = "" |
|
) |
| |
Constructor.
- Parameters
-
modelFileName | name 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. Otherwise, image will be preprocessed and resized using OpenCV routines. |
useAdvancedPostprocessing | - if true, an advanced algorithm for filtering/postprocessing will be used (with better processing of multiple crossing objects). Otherwise, classic algorithm will be used. |
boxIOUThreshold | - threshold to treat separate output regions as one object for filtering during postprocessing (only one of them should stay). The default value is 0.5 |
labels | - array of labels for every class. If this array is empty or contains less elements than actual classes number, default "Label #N" will be shown for missing items. |
anchors | - vector of anchors coordinates. Required for YOLOv4, for other versions it may be omitted. |
masks | - vector of masks values. Required for YOLOv4, for other versions it may be omitted. |
layout | - model input layout |
The documentation for this class was generated from the following files: