Skip to content

Commit f88e9b2

Browse files
authoredJun 4, 2024
bump opencv version to 4.10.0 (#260)
* bump opencv version to 4.10.0 * doc: version change * fix version control * fix version control for efficient sam
1 parent aa351d2 commit f88e9b2

File tree

35 files changed

+114
-93
lines changed

35 files changed

+114
-93
lines changed
 

‎benchmark/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ python benchmark.py --all --cfg_overwrite_backend_target 1
5555

5656
## Detailed Results
5757

58-
Benchmark is done with latest `opencv-python==4.8.0.74` and `opencv-contrib-python==4.8.0.74` on the following platforms. Some models are excluded because of support issues.
58+
Benchmark is done with latest opencv-python & opencv-contrib-python (current 4.10.0) on the following platforms. Some models are excluded because of support issues.
5959

6060
### Intel 12700K
6161

‎benchmark/benchmark.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
from utils import METRICS, DATALOADERS
1010

1111
# Check OpenCV version
12-
assert cv.__version__ >= "4.9.0", \
12+
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
13+
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
1314
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"
1415

1516
# Valid combinations of backends and targets

‎models/face_detection_yunet/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.24.0)
22
project(opencv_zoo_face_detection_yunet)
33

4-
set(OPENCV_VERSION "4.9.0")
4+
set(OPENCV_VERSION "4.10.0")
55
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
66

77
# Find OpenCV

‎models/face_detection_yunet/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
import numpy as np
1010
import cv2 as cv
1111

12-
from yunet import YuNet
13-
1412
# 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"
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 yunet import YuNet
1718

