ytfeng commited on
Commit
50fcb8f
·
1 Parent(s): 9ae8aa5

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
@@ -3,11 +3,12 @@ import argparse
3
  import numpy as np
4
  import cv2 as cv
5
 
6
- from mp_palmdet import MPPalmDet
7
-
8
  # Check OpenCV version
9
- assert cv.__version__ >= "4.9.0", \
10
- "Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
 
 
 
11
 
12
  # Valid combinations of backends and targets
13
  backend_target_pairs = [
 
3
  import numpy as np
4
  import cv2 as cv
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
+ from mp_palmdet import MPPalmDet
12
 
13
  # Valid combinations of backends and targets
14
  backend_target_pairs = [