ONNX
ytfeng commited on
Commit
6dfe46a
·
1 Parent(s): 152888d

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 +3 -2
demo.py CHANGED
@@ -4,8 +4,9 @@ import cv2 as cv
4
  from efficientSAM import EfficientSAM
5
 
6
  # Check OpenCV version
7
- assert cv.__version__ >= "4.10.0", \
8
- "Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
 
9
 
10
  # Valid combinations of backends and targets
11
  backend_target_pairs = [
 
4
  from efficientSAM import EfficientSAM
5
 
6
  # Check OpenCV version
7
+ opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
8
+ assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
9
+ "Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"
10
 
11
  # Valid combinations of backends and targets
12
  backend_target_pairs = [