> For the complete documentation index, see [llms.txt](https://docs.eyepop.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eyepop.ai/platform/abilities/pretrained-fixed-classes/text-recognition.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# Text recognition

Pretrained text detection and OCR models

* **`eyepop.text:latest`** — text detection
* **`eyepop.text.recognize.landscape:latest`** — OCR for landscape text
* **`eyepop.text.recognize.landscape-tiny:latest`** — lightweight landscape OCR
* **`eyepop.text.recognize.square:latest`** — OCR for square and document text

See the [Abilities Hub](https://www.eyepop.ai/abilities) for structured OCR abilities that return typed fields.

The example runs on a street photo, 810 x 1080, of a blue electric minibus with four people walking past it. The output was captured from production; your numbers may differ slightly.

### Example: read text

`eyepop.text` finds the text regions, and `eyepop.text.recognize.landscape` reads each crop:

{% tabs %}
{% tab title="JSON" %}

```json
{
  "components": [
    {
      "type": "inference",
      "ability": "eyepop.text:latest",
      "forward": {
        "operator": { "type": "crop" },
        "targets": [{ "type": "inference", "ability": "eyepop.text.recognize.landscape:latest" }]
      }
    }
  ]
}
```

{% endtab %}

{% tab title="Python" %}

```python
from eyepop import EyePopSdk
from eyepop.worker.worker_types import CropForward, InferenceComponent, Pop

pop = Pop(components=[
    InferenceComponent(
        ability="eyepop.text:latest",
        forward=CropForward(targets=[
            InferenceComponent(ability="eyepop.text.recognize.landscape:latest"),
        ]),
    ),
])

with EyePopSdk.sync_worker(pop=pop) as endpoint:
    result = endpoint.upload("street.jpg").predict()

for region in result.get("objects", []):
    for text in region.get("texts", []):
        print(f"{text['text']!r} at x={region['x']:.0f} y={region['y']:.0f}")
```

{% endtab %}

{% tab title="Node" %}

```typescript
import { EyePop, ForwardOperatorType, PopComponentType } from '@eyepop.ai/eyepop'

const endpoint = await EyePop.workerEndpoint({
    pop: {
        components: [
            {
                type: PopComponentType.INFERENCE,
                ability: 'eyepop.text:latest',
                forward: {
                    operator: { type: ForwardOperatorType.CROP },
                    targets: [{ type: PopComponentType.INFERENCE, ability: 'eyepop.text.recognize.landscape:latest' }],
                },
            },
        ],
    },
}).connect()

try {
    const results = await endpoint.process({ source: { path: 'street.jpg' } })
    for await (const result of results) {
        for (const region of result.objects ?? []) {
            for (const text of region.texts ?? []) {
                console.log(`'${text.text}' at x=${region.x.toFixed(0)} y=${region.y.toFixed(0)}`)
            }
        }
    }
} finally {
    await endpoint.disconnect()
}
```

{% endtab %}
{% endtabs %}

```
'emisiones' at x=558 y=572
'10' at x=335 y=542
'cero' at x=554 y=548
'M15OL' at x=43 y=335
'SEVILLA' at x=77 y=328
'2' at x=384 y=534
'2010' at x=17 y=597
'EMTe' at x=705 y=427
'electricamEM' at x=631 y=426
```

<figure><img src="https://1072321683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDoCvfjveqiJFmk0cnXCp%2Fuploads%2Fgit-blob-aae02e0c070ea7185e7f9d7bb5f749d7806b6dd4%2Fpretrained-text.jpg?alt=media" alt="The street photo with a box around each piece of text on the bus and the text read from it: cero, emisiones, SEVILLA, 2010 and others" width="400"><figcaption><p>Each text region with what was read in it.</p></figcaption></figure>

The recognizer reads each region on its own: `cero` and `emisiones` are two regions, and a stylised logo comes back as `electricamEM`.

### Next steps

* [Pretrained, fixed classes](https://docs.eyepop.ai/platform/abilities/pretrained-fixed-classes.md) — every category, and sized variants
* [Open vocabulary](https://docs.eyepop.ai/platform/abilities/open-vocabulary.md) — models that find and classify what you describe in words

Questions about building a Pop? Reach us at <help@eyepop.ai>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eyepop.ai/platform/abilities/pretrained-fixed-classes/text-recognition.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
