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

<a id="model-zoo-segment-anything-vitl-torch"></a>

# segment-anything-vitl-torch

Large segmentation model producing finer object outlines for professional editing and labeling workflows.

**Details**

- Model name: `segment-anything-vitl-torch`
- Model source: [https://segment-anything.com](https://segment-anything.com)
- Model author: Alexander Kirillov, et al.
- Model license: Apache 2.0
- Model size: 1.16 GB
- Exposes embeddings? no
- Tags: `segment-anything, sa-1b, torch, zero-shot, transformer, official`

**Requirements**

- Packages: `torch, torchvision, segment-anything`
- 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("segment-anything-vitl-torch")

# Segment inside boxes
dataset.apply_model(
    model,
    label_field="segmentations",
    prompt_field="ground_truth",  # can contain Detections or Keypoints
)

# Full automatic segmentations
dataset.apply_model(model, label_field="auto")

session = fo.launch_app(dataset)
```
