digiKam
Loading...
Searching...
No Matches
dnnmodelinfocontainer.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2024-10-13
7 * Description : digiKam DNNModelNet base class
8 *
9 * SPDX-FileCopyrightText: 2024 by Michael Miller <michael underscore miller at msn dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QMutex>
20#include <QVersionNumber>
21
22// Local includes
23
24#include "digikam_opencv.h"
25#include "digikam_export.h"
26#include "filesdownloader.h"
27#include "dnnmodeldefinitions.h"
28
29namespace Digikam
30{
31
32class DIGIKAM_EXPORT DNNModelInfoContainer
33{
34
35public:
36
37 // ---------- public methods ----------
38
41 explicit DNNModelInfoContainer(
42 const QString& _displayName,
43 const QString& _fileName,
44 const DNNModelUsageList& _usage,
45 const QVersionNumber& _minVersion,
46 const QString& _downloadPath,
47 const QString& _sha256,
48 const qint64& _fileSize,
49 int _defaultThreshold,
50 int _minUsableThreshold,
51 int _maxUsableThreshold,
52 DNNLoaderType _loaderType,
53 const QString& _classList,
54 const QString& _configName,
55 const cv::Scalar& _meanValToSubtract,
56 int _imageSize
57 );
59
62
63 bool operator==(const DNNModelInfoContainer& t) const;
64
65public:
66
67 QString displayName;
68 QString fileName;
70 QVersionNumber minVersion;
71 QString downloadPath;
72 QString sha256;
73 QString classList;
74 QString configName;
75
76 qint64 fileSize = 0;
77 int defaultThreshold = 0;
78 int minUsableThreshold = 0;
79 int maxUsableThreshold = 0;
81 cv::Scalar meanValToSubtract = cv::Scalar(0.0, 0.0, 0.0);
82 int imageSize = 0;
83};
84
85} // namespace Digikam
Definition dnnmodelinfocontainer.h:33
QString configName
Definition dnnmodelinfocontainer.h:74
QString fileName
Used by the downloader and model loader.
Definition dnnmodelinfocontainer.h:68
QVersionNumber minVersion
Minimum version of digiKam needed to use this model.
Definition dnnmodelinfocontainer.h:70
DNNModelUsageList usage
How the model can be used. | for more than one use. face_detection, face_recognition,...
Definition dnnmodelinfocontainer.h:69
QString downloadPath
Used by the downloader for the download path.
Definition dnnmodelinfocontainer.h:71
QString classList
Name of model containing list of class names for classification.
Definition dnnmodelinfocontainer.h:73
QString sha256
SHA265 hash of the file for download.
Definition dnnmodelinfocontainer.h:72
QString displayName
Name used for display in UI (QComboBox).
Definition dnnmodelinfocontainer.h:67
Definition datefolderview.cpp:34
QList< DNNModelUsage > DNNModelUsageList
Definition dnnmodeldefinitions.h:41
@ DNNLoaderNet
Definition dnnmodeldefinitions.h:26
bool operator==(const SearchTextSettings &a, const SearchTextSettings &b)
Definition searchtextbar.cpp:40
enum Digikam::_DNNLoaderType DNNLoaderType