From 06c4df6d4ffc024ad8ea2bc31bd2a2a1d031a379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 8 Oct 2022 01:45:49 +0100 Subject: [PATCH] add WeChat QRCode CNN models for wechat_qrcode module, including the detector model and the super scale model. https://github.com/WeChatCV/opencv_3rdparty the WeChatCV project added code in opencv_contrib --- .gitignore | 1 + opencv.spec | 12 +++++++++++- sources | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1ade250..0d40f7e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ opencv*.tar.* face_landmark_model.dat.xz /b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip /fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip +/wechat-20230712.git3487ef7.tar.gz diff --git a/opencv.spec b/opencv.spec index c87543f..64318e2 100644 --- a/opencv.spec +++ b/opencv.spec @@ -91,6 +91,10 @@ Source3: face_landmark_model.dat.xz # mv v0.1.2a.zip $(md5sum v0.1.2a.zip | cut -d' ' -f1)-v0.1.2a.zip Source4: fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip Source5: xorg.conf +%global wechat_commit 3487ef7cde71d93c6a01bb0b84aa0f22c6128f6b +%global wechat_shortcommit %(c=%{wechat_commit}; echo ${c:0:7}) +%global wechat_gitdate 20230712 +Source6: https://github.com/WeChatCV/opencv_3rdparty/archive/%{wechat_commit}/wechat-%{wechat_gitdate}.git%{wechat_shortcommit}.tar.gz Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch3: opencv.python.patch @@ -276,7 +280,7 @@ to provide decent performance and stability. %prep # autosetup doesn't work with 2 sources # https://github.com/rpm-software-management/rpm/issues/1204 -%setup -q -a1 %{?with_extras_tests:-a2} +%setup -q -a1 %{?with_extras_tests:-a2} -a6 # we don't use pre-built contribs except quirc pushd 3rdparty @@ -300,6 +304,11 @@ pushd .cache/data xz -d face_landmark_model.dat.xz mv face_landmark_model.dat 7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat popd +mkdir -p .cache/wechat_qrcode +mv opencv_3rdparty-%{wechat_commit}/detect.caffemodel .cache/wechat_qrcode/238e2b2d6f3c18d6c3a30de0c31e23cf-detect.caffemodel +mv opencv_3rdparty-%{wechat_commit}/detect.prototxt .cache/wechat_qrcode/6fb4976b32695f9f5c6305c19f12537d-detect.prototxt +mv opencv_3rdparty-%{wechat_commit}/sr.caffemodel .cache/wechat_qrcode/cbfcd60361a73beb8c583eea7e8e6664-sr.caffemodel +mv opencv_3rdparty-%{wechat_commit}/sr.prototxt .cache/wechat_qrcode/69db99927a70df953b471daaba03fbef-sr.prototxt # Install ADE, needed for opencv_gapi mkdir -p .cache/ade @@ -518,6 +527,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope - Update opencv to 4.8.0 - Use bundle flatbuffers, tried build with flatbuffers from system but doesn't build - Use oneVPL instead libmfx +- Add WeChat QRCode * Thu Jul 20 2023 Fedora Release Engineering - 4.7.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 7ec0a02..4daac63 100644 --- a/sources +++ b/sources @@ -2,3 +2,4 @@ SHA512 (opencv-clean-4.8.0.tar.gz) = 5c15a86893ebd4ef8d597b198f4467dbb76767c27ed SHA512 (opencv_contrib-clean-4.8.0.tar.gz) = decd6830c533014c0da7162dfaca18ef22a0cd2d10554c3f572c312cf3e76e45666ff5c6e10a4860d4bd4eaf73a1dfc8c8a4e76f49188a19d3de89019a15df3b SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip) = ce5af0bd5d7fb04022f92fed130898959aecb954cc09da2fc923c76b37ee92d2233888592a4c6bca8006ac4d3fda9c6da80f316c924a407a7a5961d9832a681c +SHA512 (wechat-20230712.git3487ef7.tar.gz) = bc4f220465de41df8af0cb35312c1db155976d05f13a60e43c1798b161d8f56388e34a59108fb3e27e8c97b53acfd198256d9ae420b5f70a32ddc1ea65c3c8a6