ytfeng commited on
Commit
9b5a5a4
·
1 Parent(s): 1e45475

bump opencv version to 4.10.0 (#260)

Browse files

* bump opencv version to 4.10.0

* doc: version change

* fix version control

* fix version control for efficient sam

Files changed (1) hide show
  1. demo.py +5 -4
demo.py CHANGED
@@ -9,11 +9,12 @@ import argparse
9
  import numpy as np
10
  import cv2 as cv
11
 
12
- from wechatqrcode import WeChatQRCode
13
-
14
  # Check OpenCV version
15
- assert cv.__version__ >= "4.9.0", \
16
- "Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
 
 
 
17
 
18
  # Valid combinations of backends and targets
19
  backend_target_pairs = [
 
9
  import numpy as np
10
  import cv2 as cv
11
 
 
 
12
  # Check OpenCV version
13
+ opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
14
+ assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
15
+ "Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"
16
+
17
+ from wechatqrcode import WeChatQRCode
18
 
19
  # Valid combinations of backends and targets
20
  backend_target_pairs = [