digiKam
Loading...
Searching...
No Matches
dnnfacedetectoryunet.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam
4 *
5 * Date : 2024-09-21
6 * Description : Derived class to perform YuNet neural network inference
7 * for face detection. Credit: Shiqi yu for YuNet
8 * More information with YuNet:
9 * https://github.com/opencv/opencv_zoo/tree/main/models/face_detection_yunet
10 *
11 * SPDX-FileCopyrightText: 2019 by Thanh Trung Dinh <dinhthanhtrung1996 at gmail dot com>
12 * SPDX-FileCopyrightText: 2020-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
13 * SPDX-FileCopyrightText: 2024 by Michael Miller <michael underscore miller at msn dot com>
14 *
15 * SPDX-License-Identifier: GPL-2.0-or-later
16 *
17 * ============================================================ */
18
19#pragma once
20
21// Qt includes
22
23#include <QMutex>
24
25// Local includes
26
27#include "dnnfacedetectorbase.h"
28
29namespace Digikam
30{
31
32class DIGIKAM_EXPORT DNNFaceDetectorYuNet: public DNNFaceDetectorBase
33{
34public:
35
36 explicit DNNFaceDetectorYuNet();
37 ~DNNFaceDetectorYuNet() override;
38
39 bool loadModels();
40
41 void detectFaces(const cv::Mat& inputImage,
42 const cv::Size& paddedSize,
43 std::vector<cv::Rect>& detectedBboxes) override;
44
45 virtual void setFaceDetectionSize(FaceScanSettings::FaceDetectionSize faceSize) override;
46
47private:
48
49 std::vector<cv::String> getOutputsNames() const;
50
51 cv::Mat callModel(const cv::Mat& inputImage);
52
53private:
54
55 // Disable
57 DNNFaceDetectorYuNet& operator=(const DNNFaceDetectorYuNet&) = delete;
58};
59
60} // namespace Digikam
Definition dnnfacedetectorbase.h:37
Definition dnnfacedetectoryunet.h:33
FaceDetectionSize
Definition facescansettings.h:76
Definition datefolderview.cpp:34