ytfeng commited on
Commit
b018fd4
·
1 Parent(s): 1eb1515

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
@@ -4,15 +4,16 @@ import argparse
4
  import numpy as np
5
  import cv2 as cv
6
 
 
 
 
 
 
7
  from mp_handpose import MPHandPose
8
 
9
  sys.path.append('../palm_detection_mediapipe')
10
  from mp_palmdet import MPPalmDet
11
 
12
- # Check OpenCV version
13
- assert cv.__version__ >= "4.9.0", \
14
- "Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
15
-
16
  # Valid combinations of backends and targets
17
  backend_target_pairs = [
18
  [cv.dnn.DNN_BACKEND_OPENCV, cv.dnn.DNN_TARGET_CPU],
 
4
  import numpy as np
5
  import cv2 as cv
6
 
7
+ # Check OpenCV version
8
+ opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
9
+ assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
10
+ "Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"
11
+
12
  from mp_handpose import MPHandPose
13
 
14
  sys.path.append('../palm_detection_mediapipe')
15
  from mp_palmdet import MPPalmDet
16
 
 
 
 
 
17
  # Valid combinations of backends and targets
18
  backend_target_pairs = [
19
  [cv.dnn.DNN_BACKEND_OPENCV, cv.dnn.DNN_TARGET_CPU],