How Offline OCR Reads Text From a Screenshot, Step by Step

Two small models, one to find lines of text and one to read them, run on your computer in about 30 ms. What happens between pressing OCR and copying the text, and its limits.
When you select an area and press OCR in InSnap, no screenshot leaves your computer. Two small neural networks run locally: one finds where the lines of text are, the second reads each line. On a small image that takes about 30 ms in an optimised build on our development Mac. This article follows the pipeline step by step and explains why some scripts are read well and others are not.
The two models
InSnap runs them with ONNX Runtime. The models are the PP-OCRv6 "tiny" detection and recognition models published by PaddlePaddle under the Apache-2.0 licence. Together they are roughly 6 MB (about 1.7 MB for detection and 4.3 MB for recognition), small enough to ship inside the app.
Nothing is downloaded when you press OCR. The models are in the app.
Step 1: find the lines
Detection is a segmentation network of the "DB" kind. It does not read anything; it paints a map showing how likely each pixel is to belong to text.
- The selection is scaled so its sides are multiples of 32 within the range the model accepts, and the colours are normalised.
- The network produces a probability map the same size as the input.
- Pixels above a threshold of 0.2 become text regions. Regions whose average score is below 0.4 are discarded.
- Each region is turned into a box and expanded outward by a factor of 1.4, because the network tends to paint slightly inside the real letters.
Up to 3000 candidate regions are considered, so dense tables and long chat logs are handled.

Step 2: read each line
Each detected line is cut out and fed to the recognition network.
- The height is fixed at 48 pixels; the width follows the line.
- A line shorter than 320 pixels is padded to 320, matching how the model was trained. A longer line keeps its natural width, and only a line beyond 3200 pixels is split.
- The output is a score for each symbol at each horizontal position. A decoding step called CTC collapses repeated symbols and removes the blank, which leaves the text.
The recognition dictionary has 6904 symbols plus a blank and a space.
What the original is, and what it is not
OCR reads the original selected pixels, not your annotations. Arrows, boxes and highlights you drew are not part of the image that is recognised. That is why you can mark up a screenshot and still copy clean text from it.
Placing the text on the picture
Recognition returns a box for the whole line, not for each character. To let you drag over part of a line, InSnap estimates where each character sits: it measures the width of every character in a system font at the line's height and spreads the line width in proportion. If the font in the screenshot differs from that font, the estimate can be off by up to about half a character.
Why some scripts work and others do not
The dictionary decides what can be read. In our tests Chinese (simplified and traditional), English, and Latin-script languages such as German, French, Spanish, Portuguese and Italian are read well. Japanese kana, Korean and Russian are not read reliably, because those characters are not in the dictionary the model decodes against.

Speed
| Item | Figure |
|---|---|
| Models | Under 6 MB together |
| A small test image | About 30 ms |
| Network access needed | None |
These are measurements from our development machine. Large images with a lot of text take longer.
Where the text goes
The recognised text appears in a panel next to the selection, one line per row. You can drag over it on the picture like normal text, click a line to select it, and copy with Command-C or Ctrl+C. With nothing selected, copying takes all lines. If the screenshot history is allowed to index text, the same recognition makes old screenshots searchable.
FAQ
Does OCR work offline?
Yes. The models are inside the app and recognition runs on your computer. No screenshot or text is uploaded.
Why is one word misread?
The recogniser picks the most likely symbol sequence for each line. Small fonts, unusual typefaces, low contrast and compression artefacts all lower accuracy. Selecting a tighter area or a larger zoom usually helps.
Why can OCR not read Japanese, Korean or Russian?
The model decodes against a fixed dictionary, and the characters used by those scripts are not read reliably with it. This is a limit of the model, not of your screenshot.
Does OCR read my annotations?
No. It reads the original pixels of the selection, so your arrows and highlights do not interfere.
More from the blog

How to Copy Text From a Screenshot or Image on Mac and Windows
Turn the words in a screenshot into text you can copy. Built-in options on Mac and Windows, plus a fast on-device OCR workflow with InSnap.
October 23, 2026
How to Get Better OCR Results From a Screenshot
Text recognition is only as good as the pixels you give it. Crop tightly, keep the resolution, avoid skew and busy backgrounds, and know the language limits.
October 25, 2026
Why OCR Returns the Wrong Word Instead of an Error
Text recognition rarely says it failed. It hands back a full sentence with one character wrong — the one that matters. Here is where that happens and how to catch it.
October 29, 2026
Screen Recording File Too Large? How to Make It Smaller
Why a five-minute recording becomes 800 MB, and the four levers that actually shrink it: duration, resolution, quality and format.
October 28, 2026