ytfeng commited on
Commit
abdb6fc
·
1 Parent(s): a372c52

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 (2) hide show
  1. CMakeLists.txt +1 -1
  2. demo.py +5 -4
CMakeLists.txt CHANGED
@@ -4,7 +4,7 @@ set(project_name "opencv_zoo_face_expression_recognition")
4
 
5
  PROJECT (${project_name})
6
 
7
- set(OPENCV_VERSION "4.9.0")
8
  set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
9
  find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
10
  # Find OpenCV, you may need to set OpenCV_DIR variable
 
4
 
5
  PROJECT (${project_name})
6
 
7
+ set(OPENCV_VERSION "4.10.0")
8
  set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
9
  find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
10
  # Find OpenCV, you may need to set OpenCV_DIR variable
demo.py CHANGED
@@ -6,15 +6,16 @@ import datetime
6
  import numpy as np
7
  import cv2 as cv
8
 
 
 
 
 
 
9
  from facial_fer_model import FacialExpressionRecog
10
 
11
  sys.path.append('../face_detection_yunet')
12
  from yunet import YuNet
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 = [
20
  [cv.dnn.DNN_BACKEND_OPENCV, cv.dnn.DNN_TARGET_CPU],
 
6
  import numpy as np
7
  import cv2 as cv
8
 
9
+ # Check OpenCV version
10
+ opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
11
+ assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
12
+ "Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"
13
+
14
  from facial_fer_model import FacialExpressionRecog
15
 
16
  sys.path.append('../face_detection_yunet')
17
  from yunet import YuNet
18
 
 
 
 
 
19
  # Valid combinations of backends and targets
20
  backend_target_pairs = [
21
  [cv.dnn.DNN_BACKEND_OPENCV, cv.dnn.DNN_TARGET_CPU],