MCPcopy Create free account

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

Functions373 in github.com/ImprintLab/Medical-SAM2

↓ 1 callersMethodpredict_masks
Predicts masks. See 'forward' for more details.
sam2_train/modeling/sam/mask_decoder.py:168
↓ 1 callersFunctionpreloadInterpolationImages
()
static/js/index.js:7
↓ 1 callersMethodpropagate_in_video
Propagate the input points across frames to track in the entire video.
sam2_train/sam2_video_predictor.py:1041
↓ 1 callersMethodpropagate_in_video_preflight
Prepare inference_state and consolidate temporary outputs before tracking.
sam2_train/sam2_video_predictor.py:901
↓ 1 callersFunctionrandom_click
(mask, point_label = 1)
func_2d/utils.py:425
↓ 1 callersMethodrefine_with_m2m
(self, points, point_labels, low_res_masks, points_per_batch)
sam2_train/automatic_mask_generator.py:417
↓ 1 callersFunctionreshape_for_broadcast
(freqs_cis: torch.Tensor, x: torch.Tensor)
sam2_train/modeling/position_encoding.py:186
↓ 1 callersFunctionselect_closest_cond_frames
Select up to `max_cond_frame_num` conditioning frames from `cond_frame_outputs` that are temporally closest to the current frame at `frame_id
sam2_train/modeling/sam2_utils.py:15
↓ 1 callersMethodset_image
Calculates the image embeddings for the provided image, allowing masks to be predicted with the 'predict' method. Arguments:
sam2_train/sam2_image_predictor.py:66
↓ 1 callersFunctionsl
(c)
static/js/fontawesome.all.min.js:5
↓ 1 callersFunctiontensor_to_img_array
(tensor)
func_2d/utils.py:284
↓ 1 callersMethodto_numpy
(self)
sam2_train/utils/amg.py:74
↓ 1 callersMethodtrain_init_state
Initialize a inference state.
sam2_train/sam2_video_predictor.py:179
↓ 1 callersMethodtrain_propagate_in_video
Propagate the input points across frames to track in the entire video.
sam2_train/sam2_video_predictor.py:1126
↓ 1 callersMethodtrain_propagate_in_video_preflight
Prepare inference_state and consolidate temporary outputs before tracking.
sam2_train/sam2_video_predictor.py:971
↓ 1 callersMethodtransform_boxes
Expects a tensor of shape Bx4. The coordinates can be in absolute image or normalized coordinates, if the coords are in absolute imag
sam2_train/utils/transforms.py:64
↓ 1 callersFunctionuncrop_masks
( masks: torch.Tensor, crop_box: List[int], orig_h: int, orig_w: int )
sam2_train/utils/amg.py:257
↓ 1 callersFunctionuncrop_points
(points: torch.Tensor, crop_box: List[int])
sam2_train/utils/amg.py:248
↓ 1 callersMethodval_init_state
Initialize a inference state.
sam2_train/sam2_video_predictor.py:107
↓ 1 callersFunctionvis_image
(imgs, pred_masks, gt_masks, save_path, reverse = False, points = None)
func_2d/utils.py:305
↓ 1 callersFunctionwindow_partition
Partition into non-overlapping windows with padding if needed. Args: x (tensor): input tokens with [B, H, W, C]. window_size
sam2_train/modeling/backbones/utils.py:16
↓ 1 callersFunctionwindow_unpartition
Window unpartition into original sequences and removing padding. Args: x (tensor): input tokens with [B * num_windows, window_size, w
sam2_train/modeling/backbones/utils.py:41
↓ 1 callersFunctionxc
(c)
static/js/fontawesome.all.min.js:5
↓ 1 callersFunctionyl
(a)
static/js/fontawesome.all.min.js:5
Function$c
()
static/js/fontawesome.all.min.js:5
FunctionAutoplay
(slider)
static/js/bulma-carousel.js:1042
FunctionBreakpoints
(slider)
static/js/bulma-carousel.js:1216
FunctionCoordinate
()
static/js/bulma-carousel.js:329
FunctionEventEmitter
()
static/js/bulma-slider.js:286
FunctionEventEmitter
()
static/js/bulma-carousel.js:280
FunctionFade
(transitioner, slider)
static/js/bulma-carousel.js:2054
FunctionInfinite
(slider)
static/js/bulma-carousel.js:1354
FunctionJ
()
static/js/fontawesome.all.min.js:5
FunctionLoop
(slider)
static/js/bulma-carousel.js:1434
FunctionNavigation
(slider)
static/js/bulma-carousel.js:1502
FunctionPagination
(slider)
static/js/bulma-carousel.js:1653
FunctionSl
(c)
static/js/fontawesome.all.min.js:5
FunctionSwipe
(slider)
static/js/bulma-carousel.js:1812
FunctionTransitioner
(slider)
static/js/bulma-carousel.js:1954
FunctionTranslate
(transitioner, slider)
static/js/bulma-carousel.js:2190
FunctionVc
(c)
static/js/fontawesome.all.min.js:5
Method__call__
(self, x)
sam2_train/utils/transforms.py:35
Method__delitem__
(self, key: str)
sam2_train/utils/amg.py:37
Method__getitem__
Get the images
func_2d/dataset.py:31
Method__getitem__
(self, index)
func_3d/dataset/btcv.py:36
Method__getitem__
(self, index)
func_3d/dataset/amos.py:36
Method__getitem__
(self, key: str)
sam2_train/utils/amg.py:40
Method__init__
(self, settings)
conf/__init__.py:9
Method__init__
(self, args, data_path , transform = None, transform_msk = None, mode = 'Training',prompt = 'click', plane = F
func_2d/dataset.py:17
Method__init__
(self, dice_weight=1, focal_weight=1)
func_3d/function.py:21
Method__init__
(self, args, data_path , transform = None, transform_msk = None, mode = 'Training',prompt = 'click', seed=None
func_3d/dataset/btcv.py:14
Method__init__
(self, args, data_path , transform = None, transform_msk = None, mode = 'Training',prompt = 'click', seed=None
func_3d/dataset/amos.py:14
Method__init__
Using a SAM 2 model, generates masks for the entire image. Generates a grid of point prompts over the image, then filters low
sam2_train/automatic_mask_generator.py:37
Method__init__
Uses SAM-2 to calculate the image embedding for an image, and then allow repeated, efficient mask prediction given prompts.
sam2_train/sam2_image_predictor.py:21
Method__init__
( self, fill_hole_area=0, # whether to apply non-overlapping constraints on the output
sam2_train/sam2_video_predictor.py:20
Method__init__
(self, drop_prob=0.0, scale_by_keep=True)
sam2_train/modeling/sam2_utils.py:90
Method__init__
(self, num_channels: int, eps: float = 1e-6)
sam2_train/modeling/sam2_utils.py:138
Method__init__
( self, image_encoder, memory_attention, memory_encoder, num_maskmem=7
sam2_train/modeling/sam2_base.py:23
Method__init__
( self, activation: str, cross_attention: nn.Module, d_model: int, dim
sam2_train/modeling/memory_attention.py:19
Method__init__
( self, embed_dim=256, kernel_size=4, stride=4, padding=0, tot
sam2_train/modeling/memory_encoder.py:26
Method__init__
( self, dim, kernel_size=7, padding=3, drop_path=0.0, layer_sc
sam2_train/modeling/memory_encoder.py:74
Method__init__
( self, out_dim, mask_downsampler, fuser, position_encoding, i
sam2_train/modeling/memory_encoder.py:139
Method__init__
(self, num_pos_feats: int = 64, scale: Optional[float] = None)
sam2_train/modeling/position_encoding.py:120
Method__init__
Args: kernel_size (Tuple): kernel size of the projection layer. stride (Tuple): stride of the projection layer.
sam2_train/modeling/backbones/utils.py:70
Method__init__
( self, trunk: nn.Module, neck: nn.Module, scalp: int = 0, )
sam2_train/modeling/backbones/image_encoder.py:15
Method__init__
( self, dim: int, dim_out: int, num_heads: int, q_pool: nn.Module = No
sam2_train/modeling/backbones/hieradet.py:38
Method__init__
( self, dim: int, dim_out: int, num_heads: int, mlp_ratio: float = 4.0
sam2_train/modeling/backbones/hieradet.py:87
Method__init__
Predicts masks given an image and prompt embeddings, using a transformer architecture. Arguments: transformer_dim
sam2_train/modeling/sam/mask_decoder.py:16
Method__init__
A transformer decoder that attends to an input image using queries whose positional embedding is supplied. Args: d
sam2_train/modeling/sam/transformer.py:29
Method__init__
A transformer block with four layers: (1) self-attention of sparse inputs, (2) cross attention of sparse inputs to dense inputs, (3)
sam2_train/modeling/sam/transformer.py:122
Method__init__
( self, *args, rope_theta=10000.0, # whether to repeat q rope to match k lengt
sam2_train/modeling/sam/transformer.py:269
Method__init__
Encodes prompts for input to SAM's mask decoder. Arguments: embed_dim (int): The prompts' embedding dimension im
sam2_train/modeling/sam/prompt_encoder.py:18
Method__init__
(self, img_paths, image_size, offload_video_to_cpu, img_mean, img_std)
sam2_train/utils/misc.py:109
Method__init__
Transforms for SAM2.
sam2_train/utils/transforms.py:14
Method__init__
(self, **kwargs)
sam2_train/utils/amg.py:24
Method__len__
(self)
func_2d/dataset.py:28
Method__len__
(self)
func_3d/dataset/btcv.py:33
Method__len__
(self)
func_3d/dataset/amos.py:33
Method__len__
(self)
sam2_train/utils/misc.py:159
Method__setitem__
(self, key: str, item: Any)
sam2_train/utils/amg.py:31
Method_load_frames
()
sam2_train/utils/misc.py:128
Method_obj_idx_to_id
Map model-side object index to client-side object id.
sam2_train/sam2_video_predictor.py:284
FunctionaddClasses
(element, classes)
static/js/bulma-carousel.js:95
Methodadd_new_bbox
( self, inference_state, frame_idx, obj_id, bbox, clear_old_po
sam2_train/sam2_video_predictor.py:399
Methodadd_new_mask
Add new mask to a frame.
sam2_train/sam2_video_predictor.py:557
Functionagree_click
(mask, label = 1)
func_2d/utils.py:432
Functionbl
(c)
static/js/fontawesome.all.min.js:5
FunctionbulmaCarousel
(selector)
static/js/bulma-carousel.js:504
FunctionbulmaSlider
(selector)
static/js/bulma-slider.js:105
Functioncamelize
(str)
static/js/bulma-carousel.js:1008
Functioncompute_axial_cis
(dim: int, end_x: int, end_y: int, theta: float = 10000.0)
sam2_train/modeling/position_encoding.py:174
Functioncreate_logger
(log_dir, phase='train')
func_3d/utils.py:42
Functioncss
(element, obj)
static/js/bulma-carousel.js:169
Functiondefer
()
static/js/bulma-carousel.js:995
FunctiondetectSupportsPassive
()
static/js/bulma-carousel.js:189
Methoddevice
(self)
sam2_train/sam2_image_predictor.py:436
Functionec
(c)
static/js/fontawesome.all.min.js:5
Methodencode_boxes
(self, x, y, w, h)
sam2_train/modeling/position_encoding.py:62
Methodencode_points
(self, x, y, labels)
sam2_train/modeling/position_encoding.py:70
Functionfl
(c)
static/js/fontawesome.all.min.js:5
← previousnext →201–300 of 373, ranked by callers