digiKam
Digikam::FaceDb Class Reference

Classes

class  Private
 

Public Member Functions

int addIdentity () const
 
void clearDNNTraining (const QList< int > &identities, const QString &context=QString())
 
void clearDNNTraining (const QString &context=QString())
 clearDNNTraining : clear all trained data in the database More...
 
void clearIdentities ()
 
void clearTreeDb () const
 
void deleteIdentity (const QString &uuid)
 
void deleteIdentity (int id)
 
 FaceDb (FaceDbBackend *const db)
 
QMap< double, QVector< int > > getClosestNeighborsTreeDb (const cv::Mat &position, float sqRange, float cosThreshold, int maxNbNeighbors) const
 getClosestNeighbors : return a list of closest neighbor, limited by maxNbNeighbors and sqRange More...
 
int getNumberOfIdentities () const
 
QList< Identityidentities () const
 
QList< int > identityIds () const
 
int insertFaceVector (const cv::Mat &faceEmbedding, const int label, const QString &context) const
 insertFaceVector : insert a new face embedding to database More...
 
bool insertToTreeDb (const int nodeID, const cv::Mat &faceEmbedding) const
 insertToTreeDb : insert a new node to spatial database More...
 
bool integrityCheck ()
 
KDTreereconstructTree () const
 reconstructTree: reconstruct KD-Tree from data in the database More...
 
BdEngineBackend::QueryState setSetting (const QString &keyword, const QString &value)
 
QString setting (const QString &keyword) const
 
cv::Ptr< cv::ml::TrainData > trainData () const
 trainData: extract train data from database More...
 
void updateIdentity (const Identity &p)
 
void vacuum ()
 
 ~FaceDb ()
 

Constructor & Destructor Documentation

◆ FaceDb()

Digikam::FaceDb::FaceDb ( FaceDbBackend *const  db)
explicit

◆ ~FaceDb()

Digikam::FaceDb::~FaceDb ( )

Member Function Documentation

◆ addIdentity()

int Digikam::FaceDb::addIdentity ( ) const

◆ clearDNNTraining() [1/2]

void Digikam::FaceDb::clearDNNTraining ( const QList< int > &  identities,
const QString &  context = QString() 
)

◆ clearDNNTraining() [2/2]

void Digikam::FaceDb::clearDNNTraining ( const QString &  context = QString())

clearDNNTraining : clear all trained data in the database

Parameters
context

References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execSql().

Referenced by Digikam::OpenCVDNNFaceRecognizer::clearTraining().

◆ clearIdentities()

void Digikam::FaceDb::clearIdentities ( )

◆ clearTreeDb()

void Digikam::FaceDb::clearTreeDb ( ) const

◆ deleteIdentity() [1/2]

void Digikam::FaceDb::deleteIdentity ( const QString &  uuid)

◆ deleteIdentity() [2/2]

◆ getClosestNeighborsTreeDb()

QMap< double, QVector< int > > Digikam::FaceDb::getClosestNeighborsTreeDb ( const cv::Mat &  position,
float  sqRange,
float  cosThreshold,
int  maxNbNeighbors 
) const

getClosestNeighbors : return a list of closest neighbor, limited by maxNbNeighbors and sqRange

Parameters
subTree
neighborList
position
sqRange
cosThreshold
maxNbNeighbors
Returns

References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execQuery().

Referenced by Digikam::OpenCVDNNFaceRecognizer::Private::predictDb().

◆ getNumberOfIdentities()

int Digikam::FaceDb::getNumberOfIdentities ( ) const

◆ identities()

◆ identityIds()

QList< int > Digikam::FaceDb::identityIds ( ) const

◆ insertFaceVector()

int Digikam::FaceDb::insertFaceVector ( const cv::Mat &  faceEmbedding,
const int  label,
const QString &  context 
) const

insertFaceVector : insert a new face embedding to database

Parameters
faceEmbedding
label
Returns
id of newly inserted entry

References Digikam::FaceDb::Private::db, Digikam::BdEngineBackend::execQuery(), and Digikam::DbEngineSqlQuery::lastQuery().

Referenced by Digikam::OpenCVDNNFaceRecognizer::Private::insertData().

◆ insertToTreeDb()

bool Digikam::FaceDb::insertToTreeDb ( const int  nodeID,
const cv::Mat &  faceEmbedding 
) const

insertToTreeDb : insert a new node to spatial database

Parameters
nodeID
label
faceEmbedding
Returns
true if successed

References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execQuery().

◆ integrityCheck()

bool Digikam::FaceDb::integrityCheck ( )

◆ reconstructTree()

KDTree * Digikam::FaceDb::reconstructTree ( ) const

reconstructTree: reconstruct KD-Tree from data in the database

Returns

References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execQuery().

Referenced by Digikam::OpenCVDNNFaceRecognizer::Private::Private().

◆ setSetting()

BdEngineBackend::QueryState Digikam::FaceDb::setSetting ( const QString &  keyword,
const QString &  value 
)

◆ setting()

QString Digikam::FaceDb::setting ( const QString &  keyword) const

◆ trainData()

cv::Ptr< cv::ml::TrainData > Digikam::FaceDb::trainData ( ) const

trainData: extract train data from database

Returns

References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execQuery().

◆ updateIdentity()

◆ vacuum()


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