opencv_zoo / benchmark /README.md
ytfeng's picture
Add model file collector, fix some bugs and add some features (#123)
39d77a4
|
raw
history blame
1.32 kB
# OpenCV Zoo Benchmark
Benchmarking the speed of OpenCV DNN inferring different models in the zoo. Result of each model includes the time of its preprocessing, inference and postprocessing stages.
Data for benchmarking will be downloaded and loaded in [data](./data) based on given config.
## Preparation
1. Install `python >= 3.6`.
2. Install dependencies: `pip install -r requirements.txt`.
3. Download data for benchmarking.
1. Download all data: `python download_data.py`
2. Download one or more specified data: `python download_data.py face text`. Available names can be found in `download_data.py`.
3. You can also download all data from https://pan.baidu.com/s/18sV8D4vXUb2xC9EG45k7bg (code: pvrw). Please place and extract data packages under [./data](./data).
## Benchmarking
**Linux**:
```shell
export PYTHONPATH=$PYTHONPATH:..
python benchmark.py --cfg ./config/face_detection_yunet.yaml
```
**Windows**:
- CMD
```shell
set PYTHONPATH=%PYTHONPATH%;..
python benchmark.py --cfg ./config/face_detection_yunet.yaml
```
- PowerShell
```shell
$env:PYTHONPATH=$env:PYTHONPATH+";.."
python benchmark.py --cfg ./config/face_detection_yunet.yaml
```
<!--
Omit `--cfg` if you want to benchmark all included models:
```shell
PYTHONPATH=.. python benchmark.py
```
-->