工具与资源github.com
Tesseract.js:支持 60 种语言的纯 JavaScript OCR 库
Show HN: Tesseract.js – Pure JavaScript OCR for 60 Languages
2016 — 2022,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
Tesseract.js 是 Tesseract OCR 引擎的纯 JavaScript 版本,让开发者能在浏览器或 JS 环境中对图片做文字识别,标题称支持约 60 种语言。评论区既有人用它识别实拍书页,也有人把它与 Google Vision API 对比,指出其在复杂或低质量图像上的精度仍有明显差距。
为什么经久不衰:它把成熟的 OCR 能力带进纯前端/JS 场景,免去原生依赖和后端服务;尽管精度常被吐槽,作为开源方案仍长期有实用价值。
HN 评论精选
认为它不适合小字号屏幕截图,实拍书页效果尚可但仍有边缘错误。
给那些截屏小字体或低分辨率数字文本来演示的人:我认为这不是这个 OCR 库的用途(作为专门问题,按字体不同可能更容易解决)。一个效果好得多的例子是有人拿书的照片;结果把 'sound' 识别成 'suund'、漏掉 'anything',还把 'a post office' 误认成 'apost 0'。不算差,尤其三处错误里两处都在页面边缘。
xigency查看英文原文
To anyone screen capturing small fonts as a demonstration, or capturing digital text especially at a small resolution, I don't believe that that is the purpose of this OCR library. (As a specialized problem, that might be easier to solve depending on the typeface.) A much better example that works quite well is a picture of someone holding a book: http://i.imgur.com/3JWs64x.jpg Magic . Read this to yourself. Read it silently Don't move your lips. Don’t make a suund Listen to yourself. Listen without hearing What a wonderfully weird thing, huh? NOW MAKE THIS PART LOUD! SCREAM IT IN YOUR MIND! DROWN EVERYTHING OUT. Now, hear a whisper. A tiny whisper. New, read this next line with your best crotchety— old-man voice: “Hello there, sonny. Does your town have apost 0 Awesome! Who was that? Whose voice was that? It sure wasn’t yours! How do you do that? How?! Must be magic. Problems with this text: misspelled 'sound' as 'suund', didn't recognize the word 'anything', and mis-recognized 'a post office' as 'apost 0'. Not bad. Especially since two of three mistakes are on the edge of the page.
用真实 PDF 对比说明 Tesseract 的识别精度明显落后于 Google Vision API。
与 Google Vision API 相比,Tesseract 的文本检测有所欠缺。这里有一个基于我们网站用户上传 PDF 的真实对比:Google 几乎完整识别了原文,而 Tesseract 输出大量乱码和错字,文本检测能力明显较弱。
pyronite查看英文原文
The text detection is lacking in comparison to Google's Vision API. Here is a real-life comparison between Tesseract and Google's Vision API, based on a PDF a user of our website uploaded. Original text [http://i.imgur.com/CZGhKhn.png]: > I am also a top professional on Thumbtack which is a site for people looking for professional services like on gig salad. Please see my reviews from my clients there as well Google detects [http://i.imgur.com/pSJym1x.png]: > “ I am also a top professional on Thumbtack which is a site for people looking for professional services like on gig salad. Please see my reviews from my clients there as well ” Tesseract detects [http://i.imgur.com/wwbLU6g.png]: > \ am also a mp pmfesslonzl on Thummack wmcn Is a sue 1m peop‘e \ookmg (or professmna‘ semces We on glg salad P‘ezse see my rewews 1mm my cuems were as weH
批评其类 Promise 接口不是真正 Promise,建议用可链式 progress 方法避免运行时意外。
为什么用这种类似 Promise 的接口?如果返回一个真正的 Promise,再在它上面挂一个返回 this 的 progress 方法,就能像普通 Promise 一样使用。我对 jQuery 旧式“几乎像真 Promise”有阴影;不想再担心拿到的是真 Promise 还是运行时会出问题的假 Promise。
AgentME查看英文原文
Why the promise-like interface? If it returned a promise with a this-returning progress method monkey-patched onto it, then you could use it otherwise like a regular promise: Tesseract.recognize(myImage) .progress(function(message){console.log(message)}) .then(function(result){console.log(result)}) .catch(function(err){console.error(err)}); or Tesseract.recognize(myImage) .progress(function(message){console.log(message)}) .then( function(result){console.log(result)}, function(err){console.error(err)} ); I guess I just still have bad memories of jQuery's old almost-like-real promises. I'd rather never have to think ever again about whether I'm dealing with a real promise or one that's going to surprise me and break at run-time because I tried to use it like a real one.
认为 Tesseract 适合简单黑白文档,不适合场景文字,且 4.0 提升有限。
Tesseract 是读取简单黑白文档最理想的 OCR SDK。如果目标是识别“野外”文本或场景文字,Firebase 是更好的替代。我原本对基于神经网络的 Tesseract 4.0 抱很大希望,但目前只比 3.0 略好。
dangledangle查看英文原文
Tesseract is the most ideal OCRA SDK for reading simple bw documents. If you aim to read “text In the wild” or scene text then Firebase offers a much better alternative. I had a lot of hope for Tesseract 4.0 which is supposed to be based on NNs but it’s so far performed just marginally better than 3.0
历次讨论
同类还值得读
直接在浏览器中启动 Linux 内核
Boot a linux kernel right inside your browser.
Fabrice Bellard 的 JSLinux 页面,用 JavaScript 在浏览器里启动一个 Linux 内核,并提供一个可交互的终端环境。
工具与资源上首页 5 次 · 2011–2025bellard.orgHacker News 未公开功能与行为清单(2018)
A List of Hacker News's Undocumented Features and Behaviors (2018)
数据科学家 Max Woolf 整理的 Hacker News 未公开功能与行为清单,涵盖投票机制、排名算法、账号惩罚等社区运作细节。
工具与资源上首页 5 次 · 2019–2025github.comMapSCII:在终端中用盲文和 ASCII 渲染地图
MapSCII – Braille and ASCII map renderer for the console
MapSCII 是一个在命令行终端里渲染地图的开源工具,用盲文字符和 ASCII 字符把地理数据画成可交互浏览的字符地图。
工具与资源上首页 5 次 · 2017–2025github.com顶尖大学的免费在线课程
Free Online Courses from Top Universities
Open Culture 整理的一份免费在线课程合集,汇集了全球顶尖大学(如 MIT、斯坦福、耶鲁等)向公众开放的网络课程资源,涵盖音频、视频等多种形式。
工具与资源上首页 5 次 · 2010–2022openculture.com淘气字符串:容易引发用户输入问题的字符串清单
Naughty Strings: A list of strings likely to cause issues as user-input data
一个 GitHub 仓库,收录了大量容易让程序出问题的用户输入字符串,如特殊字符、emoji、SQL 注入片段、系统命令等,供开发者用于测试输入处理逻辑。
工具与资源上首页 4 次 · 2015–2020github.com