File indexing completed on 2025-01-19 03:57:57

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-09-03
0007  * Description : Integrated, multithread face detection / recognition
0008  *
0009  * SPDX-FileCopyrightText: 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
0010  * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_TRAINER_WORKERS_H
0017 #define DIGIKAM_TRAINER_WORKERS_H
0018 
0019 // Local includes
0020 
0021 #include "facepipeline_p.h"
0022 #include "faceitemretriever.h"
0023 
0024 namespace Digikam
0025 {
0026 
0027 class Q_DECL_HIDDEN TrainerWorker : public WorkerObject
0028 {
0029     Q_OBJECT
0030 
0031 public:
0032 
0033     explicit TrainerWorker(FacePipeline::Private* const dd);
0034     ~TrainerWorker() override;
0035 
0036 protected:
0037 
0038     void aboutToDeactivate() override;
0039 
0040 public Q_SLOTS:
0041 
0042     void process(const FacePipelineExtendedPackage::Ptr& package);
0043 
0044 Q_SIGNALS:
0045 
0046     void processed(const FacePipelineExtendedPackage::Ptr& package);
0047 
0048 protected:
0049 
0050     FacialRecognitionWrapper     recognizer;
0051     FaceItemRetriever            imageRetriever;
0052     FacePipeline::Private* const d;
0053 };
0054 
0055 } // namespace Digikam
0056 
0057 #endif // DIGIKAM_TRAINER_WORKERS_H