code: def build_sam_vit_t(checkpoint=None):
      prompt_embed_dim = 256
      image_size = 1024
      vit_patch_size = 16
      image_embedding_size = image_size // vit_patch_size
      mobile_sam = Sam(
          image_encoder=TinyViT(
              img_size=1024,
              in_chans=3,
              num_classes=1000,
              embed_dims=[64, 128, 160, 320],
              depths=[2, 2, 6, 2],
              num_heads=[2, 4, 5, 10],
              window_sizes=[7, 7, 14, 7],
              mlp_ratio=4.0,
              drop_rate=0.0,
              drop_path_rate=0.0,
              mbconv_expand_ratio=4.0,
              local_conv_size=3,
              layer_lr_decay=0.8,
          ),
          prompt_encoder=PromptEncoder(
              embed_dim=prompt_embed_dim,
              image_embedding_size=(
                  image_embedding_size,
                  image_embedding_size,
              ),
              input_image_size=(image_size, image_size),
              mask_in_chans=16,
          ),
          mask_decoder=MaskDecoder(
              num_multimask_outputs=3,
              transformer=TwoWayTransformer(
                  depth=2,
                  embedding_dim=prompt_embed_dim,
                  mlp_dim=2048,
                  num_heads=8,
              ),
              transformer_dim=prompt_embed_dim,
              iou_head_depth=3,
              iou_head_hidden_dim=256,
          ),
          pixel_mean=[123.675, 116.28, 103.53],
          pixel_std=[58.395, 57.12, 57.375],
      )
  
      mobile_sam.eval()
      if checkpoint is not None:
          load_entire_model(mobile_sam, checkpoint)
      mobile_sam.image_encoder.build_abs()
      return mobile_sam
  
file_path: PaddleSeg/contrib/SegmentAnything/segment_anything/build_sam.py
imports: import paddle
  from functools import partial
  from paddleseg.utils import load_entire_model
  from .modeling import ImageEncoderViT, MaskDecoder, PromptEncoder, Sam, TwoWayTransformer, TinyViT
label_desc: Use image node_id 4 for calling a global function with example usage: build_sam_vit_t(checkpoint) and returns: mobile_sam