summarylogtreecommitdiffstats
path: root/f2f86c3c.patch
blob: 2cc222987cc2dcaa3342e1d747b2f281d22e3440 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From f2f86c3c6719e4ea0bc7de95ce1ae33e8c45495e Mon Sep 17 00:00:00 2001
From: Maik Qualmann <metzpinguin@gmail.com>
Date: Sun, 29 Jan 2023 21:30:24 +0100
Subject: [PATCH] fix crash with the release version of OpenCV-4.7.0 The
 problem is already fixed with the master version of OpenCV. BUGS: 464646
 BUGS: 464745 FIXED-IN: 7.10.0

diff --git a/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectorssd.cpp b/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectorssd.cpp
index e178ea435a..e0f9eda6c7 100644
--- a/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectorssd.cpp
+++ b/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectorssd.cpp
@@ -78,6 +78,12 @@ bool DNNFaceDetectorSSD::loadModels()
             net = cv::dnn::readNetFromCaffe(nnmodel.toStdString(),
                                             nndata.toStdString());
 
+#endif
+
+#if (OPENCV_VERSION == QT_VERSION_CHECK(4, 7, 0))
+
+            net.enableWinograd(false);
+
 #endif
 
         }
diff --git a/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectoryolo.cpp b/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectoryolo.cpp
index 3524d07071..0624a745f6 100644
--- a/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectoryolo.cpp
+++ b/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectoryolo.cpp
@@ -89,6 +89,13 @@ bool DNNFaceDetectorYOLO::loadModels()
 
             net.setPreferableBackend(cv::dnn::DNN_BACKEND_DEFAULT);
             net.setPreferableTarget(cv::dnn::DNN_TARGET_CPU);
+
+#if (OPENCV_VERSION == QT_VERSION_CHECK(4, 7, 0))
+
+            net.enableWinograd(false);
+
+#endif
+
         }
         catch (cv::Exception& e)
         {
diff --git a/core/libs/facesengine/recognition/opencv-dnn/dnnfaceextractor.cpp b/core/libs/facesengine/recognition/opencv-dnn/dnnfaceextractor.cpp
index e9a2fe9efb..7067af2590 100644
--- a/core/libs/facesengine/recognition/opencv-dnn/dnnfaceextractor.cpp
+++ b/core/libs/facesengine/recognition/opencv-dnn/dnnfaceextractor.cpp
@@ -149,6 +149,12 @@ bool DNNFaceExtractor::loadModels()
 
             d->net = cv::dnn::readNetFromTorch(nnmodel.toStdString());
 
+#endif
+
+#if (OPENCV_VERSION == QT_VERSION_CHECK(4, 7, 0))
+
+            d->net.enableWinograd(false);
+
 #endif
 
         }
-- 
GitLab