MCPcopy Create free account

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

Functions373 in github.com/ImprintLab/Medical-SAM2

↓ 45 callersFunction$
(a)
static/js/fontawesome.all.min.js:5
↓ 35 callersMethodfilter
(self, keep: torch.Tensor)
sam2_train/utils/amg.py:46
↓ 33 callersFunctionn
(t,e)
static/js/bulma-carousel.min.js:1
↓ 32 callersFunction__webpack_require__
(moduleId)
static/js/bulma-carousel.js:16
↓ 31 callersFunctioni
(t)
static/js/bulma-carousel.min.js:1
↓ 30 callersMethodcat
(self, new_stats: "MaskData")
sam2_train/utils/amg.py:61
↓ 26 callersFunctiondefineProperties
(target, props)
static/js/bulma-carousel.js:273
↓ 17 callersFunctionc
()
static/js/fontawesome.all.min.js:5
↓ 17 callersMethoddevice
(self)
sam2_train/modeling/sam2_base.py:192
↓ 13 callersFunction_classCallCheck
(instance, Constructor)
static/js/bulma-carousel.js:277
↓ 12 callersFunctionz
(c)
static/js/fontawesome.all.min.js:5
↓ 7 callersFunctiona
(c)
static/js/fontawesome.all.min.js:5
↓ 7 callersMethoditems
(self)
sam2_train/utils/amg.py:43
↓ 7 callersFunctionl
(l)
static/js/fontawesome.all.min.js:5
↓ 6 callersMethod_consolidate_temp_output_across_obj
Consolidate the per-object temporary outputs in `temp_output_dict_per_obj` on a frame into a single output for all objects, including
sam2_train/sam2_video_predictor.py:746
↓ 6 callersMethod_get_image_feature
Compute the image features on a given frame.
sam2_train/sam2_video_predictor.py:1270
↓ 6 callersMethod_get_orig_video_res_output
Resize the object scores to the original video resolution (video_res_masks) and apply non-overlapping constraints for final output.
sam2_train/sam2_video_predictor.py:724
↓ 6 callersMethod_run_single_frame_inference
Run tracking on a single frame based on current inputs and previous memory.
sam2_train/sam2_video_predictor.py:1302
↓ 6 callersMethod_separate_heads
(self, x: Tensor, num_heads: int)
sam2_train/modeling/sam/transformer.py:229
↓ 6 callersFunctionbc
(c)
static/js/fontawesome.all.min.js:5
↓ 5 callersMethod_get_obj_num
Get the total number of unique object ids received so far in this session.
sam2_train/sam2_video_predictor.py:288
↓ 5 callersMethod_prepare_backbone_features
Prepare and flatten visual features.
sam2_train/modeling/sam2_base.py:477
↓ 5 callersFunctionfc
(c,l)
static/js/fontawesome.all.min.js:5
↓ 5 callersMethodforward_image
Get the image feature on the input batch.
sam2_train/modeling/sam2_base.py:463
↓ 5 callersFunctionkl
()
static/js/fontawesome.all.min.js:5
↓ 5 callersFunctionpc
()
static/js/fontawesome.all.min.js:5
↓ 5 callersFunctionr
(t)
static/js/bulma-carousel.min.js:1
↓ 5 callersFunctionr
(t,e)
static/js/bulma-slider.min.js:1
↓ 5 callersFunctions
(t)
static/js/bulma-carousel.min.js:1
↓ 4 callersFunctionH
(c)
static/js/fontawesome.all.min.js:5
↓ 4 callersFunctionJc
(c)
static/js/fontawesome.all.min.js:5
↓ 4 callersFunctionTl
()
static/js/fontawesome.all.min.js:5
↓ 4 callersFunctionWc
()
static/js/fontawesome.all.min.js:5
↓ 4 callersMethod_add_output_per_object
Split a multi-object output into per-object output slices and add them into `output_dict_per_obj`. The resulting slices share the sam
sam2_train/sam2_video_predictor.py:1210
↓ 4 callersMethod_clear_non_cond_mem_around_input
Remove the non-conditioning memory around the input frame. When users provide correction clicks, the surrounding frames' non-conditio
sam2_train/sam2_video_predictor.py:1422
↓ 4 callersMethod_encode_new_memory
Encode the current image and its prediction into a memory feature.
sam2_train/modeling/sam2_base.py:664
↓ 4 callersMethod_obj_id_to_idx
Map client-side object id to model-side object index.
sam2_train/sam2_video_predictor.py:250
↓ 4 callersMethod_predict
Predict masks for the given input prompts, using the currently set image. Input prompts are batched torch tensors and are expected to
sam2_train/sam2_image_predictor.py:317
↓ 4 callersFunctiondefineProperties
(target, props)
static/js/bulma-slider.js:86
↓ 4 callersFunctiondice_coeff
Dice coeff for batches
func_2d/utils.py:269
↓ 4 callersFunctiondice_coeff
Dice coeff for batches
func_3d/utils.py:216
↓ 4 callersMethodget_dense_pe
Returns the positional encoding used to encode point prompts, applied to a dense set of points the shape of the image encoding.
sam2_train/modeling/sam/prompt_encoder.py:68
↓ 4 callersFunctionh
(c)
static/js/fontawesome.all.min.js:5
↓ 4 callersFunctioniou
(outputs: np.array, labels: np.array)
func_2d/utils.py:231
↓ 4 callersFunctioniou
(outputs: np.array, labels: np.array)
func_3d/utils.py:205
↓ 4 callersFunctionmc
(c,l)
static/js/fontawesome.all.min.js:5
↓ 4 callersMethodtransform_coords
Expects a torch tensor with length 2 in the last dimension. The coordinates can be in absolute image or normalized coordinates, If th
sam2_train/utils/transforms.py:44
↓ 4 callersFunctionxl
(l,c)
static/js/fontawesome.all.min.js:5
↓ 4 callersFunctionyc
(h)
static/js/fontawesome.all.min.js:5
↓ 3 callersFunctionAc
(c)
static/js/fontawesome.all.min.js:5
↓ 3 callersFunctionBc
(c)
static/js/fontawesome.all.min.js:5
↓ 3 callersFunctionCl
(c)
static/js/fontawesome.all.min.js:5
↓ 3 callersFunctionIc
(c)
static/js/fontawesome.all.min.js:5
↓ 3 callersFunctionLl
(z,a)
static/js/fontawesome.all.min.js:5
↓ 3 callersFunctionM
(c,z)
static/js/fontawesome.all.min.js:5
↓ 3 callersFunctionTc
(c,l,h,z)
static/js/fontawesome.all.min.js:5
↓ 3 callersFunctionXc
()
static/js/fontawesome.all.min.js:5
↓ 3 callersMethod__init__
(self, layer, num_layers, dim=None, input_projection=False)
sam2_train/modeling/memory_encoder.py:121
↓ 3 callersMethod__init__
( self, embedding_dim: int, num_heads: int, downsample_rate: int = 1,
sam2_train/modeling/sam/transformer.py:205
↓ 3 callersMethod_apply_non_overlapping_constraints
Apply non-overlapping constraints to the object scores in pred_masks. Here we keep only the highest scoring object at each spatial lo
sam2_train/modeling/sam2_base.py:811
↓ 3 callersFunction_toConsumableArray
(arr)
static/js/bulma-carousel.js:275
↓ 3 callersFunctione
()
static/js/bulma-carousel.min.js:1
↓ 3 callersFunctione
()
static/js/bulma-slider.min.js:1
↓ 3 callersFunctionget_connected_components
Get the connected components (8-connectivity) of binary masks of shape (N, 1, H, W). Inputs: - mask: A binary mask tensor of shape (N, 1
sam2_train/utils/misc.py:47
↓ 3 callersFunctionn
(c,l)
static/js/fontawesome.all.min.js:5
↓ 3 callersFunctionqc
(c)
static/js/fontawesome.all.min.js:5
↓ 3 callersMethodreset_predictor
Resets the image embeddings and other state variables.
sam2_train/sam2_image_predictor.py:439
↓ 3 callersFunctiontc
(c,l)
static/js/fontawesome.all.min.js:5
↓ 3 callersMethodtrain_add_new_points
Add new points to a frame.
sam2_train/sam2_video_predictor.py:451
↓ 3 callersFunctionv
(c,l)
static/js/fontawesome.all.min.js:5
↓ 3 callersFunctionwc
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionAl
(n,V)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionGc
(c,l,h)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionHc
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionMc
(c,l)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionOc
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionQc
(c,l)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionSc
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionW
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionZc
(c)
static/js/fontawesome.all.min.js:5
↓ 2 callersFunctionZl
()
static/js/fontawesome.all.min.js:5
↓ 2 callersMethod__getitem__
(self, index)
sam2_train/utils/misc.py:138
↓ 2 callersMethod__init__
( self, input_dim: int, hidden_dim: int, output_dim: int, num_layers:
sam2_train/modeling/sam2_utils.py:109
↓ 2 callersMethod__init__
( self, embed_dim: int = 96, # initial embed dim num_heads: int = 1, # initial numbe
sam2_train/modeling/backbones/hieradet.py:176
↓ 2 callersFunction__webpack_require__
(moduleId)
static/js/bulma-slider.js:16
↓ 2 callersFunction_classCallCheck
(instance, Constructor)
static/js/bulma-slider.js:90
↓ 2 callersMethod_encode_xy
(self, x, y)
sam2_train/modeling/position_encoding.py:42
↓ 2 callersMethod_forward_sam_heads
Forward SAM prompt encoders and mask heads. Inputs: - backbone_features: image features of [B, C, H, W] shape - poin
sam2_train/modeling/sam2_base.py:251
↓ 2 callersMethod_get_maskmem_pos_enc
`maskmem_pos_enc` is the same across frames and objects, so we cache it as a constant in the inference session to reduce session stor
sam2_train/sam2_video_predictor.py:1397
↓ 2 callersFunction_inherits
(subClass, superClass)
static/js/bulma-carousel.js:481
↓ 2 callersFunction_load_checkpoint
(model, ckpt_path)
sam2_train/build_sam.py:79
↓ 2 callersFunction_load_img_as_tensor
(img_path, image_size)
sam2_train/utils/misc.py:92
↓ 2 callersMethod_pe_encoding
Positionally encode points that are normalized to [0,1].
sam2_train/modeling/position_encoding.py:129
↓ 2 callersFunction_possibleConstructorReturn
(self, call)
static/js/bulma-carousel.js:479
↓ 2 callersMethod_prep_prompts
( self, point_coords, point_labels, box, mask_logits, normalize_coords, img_idx=-1 )
sam2_train/sam2_image_predictor.py:285
↓ 2 callersMethod_recombine_heads
(self, x: Tensor)
sam2_train/modeling/sam/transformer.py:234
↓ 2 callersMethodbackward
(self, grad_output)
func_3d/utils.py:241
↓ 2 callersFunctionbatch_iterator
(batch_size: int, *args)
sam2_train/utils/amg.py:100
↓ 2 callersFunctionbatched_mask_to_box
Calculates boxes in XYXY format around masks. Return [0,0,0,0] for an empty mask. For input shape C1xC2x...xHxW, the output shape is C1xC2x..
sam2_train/utils/amg.py:305
↓ 2 callersFunctionbox_xyxy_to_xywh
(box_xyxy: torch.Tensor)
sam2_train/utils/amg.py:93
next →1–100 of 373, ranked by callers