Clone
1
OpenCV 5.1 DNN Benchmarks
Om Navin Rope edited this page 2026-11-24 13:39:13 +05:30

This page holds the complete CPU inference benchmarks for the OpenCV 5.1 DNN engine, compared against ONNX Runtime. For the summary and context, see the DNN section of the OpenCV 5.1 page. The numbers for OpenCV 5.0 are on the OpenCV 5 DNN Benchmarks page.

How to read these tables

  • All numbers are inference time in milliseconds (lower is better), the median of repeated runs.
  • Columns:
    • OpenCV: the OpenCV 5.1.0 DNN engine.
    • ONNX Runtime: the official ONNX Runtime Python package with the CPU execution provider and all graph optimizations enabled. The version is given in the column header.
  • Both runtimes get the same input and use the same number of threads, equal to the number of logical CPUs of the machine. Threads are not pinned to cores.
  • error marks a model that failed to run in that configuration.

Test setup

  • OpenCV: 5.1.0 release (e4f78fb), Release build of the core, imgproc, dnn and python3 modules, without CUDA, OpenCL or ONNX Runtime.
  • ONNX Runtime: 1.31.0, CPU execution provider.
Machine CPU Threads Memory OS Compiler
Intel i9 Intel Core i9-14900KS 32 125 GB Linux 6.8 GCC 11.4
Intel i7 Intel Core i7-8700K 12 60 GB Linux 6.17 GCC 15.2
Apple M5 Apple M5 (MacBook Air) 10 16 GB macOS 26.7.3 Apple clang 21
AMD AMD Ryzen 9 9950X, 16 cores 32 123 GB Linux 6.17 GCC 13.3

Intel i9

Model OpenCV ONNX Runtime (1.31.0)
Qwen2.5-0.5B-Instruct (Q4) 20.65 22.15
BlazeFace 0.68 1.11
NanoTrack (backbone) 0.73 0.76
NanoTrack (head) 0.32 0.52
SwinIR 641.9 1080
X-Feat 6.93 4.20
YuNet 0.78 0.97
AlexNet_ONNX 5.93 9.05
GoogLeNet_ONNX 3.85 4.61
SqueezeNet_ONNX 1.02 0.81
DenseNet121_ONNX 9.43 14.90
Inception_ONNX 4.52 9.86
ResNet50_QDQ 3.65 12.39
MobileNetv2 1.24 1.16
EfficientNet 4.37 10.28
VIT_Base_Patch16_224 32.61 43.18
DeiT_Tiny_Patch16_224 4.59 7.85
MobileViT_XS 5.97 10.16
MobileViTv2_100 6.85 10.33
BEiT_Base_Patch16_224 33.95 75.80
YOLOv3 45.55 88.66
YOLOv4 95.07 390.5
YOLOv4_tiny 6.57 12.06
YOLOv5 11.03 20.06
YOLOv8 10.00 24.43
YOLOX 20.41 55.07
MobileNet_SSD_v1_ONNX 7.34 12.07
SFace 1.61 9.25
MPPalm 1.17 3.57
MPHand 0.74 0.80
MPPose 1.63 2.49
PPHumanSeg 1.83 4.67
CRNN 1.67 1.77
ppocr 11.88 23.91
VitTrack 1.27 1.22
BERT 9.09 11.80
FacePaint 294.3 391.6
RAFT 339.8 400.8
NAFNet 1318 2203
U2 Net 95.78 94.99
Fast Neural Style 13.97 48.52
ResNet_18_v1 3.32 5.60
ResNet_50_v1 7.13 14.69
yolo26n 8.44 10.10
yolo26m_seg 85.44 140.6
BiRefNet 4163 6016
depth_anything 102.6 188.4
Dinov2 17.65 36.41
Dinov3 error 35.12
owlv2 929.1 1347
Segformer 142.9 254.5
SigLip 49.36 54.90
RetinaFACE 21.84 37.62
RTMPose 4.93 5.29
SAM2 ENCODER 1693 2308
SAM2 DECODER 9.86 8.96
SAM3 (Encoder) 5007 3608
SAM3 (Decoder) 14.42 14.60
trOCR (Encoder) 95.86 79.65
trOCR (Decoder) 43.28 21.86
Grounding DINO 1318 1364
RealEsrGAN 416.1 601.7
VIT_B_32 11.71 11.89
RF-DETR 85.35 109.6
RT-DETR 107.2 92.89
BERT (128 tokens) 27.43 23.23

