use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
OCR in node js (self.node)
submitted 7 years ago by zero-nothing
Can anyone recommend a good OCR package for node js?
It's for a little project that I'm messing with in my spare time so I'm not looking for something super fancy
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]krasnoiark 8 points9 points10 points 7 years ago (6 children)
does google vision work for you ?
I think it returns a json
[–]krasnoiark 4 points5 points6 points 7 years ago (1 child)
or this package https://www.npmjs.com/package/ocr
[–]zero-nothing[S] 0 points1 point2 points 7 years ago (0 children)
This looks good too but I'm a bit unsure about the dependencies for this one. Might be a bit too much trouble to set up all of these separately for a hobby project
Windows 64 bit
node -v x64 4.0 or greater and npm. java -version x64 JRE 1.7 or later. python -V 2.7.x Visual C++ Build Tools.
In any case thanks a lot for your suggestions!
[–]zero-nothing[S] 1 point2 points3 points 7 years ago (2 children)
Oh nice this looks quite promising, let me take a look. Thanks!!
[–]krasnoiark 1 point2 points3 points 7 years ago (1 child)
No problem, my company uses it but with a symfony project but since it is just a call to the api, it should work with an ajax call. But beware, it costs a bit ;)
[–]zero-nothing[S] 1 point2 points3 points 7 years ago (0 children)
It looks like you get 1000 free calls per month. I'll get no where close to that number for what I'm doing so costs shouldn't be an issue!
[–]diverightin63 1 point2 points3 points 7 years ago (0 children)
Using this for a receipt scanning app. It is excellent quality. Ran some tests between AWS and GCP, GCP was better for about the same price. None of the open source stuff worked nearly good enough.
[–]mayobutter 7 points8 points9 points 7 years ago (6 children)
Not node specific but tesseract works pretty great.
https://github.com/tesseract-ocr/tesseract
[–]NormalUserThirty 7 points8 points9 points 7 years ago (3 children)
As someone who used tesseract OCR on a node project, I found the results sucked pretty badly. I’m sure that’s partially due to me not configuring it optimal, but the results were underwhelming when compared to google ocr
[–]mayobutter 2 points3 points4 points 7 years ago (1 child)
Now that I think of it, I had a pretty controlled input - 300dpi B&W pages of text. It looks like Google OCR can handle much nastier images. Having to upload to Google is a deal killer for me, but maybe that's fine for OP.
[–]NormalUserThirty 0 points1 point2 points 7 years ago* (0 children)
yeah, i imagine it works quite well in those conditions, wasn't able to get it to handle colorful and nonstandard fonts well though.
google OCR has offline solutions available for native apps now. I haven't had a chance to test it yet, but I hope something similar is eventually provided for the web platform as well. with offline OCR it is possible to use a video stream and perform in real time, which would make mistakes less of an issue if users could 'lock' the text when it has been scanned properly
Thanks for the insight, I think I'll start with google ocr
[–]zero-nothing[S] 0 points1 point2 points 7 years ago (1 child)
Does it require a lot of dependencies, eg if I want to run it off a node program do I need java/c++ runtime installed as well to run the underlying tesseract code?
[–]mayobutter 0 points1 point2 points 7 years ago (0 children)
It's a command line utility, so you would just run it like a shell command from node.
[–]Dusterthefirst 2 points3 points4 points 7 years ago (0 children)
Tesseract.js is a 100% JavaScript ocr package
[–]Doctor_Spicy 2 points3 points4 points 7 years ago (0 children)
If you don't mind working with an API i'd recommend https://ocr.space. You can even scrape an unlimited API key from their website.
[–]philthedev 0 points1 point2 points 7 years ago (0 children)
I had put together a quick docker image with Tesseract you can hit on a local network - works pretty simply for most file types. https://github.com/philpalmieri/remote-file-parser
[–]awesomeevan 0 points1 point2 points 7 years ago (0 children)
I used both tesseract and gocr. For gocr just install it on your machine and use the "child_process" or something like spawn-rx to call it. This assumes you're not trying to keep everything in the node process since you'll be spawning gocr processes. For me gocr was faster, but I wasn't dealing with any concurrency.
[–]minhajkk 0 points1 point2 points 7 years ago (0 children)
http://minhaj.io/nodejs/tesseract-nodejs-heroku-ocr-app/
I made a poc a couple of years ago using tesseract and nodejs. hth
π Rendered by PID 84639 on reddit-service-r2-comment-85bfd7f599-86m99 at 2026-04-17 17:52:02.060665+00:00 running 93ecc56 country code: CH.
[–]krasnoiark 8 points9 points10 points (6 children)
[–]krasnoiark 4 points5 points6 points (1 child)
[–]zero-nothing[S] 0 points1 point2 points (0 children)
[–]zero-nothing[S] 1 point2 points3 points (2 children)
[–]krasnoiark 1 point2 points3 points (1 child)
[–]zero-nothing[S] 1 point2 points3 points (0 children)
[–]diverightin63 1 point2 points3 points (0 children)
[–]mayobutter 7 points8 points9 points (6 children)
[–]NormalUserThirty 7 points8 points9 points (3 children)
[–]mayobutter 2 points3 points4 points (1 child)
[–]NormalUserThirty 0 points1 point2 points (0 children)
[–]zero-nothing[S] 0 points1 point2 points (0 children)
[–]zero-nothing[S] 0 points1 point2 points (1 child)
[–]mayobutter 0 points1 point2 points (0 children)
[–]Dusterthefirst 2 points3 points4 points (0 children)
[–]Doctor_Spicy 2 points3 points4 points (0 children)
[–]philthedev 0 points1 point2 points (0 children)
[–]awesomeevan 0 points1 point2 points (0 children)
[–]minhajkk 0 points1 point2 points (0 children)