faustomorales / keras-ocr

A packaged and flexible version of the CRAFT text detector and Keras CRNN recognition model.
https://keras-ocr.readthedocs.io/
MIT License
1.39k stars 360 forks source link

Processing many files, increasing GPU utilization #131

Open fingoldo opened 3 years ago

fingoldo commented 3 years ago

Thank you very much for this awesome package!

Is there any recommended way to speed up detection and recognition process for a large number of images? Right now it's taking ~1.1 sec to process (detect & recognize) one 800x600 jpeg image on V100 (Amz deep learning ami). I'm using a pipeline from jupyter notebook. Using a batch of 4 images does not give any speedup compared to 1 image. Is that right? When a pipeline is fresh loaded, VRAM consumption is 2Gb from 16Gb. After I start processing, it jumps to 15.9Gb. GPU is clearly underloaded, most of time nvidia-smi reporting up to 19% GPS usage, often 0-2%, sometimes 100%. CPU is moderately loaded all the time.