> This is the documentation for LibreYOLO 1.6.0. Current version: https://www.libreyolo.com/docs/models/ground-florence2

# Florence-2 grounding
Florence-2 grounding locates the target of an instruction as an image point.
Tasks: Point detection. Install: pip install "libreyolo[vlm]".
Verified against LibreYOLO v1.6.0.

## Install

```bash
pip install "libreyolo[ground]"
```

## Predict

**Python**

```python
from libreyolo import LibreGround, SAMPLE_IMAGE

model = LibreGround("florence-2-base", device="cpu")
result = model(SAMPLE_IMAGE, prompt="the person")
print(result.points.xy)
```

Use `prompt=` or `query=` for one call, or `set_query()` for a persistent instruction. A list of instructions on one image returns at most one click per query. Multi-query calls on image lists or folders raise an error. Coordinates refer to the original image. Training, validation and export are not supported. See the [grounding API](/docs/v1.6.0/reference/ground-api).

## Licensing

Check the license on the Hugging Face repository of the specific weights you download. That repository is authoritative and licenses are not always uniform across a family. This is a description of the licenses involved, not legal advice.

- Original work: Florence-2, Microsoft
- Upstream license: MIT
- Upstream source: https://huggingface.co/microsoft/Florence-2-base
- LibreYOLO code: MIT
- Weights: MIT, republished at https://huggingface.co/LibreYOLO
- Interpretation: The model publisher declares MIT.

## Citation

```bibtex
@article{xiao2023florence,
  title={Florence-2: Advancing a unified representation for a variety of vision tasks},
  author={Xiao, Bin and Wu, Haiping and Xu, Weijian and Dai, Xiyang and Hu, Houdong and Lu, Yumao and Zeng, Michael and Liu, Ce and Yuan, Lu},
  journal={arXiv preprint arXiv:2311.06242},
  year={2023}
}
```

Copied from https://huggingface.co/microsoft/Florence-2-large#bibtex


## Florence-2 grounding architecture

- Florence-2 grounding base: [SVG](/diagrams/models/ground-florence2/base-point.svg), [interactive diagram](/diagrams/models/ground-florence2/base-point.html)
- Florence-2 grounding large: [SVG](/diagrams/models/ground-florence2/large-point.svg), [interactive diagram](/diagrams/models/ground-florence2/large-point.html)
- Florence-2 grounding family: [SVG](/diagrams/models/ground-florence2/family.svg), [interactive diagram](/diagrams/models/ground-florence2/family.html)