Intel i7

Model OpenCV ONNX Runtime (1.31.0)
Qwen2.5-0.5B-Instruct (Q4) 55.53 40.94
BlazeFace 1.38 1.01
NanoTrack (backbone) 1.08 0.87
NanoTrack (head) 0.63 0.38
SwinIR 2459 2980
X-Feat 16.18 9.59
YuNet 1.98 0.81
AlexNet_ONNX 13.73 12.22
GoogLeNet_ONNX 9.89 9.05
SqueezeNet_ONNX 2.58 1.41
DenseNet121_ONNX 23.37 17.46
Inception_ONNX 11.35 7.31
ResNet50_QDQ 62.25 11.92
MobileNetv2 3.66 2.21
EfficientNet 9.93 7.05
VIT_Base_Patch16_224 74.25 73.94
DeiT_Tiny_Patch16_224 10.15 7.33
MobileViT_XS 13.34 11.75
MobileViTv2_100 16.63 15.65
BEiT_Base_Patch16_224 76.07 78.25
YOLOv3 151.8 105.6
YOLOv4 313.2 488.3
YOLOv4_tiny 19.41 12.92
YOLOv5 26.11 15.19
YOLOv8 25.42 24.76
YOLOX 66.85 51.86
MobileNet_SSD_v1_ONNX 23.87 13.31
SFace 4.33 7.91
MPPalm 3.65 4.29
MPHand 2.20 1.03
MPPose 5.81 4.20
PPHumanSeg 4.86 4.14
CRNN 4.44 3.15
ppocr 43.13 48.72
VitTrack 2.94 1.15
BERT 20.04 18.36
FacePaint 722.2 993.9
RAFT 975.2 1039
NAFNet 3975 4429
U2 Net 297.5 442.1
Fast Neural Style 40.86 61.99
ResNet_18_v1 8.79 7.66
ResNet_50_v1 18.60 17.43
yolo26n 21.84 23.86
yolo26m_seg 300.0 438.2
BiRefNet 12435 14581
depth_anything 301.1 382.2
Dinov2 35.49 60.20
Dinov3 error 77.59
owlv2 2625 3655
Segformer 431.0 437.8
SigLip 101.6 105.1
RetinaFACE 68.05 47.87
RTMPose 11.11 8.10
SAM2 ENCODER 5158 6070
SAM2 DECODER 29.24 21.92
SAM3 (Encoder) 18358 11978
SAM3 (Decoder) 47.52 30.55
trOCR (Encoder) 238.8 225.0
trOCR (Decoder) 106.2 37.83
Grounding DINO 3428 3012
RealEsrGAN 1256 1429
VIT_B_32 24.61 26.72
RF-DETR 231.0 227.8
RT-DETR 336.4 229.1
BERT (128 tokens) 66.65 65.83

Apple M5

