4 ms·
Show HN: tesserocr – A Python wrapper for the tesseract-ocr API
- reubano 10y agoThis differs from other python wrappers like pytesseract [1] and pyocr [2] in that tesserocr binds the tesseract c-api. The others call out to the tesseract executable via `subprocess`. [1] https://github.com/madmaze/pytesseract https://github.com/madmaze/pytesseract [2] https://github.com/jflesch/pyocr https://github.com/jflesch/pyocr
- reubano 10y agoslight correction, pyocr has three apis: Libtesseract, Tesseract, and Cuneiform. The first calls the c-api while the other two call an executable.
- doppenhe 10y agoThis is great. Did you tune the recognition models at all or is it straight tesseract plus the wrapper.
- sirfz 10y agoThe aim of the project was to bring most tesseract's API functionality to a pythonic interface without the need for any subprocess calls. No model tuning involved, just a wrapper :)
- zo1 10y agoGreat work, btw! Feature request: It would be great if you could also hook-in to the model training API, if any, of Tesseract. That way, you could drive the training via python rather than using Tesseract's accompanying executables.
- sirfz 10y agoIt's possible the required methods are already there but I'll look into it. Would be cool if you open an issue on GitHub. Thanks for the feedback :)
- ddmf 10y agoStrangely enough started using pytesseract yesterday and realised it was subprocess only. Thanks, will give this a try instead :)
- sirfz 10y agoHey ddmf, you might want to use the latest beta version directly from the master branch of the repo as it has an important issue fixed (the way the PIL image is converted to pix). Otherwise it's safer to use the SetImageFile method instead of SetImage.
- transpy 10y agoEven more strangely, I also installed pytesseract yesterday. I was having trouble getting the visible text from a project's web pages. I thought it'd be easy to screenshot the pages and OCR them. It didn't work, at least my first experiment produced just gibberish. Then I just used BeautifulSoup and I got it done. I don't know why I didn't think of the easier solution first.
- batar 10y agoCould someone guide me to a step by step guide for installing it in windows ?
- unusximmortalis 10y agoIsn't the GIL the way not to go if you really want to be multithreaded and with good performance?
- sirfz 10y agotesserocr releases the Global Interpreter Lock (GIL) while performing some tasks which allows threads to run them in parallel without waiting for the GIL to be available.