<story><title>Tesseract.js: Pure JavaScript OCR for 100 Languages</title><url>https://tesseract.projectnaptha.com/</url></story><parent_chain><item><author>crazygringo</author><text>In case it&amp;#x27;s not clear, Tesseract is developed by Google since 2006, having been started at HP in 1985 and open-sourced by HP in 2005. [1]&lt;p&gt;As far as I know, it powers all OCR at Google (e.g. in Keep, Docs, etc.).&lt;p&gt;This (Tesseract.js) is a WASM port of the project by a separate group of people.&lt;p&gt;I investigated using this port a couple years ago, but as you can see from the demo, it&amp;#x27;s fairly slow to initialize and run, so I never found a practical use for OCR client-side rather than server-side, but I still think it&amp;#x27;s tremendously cool.&lt;p&gt;In case anyone&amp;#x27;s interested (shameless plug), because I do a lot of academic research that involves tons of copying from webpages, PDF&amp;#x27;s and screenshots and pasting into notes documents, I created a tool at &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;pastemagic.com&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;pastemagic.com&lt;/a&gt; that helps selectively remove rich text formatting, remove line breaks and does OCR on screenshots and camera photos. Setting up Tesseract on my server and creating a simple HTTP endpoint for it took less than an hour, and for free I had OCR as powerful as Google&amp;#x27;s. Pretty cool I thought.&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tesseract-ocr&amp;#x2F;tesseract&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tesseract-ocr&amp;#x2F;tesseract&lt;/a&gt;</text></item></parent_chain><comment><author>antimatter15</author><text>Disclaimer: I was the original author of Tesseract.JS— though all the hard work nowadays is done by Jerome Wu. If you&amp;#x27;re interested in supporting the project, consider backing the OpenCollective (&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;opencollective.com&amp;#x2F;tesseractjs&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;opencollective.com&amp;#x2F;tesseractjs&lt;/a&gt;)&lt;p&gt;By all of that, what I mean to say is that I&amp;#x27;ve learned a decent amount of fun OCR trivia over the past few years.&lt;p&gt;Firstly, the engine that powers Google Cloud Vision is almost certainly an entirely independent code base from Tesseract built on neural networks. In fact, the most recent major version of Tesseract (version 4.0) was a sort of rewrite of the core of Tesseract to use bidirectional LSTMs to seem a bit more like the modern OCR pipeline that systems like GCV use.&lt;p&gt;The original Tesseract algorithm dates back a previous AI spring— in the 80s when neural networks were cool (before they were uncool, and then subsequently cool again). The core of the original algorithm involved fitting polygons to character shapes in order generate features which could be matched by a kind of rudimentary neural network.&lt;p&gt;One of the primary authors of Tesseract is Ray Smith (at Google)— who gave a presentation at some point a few years ago about the history of OCR— though I can&amp;#x27;t quite find a link to it at the moment.&lt;p&gt;OCR actually predates electronic computers. In 1929, someone had invented a machine that would take a piece of paper and shine a bright light on a single letter, and pass the letter through a carousel of letter masks, so that it could hit a (effectively single pixel) photo-sensor. When the carousel and the letter mask were in alignment with the printed letter, then the drop in brightness registered that a particular letter was seen!&lt;p&gt;OCR was used by the US Postal system for sorting mail as early as 1965, but it wasn&amp;#x27;t until 1976 that any system could reasonably support more than a certain number of hard-coded fonts (fun fact this was invented by Ray Kurzweil, the Singularity is Near guy).</text></comment>
<story><title>Tesseract.js: Pure JavaScript OCR for 100 Languages</title><url>https://tesseract.projectnaptha.com/</url></story><parent_chain><item><author>crazygringo</author><text>In case it&amp;#x27;s not clear, Tesseract is developed by Google since 2006, having been started at HP in 1985 and open-sourced by HP in 2005. [1]&lt;p&gt;As far as I know, it powers all OCR at Google (e.g. in Keep, Docs, etc.).&lt;p&gt;This (Tesseract.js) is a WASM port of the project by a separate group of people.&lt;p&gt;I investigated using this port a couple years ago, but as you can see from the demo, it&amp;#x27;s fairly slow to initialize and run, so I never found a practical use for OCR client-side rather than server-side, but I still think it&amp;#x27;s tremendously cool.&lt;p&gt;In case anyone&amp;#x27;s interested (shameless plug), because I do a lot of academic research that involves tons of copying from webpages, PDF&amp;#x27;s and screenshots and pasting into notes documents, I created a tool at &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;pastemagic.com&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;pastemagic.com&lt;/a&gt; that helps selectively remove rich text formatting, remove line breaks and does OCR on screenshots and camera photos. Setting up Tesseract on my server and creating a simple HTTP endpoint for it took less than an hour, and for free I had OCR as powerful as Google&amp;#x27;s. Pretty cool I thought.&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tesseract-ocr&amp;#x2F;tesseract&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tesseract-ocr&amp;#x2F;tesseract&lt;/a&gt;</text></item></parent_chain><comment><author>bhanhfo</author><text>&amp;gt; As far as I know, it powers all OCR at Google (e.g. in Keep, Docs, etc.).&lt;p&gt;Afaik Google no longer uses Tesseract for any of its products. Googles Clould OCR is &lt;i&gt;much&lt;/i&gt; better than Tesseract.&lt;p&gt;I think Google devs still work on Tesseract, but only as their side project (not sure about this, obviously)</text></comment>