Model OpenCV ONNX Runtime (1.31.0)
Qwen2.5-0.5B-Instruct (Q4) 43.77 51.07
BlazeFace 1.40 1.05
NanoTrack (backbone) 1.83 1.44
NanoTrack (head) 0.92 0.59
SwinIR 1259 1741
X-Feat 11.35 19.77
YuNet 2.02 1.46
AlexNet_ONNX 7.07 9.67
GoogLeNet_ONNX 12.42 16.31
SqueezeNet_ONNX 3.64 3.45
DenseNet121_ONNX 20.99 34.31
Inception_ONNX 13.57 14.18
ResNet50_QDQ 11.71 9.68
MobileNetv2 4.74 4.54
EfficientNet 11.39 22.96
VIT_Base_Patch16_224 83.44 86.29
DeiT_Tiny_Patch16_224 15.08 13.42
MobileViT_XS 13.57 21.22
MobileViTv2_100 15.63 19.34
BEiT_Base_Patch16_224 83.87 100.9
YOLOv3 142.9 187.2
YOLOv4 298.0 600.5
YOLOv4_tiny 17.36 23.89
YOLOv5 17.45 33.46
YOLOv8 24.36 43.03
YOLOX 65.77 104.9
MobileNet_SSD_v1_ONNX 11.87 16.93
SFace 4.10 8.11
MPPalm 4.76 7.57
MPHand 2.85 2.91
MPPose 4.93 6.40
PPHumanSeg 5.80 8.80
CRNN 5.46 6.13
ppocr 19.30 54.04
VitTrack 2.27 2.00
BERT 10.31 11.15
FacePaint 570.3 667.1
RAFT 650.6 1381
NAFNet 2378 2457
U2 Net 302.8 533.2
Fast Neural Style 45.91 89.16
ResNet_18_v1 10.33 12.29
ResNet_50_v1 20.76 35.16
yolo26n 24.47 42.37
yolo26m_seg 315.7 335.4
BiRefNet 40564 11447
depth_anything 369.8 354.8
Dinov2 42.73 58.92
Dinov3 error 106.8
owlv2 3277 2264
Segformer 498.2 406.4
SigLip 160.2 151.0
RetinaFACE 86.16 85.59
RTMPose 18.32 26.73
SAM2 ENCODER 5780 4243
SAM2 DECODER 18.55 23.05
SAM3 (Encoder) 8489 6598
SAM3 (Decoder) 22.49 40.07
trOCR (Encoder) 331.3 280.6
trOCR (Decoder) 39.03 37.30
Grounding DINO 2441 2246
RealEsrGAN 1827 1549
VIT_B_32 36.91 24.17
RF-DETR 292.7 333.8
RT-DETR 379.2 337.9
BERT (128 tokens) 88.80 68.88

AMD

Model OpenCV ONNX Runtime (1.31.0)
Qwen2.5-0.5B-Instruct (Q4) 22.63 19.55
BlazeFace 0.85 1.31
NanoTrack (backbone) 0.83 0.83
NanoTrack (head) 0.38 0.63
SwinIR 791.1 1414
X-Feat 7.40 6.03
YuNet 1.31 1.31
AlexNet_ONNX 6.22 7.05
GoogLeNet_ONNX 3.86 4.12
SqueezeNet_ONNX 1.24 1.06
DenseNet121_ONNX 12.35 15.75
Inception_ONNX 4.65 4.15
ResNet50_QDQ 3.31 4.84
MobileNetv2 2.15 1.73
EfficientNet 5.06 4.56
VIT_Base_Patch16_224 23.15 25.86
DeiT_Tiny_Patch16_224 4.41 5.13
MobileViT_XS 6.58 8.00
MobileViTv2_100 7.58 8.97
BEiT_Base_Patch16_224 24.08 27.48
YOLOv3 45.50 33.51
YOLOv4 107.7 157.3
YOLOv4_tiny 6.78 5.20
YOLOv5 12.16 12.42
YOLOv8 12.06 15.09
YOLOX 22.03 23.29
MobileNet_SSD_v1_ONNX 8.76 7.37
SFace 1.86 3.94
MPPalm 1.62 4.27
MPHand 1.21 1.22
MPPose 2.59 5.11
PPHumanSeg 2.09 2.81
CRNN 1.41 1.44
ppocr 19.53 22.02
VitTrack 1.12 1.47
BERT 9.74 11.54
FacePaint 324.6 377.2
RAFT 328.7 423.5
NAFNet 1796 1898
U2 Net 100.9 75.30
Fast Neural Style 15.21 21.03
ResNet_18_v1 3.25 4.99
ResNet_50_v1 7.94 6.41
yolo26n 11.62 15.89
yolo26m_seg 88.10 78.25
BiRefNet 4611 5608
depth_anything 80.55 112.7
Dinov2 11.29 23.85
Dinov3 error 27.37
owlv2 584.2 1311
Segformer 158.4 203.2
SigLip 40.04 47.24
RetinaFACE 19.92 15.97
RTMPose 5.63 5.88
SAM2 ENCODER 1523 2200
SAM2 DECODER 12.45 10.88
SAM3 (Encoder) 5096 3926
SAM3 (Decoder) 17.61 16.09
trOCR (Encoder) 62.03 79.73
trOCR (Decoder) 34.45 14.02
Grounding DINO 1269 1454
RealEsrGAN 429.4 498.0
VIT_B_32 11.18 13.64
RF-DETR 61.18 85.84
RT-DETR 114.5 82.96
BERT (128 tokens) 21.44 22.46

Back to the OpenCV 5.1 release notes.