4 ms·
How we made our OCR code more accurate
- deleted 1y ago[deleted]
- camtarn 1y agoNeat article, but I feel like I have no idea why they're doing this! Is transcribing code from images really such a big use case?
- lelag 1y agoMaybe they want to compile the Apollo Guidance Computer source code... https://www.softwareheritage.org/wp-content/uploads/2019/07/Margaret_Hamilton_-_restoration.jpg https://www.softwareheritage.org/wp-content/uploads/2019/07/...
- ivanjermakov 1y agoIf it's not a joke, I think it was already digitized: https://github.com/chrislgarry/Apollo-11 https://github.com/chrislgarry/Apollo-11
- dewey 1y ago> To best support software engineers when they want to transcribe code from images, we fine-tuned our pre-processing pipeline to screenshots of code in IDEs, terminals, and online resources like YouTube videos and blog posts. Even with these examples that seems like a very narrow use case.
- FloatArtifact 1y agoFrom an accessibility standpoint, yes. To be able to pattern match where you are in I.D.E without using an accessibility api
- SloopJon 1y agoThe product appears to be similar to Microsoft's embattled Recall feature. In order to remember your digital life it takes frequent screenshots.
- gosub100 1y agoI guess it would be excellent to evade security monitors to take unauthorized copies of your employers codebase.
- EvanAnderson 1y agoIt worries me that stuff like that becoming easier will lead to wacky data pipelines being normalized (pulling display output off systems and "scraping" it to get data, of dubious quality, versus just building a proper interface). The kind of crowd that likes "low code" tools like MSFT's "Power Automate" is going to love to make Rube Goldberg nightmares out of tools like this. It fills me with a deep sadness that we created deterministic machines then, though laziness, exploit every opportunity to "contaminate" them with sloppy practices that make them produce output with the same fuzzy inaccuracy as human brains. Old man yells a neural networks take: We're entering a "The Machine Stops" era where nobody is going to know how to formulate basic algorithms. "We need to add some numbers. Let's point a camera at the input, OCR it, then feed it to an LLM that 'knows math'. Then we don't have to figure out an algorithm to add numbers." I wish compute "cost" more so people would be forced to actually make efficient use of hardware. Sadly, I think it'll take mass societal and infrastructure collapse for that to happen. Until it does, though, let the excess compute flow freely!
- jocoda 1y agoasimov - The feeling of power.
- abc-1 1y agoAnything that mentions tesseract is about 10 years out of date at this point.
- amelius 1y agoWell, at least I can apt-get install tesseract. That doesn't hold for any of the GPU-based solutions, last time I checked.
- booder1 1y ago5.5.0 released November last year. Still a very active project as far as I can tell and runs on CPU. Even compared to best open source GPU option it is still pretty good. VLMs work very differently and don't work as well for everything. Why is it out of date?
- cbsmith 1y agoI don't know that that is true: https://researchify.io/blog/comparing-pytesseract-paddleocr-and-surya-ocr-performance-on-invoices https://researchify.io/blog/comparing-pytesseract-paddleocr-... Using Surya gets you significantly better results and makes almost all the work detailed in the article largely unnecessary.
- booder1 1y agoSurya weights for the models are licensed cc-by-nc-sa-4.0 so not free for commercial usage. Also, as far as I know, the training data is 100% unavailable. Given they use well trained, but standard models, it isn't really open source and barely, maybe, open weight. I kinda hate how their repo says gpl cause that is only true for the inference code. The training code is closed source.
- cbsmith 1y agoI did not know that the training code is closed source. That is troubling.
- 1y ago
- bluelightning2k 1y agoI can't say I've ever wanted to transcribe code from an image. That seems super niche. Perhaps the specific idea is to harvest coding textbooks as training data for LLMs?
- eurekin 1y agoI'm guessing to automatically scrape videos for future training rounds.
- blharr 1y agoEh, imagine poor documentation where people take screenshots of steps and don't write them out. I can also imagine plenty of YouTube tutorials that type the code live... seems fairly useful
- cAtte_ 1y agoPieces is (correction: used to be, prior to the AI slopification) an app for storing code snippets. so i think you can imagine the general idea of, e.g., "cool API usage example from a YouTube video, let me screenshot it!"
- potato-peeler 1y ago> can't say I've ever wanted to transcribe code from an image. That seems super niche. This is nightmare for endpoint protection. Imagine rogue employees snapping pics of your proprietary codebase and then using this to reassemble it.
- gitroom 1y ago[dead]
- vaxman 1y agoTesseract OCR was created by digital (DEC) in 19_8_5 (yes, 40 not four YEARs ago). Now go back and read the article and ROFL with me.
- Onavo 1y agoThe original tesseract OCR has no neural nets. It bare little resemblance to the modern version.
- vaxman 1y agoIt's still 40. Why not use Ollama-OCR?
- krapht 1y agoBecause I benchmarked both on my dataset and found that Tesseract was better for my use-case?
- rafram 1y agoI’ve tested a bunch of vision models on particularly difficult documents (handwritten in a German script that’s no longer used), and I have yet to be impressed. They’re good at BSing to the point that you almost think they nailed it, until you realize that it’s mostly/all made-up text that doesn’t appear in the document.
- yjftsjthsd-h 1y ago> It's still 40. Is it, though? If the important parts of the code are new, does it matter that other parts are older or derived from older code? (Of course, I think this whole line of thought is pointless; what matters is not age, but how well it works, and tesseract generally does seem to work.)
- vaxman 1y agoYeah it is, it does (especially with OOP) and "ABBYY" kicked Tesseract's arse a long time ago anyway. Maybe try OpenAI GPT-4o or Google's Document AI https://cloud.google.com/document-ai https://cloud.google.com/document-ai
- sushid 1y agoMaking OCR more accurate for regular text (e.g. data extraction from documents) would be useful; not sure how useful code transcription is
- bobosha 1y agohas anyone tried feeding the admittedly noisy OCR-ed text -at a document level - to an LLM for making sense? Presumably some of the less capable ones should be quite affordable and accurate at scale as well.
- lesuorac 1y agoOCR is the biggest XY problem. Stop accepting PDFs and force things to use APIs ...
- deleted 1y ago[deleted]
- MoonGhost 1y agoEven small upscale model trained on texts should do better than big generic.