digiKam
|
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< Identity > | identities () 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 () |
KDTree * | reconstructTree () 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 () | |
|
explicit |
References Digikam::FaceDb::Private::db.
Digikam::FaceDb::~FaceDb | ( | ) |
int Digikam::FaceDb::addIdentity | ( | ) | const |
References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execSql().
Referenced by Digikam::FacialRecognitionWrapper::addIdentity().
void Digikam::FaceDb::clearDNNTraining | ( | const QList< int > & | identities, |
const QString & | context = QString() |
||
) |
References Digikam::FaceDb::Private::db, Digikam::BdEngineBackend::execSql(), and identities().
void Digikam::FaceDb::clearDNNTraining | ( | const QString & | context = QString() | ) |
clearDNNTraining : clear all trained data in the database
context |
References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execSql().
Referenced by Digikam::OpenCVDNNFaceRecognizer::clearTraining().
void Digikam::FaceDb::clearIdentities | ( | ) |
References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execSql().
Referenced by Digikam::FacialRecognitionWrapper::clearAllTraining().
void Digikam::FaceDb::clearTreeDb | ( | ) | const |
References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execSql().
void Digikam::FaceDb::deleteIdentity | ( | const QString & | uuid | ) |
References Digikam::FaceDb::Private::db, deleteIdentity(), and Digikam::BdEngineBackend::execSql().
void Digikam::FaceDb::deleteIdentity | ( | int | id | ) |
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
subTree | |
neighborList | |
position | |
sqRange | |
cosThreshold | |
maxNbNeighbors |
References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execQuery().
Referenced by Digikam::OpenCVDNNFaceRecognizer::Private::predictDb().
int Digikam::FaceDb::getNumberOfIdentities | ( | ) | const |
References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execSql().
Referenced by Digikam::FaceScanWidget::settings().
References Digikam::FaceDb::Private::db, Digikam::BdEngineBackend::execSql(), Digikam::Identity::id(), Digikam::Identity::setAttribute(), Digikam::Identity::setId(), and value.
Referenced by clearDNNTraining().
QList< int > Digikam::FaceDb::identityIds | ( | ) | const |
References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execSql().
int Digikam::FaceDb::insertFaceVector | ( | const cv::Mat & | faceEmbedding, |
const int | label, | ||
const QString & | context | ||
) | const |
insertFaceVector : insert a new face embedding to database
faceEmbedding | |
label |
References Digikam::FaceDb::Private::db, Digikam::BdEngineBackend::execQuery(), and Digikam::DbEngineSqlQuery::lastQuery().
Referenced by Digikam::OpenCVDNNFaceRecognizer::Private::insertData().
bool Digikam::FaceDb::insertToTreeDb | ( | const int | nodeID, |
const cv::Mat & | faceEmbedding | ||
) | const |
insertToTreeDb : insert a new node to spatial database
nodeID | |
label | |
faceEmbedding |
References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execQuery().
bool Digikam::FaceDb::integrityCheck | ( | ) |
Returns true if the integrity of the database is preserved.
References Digikam::BdEngineBackend::databaseType(), Digikam::FaceDb::Private::db, Digikam::BdEngineBackend::execDBAction(), and Digikam::BdEngineBackend::getDBAction().
Referenced by Digikam::FacialRecognitionWrapper::integrityCheck().
KDTree * Digikam::FaceDb::reconstructTree | ( | ) | const |
reconstructTree: reconstruct KD-Tree from data in the database
References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execQuery().
Referenced by Digikam::OpenCVDNNFaceRecognizer::Private::Private().
BdEngineBackend::QueryState Digikam::FaceDb::setSetting | ( | const QString & | keyword, |
const QString & | value | ||
) |
QString Digikam::FaceDb::setting | ( | const QString & | keyword | ) | const |
cv::Ptr< cv::ml::TrainData > Digikam::FaceDb::trainData | ( | ) | const |
trainData: extract train data from database
References Digikam::FaceDb::Private::db, and Digikam::BdEngineBackend::execQuery().
void Digikam::FaceDb::updateIdentity | ( | const Identity & | p | ) |
References Digikam::Identity::attributesMap(), Digikam::FaceDb::Private::db, Digikam::BdEngineBackend::execSql(), and Digikam::Identity::id().
Referenced by Digikam::FacialRecognitionWrapper::addIdentity(), Digikam::FacialRecognitionWrapper::addIdentityAttribute(), Digikam::FacialRecognitionWrapper::addIdentityAttributes(), and Digikam::FacialRecognitionWrapper::setIdentityAttributes().
void Digikam::FaceDb::vacuum | ( | ) |
Shrinks the database.
References Digikam::FaceDb::Private::db, Digikam::BdEngineBackend::execDBAction(), and Digikam::BdEngineBackend::getDBAction().
Referenced by Digikam::FacialRecognitionWrapper::vacuum().