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

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

# segmentation-transformer-torch

Hugging Face Transformers model for semantic segmentation.

**Details**

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

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

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

session = fo.launch_app(dataset)
```
