MCPcopy Create free account

hub / github.com/NVIDIA-AI-IOT/nanosam / functions

Functions234 in github.com/NVIDIA-AI-IOT/nanosam

↓ 1 callersMethodset_layer_lr_decay
(self, layer_lr_decay)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:553
↓ 1 callersMethodset_torch_image
Calculates the image embeddings for the provided image, allowing masks to be predicted with the 'predict' method. Expects the input
nanosam/mobile_sam/predictor.py:63
↓ 1 callersFunctionsubplot_notick
(a, b, c)
examples/segment_from_pose.py:90
↓ 1 callersFunctionsubplot_notick
(a, b, c)
examples/segment_from_owl.py:64
↓ 1 callersFunctionto_numpy
(tensor)
nanosam/tools/export_sam_mask_decoder_onnx.py:174
↓ 1 callersMethodto_numpy
(self)
nanosam/mobile_sam/utils/amg.py:72
↓ 1 callersFunctionuncrop_masks
( masks: torch.Tensor, crop_box: List[int], orig_h: int, orig_w: int )
nanosam/mobile_sam/utils/amg.py:255
↓ 1 callersFunctionuncrop_points
(points: torch.Tensor, crop_box: List[int])
nanosam/mobile_sam/utils/amg.py:246
↓ 1 callersFunctionup_to_256
(x)
nanosam/utils/tracker_online_learning.py:34
↓ 1 callersFunctionup_to_256
(x)
nanosam/utils/tracker.py:35
↓ 1 callersMethodupdate
(self, image)
nanosam/utils/tracker.py:132
↓ 1 callersFunctionwindow_partition
Partition into non-overlapping windows with padding if needed. Args: x (tensor): input tokens with [B, H, W, C]. window_size
nanosam/mobile_sam/modeling/image_encoder.py:243
↓ 1 callersFunctionwindow_unpartition
Window unpartition into original sequences and removing padding. Args: windows (tensor): input tokens with [B * num_windows, window_s
nanosam/mobile_sam/modeling/image_encoder.py:267
Method__delitem__
(self, key: str)
nanosam/mobile_sam/utils/amg.py:35
Method__getitem__
(self, idx)
nanosam/datasets/coco.py:39
Method__getitem__
(self, index)
nanosam/datasets/image_folder.py:51
Method__getitem__
(self, key: str)
nanosam/mobile_sam/utils/amg.py:38
Method__init__
(self, image_encoder_engine: str, mask_decoder_engine: str, image_encoder_
nanosam/utils/predictor.py:141
Method__init__
(self, a, b)
nanosam/utils/tracker_online_learning.py:83
Method__init__
(self, predictor: Predictor )
nanosam/utils/tracker_online_learning.py:97
Method__init__
(self, weights, config, arch="densenet121_baseline_att", shap
nanosam/utils/trt_pose.py:31
Method__init__
(self, predictor: Predictor )
nanosam/utils/tracker.py:68
Method__init__
(self, threshold=0.1)
nanosam/utils/owlvit.py:28
Method__init__
(self, root_dir, annotation_file, transforms=None, cat_ids=[], max_boxes=64)
nanosam/datasets/coco.py:29
Method__init__
(self, root: str, transform = None)
nanosam/datasets/image_folder.py:36
Method__init__
(self, model_name: str = "resnet18", pretrained: bool = False, feature_di
nanosam/models/timm_image_encoder.py:25
Method__init__
Uses SAM to calculate the image embedding for an image, and then allow repeated, efficient mask prediction given prompts. Ar
nanosam/mobile_sam/predictor.py:18
Method__init__
Using a SAM model, generates masks for the entire image. Generates a grid of point prompts over the image, then filters low q
nanosam/mobile_sam/automatic_mask_generator.py:36
Method__init__
Predicts masks given an image and prompt embeddings, using a transformer architecture. Arguments: transformer_dim
nanosam/mobile_sam/modeling/mask_decoder.py:17
Method__init__
Args: img_size (int): Input image size. patch_size (int): Patch size. in_chans (int): Number of input ima
nanosam/mobile_sam/modeling/image_encoder.py:18
Method__init__
Args: dim (int): Number of input channels. num_heads (int): Number of attention heads. qkv_bias (bool):
nanosam/mobile_sam/modeling/image_encoder.py:188
Method__init__
Args: kernel_size (Tuple): kernel size of the projection layer. stride (Tuple): stride of the projection layer.
nanosam/mobile_sam/modeling/image_encoder.py:369
Method__init__
(self, num_channels: int, eps: float = 1e-6)
nanosam/mobile_sam/modeling/common.py:32
Method__init__
A transformer decoder that attends to an input image using queries whose positional embedding is supplied. Args: d
nanosam/mobile_sam/modeling/transformer.py:17
Method__init__
A transformer block with four layers: (1) self-attention of sparse inputs, (2) cross attention of sparse inputs to dense inputs, (3)
nanosam/mobile_sam/modeling/transformer.py:110
Method__init__
SAM predicts object masks from an image and input prompts. Arguments: image_encoder (ImageEncoderViT): The backbone used t
nanosam/mobile_sam/modeling/sam.py:23
Method__init__
(self, num_pos_feats: int = 64, scale: Optional[float] = None)
nanosam/mobile_sam/modeling/prompt_encoder.py:176
Method__init__
(self, a, b, ks=1, stride=1, pad=0, dilation=1, groups=1, bn_weight_init=1)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:22
Method__init__
(self, drop_prob=None)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:47
Method__init__
(self, in_chans, embed_dim, resolution, activation)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:58
Method__init__
(self, in_chans, out_chans, expand_ratio, activation, drop_path)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:78
Method__init__
(self, input_resolution, dim, out_dim, activation)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:119
Method__init__
(self, dim, input_resolution, depth, activation, drop_path=0., downsample=No
nanosam/mobile_sam/modeling/tiny_vit_sam.py:151
Method__init__
(self, dim, key_dim, num_heads=8, attn_ratio=4, resolution=(14, 14),
nanosam/mobile_sam/modeling/tiny_vit_sam.py:213
Method__init__
(self, dim, input_resolution, num_heads, window_size=7, mlp_ratio=4., drop=0., drop_path=0.,
nanosam/mobile_sam/modeling/tiny_vit_sam.py:303
Method__init__
(self, dim, input_resolution, depth, num_heads, window_size, mlp_ratio=4., drop=0.,
nanosam/mobile_sam/modeling/tiny_vit_sam.py:402
Method__init__
(self, num_channels: int, eps: float = 1e-6)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:450
Method__init__
(self, img_size=224, in_chans=3, num_classes=1000, embed_dims=[96, 192, 384, 768], depths=[2,
nanosam/mobile_sam/modeling/tiny_vit_sam.py:463
Method__init__
(self, target_length: int)
nanosam/mobile_sam/utils/transforms.py:23
Method__init__
( self, model: Sam, return_single_mask: bool, use_stability_score: bool = Fals
nanosam/mobile_sam/utils/onnx.py:25
Method__init__
(self, **kwargs)
nanosam/mobile_sam/utils/amg.py:22
Method__len__
(self)
nanosam/datasets/coco.py:36
Method__len__
(self)
nanosam/datasets/image_folder.py:48
Method__repr__
(self)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:51
Method__setitem__
(self, key: str, item: Any)
nanosam/mobile_sam/utils/amg.py:29
Method_check_lr_scale
(m)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:581
Method_init_weights
(self, m)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:587
Function_register_model
(fn)
nanosam/models/registry.py:21
Method_set_lr_scale
(m, scale)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:561
Methodapply_boxes_torch
Expects a torch tensor with shape Bx4. Requires the original image size in (H, W) format.
nanosam/mobile_sam/utils/transforms.py:83
Methodapply_image_torch
Expects batched images with shape BxCxHxW and float format. This transformation may not exactly match apply_image. apply_image is
nanosam/mobile_sam/utils/transforms.py:55
Methodapply_token
(self, features, token)
nanosam/utils/tracker_online_learning.py:143
Functionbuild_sam_vit_b
(checkpoint=None)
nanosam/mobile_sam/build_sam.py:37
Functionbuild_sam_vit_h
(checkpoint=None)
nanosam/mobile_sam/build_sam.py:14
Functionbuild_sam_vit_l
(checkpoint=None)
nanosam/mobile_sam/build_sam.py:27
Functionbuild_sam_vit_t
(checkpoint=None)
nanosam/mobile_sam/build_sam.py:47
Methoddevice
(self)
nanosam/mobile_sam/predictor.py:261
Methoddevice
(self)
nanosam/mobile_sam/modeling/sam.py:51
Functiondraw_box
(box)
nanosam/tools/eval_coco.py:51
Methodextra_repr
(self)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:378
Methodextra_repr
(self)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:446
Methodfit_token
Finds token that when dot-producted with features minimizes MSE with low resolution masks. Args: features (Nx25
nanosam/utils/tracker_online_learning.py:125
Functionfn_wrapper
(pretrained=False, **kwargs)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:638
Methodforward
(self, x)
nanosam/utils/tracker_online_learning.py:92
Methodforward
(self, x)
nanosam/models/timm_image_encoder.py:68
Methodforward
Predict masks given image and prompt embeddings. Arguments: image_embeddings (torch.Tensor): the embeddings from the image
nanosam/mobile_sam/modeling/mask_decoder.py:71
Methodforward
(self, x)
nanosam/mobile_sam/modeling/mask_decoder.py:172
Methodforward
(self, x: torch.Tensor)
nanosam/mobile_sam/modeling/image_encoder.py:106
Methodforward
(self, x: torch.Tensor)
nanosam/mobile_sam/modeling/image_encoder.py:166
Methodforward
(self, x: torch.Tensor)
nanosam/mobile_sam/modeling/image_encoder.py:224
Methodforward
(self, x: torch.Tensor)
nanosam/mobile_sam/modeling/image_encoder.py:391
Methodforward
(self, x: torch.Tensor)
nanosam/mobile_sam/modeling/common.py:25
Methodforward
(self, x: torch.Tensor)
nanosam/mobile_sam/modeling/common.py:38
Methodforward
Args: image_embedding (torch.Tensor): image to attend to. Should be shape B x embedding_dim x h x w for any h and w.
nanosam/mobile_sam/modeling/transformer.py:62
Methodforward
( self, queries: Tensor, keys: Tensor, query_pe: Tensor, key_pe: Tensor )
nanosam/mobile_sam/modeling/transformer.py:151
Methodforward
(self, q: Tensor, k: Tensor, v: Tensor)
nanosam/mobile_sam/modeling/transformer.py:218
Methodforward
Predicts masks end-to-end from provided images and prompts. If prompts are not known in advance, using SamPredictor is recomm
nanosam/mobile_sam/modeling/sam.py:55
Methodforward
Embeds different types of prompts, returning both sparse and dense embeddings. Arguments: points (tuple(torch.Tens
nanosam/mobile_sam/modeling/prompt_encoder.py:128
Methodforward
Generate positional encoding for a grid of the specified size.
nanosam/mobile_sam/modeling/prompt_encoder.py:194
Methodforward
(self, x)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:73
Methodforward
(self, x)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:99
Methodforward
(self, x)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:133
Methodforward
(self, x)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:178
Methodforward
(self, x)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:201
Methodforward
(self, x)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:260
Methodforward
(self, x)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:335
Methodforward
(self, x)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:436
Methodforward
(self, x: torch.Tensor)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:456
Methodforward
(self, x)
nanosam/mobile_sam/modeling/tiny_vit_sam.py:616
Methodforward
( self, image_embeddings: torch.Tensor, point_coords: torch.Tensor, point_labe
nanosam/mobile_sam/utils/onnx.py:108
← previousnext →101–200 of 234, ranked by callers