digiKam
Loading...
Searching...
No Matches
dnnfacedetectoryolo.h
Go to the documentation of this file.
1
/* ============================================================
2
*
3
* This file is a part of digiKam
4
*
5
* Date : 2019-08-08
6
* Description : Derived class to perform YOLO neural network inference
7
* for face detection. Credit: Ayoosh Kathuria (for Yolov3 blog post),
8
* sthanhng (for example of face detection with Yolov3).
9
* More information with Yolov3:
10
* https://towardsdatascience.com/yolo-v3-object-detection-53fb7d3bfe6b
11
* sthanhng github on face detection with Yolov3:
12
* https://github.com/sthanhng/yoloface
13
*
14
* SPDX-FileCopyrightText: 2019 by Thanh Trung Dinh <dinhthanhtrung1996 at gmail dot com>
15
* SPDX-FileCopyrightText: 2020-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
16
*
17
* SPDX-License-Identifier: GPL-2.0-or-later
18
*
19
* ============================================================ */
20
21
#pragma once
22
23
// Local includes
24
25
#include "
dnnfacedetectorbase.h
"
26
27
namespace
Digikam
28
{
29
30
class
DIGIKAM_EXPORT
DNNFaceDetectorYOLO
:
public
DNNFaceDetectorBase
31
{
32
33
public
:
34
35
explicit
DNNFaceDetectorYOLO
();
36
~DNNFaceDetectorYOLO
()
override
=
default
;
37
38
bool
loadModels();
39
40
void
detectFaces(
const
cv::Mat& inputImage,
41
const
cv::Size& paddedSize,
42
std::vector<cv::Rect>& detectedBboxes)
override
;
43
44
private
:
45
46
std::vector<cv::String> getOutputsNames()
const
;
47
48
void
postprocess(
const
std::vector<cv::Mat>& outs,
49
const
cv::Size& paddedSize,
50
std::vector<cv::Rect>& detectedBboxes)
const
;
51
52
private
:
53
54
// Disable
55
DNNFaceDetectorYOLO
(
const
DNNFaceDetectorYOLO
&) =
delete
;
56
DNNFaceDetectorYOLO
& operator=(
const
DNNFaceDetectorYOLO
&) =
delete
;
57
};
58
59
}
// namespace Digikam
Digikam::DNNFaceDetectorBase
Definition
dnnfacedetectorbase.h:37
Digikam::DNNFaceDetectorYOLO
Definition
dnnfacedetectoryolo.h:31
Digikam::DNNFaceDetectorYOLO::~DNNFaceDetectorYOLO
~DNNFaceDetectorYOLO() override=default
dnnfacedetectorbase.h
Digikam
Definition
datefolderview.cpp:34
core
libs
facesengine
detection
opencv-dnn
dnnfacedetectoryolo.h
Generated by
1.9.8