> 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/classification.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# Classification

Fixed-class classifiers that label a whole image or a crop

A classifier labels the whole image, or each crop it is given, rather than finding objects in it.

* **`eyepop.imagenet.classify:latest`** — whole-image classification into the ImageNet classes, such as `minibus` or `recreational vehicle, RV, R.V.`
* **`eyepop.expression:latest`** classifies the expression of a face crop; see [Person analysis](https://docs.eyepop.ai/platform/abilities/pretrained-fixed-classes/person-analysis.md).

To classify against labels you choose per request, see [Classify the whole image](https://docs.eyepop.ai/platform/abilities/open-vocabulary/classify-the-whole-image.md).

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: classify the scene

`eyepop.imagenet.classify` names what the whole photo shows:

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

```json
{
  "components": [
    { "type": "inference", "ability": "eyepop.imagenet.classify:latest" }
  ]
}
```

{% endtab %}

{% tab title="Python" %}

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

pop = Pop(components=[
    InferenceComponent(ability="eyepop.imagenet.classify:latest"),
])

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

for c in result.get("classes", []):
    print(f"{c['classLabel']} {c['confidence']:.2f}")
```

{% endtab %}

{% tab title="Node" %}

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

const endpoint = await EyePop.workerEndpoint({
    pop: {
        components: [
            { type: PopComponentType.INFERENCE, ability: 'eyepop.imagenet.classify:latest' },
        ],
    },
}).connect()

try {
    const results = await endpoint.process({ source: { path: 'street.jpg' } })
    for await (const result of results) {
        for (const c of result.classes ?? []) {
            console.log(c.classLabel, c.confidence?.toFixed(2))
        }
    }
} finally {
    await endpoint.disconnect()
}
```

{% endtab %}
{% endtabs %}

```
minibus 0.64
```

<figure><img src="https://1072321683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDoCvfjveqiJFmk0cnXCp%2Fuploads%2Fgit-blob-e80d9286645fc86457015be4faa1ce1bf49eea51%2Fpretrained-classify.jpg?alt=media" alt="The street photo with a bar below it: minibus 0.6409" width="400"><figcaption><p>One class for the whole image.</p></figcaption></figure>

### 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/classification.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.
