Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bowang-lab/MedSAM2
/ functions
Functions
862 in github.com/bowang-lab/MedSAM2
⨍
Functions
862
◇
Types & classes
142
Method
init_state
Initialize an inference state.
sam2/sam2_video_predictor_npz.py:44
Method
init_state
Initialize an inference state.
sam2/sam2_video_predictor.py:44
Method
init_state
Initialize an inference state.
efficient_track_anything/efficienttam_video_predictor_npz.py:49
Function
is_box_near_crop_edge
Filter masks at the edge of a crop, but not at the edge of the original image.
sam2/utils/amg.py:80
Function
is_primary
Returns True if this is rank 0 of a distributed training job OR if it is a single trainer job. Otherwise False.
training/utils/distributed.py:220
Function
layer_decay_param_modifier
Args - scheduler_cfgs: a list of omegaconf.ListConfigs. Each element in the list is a omegaconfg.DictConfig with the following struct
training/optimizer.py:422
Method
load
(self, frame_id, obj_ids=None)
training/dataset/vos_segment_loader.py:46
Method
load
load the single palettised mask from the disk (path: f'{self.video_png_root}/{frame_id:05d}.png') Args: frame_id: int, de
training/dataset/vos_segment_loader.py:120
Method
load
(self, frame_id)
training/dataset/vos_segment_loader.py:175
Method
load
(self, frame_idx)
training/dataset/vos_segment_loader.py:300
Function
load_checkpoint
Loads a checkpoint from the specified path. Args: path_list: A list of paths which contain the checkpoint. Each element
training/utils/checkpoint_utils.py:189
Function
load_checkpoint_and_apply_kernels
Performs checkpoint loading with a variety of pre-processing kernel applied in sequence. Args: checkpoint_path (str): Path to th
training/utils/checkpoint_utils.py:247
Method
log_dict
Add multiple scalar values to TensorBoard. Args: payload (dict): dictionary of tag name and scalar value step (int, O
training/utils/logger.py:114
Method
log_hparams
Add hyperparameter data to TensorBoard. Args: hparams (dict): dictionary of hyperparameter names and corresponding values
training/utils/logger.py:138
Method
log_hparams
( self, hparams: Dict[str, Scalar], meters: Dict[str, Scalar] )
training/utils/logger.py:171
Function
make_tensorboard_logger
(log_dir: str, **writer_kwargs: Any)
training/utils/logger.py:27
Function
mask2D_to_bbox
(gt2D, max_shift=20)
medsam2_infer_3D_CT.py:158
Function
mask3D_to_bbox
(gt3D, max_shift=20)
medsam2_infer_3D_CT.py:171
Function
mask_to_rle_pytorch
Encodes masks to an uncompressed RLE, in the format expected by pycoco tools.
sam2/utils/amg.py:109
Function
monitor_and_cleanup_processes
()
app.py:437
Function
multiply_all
(*args)
training/utils/train_utils.py:25
Method
num_frames
Returns the number of frames per video.
training/utils/data_utils.py:58
Method
num_videos
Returns the number of videos in the batch.
training/utils/data_utils.py:65
Function
pad
(datapoint, index, padding, v2=False)
training/dataset/transforms.py:104
Method
path
(self)
training/utils/logger.py:86
Method
pin_memory
(self, device=None)
training/utils/data_utils.py:54
Method
postprocess_small_regions
Removes small disconnected regions and holes in masks, then reruns box NMS to remove any new duplicates. Edits mask_data in
efficient_track_anything/automatic_mask_generator.py:390
Method
predict
Predict masks for the given input prompts, using the currently set image. Arguments: point_coords (np.ndarray or None): A
efficient_track_anything/efficienttam_image_predictor.py:243
Method
predict_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/sam2_image_predictor.py:177
Method
predict_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
efficient_track_anything/efficienttam_image_predictor.py:181
Function
print_cfg
Supports printing both Hydra DictConfig and also the AttrDict config
training/utils/train_utils.py:93
Function
process_video
(queue, result_queue, session_id)
app.py:342
Method
propagate_in_video
Propagate the input points across frames to track in the entire video.
sam2/sam2_video_predictor_npz.py:667
Method
propagate_in_video
Propagate the input points across frames to track in the entire video.
efficient_track_anything/efficienttam_video_predictor_npz.py:558
Method
remove_object
Remove an object id from the tracking state. If strict is True, we check whether the object id actually exists and raise an error if
sam2/sam2_video_predictor_npz.py:1046
Method
remove_object
Remove an object id from the tracking state. If strict is True, we check whether the object id actually exists and raise an error if
sam2/sam2_video_predictor.py:1042
Method
remove_object
Remove an object id from the tracking state. If strict is True, we check whether the object id actually exists and raise an error if
efficient_track_anything/efficienttam_video_predictor.py:876
Method
remove_object
Remove an object id from the tracking state. If strict is True, we check whether the object id actually exists and raise an error if
efficient_track_anything/efficienttam_video_predictor_npz.py:879
Function
remove_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/utils/amg.py:269
Method
reset
(self)
training/utils/train_utils.py:239
Function
rle_to_mask
Compute a binary mask from an uncompressed RLE.
sam2/utils/amg.py:140
Method
sample
(self, video, segment_loader, epoch=None)
training/dataset/vos_sampler.py:42
Method
sample
Sampling all the frames and all the objects
training/dataset/vos_sampler.py:91
Function
sample_box_points
Sample a noised version of the top left and bottom right corners of a given `bbox` Inputs: - masks: [B, 1, H,W] boxes, dtype=torch.Tenso
efficient_track_anything/modeling/efficienttam_utils.py:156
Method
setUp
(self)
sam2/sam2_video_trainer.py:488
Function
set_cpu_device
()
training/utils/distributed.py:374
Function
set_cuda_device_index
(idx: int)
training/utils/distributed.py:368
Method
set_epoch
(self, epoch: int)
training/dataset/utils.py:91
Method
set_image_batch
Calculates the image embeddings for the provided image batch, allowing masks to be predicted with the 'predict_batch' method.
sam2/sam2_image_predictor.py:134
Method
set_image_batch
Calculates the image embeddings for the provided image batch, allowing masks to be predicted with the 'predict_batch' method.
efficient_track_anything/efficienttam_image_predictor.py:138
Function
show_box
show bounding box on the image Parameters ---------- box : numpy.ndarray bounding box coordinates in the original image
medsam2_infer_3D_CT.py:117
Function
show_mask
show mask on the image Parameters ---------- mask : numpy.ndarray mask of the image ax : matplotlib.axes.Axes ax
medsam2_infer_3D_CT.py:93
Function
shutdown_logging
After training is done, we ensure to shut down all the logger streams.
training/utils/logger.py:239
Function
submitit_launch
(video_paths, sample_rate, save_root)
training/scripts/sav_frame_extraction_submitit.py:103
Method
test_forward
(self)
sam2/sam2_video_trainer.py:515
Method
to_numpy
(self)
sam2/utils/amg.py:74
Method
track_step
( self, frame_idx, is_init_cond_frame, current_vision_feats, current_v
sam2/modeling/efficienttam_base.py:816
Function
uncrop_masks
( masks: torch.Tensor, crop_box: List[int], orig_h: int, orig_w: int )
sam2/utils/amg.py:257
Function
uncrop_points
(points: torch.Tensor, crop_box: List[int])
sam2/utils/amg.py:248
Function
unwrap_ddp_if_wrapped
(model)
training/utils/distributed.py:526
Method
update
(self, val)
training/utils/train_utils.py:242
Method
writer
(self)
training/utils/logger.py:82
← previous
801–862 of 862, ranked by callers