Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ python benchmark.py --all --cfg_overwrite_backend_target 1

## Detailed Results

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.
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.

### Intel 12700K

Expand Down
3 changes: 2 additions & 1 deletion benchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from utils import METRICS, DATALOADERS

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

# Valid combinations of backends and targets
Expand Down
2 changes: 1 addition & 1 deletion models/face_detection_yunet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.24.0)
project(opencv_zoo_face_detection_yunet)

set(OPENCV_VERSION "4.9.0")
set(OPENCV_VERSION "4.10.0")
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")

# Find OpenCV
Expand Down
9 changes: 5 additions & 4 deletions models/face_detection_yunet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
import numpy as np
import cv2 as cv

from yunet import YuNet

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from yunet import YuNet

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
9 changes: 5 additions & 4 deletions models/face_recognition_sface/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
import numpy as np
import cv2 as cv

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

from sface import SFace

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

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"

# Valid combinations of backends and targets
backend_target_pairs = [
[cv.dnn.DNN_BACKEND_OPENCV, cv.dnn.DNN_TARGET_CPU],
Expand Down
2 changes: 1 addition & 1 deletion models/facial_expression_recognition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(project_name "opencv_zoo_face_expression_recognition")

PROJECT (${project_name})

set(OPENCV_VERSION "4.9.0")
set(OPENCV_VERSION "4.10.0")
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
# Find OpenCV, you may need to set OpenCV_DIR variable
Expand Down
9 changes: 5 additions & 4 deletions models/facial_expression_recognition/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
import numpy as np
import cv2 as cv

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

from facial_fer_model import FacialExpressionRecog

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

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"

# Valid combinations of backends and targets
backend_target_pairs = [
[cv.dnn.DNN_BACKEND_OPENCV, cv.dnn.DNN_TARGET_CPU],
Expand Down
9 changes: 5 additions & 4 deletions models/handpose_estimation_mediapipe/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
import numpy as np
import cv2 as cv

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

from mp_handpose import MPHandPose

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

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"

# Valid combinations of backends and targets
backend_target_pairs = [
[cv.dnn.DNN_BACKEND_OPENCV, cv.dnn.DNN_TARGET_CPU],
Expand Down
2 changes: 1 addition & 1 deletion models/human_segmentation_pphumanseg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(project_name "opencv_zoo_human_segmentation")

PROJECT (${project_name})

set(OPENCV_VERSION "4.9.0")
set(OPENCV_VERSION "4.10.0")
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
# Find OpenCV, you may need to set OpenCV_DIR variable
Expand Down
9 changes: 5 additions & 4 deletions models/human_segmentation_pphumanseg/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
import numpy as np
import cv2 as cv

from pphumanseg import PPHumanSeg

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from pphumanseg import PPHumanSeg

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
2 changes: 1 addition & 1 deletion models/image_classification_mobilenet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(project_name "opencv_zoo_image_classification_mobilenet")

PROJECT (${project_name})

set(OPENCV_VERSION "4.9.0")
set(OPENCV_VERSION "4.10.0")
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
# Find OpenCV, you may need to set OpenCV_DIR variable
Expand Down
9 changes: 5 additions & 4 deletions models/image_classification_mobilenet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import numpy as np
import cv2 as cv

from mobilenet import MobileNet

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from mobilenet import MobileNet

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
2 changes: 1 addition & 1 deletion models/image_classification_ppresnet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(project_name "opencv_zoo_image_classification_ppresnet")

PROJECT (${project_name})

set(OPENCV_VERSION "4.9.0")
set(OPENCV_VERSION "4.10.0")
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
# Find OpenCV, you may need to set OpenCV_DIR variable
Expand Down
9 changes: 5 additions & 4 deletions models/image_classification_ppresnet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
import numpy as np
import cv2 as cv

from ppresnet import PPResNet

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from ppresnet import PPResNet

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
5 changes: 3 additions & 2 deletions models/image_segmentation_efficientsam/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
from efficientSAM import EfficientSAM

# Check OpenCV version
assert cv.__version__ >= "4.10.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
9 changes: 5 additions & 4 deletions models/license_plate_detection_yunet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import numpy as np
import cv2 as cv

from lpd_yunet import LPD_YuNet

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from lpd_yunet import LPD_YuNet

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
2 changes: 1 addition & 1 deletion models/object_detection_nanodet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(project_name "opencv_zoo_object_detection_nanodet")

PROJECT (${project_name})

set(OPENCV_VERSION "4.9.0")
set(OPENCV_VERSION "4.10.0")
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
# Find OpenCV, you may need to set OpenCV_DIR variable
Expand Down
9 changes: 5 additions & 4 deletions models/object_detection_nanodet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
import cv2 as cv
import argparse

from nanodet import NanoDet

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from nanodet import NanoDet

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
2 changes: 1 addition & 1 deletion models/object_detection_yolox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(project_name "opencv_zoo_object_detection_yolox")

PROJECT (${project_name})

set(OPENCV_VERSION "4.9.0")
set(OPENCV_VERSION "4.10.0")
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
# Find OpenCV, you may need to set OpenCV_DIR variable
Expand Down
9 changes: 5 additions & 4 deletions models/object_detection_yolox/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
import cv2 as cv
import argparse

from yolox import YoloX

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from yolox import YoloX

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
2 changes: 1 addition & 1 deletion models/object_tracking_vittrack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(project_name "opencv_zoo_object_tracking_vittrack")

PROJECT (${project_name})

set(OPENCV_VERSION "4.9.0")
set(OPENCV_VERSION "4.10.0")
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
# Find OpenCV, you may need to set OpenCV_DIR variable
Expand Down
9 changes: 5 additions & 4 deletions models/object_tracking_vittrack/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
import numpy as np
import cv2 as cv

from vittrack import VitTrack

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from vittrack import VitTrack

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
9 changes: 5 additions & 4 deletions models/optical_flow_estimation_raft/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import cv2 as cv
import numpy as np

from raft import Raft

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from raft import Raft

parser = argparse.ArgumentParser(description='RAFT (https://github.com/princeton-vl/RAFT)')
parser.add_argument('--input1', '-i1', type=str,
Expand Down
9 changes: 5 additions & 4 deletions models/palm_detection_mediapipe/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import numpy as np
import cv2 as cv

from mp_palmdet import MPPalmDet

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from mp_palmdet import MPPalmDet

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
2 changes: 1 addition & 1 deletion models/person_detection_mediapipe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(project_name "opencv_zoo_person_detection_mediapipe")

PROJECT (${project_name})

set(OPENCV_VERSION "4.9.0")
set(OPENCV_VERSION "4.10.0")
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
# Find OpenCV, you may need to set OpenCV_DIR variable
Expand Down
9 changes: 5 additions & 4 deletions models/person_detection_mediapipe/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import numpy as np
import cv2 as cv

from mp_persondet import MPPersonDet

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from mp_persondet import MPPersonDet

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
9 changes: 5 additions & 4 deletions models/person_reid_youtureid/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
import numpy as np
import cv2 as cv

from youtureid import YoutuReID

# Check OpenCV version
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"
opencv_python_version = lambda str_version: tuple(map(int, (str_version.split("."))))
assert opencv_python_version(cv.__version__) >= opencv_python_version("4.10.0"), \
"Please install latest opencv-python for benchmark: python3 -m pip install --upgrade opencv-python"

from youtureid import YoutuReID

# Valid combinations of backends and targets
backend_target_pairs = [
Expand Down
2 changes: 1 addition & 1 deletion models/pose_estimation_mediapipe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(project_name "opencv_zoo_pose_estimation_mediapipe")

PROJECT (${project_name})

set(OPENCV_VERSION "4.9.0")
set(OPENCV_VERSION "4.10.0")
set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
# Find OpenCV, you may need to set OpenCV_DIR variable
Expand Down
Loading