summaryrefslogtreecommitdiff
path: root/subprojects
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-11-13 13:36:16 +0100
committerJörg Frings-Fürst <debian@jff.email>2024-11-13 13:36:16 +0100
commit34852b296a372a81d0b97ab4c12f32be6d294cd3 (patch)
tree4f751a1551d21c24e7fe66d2a7ddf4444d10a569 /subprojects
parent80aa3fe15f6346102c29b9c4236fe1e89c283d3b (diff)
parent4098950bba8e6d8609395eb9b223c276cb5954b6 (diff)
Merge branch 'release/debian/0.32.10-1'HEADdebian/0.32.10-1master
Diffstat (limited to 'subprojects')
-rw-r--r--subprojects/shotwell-facedetect/facedetect-opencv.cpp14
1 files changed, 6 insertions, 8 deletions
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