Skip to content

Latest commit

 

History

History
121 lines (82 loc) · 9.01 KB

README.md

File metadata and controls

121 lines (82 loc) · 9.01 KB

OpenCV Zoo and Benchmark

A zoo for models tuned for OpenCV DNN with benchmarks on different platforms.

Guidelines:

  • Install latest opencv-python:
    python3 -m pip install opencv-python
    # Or upgrade to latest version
    python3 -m pip install --upgrade opencv-python
  • Clone this repo to download all models and demo scripts:
    # Install git-lfs from https://git-lfs.github.com/
    git clone https://github.com/opencv/opencv_zoo && cd opencv_zoo
    git lfs install
    git lfs pull
  • To run benchmarks on your hardware settings, please refer to benchmark/README.

Models & Benchmark Results

Model Task Input Size INTEL-CPU (ms) RPI-CPU (ms) JETSON-GPU (ms) KV3-NPU (ms) Ascend-310 (ms) D1-CPU (ms)
YuNet Face Detection 160x120 1.45 6.22 12.18 4.04 1.73 86.69
SFace Face Recognition 112x112 8.65 99.20 24.88 46.25 23.17 ---
FER Facial Expression Recognition 112x112 4.43 49.86 31.07 29.80 10.12 ---
LPD-YuNet License Plate Detection 320x240 --- 168.03 56.12 29.53 8.70 ---
YOLOX Object Detection 640x640 176.68 1496.70 388.95 420.98 29.10 ---
NanoDet Object Detection 416x416 157.91 220.36 64.94 116.64 35.97 ---
DB-IC15 Text Detection 640x480 142.91 2835.91 208.41 --- 229.74 ---
DB-TD500 Text Detection 640x480 142.91 2841.71 210.51 --- 247.29 ---
CRNN-EN Text Recognition 100x32 50.21 234.32 196.15 125.30 101.03 ---
CRNN-CN Text Recognition 100x32 73.52 322.16 239.76 166.79 136.41 ---
PP-ResNet Image Classification 224x224 56.05 602.58 98.64 75.45 6.99 ---
MobileNet-V1 Image Classification 224x224 9.04 92.25 33.18 145.66* 5.25 ---
MobileNet-V2 Image Classification 224x224 8.86 74.03 31.92 146.31* 5.82 ---
PP-HumanSeg Human Segmentation 192x192 19.92 105.32 67.97 74.77 7.07 ---
WeChatQRCode QR Code Detection and Parsing 100x100 7.04 37.68 --- --- --- ---
DaSiamRPN Object Tracking 1280x720 36.15 705.48 76.82 --- --- ---
YoutuReID Person Re-Identification 128x256 35.81 521.98 90.07 44.61 5.69 ---
MP-PalmDet Palm Detection 192x192 11.09 63.79 83.20 33.81 21.59 ---
MP-HandPose Hand Pose Estimation 224x224 4.28 36.19 40.10 19.47 6.02 ---

*: Models are quantized in per-channel mode, which run slower than per-tensor quantized models on NPU.

Hardware Setup:

Important Notes:

  • The data under each column of hardware setups on the above table represents the elapsed time of an inference (preprocess, forward and postprocess).
  • The time data is the median of 10 runs after some warmup runs. Different metrics may be applied to some specific models.
  • Batch size is 1 for all benchmark results.
  • --- represents the model is not availble to run on the device.
  • View benchmark/config for more details on benchmarking different models.

Some Examples

Some examples are listed below. You can find more in the directory of each model!

Face Detection with YuNet

largest selfie

Facial Expression Recognition with Progressive Teacher

fer demo

Human Segmentation with PP-HumanSeg

messi

License Plate Detection with LPD_YuNet

license plate detection

Object Detection with NanoDet & YOLOX

nanodet demo

yolox demo

Object Tracking with DaSiamRPN

webcam demo

Palm Detection with MP-PalmDet

palm det

Hand Pose Estimation with MP-HandPose

handpose estimation

QR Code Detection and Parsing with WeChatQRCode

qrcode

Chinese Text detection DB

mask

English Text detection DB

gsoc

Text Detection with CRNN

crnn_demo

License

OpenCV Zoo is licensed under the Apache 2.0 license. Please refer to licenses of different models.