Debian Codegraph @

core/utilities/facemanagement/bench/detectionbenchmarker.h

raw
1 /* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2010-09-03
7 * Description : Face detection benchmarker
8 *
9 * SPDX-FileCopyrightText: 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10 * SPDX-FileCopyrightText: 2012-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16 #pragma once
17
18 // Local includes
19
20 #include "facepipeline_p.h"
21
22 namespace Digikam
23 {
24
25 class Q_DECL_HIDDEN DetectionBenchmarker : public WorkerObject
26 {
27 Q_OBJECT
28
29 public:
30
31 explicit DetectionBenchmarker(FacePipeline::Private* const d);
32 QString result() const;
33
34 public Q_SLOTS:
35
36 void process(const FacePipelineExtendedPackage::Ptr& package);
37
38 Q_SIGNALS:
39
40 void processed(const FacePipelineExtendedPackage::Ptr& package);
41
42 protected:
43
44 int totalImages = 0;
45 int faces = 0;
46 double totalPixels = 0.0;
47 double facePixels = 0.0;
48
49 int trueNegativeImages = 0;
50 int falsePositiveImages = 0;
51
52 int truePositiveFaces = 0;
53 int falseNegativeFaces = 0;
54 int falsePositiveFaces = 0;
55
56 FacePipeline::Private* const d = nullptr;
57 };
58
59 } // namespace Digikam