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

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Digikam::FaceDb Class Reference

## Public Member Functions
| FaceDb (FaceDbBackend *const db, FaceScanSettings::FaceRecognitionModel recModel)
int | addIdentity () const
void | clearDNNTraining ()
| clearDNNTraining: clear all trained data in the database.
void | clearDNNTraining (const QList< int > &identities)
| clearDNNTraining: clear
void | clearIdentities ()
void | deleteIdentity (const QString &uuid)
void | deleteIdentity (int id)
int | getNumberOfIdentities () const
void | getTrainingVersionInfo (QString &version, QString &model) const
| get the digiKam version and extractor model the DB was trained with.
QList< Identity > | identities () const
Identity | identity (int id) const
QList< int > | identityIds () const
int | insertFaceVector (const cv::Mat &faceEmbedding, const int label, const QString &hash) const
| insertFaceVector: insert a new face embedding to database.
bool | integrityCheck ()
bool | removeFaceVector (const int id) const
| removeFaceVector: remove a face embedding from the database.
bool | removeFaceVector (const QString &hash) const
| removeFaceVector: remove a face embedding from the database.
BdEngineBackend::QueryState | setSetting (const QString &keyword, const QString &value)
QString | setting (const QString &keyword) const
void | setTrainingVersionInfo (const QString &version, const QString &model)
| set the digiKam version and extractor model the DB was trained with.
cv::Ptr< cv::ml::TrainData > | trainData () const
| trainData: extract train data from database.
void | updateIdentity (const Identity &p)
void | vacuum ()
| Shrinks the database.

## Member Function Documentation

## ◆ clearDNNTraining()

void Digikam::FaceDb::clearDNNTraining | ( | const QList< int > & | identities | ) |

Parameters

  identities | in the database.

## ◆ insertFaceVector()

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

Parameters

  faceEmbedding |
  label |
  hash |

Returns
  id of newly inserted entry.

## ◆ integrityCheck()

bool Digikam::FaceDb::integrityCheck | ( |  | ) |

Returns
  true if the integrity of the database is preserved.

## ◆ removeFaceVector() [1/2]

bool Digikam::FaceDb::removeFaceVector | ( | const int | id | ) | const

Parameters

  id | the nodeId (row id) to remove.

Returns
  bool

## ◆ removeFaceVector() [2/2]

bool Digikam::FaceDb::removeFaceVector | ( | const QString & | hash | ) | const

Parameters

  hash | the removeHash (removeHash) to remove.

Returns
  bool

## ◆ trainData()

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

Returns
  the train data instance.