digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::AutotagsClassifierYolo Class Reference
Inheritance diagram for Digikam::AutotagsClassifierYolo:

Public Types

enum  YoloVersion {
  YOLOv5 , YOLOv6 , YOLOv7 , YOLOv8 ,
  YOLOv9 , YOLOv10 , YOLOv11
}

Public Member Functions

 AutotagsClassifierYolo (float _threshold, const QString &predefinedClassFile)
virtual int predict (const cv::Mat &target, const QList< int > &exclusionLabelList=QList< int >()) const override
virtual int predict (const cv::UMat &target, const QList< int > &exclusionLabelList=QList< int >()) const override
virtual QList< int > predictMulti (const QList< cv::Mat > &targets) const override
virtual QList< int > predictMulti (const QList< cv::UMat > &targets) const override
void setParams (YoloVersion version, QSize size)
Public Member Functions inherited from Digikam::AutotagsClassifierBase
 AutotagsClassifierBase (float _threshold, const QString &_predefinedClassFile)
QList< QString > getClassStrings (const QList< int > &labelList) const
bool retrain () override
Public Member Functions inherited from Digikam::MLClassifierFoundation
void setThreshold (float _threshold)

Additional Inherited Members

Protected Member Functions inherited from Digikam::AutotagsClassifierBase
bool loadTrainingData () override
Protected Attributes inherited from Digikam::AutotagsClassifierBase
QList< QString > predefinedClasses
QString predefinedClassFile
Protected Attributes inherited from Digikam::MLClassifierFoundation
QReadWriteLock lock
float threshold = 0.0F

Constructor & Destructor Documentation

◆ AutotagsClassifierYolo()

Digikam::AutotagsClassifierYolo::AutotagsClassifierYolo ( float _threshold,
const QString & predefinedClassFile )
explicit
Note
: In strict technical terms, this is not a classifier. This is a post-processor. The initial classification is done by the YOLO detector, and this class is used to interpret the results of that classification and provide a list of labels based on the confidence of the classification.

Member Function Documentation

◆ predict() [1/2]

virtual int Digikam::AutotagsClassifierYolo::predict ( const cv::Mat & target,
const QList< int > & exclusionLabelList = QList<int>() ) const
inlineoverridevirtual

◆ predict() [2/2]

virtual int Digikam::AutotagsClassifierYolo::predict ( const cv::UMat & target,
const QList< int > & exclusionLabelList = QList<int>() ) const
inlineoverridevirtual

◆ predictMulti() [1/2]

QList< int > Digikam::AutotagsClassifierYolo::predictMulti ( const QList< cv::Mat > & targets) const
overridevirtual
Warning
: This classifier does not handle YOLOv10

Reimplemented from Digikam::AutotagsClassifierBase.

◆ predictMulti() [2/2]

virtual QList< int > Digikam::AutotagsClassifierYolo::predictMulti ( const QList< cv::UMat > & targets) const
inlineoverridevirtual

Reimplemented from Digikam::AutotagsClassifierBase.

◆ setParams()

void Digikam::AutotagsClassifierYolo::setParams ( YoloVersion version,
QSize size )
Warning
: This classifier does not handle YOLO v10