![]() |
digiKam
|
#include <dnnmodelbase.h>
Public Member Functions | |
DNNModelBase (const DNNModelInfoContainer &_info) | |
DownloadInfo | getDownloadInformation () const |
const QString | getModelPath () const |
float | getThreshold (int uiThreshold=DNN_MODEL_THRESHOLD_NOT_SET) const |
virtual | ~DNNModelBase ()=default |
Public Attributes | |
const DNNModelInfoContainer | info |
information about the model. | |
bool | modelLoaded = false |
check if the model has been loaded. | |
QMutex | mutex |
mutex to sigle-thread model during critical processing functions. | |
Protected Member Functions | |
bool | checkFilename () const |
const QPair< int, int > | getBackendAndTarget () const |
Protected Attributes | |
QMutex | loaderMutex |
|
explicit |
|
virtualdefault |
|
protected |
References Digikam::DNNModelInfoContainer::fileSize, getModelPath(), and info.
|
protected |
DownloadInfo Digikam::DNNModelBase::getDownloadInformation | ( | ) | const |
const QString Digikam::DNNModelBase::getModelPath | ( | ) | const |
Return path to the model, or null string if path cannot be found.
References Digikam::DNNModelInfoContainer::fileName, and info.
Referenced by checkFilename(), and Digikam::DNNBaseDetectorModel::loadDetectionClasses().
float Digikam::DNNModelBase::getThreshold | ( | int | uiThreshold = DNN_MODEL_THRESHOLD_NOT_SET | ) | const |
input: uiThreshold is the slider value from the UI. return: float threshold to be used by processing (FaceDetector, FaceRecognizer, etc...).
References Digikam::DNNModelInfoContainer::defaultThreshold, Digikam::DNN_MODEL_THRESHOLD_NOT_SET, info, Digikam::DNNModelInfoContainer::maxUsableThreshold, Digikam::DNNModelInfoContainer::minUsableThreshold, and Digikam::DNNModelInfoContainer::usage.
Referenced by Digikam::OpenCVDNNFaceRecognizer::Private::predictDb(), and Digikam::OpenCVDNNFaceRecognizer::Private::predictKDTree().
const DNNModelInfoContainer Digikam::DNNModelBase::info |
information about the model.
Referenced by checkFilename(), getDownloadInformation(), getModelPath(), getThreshold(), Digikam::DNNBaseDetectorModel::loadDetectionClasses(), Digikam::DNNFaceDetectorSSD::loadModels(), Digikam::DNNFaceDetectorYOLO::loadModels(), and Digikam::DNNFaceDetectorYuNet::loadModels().
|
protected |
bool Digikam::DNNModelBase::modelLoaded = false |
check if the model has been loaded.
Referenced by Digikam::DNNModelNet::getNet(), Digikam::DNNModelSFace::getNet(), Digikam::DNNModelYuNet::getNet(), Digikam::DNNBaseDetectorModel::getOutputsNames(), Digikam::DNNBaseDetectorModel::loadDetectionClasses(), Digikam::DNNFaceDetectorSSD::loadModels(), Digikam::DNNFaceDetectorYOLO::loadModels(), Digikam::DNNFaceDetectorYuNet::loadModels(), Digikam::DNNResnetDetector::loadModels(), Digikam::DNNYoloDetector::loadModels(), Digikam::DNNBaseDetectorModel::preprocess(), and Digikam::DNNBaseDetectorModel::preprocess().
QMutex Digikam::DNNModelBase::mutex |
mutex to sigle-thread model during critical processing functions.
Referenced by Digikam::DNNFaceDetectorSSD::detectFaces(), Digikam::DNNFaceDetectorYOLO::detectFaces(), Digikam::DNNBaseDetectorModel::preprocess(), and Digikam::DNNBaseDetectorModel::preprocess().