MCPcopy Create free account

hub / github.com/ImprintLab/Medical-SAM2 / functions

Functions373 in github.com/ImprintLab/Medical-SAM2

Methodforward
(self, inputs, targets)
func_3d/function.py:28
Methodforward
(self, x)
sam2_train/modeling/sam2_utils.py:95
Methodforward
(self, x)
sam2_train/modeling/sam2_utils.py:127
Methodforward
(self, x: torch.Tensor)
sam2_train/modeling/sam2_utils.py:144
Methodforward
(self, *args, **kwargs)
sam2_train/modeling/sam2_base.py:195
Methodforward
( self, tgt, memory, pos: Optional[Tensor] = None, query_pos: Optional
sam2_train/modeling/memory_attention.py:83
Methodforward
( self, curr: torch.Tensor, # self-attention inputs memory: torch.Tensor, # cross-at
sam2_train/modeling/memory_attention.py:119
Methodforward
(self, x)
sam2_train/modeling/memory_encoder.py:57
Methodforward
(self, x)
sam2_train/modeling/memory_encoder.py:104
Methodforward
(self, x)
sam2_train/modeling/memory_encoder.py:130
Methodforward
( self, pix_feat: torch.Tensor, masks: torch.Tensor, skip_mask_sigmoid: bool =
sam2_train/modeling/memory_encoder.py:158
Methodforward
(self, x: torch.Tensor)
sam2_train/modeling/position_encoding.py:79
Methodforward
Generate positional encoding for a grid of the specified size.
sam2_train/modeling/position_encoding.py:138
Methodforward
(self, x: torch.Tensor)
sam2_train/modeling/backbones/utils.py:91
Methodforward
(self, sample: torch.Tensor)
sam2_train/modeling/backbones/image_encoder.py:29
Methodforward
(self, xs: List[torch.Tensor])
sam2_train/modeling/backbones/image_encoder.py:101
Methodforward
(self, x: torch.Tensor)
sam2_train/modeling/backbones/hieradet.py:58
Methodforward
(self, x: torch.Tensor)
sam2_train/modeling/backbones/hieradet.py:136
Methodforward
(self, x: torch.Tensor)
sam2_train/modeling/backbones/hieradet.py:279
Methodforward
Predict masks given image and prompt embeddings. Arguments: image_embeddings (torch.Tensor): the embeddings from the image
sam2_train/modeling/sam/mask_decoder.py:110
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.
sam2_train/modeling/sam/transformer.py:74
Methodforward
( self, queries: Tensor, keys: Tensor, query_pe: Tensor, key_pe: Tensor )
sam2_train/modeling/sam/transformer.py:165
Methodforward
(self, q: Tensor, k: Tensor, v: Tensor)
sam2_train/modeling/sam/transformer.py:239
Methodforward
( self, q: Tensor, k: Tensor, v: Tensor, num_k_exclude_rope: int = 0 )
sam2_train/modeling/sam/transformer.py:288
Methodforward
Embeds different types of prompts, returning both sparse and dense embeddings. Arguments: points (tuple(torch.Tens
sam2_train/modeling/sam/prompt_encoder.py:140
Methodgenerate
Generates masks for the given image. Arguments: image (np.ndarray): The image to generate masks for, in HWC uint8 format.
sam2_train/automatic_mask_generator.py:152
FunctiongetNodeIndex
(node)
static/js/bulma-carousel.js:1005
Methodget_image_embedding
Returns the image embeddings for the currently set image, with shape 1xCxHxW, where C is the embedding dimension and (H,W) are
sam2_train/sam2_image_predictor.py:420
Functionget_network
return given network
func_3d/utils.py:22
Functiongl
(c)
static/js/fontawesome.all.min.js:5
Functionheight
(element)
static/js/bulma-carousel.js:136
Functionhide
(elements)
static/js/bulma-carousel.js:116
Functionhl
(c)
static/js/fontawesome.all.min.js:5
Functionic
(c)
static/js/fontawesome.all.min.js:5
Methodinit_state
Initialize a inference state.
sam2_train/sam2_video_predictor.py:39
FunctionisDate
(unknown)
static/js/bulma-carousel.js:234
FunctionisEmptyObject
(unknown)
static/js/bulma-carousel.js:240
FunctionisFunction
(unknown)
static/js/bulma-carousel.js:225
FunctionisInViewport
(element, html)
static/js/bulma-carousel.js:1481
FunctionisNumber
(unknown)
static/js/bulma-carousel.js:228
FunctionisObject
(unknown)
static/js/bulma-carousel.js:237
FunctionisRtl
()
static/js/bulma-carousel.js:991
FunctionisString
(unknown)
static/js/bulma-carousel.js:231
FunctionisVideo
(unknown)
static/js/bulma-carousel.js:252
Functionjc
()
static/js/fontawesome.all.min.js:5
Functionl
(t,e)
static/js/bulma-carousel.min.js:1
Functionmask_to_box
compute bounding box given an input mask Inputs: - masks: [B, 1, H, W] boxes, dtype=torch.Tensor Returns: - box_coords: [B, 1,
sam2_train/utils/misc.py:66
Functionnc
(c)
static/js/fontawesome.all.min.js:5
Functionoffset
(element)
static/js/bulma-carousel.js:123
FunctionouterHeight
(element)
static/js/bulma-carousel.js:140
FunctionouterWidth
(element)
static/js/bulma-carousel.js:151
Functionparse_args
()
cfg.py:4
Functionposition
(element)
static/js/bulma-carousel.js:162
Methodpostprocess_small_regions
Removes small disconnected regions and holes in masks, then reruns box NMS to remove any new duplicates. Edits mask_data in
sam2_train/automatic_mask_generator.py:367
Methodpredict
Predict masks for the given input prompts, using the currently set image. Arguments: point_coords (np.ndarray or None): A
sam2_train/sam2_image_predictor.py:217
Methodpredict_batch
This function is very similar to predict(...), however it is used for batched mode, when the model is expected to generate predictions on multiple ima
sam2_train/sam2_image_predictor.py:155
Functionrandom_box
(multi_rater)
func_2d/utils.py:441
Functionrc
(c)
static/js/fontawesome.all.min.js:5
FunctionremoveClasses
(element, classes)
static/js/bulma-carousel.js:102
Functionsave_checkpoint
(states, is_best, output_dir, filename='checkpoint.pth')
func_2d/utils.py:223
Functionsave_checkpoint
(states, is_best, output_dir, filename='checkpoint.pth')
func_3d/utils.py:84
Functionsave_image
Save a given Tensor into an image file. Args: tensor (Tensor or list): Image to be saved. If given a mini-batch tensor, s
func_2d/utils.py:155
Methodset_image_batch
Calculates the image embeddings for the provided image batch, allowing masks to be predicted with the 'predict_batch' method.
sam2_train/sam2_image_predictor.py:112
Functionset_log_dir
(root_dir, exp_name)
func_3d/utils.py:56
Functionshow
(elements)
static/js/bulma-carousel.js:109
Functiontrain_sam
(args, net: nn.Module, optimizer, train_loader, epoch, writer)
func_2d/function.py:25
Functiontrain_sam
(args, net: nn.Module, optimizer1, optimizer2, train_loader, epoch)
func_3d/function.py:50
Functionuuid
()
static/js/bulma-carousel.js:985
Functionvalidation_sam
(args, val_loader, epoch, net: nn.Module, clean_dir=True)
func_2d/function.py:259
Functionvalidation_sam
(args, val_loader, epoch, net: nn.Module, clean_dir=True)
func_3d/function.py:198
Functionvc
()
static/js/fontawesome.all.min.js:5
Functionview
(tensor)
func_2d/utils.py:290
Functionwidth
(element)
static/js/bulma-carousel.js:132
← previous301–373 of 373, ranked by callers