Library / SDK
opencv/opencv_zoo avatar
opencv/opencv_zoo

OpenCV Zoo: Benchmarked Pre-Tuned Models for OpenCV DNN Across x86, ARM, and RISC-V

Model Zoo For OpenCV DNN and Benchmarks.

1,064 stars307 forksPythonApache-2.0

At a glance

What is it?
OpenCV Zoo is an Apache-licensed collection of deep learning models tuned for the OpenCV DNN module, paired with benchmark results on x86, ARM, and RISC-V hardware. The canonical location for models has moved to Hugging Face, while this GitHub repository continues to host demo scripts, benchmark tooling, and the model index.
Who is it for?
OpenCV Zoo is the right starting point for engineers who need a pre-tuned model that runs via the OpenCV DNN API on constrained hardware, particularly ARM SBCs and NPU-equipped boards. Teams who need broader model format support or hardware acceleration beyond what OpenCV DNN exposes should evaluate ONNX Runtime instead.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 124 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What OpenCV Zoo Solves and Who It Targets

Developers who build vision applications on top of OpenCV often need a working baseline model without going through a full training pipeline. OpenCV Zoo addresses this by collecting models that have been tuned specifically for the OpenCV DNN module, accompanied by Python demo scripts and benchmark results on real hardware. The repository is useful to engineers who are already using opencv-python and want to add a task such as face detection, pose estimation, or text recognition without switching inference backends.

The README notes that the project is now hosted on Hugging Face at huggingface.co/opencv, which is the current location for model weights and interactive demos. The GitHub repository remains the home for the benchmark tooling, demo scripts, and the model catalog organized by task. Engineers who need only inference code and weights should go directly to Hugging Face; those who need to benchmark a model on their own hardware or study the demo implementations should use the GitHub repository.

The Model Collection: Tasks, Models, and Coverage

The repository organizes models by task under the `models/` directory. Based on the README examples, the collection covers:

- Face detection: YuNet and LPD_YuNet (license plate variant) - Face recognition: SFace - Facial expression recognition: Progressive Teacher - Human segmentation: PP-HumanSeg - Image segmentation: EfficientSAM - Object detection: NanoDet and YOLOX - Object tracking: VitTrack - Palm detection: MP-PalmDet - Hand pose estimation: MP-HandPose - Person detection: MP-PersonDet - Pose estimation: MP-Pose - QR code detection and parsing: WeChatQRCode - Chinese and English text detection: PPOCR-Det - Text recognition: CRNN

Each model lives in its own subdirectory with a README that documents usage, limitations, and the applicable license. The README states that individual model licenses may differ from the repository's Apache 2.0 license, so checking each model's own directory before redistribution is necessary.

Installing OpenCV Zoo and Running the Demo Scripts

The setup requires a recent opencv-python installation and git-lfs to retrieve model weights. Install or upgrade opencv-python first:

shell
python3 -m pip install opencv-python

Or, to upgrade to the latest version:

shell
python3 -m pip install --upgrade opencv-python

Then clone the repository and pull model files with git-lfs. Git LFS must be installed separately from git-lfs.github.com before running the pull:

shell
git clone https://github.com/opencv/opencv_zoo && cd opencv_zoo
git lfs install
git lfs pull

After cloning, each model directory under `models/` contains a Python demo script. The scripts follow a consistent pattern: load the model file, read input from a camera or image file, run inference through OpenCV DNN, and display or write the result. The README refers readers to `benchmark/README.md` for instructions on running the benchmark suite against their own hardware.

Cross-Platform Benchmarks: Hardware and Measurement Method

The repository's benchmark section documents results on a broad range of hardware. The x86 baseline uses an Intel Core i7-12700K with 8 performance cores and 4 efficient cores. ARM platforms include several Khadas SBCs (VIM3 with Amlogic A311D, VIM4 with A311D2, Edge 2 with Rockchip RK3588S), the Atlas 200 DK (Ascend 310 NPU), Atlas 200I DK A2 (Ascend 310B NPU), NVIDIA Jetson Nano B01, NVIDIA Jetson Nano Orin, Raspberry Pi 4B, Horizon Sunrise X3, MAIX-III AXera-Pi, and Toybrick RV1126. RISC-V coverage includes the StarFive VisionFive 2 and the Allwinner Nezha D1.

The README states that each benchmark number represents the mean elapsed time of an inference (preprocess, forward, and postprocess) over 10 runs after warmup, with batch size 1. Cells marked `---` mean the model could not run on that device. ARM NPU results use per-tensor quantized models. The Nezha D1 RISC-V board currently reports results only for YuNet.

This hardware diversity is genuinely useful for teams selecting between deployment targets, since the numbers show which models are practical on low-power ARM boards versus which require a higher-end SoC. The benchmark configuration files are under `benchmark/config/`.

The Move to Hugging Face and What It Means for Users

