File tree Expand file tree Collapse file tree 20 files changed +97
-77
lines changed
facial_expression_recognition
handpose_estimation_mediapipe
human_segmentation_pphumanseg
image_classification_mobilenet
image_classification_ppresnet
license_plate_detection_yunet
optical_flow_estimation_raft
person_detection_mediapipe
pose_estimation_mediapipe Expand file tree Collapse file tree 20 files changed +97
-77
lines changed Original file line number Diff line number Diff line change 99from utils import METRICS , DATALOADERS
1010
1111# Check OpenCV version
12- assert cv .__version__ >= "4.10.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
Original file line number Diff line number Diff line change 99import numpy as np
1010import cv2 as cv
1111
12- from yunet import YuNet
13-
1412# Check OpenCV version
15- assert cv .__version__ >= "4.10.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
1920backend_target_pairs = [
Original file line number Diff line number Diff line change 1010import numpy as np
1111import 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+
1318from sface import SFace
1419
1520sys .path .append ('../face_detection_yunet' )
1621from yunet import YuNet
1722
18- # Check OpenCV version
19- assert cv .__version__ >= "4.10.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
2324backend_target_pairs = [
2425 [cv .dnn .DNN_BACKEND_OPENCV , cv .dnn .DNN_TARGET_CPU ],
Original file line number Diff line number Diff line change 66import numpy as np
77import 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+
914from facial_fer_model import FacialExpressionRecog
1015
1116sys .path .append ('../face_detection_yunet' )
1217from yunet import YuNet
1318
14- # Check OpenCV version
15- assert cv .__version__ >= "4.10.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
1920backend_target_pairs = [
2021 [cv .dnn .DNN_BACKEND_OPENCV , cv .dnn .DNN_TARGET_CPU ],
Original file line number Diff line number Diff line change 44import numpy as np
55import 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+
712from mp_handpose import MPHandPose
813
914sys .path .append ('../palm_detection_mediapipe' )
1015from mp_palmdet import MPPalmDet
1116
12- # Check OpenCV version
13- assert cv .__version__ >= "4.10.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
1718backend_target_pairs = [
1819 [cv .dnn .DNN_BACKEND_OPENCV , cv .dnn .DNN_TARGET_CPU ],
Original file line number Diff line number Diff line change 99import numpy as np
1010import cv2 as cv
1111
12- from pphumanseg import PPHumanSeg
13-
1412# Check OpenCV version
15- assert cv .__version__ >= "4.10.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
1920backend_target_pairs = [
Original file line number Diff line number Diff line change 33import numpy as np
44import cv2 as cv
55
6- from mobilenet import MobileNet
7-
86# Check OpenCV version
9- assert cv .__version__ >= "4.10.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
1314backend_target_pairs = [
Original file line number Diff line number Diff line change 99import numpy as np
1010import cv2 as cv
1111
12- from ppresnet import PPResNet
13-
1412# Check OpenCV version
15- assert cv .__version__ >= "4.10.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
1920backend_target_pairs = [
Original file line number Diff line number Diff line change 33import numpy as np
44import cv2 as cv
55
6- from lpd_yunet import LPD_YuNet
7-
86# Check OpenCV version
9- assert cv .__version__ >= "4.10.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
1314backend_target_pairs = [
Original file line number Diff line number Diff line change 22import cv2 as cv
33import argparse
44
5- from nanodet import NanoDet
6-
75# Check OpenCV version
8- assert cv .__version__ >= "4.10.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
1213backend_target_pairs = [
You can’t perform that action at this time.
0 commit comments