Scripts for benchmarking of OpenVINO integration into EasyOCR
This repo helps to benchmark OpenVINO integration into EasyOCR and compare it with an original one based on Pytorch (on CPU).
- Create a virtual environment or use an existing one: On Linux:
python3 -m venv env
source env/bin/activateOn Windows:
python -m venv env
env\Scripts\activate- Clone the repo:
git clone https://github.com/avbelova/easyocr_ov_benchmark.git
cd easyocr_ov_benchmark- Install OpenVINO integration into EasyOCR:
pip install git+https://github.com/avbelova/EasyOCR.gitpython easyocr_ov_benchmark.py <PATH-TO-AN-INPUT-IMAGE> <LANGUAGE>Additianally you can specify an inference device for OpenVINO (default one is CPU) and a number of iterations (default is 10).
For example the following command runs 20 benchmarking iterations of English language recognition on Intel(R) Processor Graphics:
python easyocr_ov_benchmark.py EasyOCR/examples/english.png en -n 20 -d ov_gpuRunning Chinese+English text recognition benchmarking on Intel(R) Discrete Graphics:
python easyocr_ov_benchmark.py EasyOCR/examples/chinese.jpg ch_sim en -d ov_gpu.1