单目3D初始代码

This commit is contained in:
zhao.zhu
2026-06-24 09:35:46 +08:00
commit 04a5895b6b
1153 changed files with 340700 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
---
description: Explore the detailed API reference for Ultralytics SAM/AMG models, including functions for mask stability scores, crop box generation, and more.
keywords: Ultralytics, SAM, AMG, API Reference, models, mask stability, crop boxes, data processing, YOLO
---
# Reference for `ultralytics/models/sam/amg.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/amg.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/amg.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.amg.is_box_near_crop_edge
<br><br><hr><br>
## ::: ultralytics.models.sam.amg.batch_iterator
<br><br><hr><br>
## ::: ultralytics.models.sam.amg.calculate_stability_score
<br><br><hr><br>
## ::: ultralytics.models.sam.amg.build_point_grid
<br><br><hr><br>
## ::: ultralytics.models.sam.amg.build_all_layer_point_grids
<br><br><hr><br>
## ::: ultralytics.models.sam.amg.generate_crop_boxes
<br><br><hr><br>
## ::: ultralytics.models.sam.amg.uncrop_boxes_xyxy
<br><br><hr><br>
## ::: ultralytics.models.sam.amg.uncrop_points
<br><br><hr><br>
## ::: ultralytics.models.sam.amg.uncrop_masks
<br><br><hr><br>
## ::: ultralytics.models.sam.amg.remove_small_regions
<br><br><hr><br>
## ::: ultralytics.models.sam.amg.batched_mask_to_box
<br><br>

View File

@@ -0,0 +1,60 @@
---
description: Discover detailed instructions for building various Segment Anything Model (SAM) and Segment Anything Model 2 (SAM 2) architectures with Ultralytics, including SAM ViT and Mobile-SAM.
keywords: Ultralytics, SAM model, Segment Anything Model, SAM 2 model, Segment Anything Model 2, SAM ViT, Mobile-SAM, model building, deep learning, AI
---
# Reference for `ultralytics/models/sam/build.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/build.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/build.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.build._load_checkpoint
<br><br><hr><br>
## ::: ultralytics.models.sam.build.build_sam_vit_h
<br><br><hr><br>
## ::: ultralytics.models.sam.build.build_sam_vit_l
<br><br><hr><br>
## ::: ultralytics.models.sam.build.build_sam_vit_b
<br><br><hr><br>
## ::: ultralytics.models.sam.build.build_mobile_sam
<br><br><hr><br>
## ::: ultralytics.models.sam.build.build_sam2_t
<br><br><hr><br>
## ::: ultralytics.models.sam.build.build_sam2_s
<br><br><hr><br>
## ::: ultralytics.models.sam.build.build_sam2_b
<br><br><hr><br>
## ::: ultralytics.models.sam.build.build_sam2_l
<br><br><hr><br>
## ::: ultralytics.models.sam.build._build_sam
<br><br><hr><br>
## ::: ultralytics.models.sam.build._build_sam2
<br><br><hr><br>
## ::: ultralytics.models.sam.build.build_sam
<br><br>

View File

@@ -0,0 +1,32 @@
---
description: Explore the ultralytics.models.sam.build_sam3 module for building SAM3 image models, including backbone and transformer components.
keywords: Ultralytics, SAM3, SAM, segmentation, transformer, ViTDet, model builder, Python
---
# Reference for `ultralytics/models/sam/build_sam3.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/build_sam3.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/build_sam3.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.build_sam3._create_vision_backbone
<br><br><hr><br>
## ::: ultralytics.models.sam.build_sam3._create_sam3_transformer
<br><br><hr><br>
## ::: ultralytics.models.sam.build_sam3.build_sam3_image_model
<br><br><hr><br>
## ::: ultralytics.models.sam.build_sam3.build_interactive_sam3
<br><br><hr><br>
## ::: ultralytics.models.sam.build_sam3._load_checkpoint
<br><br>

View File

