digiKam Developer Documentation: Digikam::DNNFaceDetectorBase Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Digikam::DNNFaceDetectorBase Class Referenceabstract
Inheritance diagram for Digikam::DNNFaceDetectorBase:

## Public Member Functions
| DNNFaceDetectorBase (float scale, const cv::Scalar &val, const cv::Size &inputImgSize)
virtual void | detectFaces (const cv::Mat &inputImage, const cv::Size &paddedSize, std::vector< cv::Rect > &detectedBboxes)=0
cv::Size | nnInputSizeRequired () const
virtual void | setFaceDetectionSize (FaceScanSettings::FaceDetectionSize faceSize)

## Static Public Attributes
static float | nmsThreshold = 0.4F
| Threshold for nms suppression.
static int | uiConfidenceThreshold = DNN_MODEL_THRESHOLD_NOT_SET
| Threshold for bbox detection. It can be init and changed in the GUI.

## Protected Member Functions
void | correctBbox (cv::Rect &bbox, const cv::Size &paddedSize) const
void | selectBbox (const cv::Size &paddedSize, float confidence, int left, int right, int top, int bottom, std::vector< float > &goodConfidences, std::vector< cv::Rect > &goodBoxes, std::vector< float > &doubtConfidences, std::vector< cv::Rect > &doubtBoxes) const

## Protected Attributes
cv::Size | inputImageSize = cv::Size(300, 300)
cv::Scalar | meanValToSubtract = cv::Scalar(0.0, 0.0, 0.0)
DNNModelBase * | model = nullptr
float | scaleFactor = 1.0F

## Member Function Documentation

## ◆ selectBbox()

void Digikam::DNNFaceDetectorBase::selectBbox | ( | const cv::Size & | paddedSize,
|  | float | confidence,
|  | int | left,
|  | int | right,
|  | int | top,
|  | int | bottom,
|  | std::vector< float > & | goodConfidences,
|  | std::vector< cv::Rect > & | goodBoxes,
|  | std::vector< float > & | doubtConfidences,
|  | std::vector< cv::Rect > & | doubtBoxes
| ) |  | const
| protected

Classify bounding boxes detected. Good bounding boxes are defined as boxes that reside within the non-padded zone or those that are out only for min of (10% of padded range, 10% of bbox dim).

Bad bounding boxes are defined as boxes that have at maximum 25% of each dimension out of non-padded zone.