MCPcopy Create free account

hub / github.com/bowang-lab/MedSAM2 / functions

Functions862 in github.com/bowang-lab/MedSAM2

Method__init__
(self, prob=0.15, grid_h=2, grid_w=2, use_random_hflip=False)
training/dataset/transforms.py:529
Method__init__
Args: consistent_transform (bool): Whether to use the same noise parameters for all frames in the video mean (float):
training/dataset/transforms.py:562
Method__init__
Args: consistent_transform (bool): Whether to use the same blur parameters for all frames kernel_size (int): Gaussian
training/dataset/transforms.py:602
Method__init__
Args: dataloaders (List[DataLoader]): List of DataLoaders to be mixed. mixing_prob (torch.FloatTensor): Probability o
training/dataset/sam2_datasets.py:19
Method__init__
Args: datasets (List[Dataset]): List of Datasets to be mixed. batch_sizes (List[int]): Batch sizes for each dataset i
training/dataset/sam2_datasets.py:71
Method__init__
(self, datasets: Iterable[Dataset])
training/dataset/utils.py:20
Method__init__
(self, dataset, seed: int = 0)
training/dataset/utils.py:49
Method__init__
(self)
training/dataset/vos_raw_dataset.py:51
Method__init__
( self, img_folder, gt_folder, file_list_txt=None, excluded_videos_lis
training/dataset/vos_raw_dataset.py:59
Method__init__
( self, folder, file_list_txt=None, excluded_videos_list_txt=None, sam
training/dataset/vos_raw_dataset.py:150
Method__init__
( self, img_folder, gt_folder, file_list_txt=None, excluded_videos_lis
training/dataset/vos_raw_dataset.py:227
Method__init__
( self, img_folder, gt_folder, file_list_txt=None, excluded_videos_lis
training/dataset/vos_raw_dataset.py:298
Method__init__
(self, video_json_path, ann_every=1, frames_fps=24, valid_obj_ids=None)
training/dataset/vos_segment_loader.py:24
Method__init__
SegmentLoader for datasets with masks stored as palettised PNGs. video_png_root: the folder contains all the masks stored in png
training/dataset/vos_segment_loader.py:104
Method__init__
video_png_root: the folder contains all the masks stored in png single_object_mode: whether to load only a single object at a time
training/dataset/vos_segment_loader.py:153
Method__init__
(self)
training/dataset/vos_segment_loader.py:237
Method__init__
( self, video_mask_path, mask_area_frac_thresh=1.1, video_frame_path=None,
training/dataset/vos_segment_loader.py:263
Method__init__
Initialize the NPZSegmentLoader. Args: masks (numpy.ndarray): Array of masks with shape (img_num, H, W).
training/dataset/vos_segment_loader.py:305
Method__init__
( self, transforms, training: bool, video_dataset: VOSRawDataset, samp
training/dataset/vos_dataset.py:28
Method__init__
( self, image_encoder, memory_attention=None, memory_encoder=None, pro
training/model/efficienttam.py:27
Method__init__
( self, image_encoder, memory_attention=None, memory_encoder=None, pro
training/model/sam2.py:26
Method__iter__
(self)
training/dataset/sam2_datasets.py:37
Method__len__
(self)
sam2/utils/misc.py:168
Method__len__
(self)
efficient_track_anything/utils/misc.py:168
Method__len__
(self)
training/dataset/sam2_datasets.py:34
Method__len__
(self)
training/dataset/utils.py:81
Method__len__
(self)
training/dataset/vos_raw_dataset.py:46
Method__len__
(self)
training/dataset/vos_raw_dataset.py:146
Method__len__
(self)
training/dataset/vos_raw_dataset.py:223
Method__len__
(self)
training/dataset/vos_raw_dataset.py:289
Method__len__
(self)
training/dataset/vos_raw_dataset.py:385
Method__len__
(self)
training/dataset/vos_segment_loader.py:148
Method__len__
(self)
training/dataset/vos_segment_loader.py:228
Method__len__
(self)
training/dataset/vos_segment_loader.py:255
Method__len__
(self)
training/dataset/vos_dataset.py:134
Method__next__
Sample a dataloader to sample from based on mixing probabilities. If one of the dataloaders is exhausted, we continue sampling from the other
training/dataset/sam2_datasets.py:44
Method__post_init__
(self)
training/trainer.py:81
Method__repr__
(self)
training/dataset/transforms.py:250
Method__setitem__
(self, key: str, item: Any)
sam2/utils/amg.py:31
Method__setitem__
(self, key: str, item: Any)
efficient_track_anything/utils/amg.py:31
Method__setitem__
(self, key, item)
training/dataset/vos_segment_loader.py:241
Method__str__
(self)
training/utils/train_utils.py:180
Method__str__
(self)
training/utils/train_utils.py:211
Method__str__
(self)
training/utils/train_utils.py:248
Method_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
efficient_track_anything/efficienttam_video_predictor.py:965
Method_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
efficient_track_anything/efficienttam_video_predictor_npz.py:968
Method_forward_sam_heads
Identical to the corresponding method in the parent (EfficientTAMVideoPredictor), but cloning the outputs of prompt_encoder and mask_
efficient_track_anything/efficienttam_video_predictor.py:1036
Method_forward_sam_heads
Identical to the corresponding method in the parent (EfficientTAMVideoPredictor), but cloning the outputs of prompt_encoder and mask_
efficient_track_anything/efficienttam_video_predictor_npz.py:1039
Method_load_frames
()
sam2/utils/misc.py:137
Method_load_frames
()
efficient_track_anything/utils/misc.py:137
Method_map_keys
(container)
sam2/sam2_video_predictor_npz.py:1101
Method_map_keys
(container)
sam2/sam2_video_predictor.py:1097
Method_map_keys
(container)
efficient_track_anything/efficienttam_video_predictor.py:929
Method_map_keys
(container)
efficient_track_anything/efficienttam_video_predictor_npz.py:932
Method_obj_idx_to_id
Map model-side object index to client-side object id.
sam2/sam2_video_predictor_npz.py:168
Method_obj_idx_to_id
Map model-side object index to client-side object id.
sam2/sam2_video_predictor.py:164
Method_prepare_backbone_features
Prepare and flatten visual features.
sam2/modeling/efficienttam_base.py:483
Method_slice_state
(output_dict, storage_key)
sam2/sam2_video_predictor_npz.py:1115
Method_slice_state
(output_dict, storage_key)
sam2/sam2_video_predictor.py:1111
Methodadd_new_mask
Add new mask to a frame.
sam2/sam2_video_predictor_npz.py:325
Methodadd_new_mask
Add new mask to a frame.
efficient_track_anything/efficienttam_video_predictor_npz.py:312
Methodadd_new_points
Deprecated method. Please use `add_new_points_or_box` instead.
sam2/sam2_video_predictor_npz.py:320
Methodadd_new_points
Deprecated method. Please use `add_new_points_or_box` instead.
efficient_track_anything/efficienttam_video_predictor.py:304
Methodadd_new_points
Deprecated method. Please use `add_new_points_or_box` instead.
efficient_track_anything/efficienttam_video_predictor_npz.py:307
Functionall_gather
Run all_gather on arbitrary picklable data (not necessarily tensors) Args: data: any picklable object Returns: list[data]
training/utils/distributed.py:114
Functionall_gather_batch
Performs all_gather operation on the provided tensors.
training/utils/distributed.py:465
Functionall_gather_batch_with_grad
Performs all_gather operation on the provided tensors. Graph remains connected for backward grad computation.
training/utils/distributed.py:504
Functionall_reduce_mean
Wrapper over torch.distributed.all_reduce for performing mean reduction of tensor over all processes.
training/utils/distributed.py:228
Functionall_reduce_min
Wrapper over torch.distributed.all_reduce for performing min reduction of tensor over all processes in both distributed / non-distributed
training/utils/distributed.py:249
Functionall_reduce_sum
Wrapper over torch.distributed.all_reduce for performing sum reduction of tensor over all processes in both distributed / non-distributed
training/utils/distributed.py:240
Functionarea_from_rle
(rle: Dict[str, Any])
sam2/utils/amg.py:154
Functionbatch_iterator
(batch_size: int, *args)
sam2/utils/amg.py:100
Functionbatched_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/utils/amg.py:305
Functionbox_xyxy_to_xywh
(box_xyxy: torch.Tensor)
sam2/utils/amg.py:93
Functionbroadcast_object
Broadcast an object from a source to all workers. Args: obj: Object to broadcast, must be serializable src: Source rank for broad
training/utils/distributed.py:411
Functionbuild_all_layer_point_grids
Generates point grids for all crop layers.
sam2/utils/amg.py:191
Methodbuild_extensions
(self)
setup.py:129
Functioncalculate_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/utils/amg.py:158
Functioncoco_encode_rle
(uncompressed_rle: Dict[str, Any])
sam2/utils/amg.py:296
Functioncollate_fn
Args: batch: A list of VideoDatapoint instances. dict_key (str): A string key used to identify the batch.
training/utils/data_utils.py:114
Functioncompute_axial_cis
(dim: int, end_x: int, end_y: int, theta: float = 10000.0)
sam2/modeling/position_encoding.py:174
Functioncompute_axial_cis
(dim: int, end_x: int, end_y: int, theta: float = 10000.0)
efficient_track_anything/modeling/position_encoding.py:192
Functioncreate_new_process_group
Creates process groups of a gives `group_size` and returns process group that current GPU participates in. `group_size` must divide the
training/utils/distributed.py:532
Methoddevice
(self)
sam2/sam2_image_predictor.py:458
Methoddevice
(self)
sam2/modeling/efficienttam_base.py:201
Methoddevice
(self)
efficient_track_anything/efficienttam_image_predictor.py:462
Functiondice_multi_class
(preds, targets)
medsam2_infer_3D_CT.py:81
Methodencode_boxes
(self, x, y, w, h)
sam2/modeling/position_encoding.py:62
Methodencode_boxes
(self, x, y, w, h)
efficient_track_anything/modeling/position_encoding.py:73
Methodencode_points
(self, x, y, labels)
sam2/modeling/position_encoding.py:70
Methodencode_points
(self, x, y, labels)
efficient_track_anything/modeling/position_encoding.py:81
Functionextract_session_id_from_request
(request: gr.Request)
app.py:456
Methodfinalize_options
(self)
setup.py:122
Methodflat_img_batch
Returns a flattened img_batch_tensor of shape [(B*T)xCxHxW]
training/utils/data_utils.py:82
Methodflat_obj_to_img_idx
Returns a flattened tensor containing the object to img index. The flat index can be used to access a flattened img_batch of shape [(
training/utils/data_utils.py:72
Methodflush
Writes pending logs to disk.
training/utils/logger.py:89
Methodforward
Forward pass for processing video frames and predicting masks, logits, and IoUs. Args: videos (torch.Tensor): A tensor o
sam2/sam2_video_trainer.py:133
Methodforward
(self, x)
sam2/modeling/sam2_utils.py:99
Methodforward
(self, x)
sam2/modeling/sam2_utils.py:131
Methodforward
(self, x: torch.Tensor)
sam2/modeling/sam2_utils.py:148
← previousnext →601–700 of 862, ranked by callers