You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.6 KiB

---
description: Explore detailed documentation of various SAM encoder modules such as ImageEncoderViT, PromptEncoder, and more, available in Ultralytics' repository.
keywords: Ultralytics, SAM encoder, ImageEncoderViT, PromptEncoder, PositionEmbeddingRandom, Block, Attention, PatchEmbed
---
# Reference for `ultralytics/models/sam/modules/encoders.py`
!!! Note
This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/encoders.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/encoders.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/encoders.py) 🛠. Thank you 🙏!
<br>
## ::: ultralytics.models.sam.modules.encoders.ImageEncoderViT
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.PromptEncoder
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.PositionEmbeddingRandom
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.Block
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.Attention
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.PatchEmbed
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.window_partition
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.window_unpartition
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.get_rel_pos
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.add_decomposed_rel_pos
<br><br>