@@ -0,0 +1,16 @@
---
description: Explore the SAM (Segment Anything Model) and SAM 2 (Segment Anything Model 2) interface for real-time image segmentation. Learn about promptable segmentation and zero-shot capabilities.
keywords: Ultralytics, SAM, Segment Anything Model, SAM 2, Segment Anything Model 2, image segmentation, real-time segmentation, zero-shot performance, promptable segmentation, SA-1B dataset
---
# Reference for `ultralytics/models/sam/model.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/model.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.model.SAM
<br><br>

View File

@@ -0,0 +1,72 @@
---
description: Explore detailed documentation of various SAM and SAM 2 modules such as MaskDownSampler, CXBlock, and more, available in Ultralytics' repository.
keywords: 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`
!!! success "Improvements"
This page is sourced from [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). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.modules.blocks.DropPath
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.MaskDownSampler
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.CXBlock
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.Fuser
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.SAM2TwoWayAttentionBlock
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.SAM2TwoWayTransformer
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.RoPEAttention
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.MultiScaleAttention
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.MultiScaleBlock
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.PositionEmbeddingSine
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.PositionEmbeddingRandom
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.Block
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.REAttention
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.PatchEmbed
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.blocks.do_pool
<br><br>

View File

@@ -0,0 +1,20 @@
---
description: Explore the MaskDecoder and MLP modules in Ultralytics for efficient mask prediction using transformer architecture. Detailed attributes, functionalities, and implementation.
keywords: Ultralytics, MaskDecoder, MLP, machine learning, transformer architecture, mask prediction, neural networks, PyTorch modules
---
# Reference for `ultralytics/models/sam/modules/decoders.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/decoders.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/decoders.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.modules.decoders.MaskDecoder
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.decoders.SAM2MaskDecoder
<br><br>

View File

@@ -0,0 +1,36 @@
---
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`
!!! success "Improvements"
This page is sourced from [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). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — 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.MemoryEncoder
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.ImageEncoder
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.FpnNeck
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.encoders.Hiera
<br><br>

View File

@@ -0,0 +1,20 @@
---
description: Explore detailed documentation of various SAM 2 encoder modules such as MemoryAttentionLayer, MemoryAttention, available in Ultralytics' repository.
keywords: Ultralytics, SAM 2 encoder, MemoryAttentionLayer, MemoryAttention
---
# Reference for `ultralytics/models/sam/modules/memory_attention.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/memory_attention.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/memory_attention.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.modules.memory_attention.MemoryAttentionLayer
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.memory_attention.MemoryAttention
<br><br>

View File

@@ -0,0 +1,24 @@
---
description: Discover the Ultralytics SAM and SAM 2 module for object segmentation. Learn about its components, such as image encoders and mask decoders, in this comprehensive guide.
keywords: Ultralytics, SAM Module, SAM 2 Module, object segmentation, image encoder, mask decoder, prompt encoder, AI, machine learning
---
# Reference for `ultralytics/models/sam/modules/sam.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/sam.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/sam.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.modules.sam.SAMModel
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.sam.SAM2Model
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.sam.SAM3Model
<br><br>

View File

@@ -0,0 +1,52 @@
---
description: Explore the detailed implementation of TinyViT architecture including Conv2d_BN, PatchEmbed, MBConv, and more in Ultralytics.
keywords: Ultralytics, TinyViT, Conv2d_BN, PatchEmbed, MBConv, Attention, PyTorch, YOLO, Deep Learning
---
# Reference for `ultralytics/models/sam/modules/tiny_encoder.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/tiny_encoder.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/tiny_encoder.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.modules.tiny_encoder.Conv2d_BN
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.tiny_encoder.PatchEmbed
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.tiny_encoder.MBConv
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.tiny_encoder.PatchMerging
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.tiny_encoder.ConvLayer
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.tiny_encoder.MLP
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.tiny_encoder.Attention
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.tiny_encoder.TinyViTBlock
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.tiny_encoder.BasicLayer
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.tiny_encoder.TinyViT
<br><br>

