MCPcopy Create free account

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

Functions373 in github.com/ImprintLab/Medical-SAM2

↓ 2 callersFunctioncalculate_stability_score
Computes the stability score for a batch of masks. The stability score is the IoU between the binary masks obtained by thresholding the p
sam2_train/utils/amg.py:158
↓ 2 callersFunctioncl
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionconcat_points
Add new points and labels to previous point inputs (add at the end).
sam2_train/utils/misc.py:261
↓ 2 callersFunctioncreate_logger
(log_dir, phase='train')
func_2d/utils.py:179
↓ 2 callersFunctioncrop_len
(orig_len, n_crops, overlap)
sam2_train/utils/amg.py:217
↓ 2 callersFunctiondc
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctiondo_pool
(x: torch.Tensor, pool: nn.Module, norm: nn.Module = None)
sam2_train/modeling/backbones/hieradet.py:23
↓ 2 callersFunctionel
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersMethodforward_with_coords
Positionally encode points that are not normalized to [0,1].
sam2_train/modeling/position_encoding.py:151
↓ 2 callersFunctiongenerate_bbox
(mask, variation=0, seed=None)
func_3d/utils.py:107
↓ 2 callersFunctionget_clones
(module, N)
sam2_train/modeling/sam2_utils.py:84
↓ 2 callersFunctionget_network
return given network
func_2d/utils.py:43
↓ 2 callersFunctioni
(t)
static/js/bulma-slider.min.js:1
↓ 2 callersFunctionisIFrame
(unknown)
static/js/bulma-carousel.js:258
↓ 2 callersFunctionisNode
(unknown)
static/js/bulma-carousel.js:249
↓ 2 callersFunctionload_video_frames_from_data
Load the video frames from a directory of JPEG files ("<frame_index>.jpg" format). The frames are resized to image_size x image_size and are
sam2_train/utils/misc.py:215
↓ 2 callersFunctionmask_to_rle_pytorch
Encodes masks to an uncompressed RLE, in the format expected by pycoco tools.
sam2_train/utils/amg.py:109
↓ 2 callersFunctionnorm_ip
(img, low, high)
func_2d/utils.py:114
↓ 2 callersFunctionnorm_range
(t, value_range)
func_2d/utils.py:118
↓ 2 callersFunctiono
(t)
static/js/bulma-carousel.min.js:1
↓ 2 callersFunctionql
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionrandom_click
(mask, point_labels = 1, seed=None)
func_3d/utils.py:90
↓ 2 callersFunctionremove_small_regions
Removes small disconnected regions and holes in a mask. Returns the mask and an indicator of if the mask has been modified.
sam2_train/utils/amg.py:269
↓ 2 callersMethodreset_state
Remove all input points or mask in all frames throughout the video.
sam2_train/sam2_video_predictor.py:1239
↓ 2 callersFunctionrle_to_mask
Compute a binary mask from an uncompressed RLE.
sam2_train/utils/amg.py:140
↓ 2 callersFunctionsc
(l,h)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionsetInterpolationImage
(i)
static/js/index.js:15
↓ 2 callersFunctionset_log_dir
(root_dir, exp_name)
func_2d/utils.py:194
↓ 2 callersFunctiontl
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersMethodtrack_step
( self, frame_idx, is_init_cond_frame, current_vision_feats, current_v
sam2_train/modeling/sam2_base.py:704
↓ 2 callersMethodtrain_add_new_bbox
( self, inference_state, frame_idx, obj_id, bbox, clear_old_po
sam2_train/sam2_video_predictor.py:425
↓ 2 callersMethodtrain_add_new_mask
Add new mask to a frame.
sam2_train/sam2_video_predictor.py:641
↓ 2 callersFunctionul
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionuncrop_boxes_xyxy
(boxes: torch.Tensor, crop_box: List[int])
sam2_train/utils/amg.py:239
↓ 2 callersFunctionvl
()
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionzl
(h,c)
static/js/fontawesome.all.min.js:5
↓ 1 callersFunctionMl
(c)
static/js/fontawesome.all.min.js:5
↓ 1 callersFunctionNc
(c)
static/js/fontawesome.all.min.js:5
↓ 1 callersMethod__init__
( self, d_model: int, pos_enc_at_input: bool, layer: nn.Module, num_la
sam2_train/modeling/memory_attention.py:103
↓ 1 callersMethod__init__
( self, num_pos_feats, temperature: int = 10000, normalize: bool = True,
sam2_train/modeling/position_encoding.py:22
↓ 1 callersMethod__init__
Initialize the neck :param trunk: the backbone :param position_encoding: the positional encoding to use :param d_model: the di
sam2_train/modeling/backbones/image_encoder.py:52
↓ 1 callersMethod_build_sam_heads
Build SAM-style prompt encoder and mask decoder.
sam2_train/modeling/sam2_base.py:201
↓ 1 callersFunction_defineProperty
(obj, key, value)
static/js/bulma-carousel.js:475
↓ 1 callersMethod_dynamic_multimask_via_stability
When outputting a single mask, if the stability score from the current single-mask output (based on output token 0) falls below a thr
sam2_train/modeling/sam/mask_decoder.py:259
↓ 1 callersMethod_embed_boxes
Embeds box prompts.
sam2_train/modeling/sam/prompt_encoder.py:103
↓ 1 callersMethod_embed_masks
Embeds mask inputs.
sam2_train/modeling/sam/prompt_encoder.py:114
↓ 1 callersMethod_embed_points
Embeds point prompts.
sam2_train/modeling/sam/prompt_encoder.py:79
↓ 1 callersMethod_forward_ca
(self, tgt, memory, query_pos, pos, num_k_exclude_rope=0)
sam2_train/modeling/memory_attention.py:66
↓ 1 callersMethod_forward_sa
(self, tgt, query_pos)
sam2_train/modeling/memory_attention.py:58
↓ 1 callersMethod_generate_masks
(self, image: np.ndarray)
sam2_train/automatic_mask_generator.py:206
↓ 1 callersMethod_get_batch_size
Gets the batch size of the output given the batch size of the input prompts.
sam2_train/modeling/sam/prompt_encoder.py:119
↓ 1 callersMethod_get_device
(self)
sam2_train/modeling/sam/prompt_encoder.py:137
↓ 1 callersMethod_get_empty_mask_ptr
Get a dummy object pointer based on an empty mask on the current frame.
sam2_train/sam2_video_predictor.py:864
↓ 1 callersMethod_get_pos_embed
(self, hw: Tuple[int, int])
sam2_train/modeling/backbones/hieradet.py:269
↓ 1 callersMethod_get_stability_scores
Compute stability scores of the mask logits based on the IoU between upper and lower thresholds, similar to https://github.com/fairin
sam2_train/modeling/sam/mask_decoder.py:247
↓ 1 callersFunction_inherits
(subClass, superClass)
static/js/bulma-slider.js:94
↓ 1 callersFunction_possibleConstructorReturn
(self, call)
static/js/bulma-slider.js:92
↓ 1 callersMethod_prepare_memory_conditioned_features
Fuse the current frame's visual feature map with previous memory.
sam2_train/modeling/sam2_base.py:493
↓ 1 callersMethod_process_batch
( self, points: np.ndarray, im_size: Tuple[int, ...], crop_box: List[int],
sam2_train/automatic_mask_generator.py:276
↓ 1 callersMethod_process_crop
( self, image: np.ndarray, crop_box: List[int], crop_layer_idx: int, o
sam2_train/automatic_mask_generator.py:233
↓ 1 callersMethod_reset_tracking_results
Reset all tracking inputs and results across the videos.
sam2_train/sam2_video_predictor.py:1251
↓ 1 callersMethod_run_memory_encoder
Run the memory encoder on `high_res_masks`. This is usually after applying non-overlapping constraints to object scores. Since their
sam2_train/sam2_video_predictor.py:1368
↓ 1 callersMethod_use_mask_as_output
Directly turn binary `mask_inputs` into a output mask logits without using SAM. (same input and output shapes as in _forward_sam_head
sam2_train/modeling/sam2_base.py:411
↓ 1 callersMethod_use_multimask
Whether to use multimask output in the SAM head.
sam2_train/modeling/sam2_base.py:801
↓ 1 callersFunctiona
(t)
static/js/bulma-carousel.min.js:1
↓ 1 callersMethodadd_new_points
Add new points to a frame.
sam2_train/sam2_video_predictor.py:293
↓ 1 callersFunctionapply_rotary_enc
( xq: torch.Tensor, xk: torch.Tensor, freqs_cis: torch.Tensor, repeat_freqs_k: bool = False, )
sam2_train/modeling/position_encoding.py:194
↓ 1 callersFunctionarea_from_rle
(rle: Dict[str, Any])
sam2_train/utils/amg.py:154
↓ 1 callersMethodbackward
(self, grad_output)
func_2d/utils.py:255
↓ 1 callersFunctionbuild_all_layer_point_grids
Generates point grids for all crop layers.
sam2_train/utils/amg.py:191
↓ 1 callersFunctionbuild_point_grid
Generates a 2D grid of points evenly spaced in [0,1]x[0,1].
sam2_train/utils/amg.py:181
↓ 1 callersFunctionbuild_sam2
( config_file, ckpt_path=None, device="cuda", mode="eval", hydra_overrides_extra=[], a
sam2_train/build_sam.py:15
↓ 1 callersFunctionbuild_sam2_video_predictor
( config_file, ckpt_path=None, device="cuda", mode="eval", hydra_overrides_extra=[], a
sam2_train/build_sam.py:43
↓ 1 callersFunctioncoco_encode_rle
(uncompressed_rle: Dict[str, Any])
sam2_train/utils/amg.py:296
↓ 1 callersFunctioneval_seg
threshold: a int or a tuple of int masks: [b,2,h,w] pred: [b,2,h,w]
func_2d/utils.py:358
↓ 1 callersFunctioneval_seg
threshold: a int or a tuple of int masks: [b,2,h,w] pred: [b,2,h,w]
func_3d/utils.py:139
↓ 1 callersFunctionfill_holes_in_mask_scores
A post processor to fill small holes in mask scores with area under `max_area`.
sam2_train/utils/misc.py:247
↓ 1 callersMethodforward
(self, input, target)
func_2d/utils.py:245
↓ 1 callersMethodforward
(self, input, target)
func_3d/utils.py:231
↓ 1 callersMethodforward_batch
(self, img_list)
sam2_train/utils/transforms.py:39
↓ 1 callersFunctiongc
(c,l)
static/js/fontawesome.all.min.js:5
↓ 1 callersFunctiongenerate_crop_boxes
Generates a list of crop boxes of different sizes. Each layer has (2**i)**2 boxes for the ith layer.
sam2_train/utils/amg.py:202
↓ 1 callersFunctionget_1d_sine_pe
Get 1D sine positional embedding as in the original Transformer paper.
sam2_train/modeling/sam2_utils.py:60
↓ 1 callersFunctionget_activation_fn
Return an activation function given a string
sam2_train/modeling/sam2_utils.py:73
↓ 1 callersFunctionget_dataloader
(args)
func_3d/dataset/__init__.py:8
↓ 1 callersFunctionget_sdpa_settings
()
sam2_train/utils/misc.py:17
↓ 1 callersFunctioninit_t_xy
(end_x: int, end_y: int)
sam2_train/modeling/position_encoding.py:167
↓ 1 callersFunctionisHTML5
(unknown)
static/js/bulma-carousel.js:255
↓ 1 callersFunctionisString
(unknown)
static/js/bulma-slider.js:98
↓ 1 callersFunctionisVimeo
(unknown)
static/js/bulma-carousel.js:264
↓ 1 callersFunctionisYoutube
(unknown)
static/js/bulma-carousel.js:261
↓ 1 callersFunctionis_box_near_crop_edge
Filter masks at the edge of a crop, but not at the edge of the original image.
sam2_train/utils/amg.py:80
↓ 1 callersFunctionl
(t)
static/js/bulma-slider.min.js:1
↓ 1 callersFunctionload_video_frames
Load the video frames from a directory of JPEG files ("<frame_index>.jpg" format). The frames are resized to image_size x image_size and are
sam2_train/utils/misc.py:163
↓ 1 callersFunctionmain
()
train_2d.py:26
↓ 1 callersFunctionmain
()
train_3d.py:21
↓ 1 callersFunctionmake_grid
( tensor: Union[torch.Tensor, List[torch.Tensor]], nrow: int = 8, padding: int = 2, normalize:
func_2d/utils.py:75
↓ 1 callersFunctiono
(t)
static/js/bulma-slider.min.js:1
↓ 1 callersFunctionpl
(c)
static/js/fontawesome.all.min.js:5
↓ 1 callersMethodpostprocess_masks
Perform PostProcessing on output masks.
sam2_train/utils/transforms.py:74
← previousnext →101–200 of 373, ranked by callers