This is my First ever post here
I have been working on a python script to get text from photos using PaddleOCR. Obviously everything works as expected on Windows x64. I managed to install paddleocr successfully on my MacBook Pro M1 by manually compiling a few dependencies like MuPdf and lanms-neo however, the script hangs forever on paddleocr trying to process the image, cpu at 100% but nothing happens. I have tested the example above on my windows machine and It runs immediately. Does anybody had a similar experience and know how to make it work on my M1?
from paddleocr import PaddleOCR
ocr = PaddleOCR(lang='en')
lines = ocr.ocr('<path to image>')
text = ''
for string in lines:
text += " " + string[1][0].replace(' ', '')
I have tried different python versions, 3.9.6 is the only one working with paddleOCR on M1. The installation of paddleocr package by pip3 wasn't straightforward. I had to manually compile the wheels of MuPdf 1.19, lanms-neo and freetype2 before installing their python packages as they were failing on getting some headers even with the python-dev installed. The installation succeeded, no errors and no dependencies missing. the package PaddlePaddle installed without issues with pip3.