MCPcopy Create free account

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

Functions862 in github.com/bowang-lab/MedSAM2

↓ 1 callersMethodlog
Add scalar data to TensorBoard. Args: name (string): tag name used to group scalars data (float/int/Tensor): scalar d
training/utils/logger.py:126
↓ 1 callersFunctionlog_env_variables
()
training/utils/train_utils.py:148
↓ 1 callersFunctionmain
()
medsam2_infer_video.py:420
↓ 1 callersFunctionmain
(args, cfg)
training/train.py:120
↓ 1 callersFunctionmap_scheduler_cfgs_to_param_groups
Produce parameter groups corresponding to all the scheduler configs. Takes all the scheduler configs, each of which applies to a specific optimiz
training/optimizer.py:131
↓ 1 callersFunctionmask2bbox
(mask)
app.py:99
↓ 1 callersFunctionmask_to_box
compute bounding box given an input mask Inputs: - masks: [B, 1, H, W] masks, dtype=torch.Tensor Returns: - box_coords: [B, 1,
efficient_track_anything/utils/misc.py:66
↓ 1 callersFunctionname_constraints_to_parameters
Return parameters which match the intersection of parameter constraints. Note that this returns the parameters themselves, not their names.
training/optimizer.py:112
↓ 1 callersMethodnormalize_bbox
Normalize the given bounding box coordinates. This method transforms the bounding box coordinates to a normalized form based
sam2/sam2_video_trainer.py:204
↓ 1 callersMethodpostprocess_masks
Perform PostProcessing on output masks.
sam2/utils/transforms.py:76
↓ 1 callersMethodpostprocess_masks
Perform PostProcessing on output masks.
efficient_track_anything/utils/transforms.py:76
↓ 1 callersMethodpredict
Predict masks for the given input prompts, using the currently set image. Arguments: point_coords (np.ndarray or None): A
sam2/sam2_image_predictor.py:239
↓ 1 callersMethodpredict_masks
Predicts masks. See 'forward' for more details.
sam2/modeling/sam/mask_decoder.py:168
↓ 1 callersMethodpredict_masks
Predicts masks. See 'forward' for more details.
efficient_track_anything/modeling/sam/mask_decoder.py:168
↓ 1 callersMethodprepare_prompt_inputs
Prepare input mask, point or box prompts. Optionally, we allow tracking from a custom `start_frame_idx` to the end of the video (for
training/model/efficienttam.py:170
↓ 1 callersMethodprepare_prompt_inputs
Prepare input mask, point or box prompts. Optionally, we allow tracking from a custom `start_frame_idx` to the end of the video (for
training/model/sam2.py:146
↓ 1 callersFunctionpreprocess
(image_data, modality="CT", window_level=-750, window_width=1500)
examples/infer_CT_LUNA25.py:80
↓ 1 callersMethodpreprocess_frame_features
Preprocess frame features.
sam2/sam2_video_trainer.py:259
↓ 1 callersFunctionprint_model_summary
Prints the model and the number of parameters in the model. # Multiple packages provide this info in a nice table format # However, they
training/trainer.py:1049
↓ 1 callersMethodpropagate_in_video_preflight
Prepare inference_state and consolidate temporary outputs before tracking.
sam2/sam2_video_predictor_npz.py:597
↓ 1 callersMethodpropagate_in_video_preflight
Prepare inference_state and consolidate temporary outputs before tracking.
sam2/sam2_video_predictor.py:593
↓ 1 callersMethodpropagate_in_video_preflight
Prepare inference_state and consolidate temporary outputs before tracking.
efficient_track_anything/efficienttam_video_predictor.py:489
↓ 1 callersMethodpropagate_in_video_preflight
Prepare inference_state and consolidate temporary outputs before tracking.
efficient_track_anything/efficienttam_video_predictor_npz.py:492
↓ 1 callersFunctionrandom_mosaic_frame
( datapoint, index, grid_h, grid_w, target_grid_y, target_grid_x, should_hflip, )
training/dataset/transforms.py:444
↓ 1 callersMethodreduce_loss
(self, losses)
training/loss_fns.py:299
↓ 1 callersMethodrefine_with_m2m
(self, points, point_labels, low_res_masks, points_per_batch)
efficient_track_anything/automatic_mask_generator.py:440
↓ 1 callersFunctionreset
(seg_tracker)
app.py:35
↓ 1 callersMethodreset
(self)
training/utils/train_utils.py:167
↓ 1 callersMethodreset_state
Remove all input points or mask in all frames throughout the video.
sam2/sam2_video_predictor_npz.py:852
↓ 1 callersMethodreset_state
Remove all input points or mask in all frames throughout the video.
sam2/sam2_video_predictor.py:848
↓ 1 callersMethodreset_state
Remove all input points or mask in all frames throughout the video.
efficient_track_anything/efficienttam_video_predictor_npz.py:688
↓ 1 callersFunctionreshape_for_broadcast
(freqs_cis: torch.Tensor, x: torch.Tensor)
sam2/modeling/position_encoding.py:186
↓ 1 callersFunctionreshape_for_broadcast
(freqs_cis: torch.Tensor, x: torch.Tensor)
efficient_track_anything/modeling/position_encoding.py:204
↓ 1 callersFunctionresize_grayscale_to_rgb_and_resize
Resize a 3D grayscale NumPy array to an RGB image and then resize it. Parameters: array (np.ndarray): Input array of shape (d, h
medsam2_infer_CT_lesion_npz_recist.py:257
↓ 1 callersFunctionresize_grayscale_to_rgb_and_resize
Resize a 3D grayscale NumPy array to an RGB image and then resize it. Parameters: array (np.ndarray): Input array of shape (d, h
eff_medsam2_infer_CT_lesion_npz_recist.py:194
↓ 1 callersFunctionresize_grayscale_to_rgb_and_resize
Resize a 3D grayscale NumPy array to an RGB image and then resize it. Parameters: array (np.ndarray): Input array of shape (d, h
medsam2_infer_3D_CT.py:135
↓ 1 callersFunctionresize_grayscale_to_rgb_and_resize
Resize a 3D grayscale NumPy array to an RGB image and then resize it. Parameters: array (np.ndarray): Input array of shape (d, h
examples/infer_CT_LUNA25.py:106
↓ 1 callersFunctionrgetattr
Like getattr(), but supports dotted notation for nested objects. rattrs is a str of form 'attr1.attr2', returns obj.attr1.attr2
training/optimizer.py:409
↓ 1 callersMethodrun_trainer
(self)
training/train.py:73
↓ 1 callersFunctionsam_click
(session_id, seg_tracker, frame_num, point_mode, click_stack, ann_obj_id, point)
app.py:143
↓ 1 callersFunctionsam_stroke
(session_id, seg_tracker, drawing_board, last_draw, frame_num, ann_obj_id)
app.py:111
↓ 1 callersFunctionsample_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
sam2/modeling/sam2_utils.py:156
↓ 1 callersFunctionsample_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
sam2/modeling/efficienttam_utils.py:156
↓ 1 callersFunctionsample_one_point_from_error_center
Sample 1 random point (along with its label) from the center of each error region, that is, the point with the largest distance to the bounda
sam2/modeling/sam2_utils.py:252
↓ 1 callersFunctionsample_one_point_from_error_center
Sample 1 random point (along with its label) from the center of each error region, that is, the point with the largest distance to the bounda
sam2/modeling/efficienttam_utils.py:252
↓ 1 callersFunctionsample_one_point_from_error_center
Sample 1 random point (along with its label) from the center of each error region, that is, the point with the largest distance to the bounda
efficient_track_anything/modeling/efficienttam_utils.py:252
↓ 1 callersFunctionsample_points_in_bbox_grid
Uniformly sample n grid-aligned (x, y) points inside the bbox. Args: bbox (np.ndarray): [x_min, y_min, x_max, y_max] n (int)
medsam2_infer_CT_lesion_npz_recist.py:153
↓ 1 callersFunctionsample_points_in_bbox_grid
Uniformly sample n grid-aligned (x, y) points inside the bbox. Args: bbox (np.ndarray): [x_min, y_min, x_max, y_max] n (int)
eff_medsam2_infer_CT_lesion_npz_recist.py:218
↓ 1 callersFunctionsample_random_points_from_errors
Sample `num_pt` random points (along with their labels) independently from the error regions. Inputs: - gt_masks: [B, 1, H_im, W_im] mas
sam2/modeling/sam2_utils.py:202
↓ 1 callersFunctionsample_random_points_from_errors
Sample `num_pt` random points (along with their labels) independently from the error regions. Inputs: - gt_masks: [B, 1, H_im, W_im] mas
sam2/modeling/efficienttam_utils.py:202
↓ 1 callersFunctionsample_random_points_from_errors
Sample `num_pt` random points (along with their labels) independently from the error regions. Inputs: - gt_masks: [B, 1, H_im, W_im] mas
efficient_track_anything/modeling/efficienttam_utils.py:202
↓ 1 callersFunctionsave_masks_to_dir
Save masks to a directory as greyscale PNG files.
medsam2_infer_video.py:115
↓ 1 callersFunctionseg_track_app
()
app.py:452
↓ 1 callersFunctionselect_closest_cond_frames
Select up to `max_cond_frame_num` conditioning frames from `cond_frame_outputs` that are temporally closest to the current frame at `frame_id
sam2/modeling/sam2_utils.py:19
↓ 1 callersFunctionselect_closest_cond_frames
Select up to `max_cond_frame_num` conditioning frames from `cond_frame_outputs` that are temporally closest to the current frame at `frame_id
sam2/modeling/efficienttam_utils.py:19
↓ 1 callersFunctionselect_closest_cond_frames
Select up to `max_cond_frame_num` conditioning frames from `cond_frame_outputs` that are temporally closest to the current frame at `frame_id
efficient_track_anything/modeling/efficienttam_utils.py:19
↓ 1 callersFunctionset_default_parameters
Set up the "default" scheduler with the right parameters. Args: scheduler_cgfs: A list of scheduler configs, where each scheduler also
training/optimizer.py:78
↓ 1 callersMethodset_image
Calculates the image embeddings for the provided image, allowing masks to be predicted with the 'predict' method. Arguments:
sam2/sam2_image_predictor.py:88
↓ 1 callersMethodset_image
Calculates the image embeddings for the provided image, allowing masks to be predicted with the 'predict' method. Arguments:
efficient_track_anything/efficienttam_image_predictor.py:92
↓ 1 callersFunctionset_seeds
Set the python random, numpy and torch seed for each gpu. Also set the CUDA seeds if the CUDA is available. This ensures deterministic nature
training/utils/train_utils.py:101
↓ 1 callersFunctionsetup_distributed_backend
Initialize torch.distributed and set the CUDA device. Expects environment variables to be set as per https://pytorch.org/docs/stable/dist
training/utils/train_utils.py:66
↓ 1 callersFunctionsetup_logging
Setup various logging streams: stdout and file handlers. For file handlers, we only setup for the master gpu.
training/utils/logger.py:190
↓ 1 callersFunctionshow_box
show bounding box on the image Parameters ---------- box : numpy.ndarray bounding box coordinates in the original image
medsam2_infer_CT_lesion_npz_recist.py:240
↓ 1 callersFunctionshow_mask
show mask on the image Parameters ---------- mask : numpy.ndarray mask of the image ax : matplotlib.axes.Axes ax
medsam2_infer_CT_lesion_npz_recist.py:216
↓ 1 callersFunctionshow_res_by_slider
(session_id, frame_per, click_stack)
app.py:227
↓ 1 callersFunctionsingle_node_runner
(cfg, main_port: int, node_rank: int = 0, master_addr: str = "localhost")
training/train.py:44
↓ 1 callersFunctionsingle_proc_run
Single GPU process
training/train.py:28
↓ 1 callersMethodstep
(self, where, step, closure=None)
training/optimizer.py:70
↓ 1 callersFunctiontensor_2_PIL
(data: torch.Tensor)
training/dataset/vos_dataset.py:159
↓ 1 callersMethodto_numpy
(self)
efficient_track_anything/utils/amg.py:74
↓ 1 callersMethodtrack_step
( self, frame_idx, is_init_cond_frame, current_vision_feats, current_v
training/model/efficienttam.py:377
↓ 1 callersMethodtrack_step
( self, frame_idx, is_init_cond_frame, current_vision_feats, current_v
training/model/sam2.py:353
↓ 1 callersFunctiontracking_objects
(session_id, seg_tracker, frame_num, input_video)
app.py:267
↓ 1 callersMethodtrain_epoch
(self, train_loader)
training/trainer.py:703
↓ 1 callersMethodtransform_boxes
Expects a tensor of shape Bx4. The coordinates can be in absolute image or normalized coordinates, if the coords are in absolute imag
efficient_track_anything/utils/transforms.py:66
↓ 1 callersMethodtransform_datapoint
(self, datapoint: VideoDatapoint)
training/dataset/transforms.py:384
↓ 1 callersMethodunbind_frame_features
Unbind image features from the model.
sam2/sam2_video_trainer.py:242
↓ 1 callersFunctionuncrop_boxes_xyxy
(boxes: torch.Tensor, crop_box: List[int])
sam2/utils/amg.py:239
↓ 1 callersFunctionuncrop_masks
( masks: torch.Tensor, crop_box: List[int], orig_h: int, orig_w: int )
efficient_track_anything/utils/amg.py:257
↓ 1 callersFunctionuncrop_points
(points: torch.Tensor, crop_box: List[int])
efficient_track_anything/utils/amg.py:248
↓ 1 callersFunctionunix_module_cls_pattern_to_parameter_names
Returns param names which pass the filters specified in filter_module_cls_names. Args: filter_module_cls_names: A list of filter strings
training/optimizer.py:194
↓ 1 callersFunctionunix_param_pattern_to_parameter_names
Returns param names which pass the filters specified in filter_param_names. Args: filter_param_names: A list of unix-style filter strings
training/optimizer.py:227
↓ 1 callersFunctionupdate_current_id
(ann_obj_id)
app.py:336
↓ 1 callersMethodval_epoch
(self, val_loader, phase)
training/trainer.py:583
↓ 1 callersFunctionvalidate_param_group_params
Check that the param groups are non-overlapping and cover all the parameters. Args: param_groups: List of all param groups model:
training/optimizer.py:172
↓ 1 callersFunctionvos_inference
Run inference on a single video with the given predictor.
medsam2_infer_video.py:153
↓ 1 callersFunctionvos_separate_inference_per_object
Run inference on a single video with the given predictor. Unlike `vos_inference`, this function run inference separately for each object
medsam2_infer_video.py:300
↓ 1 callersFunctionwindow_partition
Partition into non-overlapping windows with padding if needed. Args: x (tensor): input tokens with [B, H, W, C]. window_size
efficient_track_anything/modeling/backbones/utils.py:17
↓ 1 callersFunctionwindow_unpartition
Window unpartition into original sequences and removing padding. Args: x (tensor): input tokens with [B * num_windows, window_size, w
efficient_track_anything/modeling/backbones/utils.py:40
↓ 1 callersFunctionwith_check_parameter_frozen
Context manager that inspects a model surrounding a piece of code and verifies if the model has been updated by this piece of code The f
training/utils/checkpoint_utils.py:123
↓ 1 callersMethodzero_grad
(self, *args, **kwargs)
training/optimizer.py:74
↓ 1 callersFunctionzip_folder
(folder_path, output_zip_path)
app.py:260
Method__call__
(self, x)
sam2/utils/transforms.py:37
Method__call__
(self, x)
efficient_track_anything/utils/transforms.py:37
Method__call__
(self)
training/train.py:91
Method__call__
(self, model: nn.Module)
training/optimizer.py:390
Method__call__
(self, *args, **kwargs)
training/optimizer.py:404
Method__call__
Args: state_dict: A dictionary representing the given checkpoint's state dict.
training/utils/checkpoint_utils.py:176
Method__call__
(self, datapoint, **kwargs)
training/dataset/transforms.py:153
Method__call__
(self, datapoint, **kwargs)
training/dataset/transforms.py:170
← previousnext →401–500 of 862, ranked by callers