Run your own OCR-as-a-Service using Tesseract and Docker
People
Repo info
Activity
Daemian Mack
@daemianmack
hey all. is there a demo running somewhere of this project (or of tesseract) that i can try out?
Traun Leyden
@tleyden
@daemianmack hey! nope, no public api, but it should be easy to deploy it on your own cloud.
Daemian Mack
@daemianmack
@tleyden i was hoping to avoid setup if the sort of text i'm looking to OCR turns out to be impractical. maybe you could opine -- does the text in this image look like it might be possible to OCR with tesseract, given i might need to use character whitelisting and some kind of positioning bounding/transform? http://i.imgur.com/SMbdWzK.jpg
Traun Leyden
@tleyden
@daemianmack it's really hard to know without trying, but my gut tells me that tesseract will struggle with that
Thought Object
@thoughtobj
Is tesseract ran as a command line or does it use the provided C-APIs? Want to know if everything is done in memory or I/O
Traun Leyden
@tleyden
@thoughtobj initially it was using a g
.. a go binding to the c api
However I ran into limitations and switched to a command line approach (fork / exec) subprocess
Thought Object
@thoughtobj
@tleyden do you remember what limitations you ran into and whether they were from the actual c-api or from the go binding? command line approach would work fine however, it requires writing the file to the disk which includes I/O. Doing everything in memory would be better, no?
Traun Leyden
@tleyden
@thoughtobj yeah there were limitations to the go bindings and I filed an issue (that I can dig up), which may have been fixed by now. I believe I made the commandline exec() approach the default but kept the gobinding approach as optional.
But yeah, the gobinding approach is cleaner and more efficient and was my original approach
simkimsia
@simkimsia
I was googling around for OCR as a service and your github came up
I have created an issue for this tleyden/open-ocr#52
@tleyden Sorry I had to ping you directly. I was hoping you had an answer to this
Traun Leyden
@tleyden
@simkimsia it's been maintained in the sense that it's been low maintenance, and I have been helping people that get stuck. Haven't added much in the way of new features, and I still need to get back to documenting and cleaning up the stroke width transform stuff.
simkimsia
@simkimsia
@tleyden Thanks for clarifying.
@tleyden I have somehow resolved my issue with the docker-compose up by turning on my VPN. Not sure why.
Traun Leyden
@tleyden
Just saw that, thanks for posting the follow up!
That is strange, I'd ask the person maintaining your network to see if that is on purpose. Never seen that before.
simkimsia
@simkimsia
I am running the docker on my mac book pro
so I am not sure what's my RABBITMQ_HOST ip address
Traun Leyden
@tleyden
You are using docker compose right?
_
simkimsia
@simkimsia
i used docker-compose up
Traun Leyden
@tleyden
Actually would you mind opening a new ticket? I will tag as a question.. I think this will be useful to lots of people
Things are much simpler with docker compose
simkimsia
@simkimsia
This message was deleted
simkimsia
@simkimsia
@tleyden This is the issue. You can tag as question. tleyden/open-ocr#53
simkimsia
@simkimsia
Any ideas?
simkimsia
@simkimsia
I sent a pull request to make it explicit on how to solve the issue for the docker-compose inside mac os x
tleyden/open-ocr#54
Please merge it.
simkimsia
@simkimsia
Need advice on one more issue. tleyden/open-ocr#56
And this tleyden/open-ocr#55
Traun Leyden
@tleyden
Thanks for the contributions!
simkimsia
@simkimsia
:+1:
FBurner
@FBurner
im getting Container command '/opt/open-ocr/open-ocr-httpd' not found or does not exist. on docker compose
Traun Leyden
@tleyden
Hey @FBurner! Can you post the full logs of your docker compose output?
hoangtocdo90
@hoangtocdo90
hi all plz tell me how to set input language in http json request
Traun Leyden
@tleyden
don’t remember off the top of my head .. it’s not in the docs?
Hi @tleyden I was going through the thread tleyden/open-ocr#18 and am interested in seeing how a hOcr file can be generated. I ran the command, curl -X POST -H "Content-Type: application/json" -d '{"img_url":"http://i.imgur.com/xYAaDjV.png","engine":"tesseract","engine_args":{"psm":"3","lang":"fra"}, "config_vars": {"tessedit_create_hocr":"1","tessedit_pageseg_mode":"1"}}' http://192.168.121.130:9292/ocr in my terminal but was wondering were can I find the actual output be it txt or hocr's xml?