Skip to content

Commit a3c46e8

Browse files
committed
Convert WeChatQRCode test model fixtures from Caffe to ONNX
OpenCV 5.x's wechat_qrcode module (and WeChatQRCode's OpenCvSharp wrapper) only accepts single-file ONNX models now; the Caffe importer has been removed entirely. The Caffe-format fixtures checked into this repo (detect.prototxt/.caffemodel, sr.prototxt/.caffemodel) were therefore stale and every model-dependent WeChatQRCodeTest case was silently skipped. Replace them with detect.onnx/sr.onnx, converted from the same published weights (opencv/opencv_3rdparty:wechat_qrcode_20210119, Apache License 2.0; see NOTICE.md). All 7 model-dependent tests in WeChatQRCodeTest.cs now run and pass instead of being skipped. Refs #2075
1 parent 3f18300 commit a3c46e8

5 files changed

Lines changed: 12 additions & 3119 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
`detect.onnx` and `sr.onnx` are derived from the WeChatQRCode Caffe models
2+
published at
3+
[opencv/opencv_3rdparty:wechat_qrcode_20210119](https://github.com/opencv/opencv_3rdparty/tree/wechat_qrcode_20210119)
4+
(`detect.prototxt`/`.caffemodel`, `sr.prototxt`/`.caffemodel`), Copyright (C)
5+
2021 THL A29 Limited, a Tencent company, licensed under the
6+
[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
7+
8+
These files were converted from Caffe to ONNX using the tool at
9+
`tools/wechat_qrcode_caffe2onnx/` in this repository, since OpenCV 5.x's
10+
`wechat_qrcode` module (and OpenCvSharp's `WeChatQRCode` wrapper) only accepts
11+
ONNX models. No other changes were made to the network weights or
12+
architecture.

test/OpenCvSharp.Tests/_data/wechat_qrcode/detect.caffemodel renamed to test/OpenCvSharp.Tests/_data/wechat_qrcode/detect.onnx

943 KB
Binary file not shown.

0 commit comments

Comments
 (0)