QUANTRIUM GUIDES

Optimizing PPOCR Recognition Time in Python

Multiprocessing and Colab GPU utilization to improve PPOCR recognition speed

Bhargav Sridhar
Quantrium.ai
Published in
5 min readAug 29, 2022

--

Introduction

Over the last few months, I have been writing some articles on Optical Character Recognition (OCR) using Python. But, one of the challenges faced even today with OCR in Python is the recognition time taken by some OCR models. We can find some of the OCR models (such as easyOCR, docTROCR etc.) performing very fast when implemented with a Graphical Processing Unit (GPU).

If you had gone through my article on integrating multiple OCR models (which can be found here), you would have noticed recognition models such as PPOCR, pytesseract etc., which performs recognition coordinate-wise. A major drawback with these recognition models is that, since they recognizes the text coordinate wise, their recognition time is much higher than recognition models like easyOCR, which takes the list of all coordinates and image at a time to perform recognition.

Also, if you try performing recognition using PPOCR using a Google Colab GPU directly, you may observe that the GPU is not consumed at all by the recognition model and a warning pops out in some time stating that the GPU is not consumed. Also, GPU availability…

--

--

Bhargav Sridhar
Quantrium.ai

Making AI / Data Science / Machine Learning basic skills in the near future.