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

<a id="model-zoo-detection-transformer-torch"></a>

# detection-transformer-torch

Modern object detector that finds items in images without needing complex post-processing steps.

**Details**

- Model name: `detection-transformer-torch`
- Model source: [https://huggingface.co/docs/transformers/tasks/object_detection](https://huggingface.co/docs/transformers/tasks/object_detection)
- Model author: Thomas Wolf, et al.
- Model license: Apache 2.0
- Exposes embeddings? yes
- Tags: `detection, logits, embeddings, torch, transformers, official`

**Requirements**

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

**Example usage**

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

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("detection-transformer-torch")

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

session = fo.launch_app(dataset)
```
