digiKam
Digikam::DNNFaceDetectorBase Class Referenceabstract
+ Inheritance diagram for Digikam::DNNFaceDetectorBase:

Public Member Functions

virtual void detectFaces (const cv::Mat &inputImage, const cv::Size &paddedSize, std::vector< cv::Rect > &detectedBboxes)=0
 
 DNNFaceDetectorBase ()
 
 DNNFaceDetectorBase (float scale, const cv::Scalar &val, const cv::Size &inputImgSize)
 
cv::Size nnInputSizeRequired () const
 
virtual ~DNNFaceDetectorBase ()
 

Static Public Attributes

static float confidenceThreshold = 0.6F
 Threshold for bbox detection. It can be init and changed in the GUI. More...
 
static float nmsThreshold = 0.4F
 Threshold for nms suppression. More...
 

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::Scalar meanValToSubtract
 
QMutex mutex
 
cv::dnn::Net net
 
float scaleFactor
 

Constructor & Destructor Documentation

◆ DNNFaceDetectorBase() [1/2]

Digikam::DNNFaceDetectorBase::DNNFaceDetectorBase ( )
explicit

◆ DNNFaceDetectorBase() [2/2]

Digikam::DNNFaceDetectorBase::DNNFaceDetectorBase ( float  scale,
const cv::Scalar &  val,
const cv::Size &  inputImgSize 
)
explicit

◆ ~DNNFaceDetectorBase()

Digikam::DNNFaceDetectorBase::~DNNFaceDetectorBase ( )
virtual

Member Function Documentation

◆ correctBbox()

void Digikam::DNNFaceDetectorBase::correctBbox ( cv::Rect &  bbox,
const cv::Size &  paddedSize 
) const
protected

References inputImageSize.

◆ detectFaces()

virtual void Digikam::DNNFaceDetectorBase::detectFaces ( const cv::Mat &  inputImage,
const cv::Size &  paddedSize,
std::vector< cv::Rect > &  detectedBboxes 
)
pure virtual

◆ nnInputSizeRequired()

cv::Size Digikam::DNNFaceDetectorBase::nnInputSizeRequired ( ) const

References inputImageSize.

◆ 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.

References inputImageSize.

Member Data Documentation

◆ confidenceThreshold

float Digikam::DNNFaceDetectorBase::confidenceThreshold = 0.6F
static

Threshold for bbox detection. It can be init and changed in the GUI.

◆ inputImageSize

cv::Size Digikam::DNNFaceDetectorBase::inputImageSize
protected

◆ meanValToSubtract

cv::Scalar Digikam::DNNFaceDetectorBase::meanValToSubtract
protected

◆ mutex

QMutex Digikam::DNNFaceDetectorBase::mutex
protected

◆ net

◆ nmsThreshold

float Digikam::DNNFaceDetectorBase::nmsThreshold = 0.4F
static

Threshold for nms suppression.

◆ scaleFactor

float Digikam::DNNFaceDetectorBase::scaleFactor
protected

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