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.
 
 
 

2.1 KiB

description keywords
Explore detailed documentation of various SAM and SAM 2 modules such as MaskDownSampler, CXBlock, and more, available in Ultralytics' repository. Ultralytics, SAM encoder, SAM 2 encoder, DropPath, MaskDownSampler, CXBlock, Fuser, TwoWayTransformer, TwoWayAttentionBlock, RoPEAttention, MultiScaleAttention, MultiScaleBlock. PositionEmbeddingSine, do_pool

Reference for ultralytics/models/sam/modules/blocks.py

!!! note

This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/blocks.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/blocks.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/blocks.py) 🛠. Thank you 🙏!

::: ultralytics.models.sam.modules.blocks.DropPath





::: ultralytics.models.sam.modules.blocks.MaskDownSampler





::: ultralytics.models.sam.modules.blocks.CXBlock





::: ultralytics.models.sam.modules.blocks.Fuser





::: ultralytics.models.sam.modules.blocks.SAM2TwoWayAttentionBlock





::: ultralytics.models.sam.modules.blocks.SAM2TwoWayTransformer





::: ultralytics.models.sam.modules.blocks.RoPEAttention





::: ultralytics.models.sam.modules.blocks.MultiScaleAttention





::: ultralytics.models.sam.modules.blocks.MultiScaleBlock





::: ultralytics.models.sam.modules.blocks.PositionEmbeddingSine





::: ultralytics.models.sam.modules.blocks.PositionEmbeddingRandom





::: ultralytics.models.sam.modules.blocks.Block





::: ultralytics.models.sam.modules.blocks.REAttention





::: ultralytics.models.sam.modules.blocks.PatchEmbed





::: ultralytics.models.sam.modules.blocks.do_pool