[{"data":1,"prerenderedAt":731},["ShallowReactive",2],{"project-41203306":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":48,"post_text":50,"what":51,"said":98,"maker_in_thread":201,"shape":212,"grid":216,"attempts":692,"same_week":693,"maker_shows":454,"maker_hidden":723,"reader_version":724,"card":725},"41203306","LLM-aided OCR","Correcting Tesseract OCR errors with LLMs","title","Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fllm_aided_ocr","github.com","eigenvalue",1723220919,2024,479,172,72,3515,3,"legend","productivity","ocr document conversion","cli",[24,25,26,27,28],"ocr","tesseract","llm correction","pdf to markdown","scanned books","curious",-0.205,{"positive":32,"neutral":33,"mixed":34,"critical":35},6,29,2,18,55,{"idea":38,"execution":40,"performance":43,"design":45,"pricing":46,"privacy":47},{"positive":39,"critical":18},4,{"positive":41,"critical":42},1,11,{"positive":44,"critical":34},0,{"positive":44,"critical":44},{"positive":44,"critical":41},{"positive":44,"critical":41},[18,41,41,44,41,41,18,41,44,49,44,44,44,39,41,18,18,44,44,44,18,18,44,44,18,41,41,44,18,34,49,41,18,34,44,18,41,18,18,41],5,"Almost exactly 1 year ago, I submitted something to HN about using Llama2 (which had just come out) to improve the output of Tesseract OCR by correcting obvious OCR errors [0]. That was exciting at the time because OpenAI's API calls were still quite expensive for GPT4, and the cost of running it on a book-length PDF would just be prohibitive. In contrast, you could run Llama2 locally on a machine with just a CPU, and it would be extremely slow, but \"free\" if you had a spare machine lying around.\n\nWell, it's amazing how things have changed since then. Not only have models gotten a lot better, ",{"problem":52,"audience":61,"pricing":66,"motivation":67,"time_to_build":66,"stack":71,"openness":95,"stage":96,"team_size":97},{"value":53,"source":54,"evidence":55},"Tesseract OCR output from scanned books is full of typos and unreadable","maker",[56,58],{"id":57},"post",{"id":59,"by":11,"text":60},"41204022","Agreed, this should not be used for anything mission critical unless you're going to sit there and carefully review the output by hand (although that is still going to be 100x…",{"value":62,"source":54,"evidence":63},"people reading scanned old books on ereaders",[64,65],{"id":57},{"id":59,"by":11,"text":60},null,{"value":68,"source":54,"evidence":69},"Make old scanned books readable on a Kindle or ereader",[70],{"id":57},[72,79,83,87,91],{"value":73,"source":74,"evidence":75},"Python","inferred",[76],{"id":77,"by":11,"text":78},"41204086","Yeah, it's a very real concern. My project supports purely local LLM inference via llama_cpp, and if you use an 8B param model it should be decently fast if you have a 3090\u002F4090…",{"value":80,"source":54,"evidence":81},"Tesseract",[82],{"id":57},{"value":84,"source":54,"evidence":85},"OpenAI GPT-4o-mini",[86],{"id":57},{"value":88,"source":54,"evidence":89},"Anthropic Claude 3 Haiku",[90],{"id":57},{"value":92,"source":54,"evidence":93},"llama_cpp for local inference",[94],{"id":77,"by":11,"text":78},"open_source","launched","solo",{"praise":99,"objections":112,"requests":133,"questions":151,"alternatives":166},[100,108],{"value":101,"source":102,"evidence":103},"Multi-stage prompting with cheap fast models works well","commenter",[104],{"id":105,"by":106,"text":107},"41204415","kbyatnal","\"real improvements came from adjusting the prompts to make things clearer for the model, and not asking the model to do too much in a single pass\" This is spot on, and it's the…",{"value":109,"source":54,"evidence":110},"Useful for turning old scanned books into readable markdown",[111],{"id":59,"by":11,"text":60},[113,128],{"value":114,"source":102,"evidence":115},"LLM can silently alter numbers and names, risky for critical data",[116,120,124],{"id":117,"by":118,"text":119},"41203849","janalsncm","Having tried this in the past, it can work pretty well 90% of the time. However, there are still some areas it will struggle. Imagine you are trying to read a lease contract. The…",{"id":121,"by":122,"text":123},"41206672","rasz","This is how you end up with \"Xerox scanners\u002Fphotocopiers randomly alter numbers in scanned documents\"…",{"id":125,"by":126,"text":127},"41203605","jonathanyc","It's a very interesting idea, but the potential for hallucinations reminds me of JBIG2, a compression format which would sometimes substitute digits in faxed documents:…",{"value":129,"source":102,"evidence":130},"Hallucinations in OCR output are hard to detect",[131,132],{"id":125,"by":126,"text":127},{"id":121,"by":122,"text":123},[134,141],{"value":135,"source":102,"evidence":136},"Measure word and character error rates with and without the LLM",[137],{"id":138,"by":139,"text":140},"41204424","esafak","I'd suggest measuring the word- and character error rates with and without the LLM. It'll let people quickly know how well it works.",{"value":142,"source":102,"evidence":143},"Handle two-column text and formulas better",[144,147],{"id":145,"by":11,"text":146},"41204196","The iOS app would likely not handle two-column text very well. I really made the iOS app on a lark for personal use, the whole thing took like 2 hours, and I'd never even made a…",{"id":148,"by":149,"text":150},"41204141","dr_dshiv","I use Google lens for OCR 15th century Latin books — then paste to ChatGPT and ask to correct OCR errors. Spot checking, it is very reliable. Then translation can occur",[152,159],{"value":153,"source":102,"evidence":154},"How does it handle bogus text in the scanned input",[155],{"id":156,"by":157,"text":158},"41204008","echoangle","This assumes that input text actually is well formed, right? If I scan a page containing bogus text \u002F typos, this will actually correct those mistakes in the output, right?",{"value":160,"source":102,"evidence":161},"Risk of safety filters or prompt injection in scanned documents",[162],{"id":163,"by":164,"text":165},"41203888","simonw","Something that makes me nervous about this general approach is the risk of safety filters or accidental (or deliberate) instruction following interfering with the results. I want…",[167,174,181,188,195],{"value":168,"source":102,"evidence":169},"PaddleOCR (PPOCR)",[170],{"id":171,"by":172,"text":173},"41205811","geraldog","This is a wonderful idea, but while I appreciate the venerable Tesseract I also think it's time to move on. I personally use PaddlePaddle and have way better results to correct…",{"value":175,"source":102,"evidence":176},"Nougat and Donut",[177],{"id":178,"by":179,"text":180},"41204294","troysk","In my experience, this works well but doesn't scale to all kinds of documents. For scientific papers; it can't render formulas. meta's nougat is the best model to do that. For…",{"value":182,"source":102,"evidence":183},"Zerox (GPT-4o-mini OCR)",[184],{"id":185,"by":186,"text":187},"41205410","jdthedisciple","Very recently we had Zerox [0] (Pdf -> Image -> GPT4o-mini based OCR) and I found it to work fantastically well) Would be curious about comparisons between these. [0]…",{"value":189,"source":102,"evidence":190},"Gemini Flash 1.5 for page transcription",[191],{"id":192,"by":193,"text":194},"41203778","__jl__","I think Gemini Flash 1.5 is the best closed-source model for this. Very cheap. Particularly compared to GPT4o-mini, which is priced the same as GPT4 for image input tokens.…",{"value":196,"source":54,"evidence":197},"Apple iOS built-in OCR",[198],{"id":199,"by":11,"text":200},"41203399","Cool, I know there's a little Windows Power Toy for doing something similar: https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fwindows\u002Fpowertoys\u002Ftext-extractor But the built-in functionality for…",{"comments":202,"answered":203,"key":204},21,9,[205,208,209],{"id":206,"text":207},"41204140","Yeah, that was a spectacularly bad idea of Xerox to enable that lossy compression by default!",{"id":59,"text":60},{"id":210,"text":211},"41203572","You know, I’ve really looked hard at what’s out there and haven’t been able to find anything else that’s totally free\u002Fopen, that runs well on CPU, and which has better quality…",{"commenters":213,"max_depth":214,"maker_replies":202,"first_comment_mins":49,"lifespan_hours":215},96,10,176,[217,219,222,225,228,232,236,240,242,246,250,252,255,257,259,262,264,267,271,274,275,278,280,281,282,284,286,288,290,293,296,299,301,304,308,312,315,317,320,322,324,327,329,332,334,336,338,340,342,344,346,349,352,354,356,359,361,363,365,368,372,376,380,382,385,388,391,393,396,398,400,403,406,409,412,414,417,420,422,424,426,430,433,437,440,442,445,447,449,452,456,459,461,463,465,468,470,472,474,476,478,480,482,485,489,492,494,497,500,503,506,510,513,516,519,520,522,526,527,530,533,536,537,540,543,547,551,556,559,563,567,569,573,575,579,583,587,590,593,595,597,601,605,608,610,614,616,618,620,622,625,628,630,632,634,637,641,644,649,652,656,658,661,663,665,669,673,676,679,682,684,688],[178,44,18,218,179,44],"project\u002Fmixed\u002Fidea",[220,44,18,221,179,44],"41204320","project\u002Fneutral\u002Fexecution",[223,44,18,221,224,44],"41204404","ChadNauseam",[226,44,44,227,179,44],"41204500","commenter\u002Fneutral\u002Fnone",[229,44,41,230,231,44],"41204516","project\u002Fcritical\u002Fidea","vintermann",[233,44,44,234,235,44],"41205217","commenter\u002Fneutral\u002Fidea","huijzer",[237,44,44,238,239,44],"41214156","other\u002Fneutral\u002Fnone","kiratp",[241,44,18,221,179,44],"41222742",[243,44,18,244,245,44],"41204989","project\u002Fneutral\u002Fidea","jszymborski",[247,44,41,248,249,44],"41205801","project\u002Fcritical\u002Fexecution","ozim",[251,44,44,227,245,44],"41205827",[253,44,44,227,254,44],"41207701","refulgentis",[256,44,44,234,179,44],"41207884",[258,44,44,227,245,44],"41208588",[260,44,44,227,261,44],"41210737","wahnfrieden",[263,44,44,227,179,44],"41222715",[265,44,44,238,266,44],"41206121","EarlyOom",[268,41,44,269,270,44],"41203765","other\u002Fpositive\u002Fnone","kelsey98765431",[272,41,44,238,273,44],"41204794","KTibow",[125,34,41,230,126,44],[276,34,44,227,277,44],"41203648","spiderfarmer",[279,34,44,234,126,44],"41203687",[206,34,44,238,11,41],[171,18,41,248,172,44],[283,18,44,227,172,44],"41206645",[117,39,18,285,118,44],"project\u002Fmixed\u002Fexecution",[59,39,44,287,11,41],"maker\u002Fpositive\u002Fidea",[289,39,44,227,249,44],"41205813",[291,39,44,227,292,44],"41205952","choilive",[294,39,44,227,295,44],"41211048","kevingadd",[297,49,41,248,298,44],"41203519","anonymoushn",[210,49,44,300,11,41],"maker\u002Fneutral\u002Fnone",[302,49,18,303,298,44],"41203602","project\u002Fneutral\u002Fnone",[305,49,41,306,307,44],"41203791","project\u002Fcritical\u002Fperformance","aidenn0",[309,49,44,310,311,44],"41203866","commenter\u002Fneutral\u002Fperformance","yard2010",[313,49,44,310,314,44],"41203873","fred123",[316,49,44,238,307,44],"41206205",[318,49,44,310,319,44],"41204936","ein0p",[321,49,44,269,314,44],"41203657",[323,49,44,300,11,41],"41204037",[325,49,18,221,326,44],"41204124","kergonath",[145,49,44,328,11,41],"maker\u002Fneutral\u002Fidea",[330,49,49,331,326,44],"41204397","maker\u002Fpositive\u002Fnone",[333,49,44,238,261,44],"41205353",[335,49,44,238,314,44],"41205604",[337,49,44,238,261,44],"41205836",[339,49,44,238,314,44],"41207404",[341,49,44,238,261,44],"41210324",[343,49,44,227,314,44],"41211935",[345,49,44,238,261,44],"41213691",[347,49,44,238,348,44],"41211573","_boffin_",[350,49,44,269,351,44],"41204047","savikko",[353,49,44,300,11,41],"41204472",[355,49,44,238,326,44],"41204094",[357,49,44,227,358,44],"41210711","constantinum",[360,49,18,221,270,44],"41203960",[362,49,18,221,314,44],"41204029",[105,32,49,364,106,44],"project\u002Fpositive\u002Fidea",[366,32,44,238,367,44],"41205470","saaaaaam",[369,32,44,370,371,44],"41206386","other\u002Fneutral\u002Fpricing","sumedh",[373,374,44,238,375,44],"41203831",7,"Oras",[377,378,18,244,379,44],"41205849",8,"jesprenj",[381,378,44,244,11,41],"41206787",[383,203,41,248,384,44],"41204060","123yawaworht456",[386,203,18,221,387,44],"41204099","dcastm",[389,203,44,227,390,44],"41204134","pottspotts",[392,203,44,227,387,44],"41204155",[394,203,18,244,395,44],"41205095","stavros",[397,203,44,227,387,44],"41205427",[399,203,44,238,395,44],"41206048",[401,203,41,248,402,44],"41205701","amelius",[404,214,49,364,405,44],"41204300","jmeyer2k",[407,42,44,238,408,44],"41204304","aliosm",[410,42,44,238,411,44],"41204485","vikp",[413,42,44,227,408,44],"41204541",[415,42,44,416,314,44],"41204741","other\u002Fcritical\u002Fexecution",[418,42,44,238,419,44],"41204524","bugglebeetle",[421,42,44,238,408,44],"41204600",[423,42,44,238,314,44],"41204730",[425,42,44,227,408,44],"41204865",[427,428,44,238,429,44],"41206368",12,"vunderba",[431,428,44,227,432,44],"41206447","abdullahkhalids",[434,435,44,269,436,44],"41204183",13,"katzinsky",[438,435,44,238,439,44],"41205371","Sidneys1",[441,435,44,269,436,44],"41205620",[443,435,44,227,444,44],"41209019","mewpmewp2",[446,435,44,416,439,44],"41210726",[448,435,44,227,444,44],"41215691",[450,451,44,238,358,44],"41208941",14,[453,454,18,244,455,44],"41203917",15,"foota",[457,454,18,244,458,44],"41204766","adrianmonk",[460,454,18,244,455,44],"41205028",[462,454,44,287,11,41],"41205038",[192,464,44,238,193,44],16,[466,464,44,238,467,44],"41204027","ajcp",[469,464,44,238,405,44],"41204328",[471,464,44,238,467,44],"41216779",[473,464,44,238,371,44],"41206397",[475,464,44,238,467,44],"41216497",[477,464,44,238,371,44],"41220293",[479,464,44,238,467,44],"41224959",[481,464,44,238,371,44],"41271504",[483,464,44,238,484,44],"41206485","cowsaymoo",[486,487,18,244,488,44],"41203583",17,"x-yl",[490,487,44,238,491,44],"41203622","zerojames",[493,487,44,287,11,41],"41204040",[495,487,44,238,496,44],"41204592","barrenko",[498,487,44,238,499,44],"41204789","myth_drannon",[501,487,41,248,502,44],"41203667","artyomxyz",[504,487,44,269,505,44],"41203750","davedx",[507,487,44,508,509,44],"41204371","other\u002Fcritical\u002Fprivacy","jacooper",[511,487,44,269,512,44],"41203771","_1",[514,487,44,416,515,44],"41203932","daemonologist",[517,487,44,238,518,44],"41220916","jimmySixDOF",[121,35,41,248,122,44],[521,35,44,238,122,44],"41213670",[523,524,44,238,525,44],"41203350",19,"Zambyte",[199,524,44,300,11,41],[528,524,44,238,529,44],"41203683","f_k",[531,524,44,238,532,44],"41203889","shekhar101",[534,535,44,238,358,44],"41208903",20,[185,202,18,303,186,44],[538,202,18,221,539,44],"41205825","themanmaran",[541,202,44,542,186,44],"41208052","commenter\u002Fpositive\u002Fexecution",[544,545,18,221,546,44],"41210500",22,"itsadok",[548,549,41,248,550,44],"41212854",23,"scw",[552,553,18,554,555,44],"41222399",24,"project\u002Fneutral\u002Fdesign","jodosha",[557,553,44,558,11,41],"41230900","maker\u002Fneutral\u002Fdesign",[560,561,44,238,562,44],"41225762",25,"m-louis030195",[564,565,49,364,566,44],"41203964",26,"pennomi",[568,565,44,300,11,41],"41204049",[570,571,18,303,572,44],"41208982",27,"collinmcnulty",[574,571,44,238,444,44],"41209003",[576,577,44,238,578,44],"41215575",28,"TZubiri",[580,33,41,581,582,44],"41210652","project\u002Fcritical\u002Fpricing","axpy906",[584,585,41,248,586,44],"41206458",30,"reissbaker",[588,585,44,589,11,41],"41206586","commenter\u002Fneutral\u002Fpricing",[591,585,44,592,586,44],"41206956","commenter\u002Fpositive\u002Fpricing",[156,594,18,221,157,44],31,[596,594,44,300,11,41],"41204112",[598,599,18,221,600,44],"41210184",32,"akamor",[602,603,41,248,604,44],"41203892",33,"rafram",[148,606,49,607,149,44],34,"project\u002Fpositive\u002Fexecution",[609,606,44,300,11,41],"41204181",[611,612,41,248,613,44],"41204079",35,"anothername12",[138,615,18,221,139,44],36,[617,615,44,300,11,41],"41204462",[619,615,44,227,139,44],"41204502",[621,615,44,300,11,41],"41204616",[623,615,44,227,624,44],"41205946","47282847",[163,626,18,627,164,44],37,"project\u002Fneutral\u002Fprivacy",[77,626,44,629,11,41],"maker\u002Fneutral\u002Fprivacy",[631,626,18,627,164,44],"41204139",[633,626,44,629,11,41],"41204216",[635,626,41,636,164,44],"41204293","project\u002Fcritical\u002Fprivacy",[638,639,44,238,640,44],"41206873",38,"snats",[642,639,44,238,643,44],"41206923","freedmand",[645,646,18,647,648,44],"41203830",39,"project\u002Fneutral\u002Fperformance","wantsanagent",[650,646,44,651,11,41],"41204127","maker\u002Fneutral\u002Fpricing",[653,654,18,303,655,44],"41203629",40,"sannysanoff",[657,654,44,300,11,41],"41203741",[659,654,44,238,660,44],"41203748","michaelt",[662,654,44,238,436,44],"41204172",[664,654,18,303,515,44],"41203807",[666,667,49,364,668,44],"41206830",41,"yding",[670,671,41,306,672,44],"41205563",42,"localfirst",[674,675,44,238,672,44],"41205557",43,[677,675,18,221,678,44],"41207516","hugs",[680,675,44,227,681,44],"41208606","bn-l",[683,675,44,227,678,44],"41210204",[685,686,41,230,687,44],"41204924",44,"nottorp",[689,690,44,238,691,44],"41204827",45,"fsndz",[],[694,699,704,709,714,719],{"id":695,"name":696,"points":697,"category":698},"41247023","ytch",2741,"consumer_social",{"id":700,"name":701,"points":702,"category":703},"41224689","PGlite",509,"data",{"id":705,"name":706,"points":707,"category":708},"41217109","Grandma's Word",454,"games",{"id":710,"name":711,"points":712,"category":713},"41203475","Thunder Compute",344,"infrastructure",{"id":715,"name":716,"points":717,"category":718},"41213711","flutter_rust_bridge",301,"languages",{"id":720,"name":721,"points":722,"category":20},"41227350","bookshelf",263,false,"v2",{"id":726,"name":5,"line":6,"ai":723,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":727,"top":18,"kw":728,"maker":11,"domain":10,"tier":19,"attempts":44,"strip":729,"url":9,"mix":730,"praise":101,"objection":114,"sub":21},41203306,-0.2,[24,25,26,27,28],"3110113105000413300033003110325132031331",[32,33,34,35],1793991097621]