- Author
- Leonie Bossemeyer, Pieces
- Published
- April 23, 2025
- Kind
- Company engineering blog post
- Original
- pieces.app/blog/how-we-made-our-optical-character-recognition-ocr-code-more-accurate
- Subject
- AI put to use
What it is
Leonie Bossemeyer writes for the Pieces blog. The post explains how the team adapted Tesseract for screenshots of code. It covers dark mode, noisy backgrounds, small images and lost indentation.
What it says
- The post says Tesseract is the base engine, with layout analysis before LSTM prediction.
- It says dark-mode images are detected by average brightness and then inverted.
- It says noisy or gradient backgrounds are removed by subtracting a blurred, dilated copy.
- It says indentation is inferred from line bounding boxes and rounded to even spaces.
- It says super-resolution upsampling did not beat bicubic, so bicubic was kept.
What evidence it gives
The post describes an evaluation on hand-made and generated image-text pairs. Scores use Levenshtein distance against the true text. No numbers, tables or example outputs are given.
Interests and limits
Pieces sells a desktop app and APIs. The post ends by inviting readers to try the app. No accuracy figures are reported, so the gain cannot be judged. Only one comparison, of upsampling methods, is described in detail. No datasets or code are linked.