Results#

Result Base#

struct ResultBase#

Subclassed by AnomalyResult, ClassificationResult, DetectionResult, HumanPoseResult, ImageResult, InferenceResult, InstanceSegmentationResult, KeypointDetectionResult

Public Functions

inline ResultBase(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)#
inline virtual ~ResultBase()#
inline bool IsEmpty()#
template<class T>
inline T &asRef()#
template<class T>
inline const T &asRef() const#

Public Members

int64_t frameId#
std::shared_ptr<MetaData> metaData#

Anomaly Result#

struct AnomalyResult : public ResultBase#

Public Functions

inline AnomalyResult(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)#
inline explicit operator std::string()#

Public Members

cv::Mat anomaly_map#
std::vector<cv::Rect> pred_boxes#
std::string pred_label#
cv::Mat pred_mask#
double pred_score#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const AnomalyResult &prediction)#

Inference Result#

struct InferenceResult : public ResultBase#

Public Functions

inline ov::Tensor getFirstOutputTensor()#

Returns the first output tensor This function is a useful addition to direct access to outputs list as many models have only one output

Returns:

first output tensor

inline bool IsEmpty()#

Returns true if object contains no valid data

Returns:

true if object contains no valid data

Public Members

std::shared_ptr<InternalModelData> internalModelData#
std::map<std::string, ov::Tensor> outputsData#

Classification Result#

struct ClassificationResult : public ResultBase#

Public Functions

inline ClassificationResult(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)#
inline explicit operator std::string()#

Public Members

std::vector<Classification> topLabels#
ov::Tensor saliency_map#
ov::Tensor feature_vector#
ov::Tensor raw_scores#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const ClassificationResult &prediction)#
struct Classification#

Public Functions

inline Classification(unsigned int id, const std::string &label, float score)#

Public Members

unsigned int id#
std::string label#
float score#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const Classification &prediction)#

Detected Object#

struct DetectedObject : public cv::Rect2f#

Subclassed by SegmentedObject

Public Members

size_t labelID#
std::string label#
float confidence#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const DetectedObject &detection)#

Detection Result#

struct DetectionResult : public ResultBase#

Subclassed by RetinaFaceDetectionResult

Public Functions

inline DetectionResult(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)#
inline explicit operator std::string()#

Public Members

std::vector<DetectedObject> objects#
ov::Tensor saliency_map#
ov::Tensor feature_vector#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const DetectionResult &prediction)#

RetinaFace Detection Result#

struct RetinaFaceDetectionResult : public DetectionResult#

Public Functions

inline RetinaFaceDetectionResult(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)#

Public Members

std::vector<cv::Point2f> landmarks#

ResultBase#

struct ResultBase

Subclassed by AnomalyResult, ClassificationResult, DetectionResult, HumanPoseResult, ImageResult, InferenceResult, InstanceSegmentationResult, KeypointDetectionResult

Public Functions

inline ResultBase(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)
inline virtual ~ResultBase()
inline bool IsEmpty()
template<class T>
inline T &asRef()
template<class T>
inline const T &asRef() const

Public Members

int64_t frameId
std::shared_ptr<MetaData> metaData

Segmented Object#

struct SegmentedObject : public DetectedObject#

Subclassed by SegmentedObjectWithRects

Public Members

cv::Mat mask#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const SegmentedObject &prediction)#

Segmented Object With Rects#

struct SegmentedObjectWithRects : public SegmentedObject#

Public Functions

inline SegmentedObjectWithRects(const SegmentedObject &segmented_object)#

Public Members

cv::RotatedRect rotated_rect#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const SegmentedObjectWithRects &prediction)#

Instance Segmentation Result#

struct InstanceSegmentationResult : public ResultBase#

Public Functions

inline InstanceSegmentationResult(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)#

Public Members

std::vector<SegmentedObject> segmentedObjects#
std::vector<cv::Mat_<std::uint8_t>> saliency_map#
ov::Tensor feature_vector#

Image Result#

struct ImageResult : public ResultBase#

Subclassed by ImageResultWithSoftPrediction

Public Functions

inline ImageResult(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)#
inline explicit operator std::string()#

Public Members

cv::Mat resultImage#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const ImageResult &prediction)#

ImageResult With Soft Prediction#

struct ImageResultWithSoftPrediction : public ImageResult#

Public Functions

inline ImageResultWithSoftPrediction(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)#

Public Members

cv::Mat soft_prediction#
cv::Mat saliency_map#
ov::Tensor feature_vector#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const ImageResultWithSoftPrediction &prediction)#

Contour#

struct Contour#

Public Members

std::string label#
float probability#
std::vector<cv::Point> shape#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const Contour &contour)#

HumanPose#

struct HumanPose#

Public Members

std::vector<cv::Point2f> keypoints#
float score#

HumanPoseResult#

struct HumanPoseResult : public ResultBase#

Public Functions

inline HumanPoseResult(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)#

Public Members

std::vector<HumanPose> poses#

DetectedKeypoints#

struct DetectedKeypoints#

Public Functions

inline explicit operator std::string()#

Public Members

std::vector<cv::Point2f> keypoints#
std::vector<float> scores#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const DetectedKeypoints &prediction)#

KeypointDetectionResult#

struct KeypointDetectionResult : public ResultBase#

Public Functions

inline KeypointDetectionResult(int64_t frameId = -1, const std::shared_ptr<MetaData> &metaData = nullptr)#

Public Members

std::vector<DetectedKeypoints> poses#