---
description: Explore the ultralytics.models.sam.sam3.vitdet module for ViTDet building blocks used as vision backbones in SAM3.
keywords: Ultralytics, SAM3, ViTDet, vision transformer, backbone, attention, deep learning, Python
---

# Reference for `ultralytics/models/sam/sam3/vitdet.py`

!!! success "Improvements"

    This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/vitdet.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/vitdet.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏

<br>

## ::: ultralytics.models.sam.sam3.vitdet.Attention

<br><br><hr><br>

## ::: ultralytics.models.sam.sam3.vitdet.Block

<br><br><hr><br>

## ::: ultralytics.models.sam.sam3.vitdet.ViT

<br><br>