The README opens with a prominent notice: this project is now hosted on Hugging Face at huggingface.co/opencv. This means that the primary distribution point for model weights has shifted from the GitHub repository to Hugging Face, where the OpenCV organization also hosts online demos. The GitHub repository continues to receive updates (the last push was on 2026-05-28), but new users looking for models to download should check Hugging Face first.

The practical effect for engineers is that running `git lfs pull` on the GitHub repository still retrieves model weights, but the interactive demos and any newer model additions are on Hugging Face. Teams who need to integrate this into a pipeline should verify which version of a model is current on Hugging Face compared to the git-lfs tracked file in the GitHub repository, as the two may not always be in sync.

This split also complicates licensing review. The Apache 2.0 license governs the GitHub repository, but Hugging Face model cards may carry different terms depending on the model. Checking the model's own README or Hugging Face page before deployment is the safe approach.

Limitations and Cases Where OpenCV Zoo Is Not the Right Fit

OpenCV Zoo is tied to the OpenCV DNN module. If a model format is not supported by the DNN module, it will not work with these demo scripts. Teams who need to run PyTorch-native models, use CUDA-accelerated inference at full throughput, or target hardware that lacks an OpenCV DNN backend will need a different tool.

The model selection is fixed to what the project has tuned and tested. There is no mechanism for submitting a new model architecture and having it benchmarked and added automatically. If a task is not already represented in the collection, the zoo does not help.

Benchmark numbers come from specific hardware configurations documented in the README. Inference times will differ on hardware not listed there. Teams should run `benchmark/` against their own device rather than relying on the table as an exact prediction of performance. The benchmark configuration files live under `benchmark/config/` and document per-model measurement details.

The Allwinner Nezha D1 RISC-V coverage in the README notes that only YuNet has been tested there. RISC-V deployment is thus limited in scope for the current collection. The StarFive VisionFive 2 covers a broader set of models, but its single-core RISC-V CPU at up to 1.5 GHz imposes significant latency constraints compared to the ARM platforms in the table.

License review is a genuine overhead. The repository carries Apache 2.0, but each model directory may carry a separate license. Any deployment that redistributes model weights must check the per-model README, and the Hugging Face migration means the current license for some models may be on the Hugging Face model card rather than in the GitHub directory.

OpenCV DNN vs. ONNX Runtime for Edge Deployment

The most common alternative for model inference on the same hardware targets is ONNX Runtime. ONNX Runtime is a cross-platform inference engine developed by Microsoft that supports a wider range of operators and model formats than OpenCV DNN and includes execution providers for CUDA, DirectML, TensorRT, CoreML, and ARM-specific backends.

The core difference in approach is integration cost. OpenCV DNN is already part of opencv-python, which most computer vision developers have installed. Adding a model from OpenCV Zoo requires no additional package. ONNX Runtime requires a separate install and model export to ONNX format, which is an extra step but unlocks broader hardware acceleration options.

For teams deploying to the ARM boards and NPUs listed in the OpenCV Zoo benchmarks, the choice often comes down to whether the target board's vendor provides an OpenCV DNN backend (Huawei CANN, TIM-VX, and others are mentioned in the benchmark hardware notes) or an ONNX Runtime execution provider. OpenCV Zoo's benchmark table covers the former directly, which is its primary advantage over a general-purpose inference framework.

Editorial conclusion

OpenCV Zoo is the right starting point for engineers who need a pre-tuned model that runs via the OpenCV DNN API on constrained hardware, particularly ARM SBCs and NPU-equipped boards. Teams who need broader model format support or hardware acceleration beyond what OpenCV DNN exposes should evaluate ONNX Runtime instead. Before using any model, check its individual license in its own directory, since OpenCV Zoo's Apache 2.0 license applies to the repository itself and the README states that individual model licenses may differ. Model weights and online demos are now at huggingface.co/opencv rather than in the GitHub repository.

Frequently asked questions

Does OpenCV Zoo include the model weight files in the GitHub repository?

Yes, model weights are tracked via git-lfs and are retrieved with `git lfs pull` after cloning. The README also notes that the project is now hosted on Hugging Face at huggingface.co/opencv, which is the current primary location for models and online demos.

What computer vision tasks do the OpenCV Zoo models cover?

Based on the README examples, the collection covers face detection, face recognition, facial expression recognition, human and image segmentation, license plate detection, object detection, object tracking, palm and hand pose estimation, person detection, pose estimation, QR code parsing, and text detection and recognition.

Can OpenCV Zoo models run on a Raspberry Pi 4B?

The README includes benchmark results for the Raspberry Pi 4B (Broadcom BCM2711, Quad-core Cortex-A72 at 1.5 GHz) in the hardware table. Not all models list results for every device; cells marked `---` indicate the model could not run on that platform.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. opencv/opencv_zoo on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/opencv-opencv-zoo.svg)](https://hysenlabs.com/projects/opencv-opencv-zoo)