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

<a id="model-zoo-microsoft-florence-2-base-ft"></a>

# microsoft/Florence-2-base-ft

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

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

Florence-2 is a vision foundation model with a unified, prompt-based representation for a variety of computer vision and vision-language tasks (https://arxiv.org/abs/2311.06242)..

**Details**

- Model name: `microsoft/Florence-2-base-ft`
- Model source: [https://huggingface.co/microsoft/Florence-2-base-ft](https://huggingface.co/microsoft/Florence-2-base-ft)
- Model author: Microsoft
- Model license: MIT
- Exposes embeddings? no
- Tags: `detection, segmentation, ocr, VLM, zero-shot`

**Requirements**

- Packages: `huggingface-hub, transformers, torch, torchvision, einops, timm, accelerate`
- 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/florence2")

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("microsoft/Florence-2-base-ft")

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

session = fo.launch_app(dataset)
```
