From 5b7b3b1dfd5ce7c275881098310667b09562ad27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 11 Nov 2024 12:27:53 +0100 Subject: New upstream version 0.32.10 --- subprojects/shotwell-facedetect/facedetect-opencv.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'subprojects/shotwell-facedetect/facedetect-opencv.cpp') diff --git a/subprojects/shotwell-facedetect/facedetect-opencv.cpp b/subprojects/shotwell-facedetect/facedetect-opencv.cpp index 8b0ad10..7cda514 100644 --- a/subprojects/shotwell-facedetect/facedetect-opencv.cpp +++ b/subprojects/shotwell-facedetect/facedetect-opencv.cpp @@ -192,11 +192,6 @@ bool loadNet(const cv::String &baseDir) #endif } - if(cascade.empty() && cascade_profile.empty() && faceDetectNet.empty()) { - g_warning("No face detection method detected. Face detection fill not work."); - return false; - } - #if HAS_OPENCV_DNN // If there is no detection model, disable advanced face detection disableDnn = faceDetectNet.empty(); @@ -204,11 +199,14 @@ bool loadNet(const cv::String &baseDir) if(faceRecogNet.empty()) { g_warning("Face recognition net not available, disabling recognition"); } +#endif + + if (disableDnn && cascade.empty() && cascade_profile.empty()) { + g_warning("No face detection method detected. Face detection fill not work."); + return false; + } return true; -#else - return not cascade.empty() && not cascade_profile.empty(); -#endif } // Face detector -- cgit v1.2.3