View File

@@ -0,0 +1,24 @@
---
description: Explore the TwoWayTransformer module in Ultralytics, designed for simultaneous attention to image and query points. Ideal for object detection and segmentation tasks.
keywords: Ultralytics, TwoWayTransformer, module, deep learning, transformer, object detection, image segmentation, attention mechanism, neural networks
---
# Reference for `ultralytics/models/sam/modules/transformer.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/transformer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/transformer.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.modules.transformer.TwoWayTransformer
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.transformer.TwoWayAttentionBlock
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.transformer.Attention
<br><br>

View File

@@ -0,0 +1,60 @@
---
description: Explore the detailed API reference for Ultralytics SAM and SAM 2 models.
keywords: Ultralytics, SAM, SAM 2, API Reference, models, window partition, data processing, YOLO
---
# Reference for `ultralytics/models/sam/modules/utils.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/utils.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.modules.utils.select_closest_cond_frames
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.get_1d_sine_pe
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.init_t_xy
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.compute_axial_cis
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.reshape_for_broadcast
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.apply_rotary_enc
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.window_partition
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.window_unpartition
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.get_rel_pos
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.add_decomposed_rel_pos
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.get_abs_pos
<br><br><hr><br>
## ::: ultralytics.models.sam.modules.utils.concat_rel_pos
<br><br>

View File

@@ -0,0 +1,44 @@
---
description: Explore Ultralytics SAM and SAM 2 Predictor for advanced, real-time image segmentation using the Segment Anything Model (SAM and SAM 2). Complete implementation details and auxiliary utilities.
keywords: Ultralytics, SAM, Segment Anything Model, SAM 2, Segment Anything Model 2, image segmentation, real-time, prediction, AI, machine learning, Python, torch, inference
---
# Reference for `ultralytics/models/sam/predict.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/predict.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
<br>
## ::: ultralytics.models.sam.predict.Predictor
<br><br><hr><br>
## ::: ultralytics.models.sam.predict.SAM2Predictor
<br><br><hr><br>
## ::: ultralytics.models.sam.predict.SAM2VideoPredictor
<br><br><hr><br>
## ::: ultralytics.models.sam.predict.SAM2DynamicInteractivePredictor
<br><br><hr><br>
## ::: ultralytics.models.sam.predict.SAM3Predictor
<br><br><hr><br>
## ::: ultralytics.models.sam.predict.SAM3SemanticPredictor
<br><br><hr><br>
## ::: ultralytics.models.sam.predict.SAM3VideoPredictor
<br><br><hr><br>
## ::: ultralytics.models.sam.predict.SAM3VideoSemanticPredictor
<br><br>

View File

@@ -0,0 +1,20 @@
---
description: Explore the ultralytics.models.sam.sam3.decoder module, including transformer decoder layers used in SAM3 model heads.
keywords: Ultralytics, SAM3, SAM, transformer decoder, attention, segmentation, deep learning, Python
---
# Reference for `ultralytics/models/sam/sam3/decoder.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/decoder.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/decoder.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.decoder.TransformerDecoderLayer
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.decoder.TransformerDecoder
<br><br>

View File

@@ -0,0 +1,28 @@
---
description: Explore the ultralytics.models.sam.sam3.encoder module, including transformer encoder layers and fusion blocks for SAM3.
keywords: Ultralytics, SAM3, SAM, transformer encoder, fusion, attention, deep learning, Python
---
# Reference for `ultralytics/models/sam/sam3/encoder.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/encoder.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/encoder.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.encoder.TransformerEncoderLayer
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.encoder.TransformerEncoder
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.encoder.TransformerEncoderFusion
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.encoder.pool_text_feat
<br><br>

View File

