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

<a id="model-zoo-deepseek-ai-deepseek-ocr"></a>

# deepseek-ai/DeepSeek-OCR

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

#### NOTE
This is a [remotely-sourced model](../remote.md#model-zoo-remote) from the
[deepseek_ocr](../../plugins/plugins_ecosystem/deepseek_ocr.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.

DeepSeek-OCR is an open-source vision-language model (VLM) developed by DeepSeek to perform optical character recognition (OCR) and context compression for long and complex documents.

**Details**

- Model name: `deepseek-ai/DeepSeek-OCR`
- Model source: [https://huggingface.co/deepseek-ai/DeepSeek-OCR](https://huggingface.co/deepseek-ai/DeepSeek-OCR)
- Model author: DeepSeek
- Model license: MIT
- Exposes embeddings? no
- Tags: `detection, ocr, VLM`

**Requirements**

- Packages: `huggingface-hub, transformers==4.46.3, tokenizers==0.20.3, torch, torchvision, addict, einops`
- 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/deepseek_ocr")

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("deepseek-ai/DeepSeek-OCR")

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

session = fo.launch_app(dataset)
```
