> This is the documentation for LibreYOLO 1.5.0. Current version: https://www.libreyolo.com/docs/models/omdet-turbo

# OMDet-Turbo
OMDet-Turbo is a real-time open-vocabulary object detector, developed by Om AI Lab, that decouples class embeddings from a language task prompt. LibreYOLO wraps it as a predict-only family in its open-vocabulary detector tier.
Tasks: Detection. Install: pip install libreyolo.
Verified against LibreYOLO v1.5.0.

## Install

OMDet-Turbo loads through LibreYOLO's open-vocabulary detector tier, which
needs the `openvocab` extra:

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

That extra pulls in `transformers` and `timm`, the Hugging Face libraries this
tier calls into; OMDet-Turbo's Swin backbone loads through `transformers`'
`TimmBackbone` wrapper.

## Predict

OMDet-Turbo is not a checkpoint LibreYOLO loads through `LibreYOLO()`. It loads
through the sibling `LibreOpenVocab` factory, which downloads a Hugging Face
snapshot on first use and caches it under `weights/`.

**Python**

```python
from libreyolo import LibreOpenVocab, SAMPLE_IMAGE

model = LibreOpenVocab("omdet-turbo")
model.set_classes(["person", "dog", "skateboard"])

result = model.predict(SAMPLE_IMAGE, conf=0.3)
for box in result.boxes:
    print(box.cls, box.conf, box.xyxy)
```

**Custom NMS threshold**

```python
from libreyolo import LibreOpenVocab, SAMPLE_IMAGE

model = LibreOpenVocab("omdet-turbo")
model.set_classes(["traffic light", "bicycle"])

# OMDet-Turbo is the one family in this tier that honours iou=: its
# own post-processing takes the suppression threshold as an argument,
# defaulting to 0.5 when iou= is left unset.
result = model.predict(SAMPLE_IMAGE, conf=0.3, iou=0.7)
print(result.names, len(result))
```

`set_classes()` sets a sticky text vocabulary: call it again to replace the
list outright, or skip it to keep the default COCO-80 labels, and an empty
result is a valid outcome rather than an error. Unlike Grounding DINO,
OMDet-Turbo decouples its class embeddings from the language task prompt, so
`transformers`' post-processing returns labels that map straight back to the
queried class list with no phrase-disambiguation step.

OMDet-Turbo has no text-token threshold: only `conf` filters detections, and
passing `text_threshold` raises. It is the one family in this tier that runs
its own non-maximum suppression inside
`post_process_grounded_object_detection`, so `iou` is honoured here rather
than warned about. `imgsz` and `augment=True` are rejected outright: the
`transformers` processor owns resizing, and test-time augmentation is out of
scope for this tier. `predict()` on a single image returns one `Results`, not
a list; pass a directory, a list of images, or `stream=True` for a video
source to get several. There is no CLI path for this family, `libreyolo
predict` only loads `.pt` checkpoints through `LibreYOLO()`, so
`LibreOpenVocab` families run from Python. See [prediction](/docs/v1.5.0/predict) for
source types and streaming.

## Variants

One checkpoint, `t`, the tier's only size. It mirrors `omlab/omdet-turbo-swin-tiny-hf`
at a pinned upstream revision through `transformers`'
`OmDetTurboForObjectDetection`; the mirrored weight file is byte-identical to
that upstream snapshot. No accuracy or latency numbers are published for this
family yet.

Training, dataset validation and export are all out of scope for this tier:
`train()`, `val()` and `export()` all raise `NotImplementedError`
unconditionally. This is a predict-only wrapper around a published checkpoint.

## Checkpoints

Every published weight file for this family.

| File | Input (px) | Task | Weights license |
| --- | --- | --- | --- |
| `LibreOMDetTurbot.pt` | 640 | Detection | apache-2.0 |

## 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: OMDet-Turbo, Om AI Lab
- Upstream license: Apache-2.0
- Upstream source: https://github.com/om-ai-lab/OmDet
- LibreYOLO code: MIT
- Weights: Apache-2.0, republished at https://huggingface.co/LibreYOLO
- Interpretation: Apache-2.0 is a permissive license, so this checkpoint can be used in commercial and closed-source products. It asks you to keep the license text and attribution notices with any copy of the weights you redistribute, and it grants a patent license. LibreYOLO vendors no OMDet-Turbo model source of its own: LibreOMDetTurbo calls the Apache-2.0 `transformers` implementation, `OmDetTurboForObjectDetection`, directly. The mirrored checkpoint is a byte-identical copy of `omlab/omdet-turbo-swin-tiny-hf` at a pinned upstream revision, verified against a recorded SHA-256 checksum before it is used.

## Citation

```bibtex
@article{zhao2024real,
  title={Real-time Transformer-based Open-Vocabulary Detection with Efficient Fusion Head},
  author={Zhao, Tiancheng and Liu, Peng and He, Xuan and Zhang, Lu and Lee, Kyusong},
  journal={arXiv preprint arXiv:2403.06892},
  year={2024}
}
```

Copied from https://github.com/om-ai-lab/OmDet#citation


## OMDet-Turbo architecture

- OMDet-Turbo t: [SVG](/diagrams/models/omdet-turbo/t-detect.svg), [interactive diagram](/diagrams/models/omdet-turbo/t-detect.html)