1819
# Valid combinations of backends and targets
1920
backend_target_pairs = [

‎models/face_recognition_sface/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@
1010
import numpy as np
1111
import cv2 as cv
1212

13+
# Check OpenCV version
14+
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
15+
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
16+
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"
17+
1318
from sface import SFace
1419

1520
sys.path.append('../face_detection_yunet')
1621
from yunet import YuNet
1722

18-
# Check OpenCV version
19-
assert cv.__version__ >= "4.9.0", \
20-
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
21-
2223
# Valid combinations of backends and targets
2324
backend_target_pairs = [
2425
[cv.dnn.DNN_BACKEND_OPENCV, cv.dnn.DNN_TARGET_CPU],

‎models/facial_expression_recognition/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set(project_name "opencv_zoo_face_expression_recognition")
44

55
PROJECT (${project_name})
66

7-
set(OPENCV_VERSION "4.9.0")
7+
set(OPENCV_VERSION "4.10.0")
88
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
99
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
1010
# Find OpenCV, you may need to set OpenCV_DIR variable

‎models/facial_expression_recognition/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
import numpy as np
77
import cv2 as cv
88

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+
914
from facial_fer_model import FacialExpressionRecog
1015

1116
sys.path.append('../face_detection_yunet')
1217
from yunet import YuNet
1318

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-
1819
# Valid combinations of backends and targets
1920
backend_target_pairs = [
2021
[cv.dnn.DNN_BACKEND_OPENCV, cv.dnn.DNN_TARGET_CPU],

‎models/handpose_estimation_mediapipe/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
import numpy as np
55
import cv2 as cv
66

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+
712
from mp_handpose import MPHandPose
813

914
sys.path.append('../palm_detection_mediapipe')
1015
from mp_palmdet import MPPalmDet
1116

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-
1617
# Valid combinations of backends and targets
1718
backend_target_pairs = [
1819
[cv.dnn.DNN_BACKEND_OPENCV, cv.dnn.DNN_TARGET_CPU],

‎models/human_segmentation_pphumanseg/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set(project_name "opencv_zoo_human_segmentation")
44

55
PROJECT (${project_name})
66

7-
set(OPENCV_VERSION "4.9.0")
7+
set(OPENCV_VERSION "4.10.0")
88
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
99
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
1010
# Find OpenCV, you may need to set OpenCV_DIR variable

‎models/human_segmentation_pphumanseg/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
import numpy as np
1010
import cv2 as cv
1111

12-
from pphumanseg import PPHumanSeg
13-
1412
# 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"
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 pphumanseg import PPHumanSeg
1718

1819
# Valid combinations of backends and targets
1920
backend_target_pairs = [

‎models/image_classification_mobilenet/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(project_name "opencv_zoo_image_classification_mobilenet")
33

44
PROJECT (${project_name})
55

6-
set(OPENCV_VERSION "4.9.0")
6+
set(OPENCV_VERSION "4.10.0")
77
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
88
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
99
# Find OpenCV, you may need to set OpenCV_DIR variable

‎models/image_classification_mobilenet/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import numpy as np
44
import cv2 as cv
55

6-
from mobilenet import MobileNet
7-
86
# 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"
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 mobilenet import MobileNet
1112

1213
# Valid combinations of backends and targets
1314
backend_target_pairs = [

‎models/image_classification_ppresnet/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(project_name "opencv_zoo_image_classification_ppresnet")
33

44
PROJECT (${project_name})
55

6-
set(OPENCV_VERSION "4.9.0")
6+
set(OPENCV_VERSION "4.10.0")
77
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
88
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
99
# Find OpenCV, you may need to set OpenCV_DIR variable

‎models/image_classification_ppresnet/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
import numpy as np
1010
import cv2 as cv
1111

12-
from ppresnet import PPResNet
13-
1412
# 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"
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 ppresnet import PPResNet
1718

1819
# Valid combinations of backends and targets
1920
backend_target_pairs = [

‎models/image_segmentation_efficientsam/demo.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
from efficientSAM import EfficientSAM
55

66
# 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"
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"
910

1011
# Valid combinations of backends and targets
1112
backend_target_pairs = [

‎models/license_plate_detection_yunet/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import numpy as np
44
import cv2 as cv
55

6-
from lpd_yunet import LPD_YuNet
7-
86
# 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"
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 lpd_yunet import LPD_YuNet
1112

1213
# Valid combinations of backends and targets
1314
backend_target_pairs = [

‎models/object_detection_nanodet/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(project_name "opencv_zoo_object_detection_nanodet")
33

44
PROJECT (${project_name})
55

6-
set(OPENCV_VERSION "4.9.0")
6+
set(OPENCV_VERSION "4.10.0")
77
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
88
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
99
# Find OpenCV, you may need to set OpenCV_DIR variable

‎models/object_detection_nanodet/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
import cv2 as cv
33
import argparse
44

5-
from nanodet import NanoDet
6-
75
# Check OpenCV version
8-
assert cv.__version__ >= "4.9.0", \
9-
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
6+
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
7+
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
8+
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"
9+
10+
from nanodet import NanoDet
1011

1112
# Valid combinations of backends and targets
1213
backend_target_pairs = [

‎models/object_detection_yolox/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(project_name "opencv_zoo_object_detection_yolox")
33

44
PROJECT (${project_name})
55

6-
set(OPENCV_VERSION "4.9.0")
6+
set(OPENCV_VERSION "4.10.0")
77
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
88
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
99
# Find OpenCV, you may need to set OpenCV_DIR variable

‎models/object_detection_yolox/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
import cv2 as cv
33
import argparse
44

5-
from yolox import YoloX
6-
75
# Check OpenCV version
8-
assert cv.__version__ >= "4.9.0", \
9-
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
6+
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
7+
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
8+
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"
9+
10+
from yolox import YoloX
1011

1112
# Valid combinations of backends and targets
1213
backend_target_pairs = [

‎models/object_tracking_vittrack/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(project_name "opencv_zoo_object_tracking_vittrack")
33

44
PROJECT (${project_name})
55

6-
set(OPENCV_VERSION "4.9.0")
6+
set(OPENCV_VERSION "4.10.0")
77
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
88
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
99
# Find OpenCV, you may need to set OpenCV_DIR variable

‎models/object_tracking_vittrack/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
import numpy as np
77
import cv2 as cv
88

9-
from vittrack import VitTrack
10-
119
# Check OpenCV version
12-
assert cv.__version__ >= "4.9.0", \
13-
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
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 vittrack import VitTrack
1415

1516
# Valid combinations of backends and targets
1617
backend_target_pairs = [

‎models/optical_flow_estimation_raft/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import cv2 as cv
44
import numpy as np
55

6-
from raft import Raft
7-
86
# 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"
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 raft import Raft
1112

1213
parser = argparse.ArgumentParser(description='RAFT (https://github.com/princeton-vl/RAFT)')
1314
parser.add_argument('--input1', '-i1', type=str,

‎models/palm_detection_mediapipe/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import numpy as np
44
import cv2 as cv
55

6-
from mp_palmdet import MPPalmDet
7-
86
# 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"
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
1112

1213
# Valid combinations of backends and targets
1314
backend_target_pairs = [

‎models/person_detection_mediapipe/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(project_name "opencv_zoo_person_detection_mediapipe")
33

44
PROJECT (${project_name})
55

6-
set(OPENCV_VERSION "4.9.0")
6+
set(OPENCV_VERSION "4.10.0")
77
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
88
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
99
# Find OpenCV, you may need to set OpenCV_DIR variable

‎models/person_detection_mediapipe/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import numpy as np
44
import cv2 as cv
55

6-
from mp_persondet import MPPersonDet
7-
86
# 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"
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_persondet import MPPersonDet
1112

1213
# Valid combinations of backends and targets
1314
backend_target_pairs = [

‎models/person_reid_youtureid/demo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
import numpy as np
1111
import cv2 as cv
1212

13-
from youtureid import YoutuReID
14-
1513
# Check OpenCV version
16-
assert cv.__version__ >= "4.9.0", \
17-
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
14+
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
15+
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
16+
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"
17+
18+
from youtureid import YoutuReID
1819

1920
# Valid combinations of backends and targets
2021
backend_target_pairs = [

‎models/pose_estimation_mediapipe/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(project_name "opencv_zoo_pose_estimation_mediapipe")
33

44
PROJECT (${project_name})
55

6-
set(OPENCV_VERSION "4.9.0")
6+
set(OPENCV_VERSION "4.10.0")
77
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
88
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
99
# Find OpenCV, you may need to set OpenCV_DIR variable

0 commit comments

Comments
 (0)
Failed to load comments.