MCPcopy Create free account

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

Functions862 in github.com/bowang-lab/MedSAM2

Methodinit_state
Initialize an inference state.
sam2/sam2_video_predictor_npz.py:44
Methodinit_state
Initialize an inference state.
sam2/sam2_video_predictor.py:44
Methodinit_state
Initialize an inference state.
efficient_track_anything/efficienttam_video_predictor_npz.py:49
Functionis_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
Functionis_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
Functionlayer_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
Methodload
(self, frame_id, obj_ids=None)
training/dataset/vos_segment_loader.py:46
Methodload
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
Methodload
(self, frame_id)
training/dataset/vos_segment_loader.py:175
Methodload
(self, frame_idx)
training/dataset/vos_segment_loader.py:300
Functionload_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
Functionload_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
Methodlog_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
Methodlog_hparams
Add hyperparameter data to TensorBoard. Args: hparams (dict): dictionary of hyperparameter names and corresponding values
training/utils/logger.py:138
Methodlog_hparams
( self, hparams: Dict[str, Scalar], meters: Dict[str, Scalar] )
training/utils/logger.py:171
Functionmake_tensorboard_logger
(log_dir: str, **writer_kwargs: Any)
training/utils/logger.py:27
Functionmask2D_to_bbox
(gt2D, max_shift=20)
medsam2_infer_3D_CT.py:158
Functionmask3D_to_bbox
(gt3D, max_shift=20)
medsam2_infer_3D_CT.py:171
Functionmask_to_rle_pytorch
Encodes masks to an uncompressed RLE, in the format expected by pycoco tools.
sam2/utils/amg.py:109
Functionmonitor_and_cleanup_processes
()
app.py:437
Functionmultiply_all
(*args)
training/utils/train_utils.py:25
Methodnum_frames
Returns the number of frames per video.
training/utils/data_utils.py:58
Methodnum_videos
Returns the number of videos in the batch.
training/utils/data_utils.py:65
Functionpad
(datapoint, index, padding, v2=False)
training/dataset/transforms.py:104
Methodpath
(self)
training/utils/logger.py:86
Methodpin_memory
(self, device=None)
training/utils/data_utils.py:54
Methodpostprocess_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
Methodpredict
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
Methodpredict_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
Methodpredict_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
Functionprint_cfg
Supports printing both Hydra DictConfig and also the AttrDict config
training/utils/train_utils.py:93
Functionprocess_video
(queue, result_queue, session_id)
app.py:342
Methodpropagate_in_video
Propagate the input points across frames to track in the entire video.
sam2/sam2_video_predictor_npz.py:667
Methodpropagate_in_video
Propagate the input points across frames to track in the entire video.
efficient_track_anything/efficienttam_video_predictor_npz.py:558
Methodremove_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
Methodremove_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
Methodremove_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
Methodremove_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
Functionremove_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
Methodreset
(self)
training/utils/train_utils.py:239
Functionrle_to_mask
Compute a binary mask from an uncompressed RLE.
sam2/utils/amg.py:140
Methodsample
(self, video, segment_loader, epoch=None)
training/dataset/vos_sampler.py:42
Methodsample
Sampling all the frames and all the objects
training/dataset/vos_sampler.py:91
Functionsample_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
MethodsetUp
(self)
sam2/sam2_video_trainer.py:488
Functionset_cpu_device
()
training/utils/distributed.py:374
Functionset_cuda_device_index
(idx: int)
training/utils/distributed.py:368
Methodset_epoch
(self, epoch: int)
training/dataset/utils.py:91
Methodset_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
Methodset_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
Functionshow_box
show bounding box on the image Parameters ---------- box : numpy.ndarray bounding box coordinates in the original image
medsam2_infer_3D_CT.py:117
Functionshow_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
Functionshutdown_logging
After training is done, we ensure to shut down all the logger streams.
training/utils/logger.py:239
Functionsubmitit_launch
(video_paths, sample_rate, save_root)
training/scripts/sav_frame_extraction_submitit.py:103
Methodtest_forward
(self)
sam2/sam2_video_trainer.py:515
Methodto_numpy
(self)
sam2/utils/amg.py:74
Methodtrack_step
( self, frame_idx, is_init_cond_frame, current_vision_feats, current_v
sam2/modeling/efficienttam_base.py:816
Functionuncrop_masks
( masks: torch.Tensor, crop_box: List[int], orig_h: int, orig_w: int )
sam2/utils/amg.py:257
Functionuncrop_points
(points: torch.Tensor, crop_box: List[int])
sam2/utils/amg.py:248
Functionunwrap_ddp_if_wrapped
(model)
training/utils/distributed.py:526
Methodupdate
(self, val)
training/utils/train_utils.py:242
Methodwriter
(self)
training/utils/logger.py:82
← previous801–862 of 862, ranked by callers