<!-- # hard line break macro for HTML -->

<a id="model-zoo-nanonets-nanonets-ocr2-3b"></a>

# nanonets/Nanonets-OCR2-3B

<a href="../../plugins/plugins_ecosystem/nanonets_ocr2.html" target="_blank">
    <img src="https://img.shields.io/badge/Plugin-nanonets_\_ocr2-orange" alt="From Plugin">
</a>

#### NOTE
This is a [remotely-sourced model](../remote.md#model-zoo-remote) from the
[nanonets_ocr2](../../plugins/plugins_ecosystem/nanonets_ocr2.html) plugin, maintained by the community.
It is not part of FiftyOne core and may have special installation requirements.
Please review the plugin documentation and license before use.

Nanonets-OCR2 are image-to-markdown OCR models that go far beyond traditional text extraction. It transforms documents into structured markdown with intelligent content recognition and semantic tagging, making it ideal for downstream processing by Large Language Models (LLMs)..

**Details**

- Model name: `nanonets/Nanonets-OCR2-3B`
- Model source: [https://huggingface.co/nanonets/Nanonets-OCR2-3B](https://huggingface.co/nanonets/Nanonets-OCR2-3B)
- Model author: Nanonets
- Model license: Apache 2.0
- Exposes embeddings? no
- Tags: `detection, ocr, VLM`

**Requirements**

- Packages: `huggingface-hub, transformers, torch, torchvision`
- CPU support
  - yes
- GPU support
  - yes

**Example usage**

```python
import fiftyone as fo
import fiftyone.zoo as foz

foz.register_zoo_model_source("https://github.com/harpreetsahota204/nanonets_ocr2")

dataset = foz.load_zoo_dataset(
    "coco-2017",
    split="validation",
    dataset_name=fo.get_default_dataset_name(),
    max_samples=50,
    shuffle=True,
)

model = foz.load_zoo_model("nanonets/Nanonets-OCR2-3B")

dataset.apply_model(model, label_field="predictions")

session = fo.launch_app(dataset)
```