@@ -0,0 +1,28 @@
---
description: Explore the ultralytics.models.sam.sam3.geometry_encoders module for prompt and geometry encoding utilities used by SAM3.
keywords: Ultralytics, SAM3, SAM, prompt encoder, geometry encoder, padding, embeddings, Python
---
# Reference for `ultralytics/models/sam/sam3/geometry_encoders.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/geometry_encoders.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/geometry_encoders.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.geometry_encoders.Prompt
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.geometry_encoders.SequenceGeometryEncoder
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.geometry_encoders.is_right_padded
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.geometry_encoders.concat_padded_sequences
<br><br>

View File

@@ -0,0 +1,32 @@
---
description: Explore the ultralytics.models.sam.sam3.maskformer_segmentation module for segmentation heads and predictors used with SAM3.
keywords: Ultralytics, SAM3, MaskFormer, segmentation head, mask prediction, deep learning, Python, API reference
---
# Reference for `ultralytics/models/sam/sam3/maskformer_segmentation.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/maskformer_segmentation.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/maskformer_segmentation.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.maskformer_segmentation.LinearPresenceHead
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.maskformer_segmentation.MaskPredictor
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.maskformer_segmentation.SegmentationHead
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.maskformer_segmentation.PixelDecoder
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.maskformer_segmentation.UniversalSegmentationHead
<br><br>

View File

@@ -0,0 +1,32 @@
---
description: Explore the ultralytics.models.sam.sam3.model_misc module with helper layers and utilities used in SAM3 model components.
keywords: Ultralytics, SAM3, SAM, transformer, layers, utilities, deep learning, Python
---
# Reference for `ultralytics/models/sam/sam3/model_misc.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/model_misc.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/model_misc.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.model_misc.DotProductScoring
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.model_misc.LayerScale
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.model_misc.TransformerWrapper
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.model_misc.get_valid_ratio
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.model_misc.gen_sineembed_for_position
<br><br>

View File

@@ -0,0 +1,16 @@
---
description: Explore the ultralytics.models.sam.sam3.necks module for SAM3 neck components that connect vision backbones to downstream heads.
keywords: Ultralytics, SAM3, SAM, neck, backbone, ViTDet, segmentation, Python
---
# Reference for `ultralytics/models/sam/sam3/necks.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/necks.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/necks.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.necks.Sam3DualViTDetNeck
<br><br>

View File

@@ -0,0 +1,20 @@
---
description: Explore the ultralytics.models.sam.sam3.sam3_image module, including the SAM3SemanticModel and related output helpers.
keywords: Ultralytics, SAM3, SAM, image segmentation, semantic segmentation, model, Python, API reference
---
# Reference for `ultralytics/models/sam/sam3/sam3_image.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/sam3_image.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/sam3_image.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.sam3_image.SAM3SemanticModel
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.sam3_image._update_out
<br><br>

View File

@@ -0,0 +1,32 @@
---
description: Explore the ultralytics.models.sam.sam3.text_encoder_ve module for SAM3 text-encoder components used in vision-language pipelines.
keywords: Ultralytics, SAM3, SAM, text encoder, vision-language, transformer, tokenizer, Python
---
# Reference for `ultralytics/models/sam/sam3/text_encoder_ve.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/text_encoder_ve.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/text_encoder_ve.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.text_encoder_ve.ResidualAttentionBlock
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.text_encoder_ve.Transformer
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.text_encoder_ve.TextTransformer
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.text_encoder_ve.VETextEncoder
<br><br><hr><br>
## ::: ultralytics.models.sam.sam3.text_encoder_ve.text_global_pool
<br><br>

View File

@@ -0,0 +1,24 @@
---
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>

View File

@@ -0,0 +1,16 @@
---
description: Explore the ultralytics.models.sam.sam3.vl_combiner module for combining vision and language features in SAM3.
keywords: Ultralytics, SAM3, vision-language, backbone, feature fusion, transformer, deep learning, Python
---
# Reference for `ultralytics/models/sam/sam3/vl_combiner.py`
!!! success "Improvements"
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/vl_combiner.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/vl_combiner.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.vl_combiner.SAM3VLBackbone
<br><br>