Text detection is the computer-vision task of finding the regions of an image that contain text and returning their locations, usually as boxes or polygons, one per word or line. It does not read the text. Reading is a separate task, text recognition, and the two together are what most people mean by OCR (optical character recognition).
The phrase has a second, unrelated meaning: “AI text detection” refers to classifiers that guess whether a passage was written by a language model. This site, and this guide, are about text in images.
The pipeline
A modern OCR system is a chain of three steps.
- Detection. A network looks at the whole image and outputs the location of every text instance. The detector on this site does this step first: every green box is a detection.
- Recognition. Each detected region is cropped, straightened if needed, and passed to a sequence model that outputs a string and a confidence.
- Parsing. Optional: lines are grouped into paragraphs, tables, fields on a form, or Markdown, depending on the application.
Text spotting is the research name for doing detection and recognition end to end in one model. Layout analysis is the document-side cousin: finding paragraphs, tables and figures rather than words.
Why detection is its own problem
Text in the world is not a document. It is rotated on a shop sign, curved on a logo, tiny on a street name, half-hidden behind a lamp post, and mixed with lettering that is not text at all (brick patterns, barcodes, fences). Detectors are judged on exactly these cases, and the benchmarks that define the field are photographs of scenes, not scans. See the datasets page.
How detectors work: three families
Proposal-based (2016). Adapt an object detector to text. CTPN predicts a chain of narrow vertical proposals along a line and links them with a recurrent layer. Good at horizontal lines; blind to rotation.
Direct regression (2017). Predict the geometry of the word around every pixel in one pass. EAST outputs a rotated box or quadrilateral per pixel and merges them with non-maximum suppression. Fast, handles rotation, struggles with long and curved text.
Segmentation (2019 onward). Predict a per-pixel text map and turn it into shapes. CRAFT predicts character centres and the affinity between them; DBNet learns its own binarization threshold so post-processing shrinks to one contour pass; FAST moves post-processing onto the GPU. Segmentation detectors handle any shape and dominate current toolkits.
The models page puts these side by side with the numbers each paper reports.
What a detector outputs
| Output | Produced by | Good for |
|---|---|---|
Axis-aligned box x, y, width, height |
CTPN, most toolkits after cropping | Horizontal text, simple downstream code |
| Rotated box or 4-point quadrilateral | EAST, PP-OCR detectors | Rotated words and lines |
| Polygon (many points) | CRAFT, DBNet, FAST | Curved and deformed text |
| Score map | Every segmentation detector, internally | Building any of the above |
Most outputs come with a confidence, either the detector’s own score or, as on this site, the recognizer’s confidence for the text inside the box.
How detection is measured
Detection is scored like object detection: a predicted region matches a ground-truth region if their intersection over union (IoU) is at least 0.5, and the usual precision, recall and F-measure (the ICDAR competitions call it H-mean) follow. Details differ per benchmark, which is why a 0.88 on ICDAR 2013 and a 0.61 on ICDAR 2015 can come from the same model. The benchmarks page explains the protocols and the OCR-side metrics (character and word error rate).
Which one do you need?
- You want the words. You need detection and recognition; use an OCR toolkit (PaddleOCR, EasyOCR, docTR) or the detector on this site, which runs both.
- You need to know where text is to blur it, crop it, count it, or feed a custom recognizer: detection alone.
- Scanned documents, forms, PDFs. Detection still runs underneath, but layout analysis and a document-tuned recognizer matter more than scene-text robustness.
- Street scenes, products, screenshots, video frames. This is scene text; pick a segmentation detector and check it on the datasets that look like your data.
Try it
Drop an image into the detector. The boxes are detection; the text beside each box is recognition; the number is confidence. Then read text detection with OpenCV or text detection in Python to run the same thing in your own code.