# EasyOCR: Installation, Python Examples, and Document Outputs

> Learn what EasyOCR does, how to install it, read text from an image in Python, choose languages, and use its boxes and confidence scores in document workflows.

Canonical: https://reducto.ai/guides/easyocr

## The short answer

[EasyOCR](https://github.com/JaidedAI/EasyOCR) is an open-source Python library from Jaided AI that finds and reads text in images. You install it with `pip install easyocr`, create a `Reader` with a list of language codes, and call `readtext()` on an image. Each result is a box, the recognized text, and a confidence score. It supports 80+ languages across Latin, Chinese, Arabic, Devanagari, Cyrillic and other scripts, and it is released under the Apache 2.0 license.

EasyOCR reads lines of text. It does not tell you which line is a title, which values belong to a table, or how two columns should be ordered. For that, you need a document parser such as [Reducto Parse](https://reducto.ai/parse), covered at the end of this guide.

## What EasyOCR does

EasyOCR runs two deep learning models on PyTorch. A detection model (CRAFT) finds regions that contain text, and a recognition model (CRNN) converts each region into characters. You do not need to write preprocessing code or train a model to get started, and model weights for your chosen languages download automatically on first use to `~/.EasyOCR/model`.

Common uses include reading signs, labels, screenshots, scanned forms and photos of printed text, especially when the text is in more than one script.

## Install EasyOCR and initialize a reader

The examples below use EasyOCR 1.7.2 (the latest PyPI release, from September 2024) with Python 3.12 and a CPU-only PyTorch build on Linux.

```bash
python -m venv .venv
source .venv/bin/activate
pip install easyocr==1.7.2
```

On Windows, the EasyOCR README recommends installing `torch` and `torchvision` first from [pytorch.org](https://pytorch.org), choosing the CUDA version you have or "None" for CPU only. The repository also includes a Dockerfile.

Creating a reader loads the models into memory, so do it once and reuse the object:

```python
import easyocr

reader = easyocr.Reader(["en", "fr"], gpu=False)
```

`gpu=False` runs on CPU. EasyOCR works without a GPU but is much faster with one.

## Extract text from one image with EasyOCR in Python

For this guide we made a synthetic bilingual store-hours sign: English on the left, French on the right, rendered as a 1000 x 360 PNG. No real document was used.

```python
import easyocr

reader = easyocr.Reader(["en", "fr"], gpu=False)
results = reader.readtext("store_hours.png")

for box, text, confidence in results:
    top_left = [int(v) for v in box[0]]
    print(f"{text!r:22} conf={confidence:.2f} top_left={top_left}")
```

Real output from that run:

```text
'Store Hours'          conf=0.99 top_left=[37, 31]
"Heures d'ouverture"   conf=0.47 top_left=[479, 33]
'Monday to Friday'     conf=0.90 top_left=[37, 116]
'Lundi au vendredi'    conf=0.77 top_left=[479, 119]
'9:00'                 conf=0.65 top_left=[38, 182]
'18.00'                conf=0.67 top_left=[136, 182]
'9 h 00'               conf=0.99 top_left=[478, 182]
'18 h 00'              conf=0.59 top_left=[604, 182]
'Closed Sunday'        conf=1.00 top_left=[37, 271]
'Fermé le dimanche'    conf=0.81 top_left=[477, 269]
```

Most lines are correct, including the accented "Fermé". Two details are worth noting. "18:00" came back as "18.00", and the dashes between times were dropped, so "9:00 - 18:00" became two separate results. Also, "Heures d'ouverture" was read correctly but with a confidence of only 0.47. A confidence score tells you how sure the model is. It does not tell you whether the text is right.

`readtext()` accepts a file path, an OpenCV image (NumPy array), raw image bytes, or a URL to an image. It works on images, so render PDF pages to images before you send them. EasyOCR also has a command-line tool: `easyocr -l en fr -f store_hours.png --detail=1 --gpu=False`.

## EasyOCR languages, coordinates, and confidence

You pass languages as codes when you create the reader. The 1.7.2 package lists 86 codes. English can be combined with any language, and languages that share characters usually work together, but not every combination is allowed. Load only the languages you expect, since every extra character set gives the recognizer more ways to misread a character.

<Table html={"<table>\n  <thead>\n    <tr>\n      <th>Code</th>\n      <th>Language</th>\n      <th>Script</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>en, fr, de, es</td>\n      <td>English, French, German, Spanish</td>\n      <td>Latin</td>\n    </tr>\n    <tr>\n      <td>ch_sim, ch_tra</td>\n      <td>Chinese (simplified, traditional)</td>\n      <td>Chinese</td>\n    </tr>\n    <tr>\n      <td>ja, ko</td>\n      <td>Japanese, Korean</td>\n      <td>Japanese, Hangul</td>\n    </tr>\n    <tr>\n      <td>ar</td>\n      <td>Arabic</td>\n      <td>Arabic</td>\n    </tr>\n    <tr>\n      <td>hi</td>\n      <td>Hindi</td>\n      <td>Devanagari</td>\n    </tr>\n    <tr>\n      <td>ru</td>\n      <td>Russian</td>\n      <td>Cyrillic</td>\n    </tr>\n  </tbody>\n</table>"} />

The output shape changes with a few `readtext()` arguments:

<Table html={"<table>\n  <thead>\n    <tr>\n      <th>Setting</th>\n      <th>What each result looks like</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>Default (<code>detail=1</code>)</td>\n      <td>Tuple of four corner points in pixels, text, and a confidence between 0 and 1</td>\n    </tr>\n    <tr>\n      <td><code>detail=0</code></td>\n      <td>Text string only</td>\n    </tr>\n    <tr>\n      <td><code>paragraph=True</code></td>\n      <td>Box and merged text, with no confidence score</td>\n    </tr>\n    <tr>\n      <td><code>output_format=\"dict\"</code> or <code>\"json\"</code></td>\n      <td>Keys <code>boxes</code>, <code>text</code> and <code>confident</code></td>\n    </tr>\n  </tbody>\n</table>"} />

Box points run clockwise from the top-left corner, in pixels of the input image. Other useful arguments are `allowlist` and `blocklist` to limit characters (for example, digits only), `decoder="beamsearch"` instead of the default greedy decoder, and `width_ths` and `height_ths` to control when nearby boxes are merged.

In a pipeline, use confidence to decide which results a person should review, and test the cutoff on your own images. In the example above, a single fixed cutoff would have flagged a correct French title and kept the "18.00" misread.

## When document structure requires more processing

On the sign, EasyOCR returned ten separate lines. To rebuild the two bilingual panels, you would need to group results by x and y position, decide which lines are headings, and rejoin "9:00" and "18.00" into one time range. On a real invoice, contract or multi-column report, that same work grows into reading-order logic, table reconstruction and section detection. The [PDF OCR software guide](https://reducto.ai/guides/best-pdf-ocr-software-ai-workflows) explains why this structure matters for RAG and agents.

Detected text is a list of strings with boxes. Structured document elements are typed blocks (title, text, table, figure, key-value) in reading order. Reducto Parse returns the second kind. We sent the same synthetic image to Parse with the Python SDK (`pip install reductoai`, version 0.27.0):

```python
from pathlib import Path
from reducto import Reducto

client = Reducto()  # reads REDUCTO_API_KEY
upload = client.upload(file=Path("store_hours.png"))
result = client.parse.run(input=upload.file_id, settings={"model": "r-1"})

for chunk in result.result.chunks:
    for block in chunk.blocks:
        print(block.type, "|", block.content, "|", block.confidence)
```

Real output:

```text
Title | <b>Store Hours</b> | high
Text | Monday to Friday | high
Text | 9:00 - 18:00 | high
Text | Closed Sunday | high
Title | <b>Heures d'ouverture</b> | high
Text | Lundi au vendredi | high
Text | 9 h 00 - 18 h 00 | high
Text | Fermé le dimanche | high
```

Each panel comes back as a title followed by its lines, in column order, with the time ranges intact. Each block also has a `bbox` with the page number and coordinates scaled from 0 to 1, and `chunk.content` holds the same content as Markdown for chunking and embedding. Parse accepts PDFs, office files and common image formats, including PNG, JPEG and TIFF.

If you need specific fields instead of the full document, such as opening hours by day, [Reducto Extract](https://reducto.ai/extract) fills a JSON schema and can return citations for each value. You can try both on your own files in [Reducto Studio](https://studio.reducto.ai).

## Frequently asked questions

### Is EasyOCR free?

Yes. EasyOCR is open source under the Apache 2.0 license. You pay only for the compute you run it on.

### Does EasyOCR need a GPU?

No. Pass `gpu=False` to run on CPU. A CUDA GPU makes detection and recognition much faster on large batches.

### How many languages does EasyOCR support?

The project lists 80+ languages, and version 1.7.2 includes 86 language codes. You can load several at once, but not every combination is compatible.

### Can EasyOCR read handwriting?

The EasyOCR README lists handwritten text support as a planned feature, so treat it as a printed-text library. See the [handwriting OCR guide](https://reducto.ai/guides/best-ocr-handwriting-recognition) for other options.

### How is EasyOCR different from Tesseract or PaddleOCR?

All three are open-source OCR engines that you host yourself. The [OCR models guide](https://reducto.ai/guides/best-ocr-models-accuracy-speed-cost) compares Tesseract, PaddleOCR and other models by accuracy, speed and cost.
