MCPcopy Create free account

hub / github.com/HealthX-Lab/MedCLIP-SAMv2 / functions

Functions1,090 in github.com/HealthX-Lab/MedCLIP-SAMv2

↓ 2 callersFunctioncreate_model
Creates and configures a contrastive vision-language model. Args: model_name: Name of the model architecture to create. Can be a local mo
biomedclip_finetuning/open_clip/src/open_clip/factory.py:208
↓ 2 callersFunctioncreate_model_and_transforms
( model_name: str, pretrained: Optional[str] = None, precision: str = 'fp32',
biomedclip_finetuning/open_clip/src/open_clip/factory.py:460
↓ 2 callersFunctioncreate_model_from_pretrained
( model_name: str, pretrained: Optional[str] = None, precision: str = 'fp32',
biomedclip_finetuning/open_clip/src/open_clip/factory.py:524
↓ 2 callersFunctioncrop_len
(orig_len, n_crops, overlap)
segment-anything/segment_anything/utils/amg.py:214
↓ 2 callersFunctioncrop_to_nonzero
:param data: :param seg: :param nonzero_label: this will be written into the segmentation map :return:
weak_segmentation/nnunetv2/preprocessing/cropping/cropping.py:24
↓ 2 callersMethoddetermine_fullres_target_spacing
per default we use the 50th percentile=median for the target spacing. Higher spacing results in smaller data and thus faster and easi
weak_segmentation/nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py:156
↓ 2 callersFunctiondetermine_reader_writer_from_file_ending
(file_ending: str, example_file: str = None, allow_nonmatching_filename: bool = False,
weak_segmentation/nnunetv2/imageio/reader_writer_registry.py:41
↓ 2 callersMethoddist_loss
(self, teacher_logits, student_logits)
biomedclip_finetuning/open_clip/src/open_clip/loss.py:233
↓ 2 callersMethoddo_split
The default split is a 5 fold CV on all available training cases. nnU-Net will create a split (it is seeded, so always the same) and
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:506
↓ 2 callersFunctiondumb_trainer_config_plans_to_trained_models_dict
function is called dumb because it's dumb
weak_segmentation/nnunetv2/evaluation/find_best_configuration.py:257
↓ 2 callersMethodencode_image
(self, image, normalize: bool = False)
biomedclip_finetuning/open_clip/src/open_clip/model.py:358
↓ 2 callersMethodencode_text
(self, text, normalize: bool = False)
biomedclip_finetuning/open_clip/src/open_clip/model.py:362
↓ 2 callersFunctionensemble_folders
we need too much shit for this function. Problem is that we now have to support region-based training plus multiple input/output formats so there
weak_segmentation/nnunetv2/ensembling/ensemble.py:49
↓ 2 callersFunctionevaluate
(model, data, epoch, args, tb_writer=None, tokenizer=None)
biomedclip_finetuning/open_clip/src/open_clip_train/train.py:251
↓ 2 callersFunctionexport_pretrained_model
(dataset_name_or_id: Union[int, str], output_file: str, configurations: Tuple[str]
weak_segmentation/nnunetv2/model_sharing/model_export.py:6
↓ 2 callersFunctionextract_bert_layer
(model, layer_idx)
saliency_maps/scripts/methods.py:26
↓ 2 callersFunctionextract_fingerprints
clean = False will not actually run this. This is just a switch for use with nnUNetv2_plan_and_preprocess where we don't want to rerun finger
weak_segmentation/nnunetv2/experiment_planning/plan_and_preprocess_api.py:35
↓ 2 callersMethodfilter_background
(classes_or_regions: Union[List[int], List[Union[int, Tuple[int, ...]]]])
weak_segmentation/nnunetv2/utilities/label_handling/label_handling.py:209
↓ 2 callersFunctionfind_candidate_datasets
(dataset_id: int)
weak_segmentation/nnunetv2/utilities/dataset_name_id_conversion.py:21
↓ 2 callersMethodforward_with_coords
Positionally encode points that are not normalized to [0,1].
segment-anything/segment_anything/modeling/prompt_encoder.py:207
↓ 2 callersFunctiongenerate_overlay
image can be 2d greyscale or 2d RGB (color channel in last dimension!) Segmentation must be label map of same shape as image (w/o color chan
weak_segmentation/nnunetv2/utilities/overlay_plots.py:52
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
biomedclip_finetuning/open_clip/src/open_clip/pos_embed.py:49
↓ 2 callersMethodget_bbox
(self, data_shape: np.ndarray, force_fg: bool, class_locations: Union[dict, None], overwrite_
weak_segmentation/nnunetv2/training/dataloading/base_data_loader.py:64
↓ 2 callersFunctionget_case_identifiers
finds all npz files in the given folder and reconstructs the training case names from them
weak_segmentation/nnunetv2/training/dataloading/utils.py:39
↓ 2 callersFunctionget_cast_dtype
(precision: str)
biomedclip_finetuning/open_clip/src/open_clip/model.py:87
↓ 2 callersMethodget_cast_dtype
(self)
biomedclip_finetuning/open_clip/src/open_clip/transformer.py:350
↓ 2 callersFunctionget_clean_fn
(type: str)
biomedclip_finetuning/open_clip/src/open_clip/tokenizer.py:93
↓ 2 callersFunctionget_compression_estimator
(var, layer, features)
saliency_maps/scripts/methods.py:37
↓ 2 callersMethodget_data_iterator_from_raw_npy_data
(self, image_or_list_of_images: Union[np.ndarray, List[np.ndarray]
weak_segmentation/nnunetv2/inference/predict_from_raw_data.py:274
↓ 2 callersFunctionget_dataloader
(input_shards)
biomedclip_finetuning/open_clip/tests/test_wds.py:73
↓ 2 callersFunctionget_dataset_fn
(data_path, dataset_type)
biomedclip_finetuning/open_clip/src/open_clip_train/data.py:526
↓ 2 callersFunctionget_dataset_size
(shards)
biomedclip_finetuning/open_clip/src/open_clip_train/data.py:96
↓ 2 callersFunctionget_ensemble_name
(model1_folder, model2_folder, folds: Tuple[int, ...])
weak_segmentation/nnunetv2/utilities/file_path_utilities.py:60
↓ 2 callersMethodget_ground_truth
(self, device, num_logits)
biomedclip_finetuning/open_clip/src/open_clip/loss.py:89
↓ 2 callersFunctionget_imagenet
(args, preprocess_fns, split)
biomedclip_finetuning/open_clip/src/open_clip_train/data.py:118
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
biomedclip_finetuning/open_clip/src/open_clip/tokenizer.py:54
↓ 2 callersFunctionget_patch_size
(final_patch_size, rot_x, rot_y, rot_z, scale_range)
weak_segmentation/nnunetv2/training/data_augmentation/compute_initial_patch_size.py:4
↓ 2 callersFunctionget_pretrained_cfg
(model: str, tag: str)
biomedclip_finetuning/open_clip/src/open_clip/pretrained.py:642
↓ 2 callersFunctionget_pretrained_url
(model: str, tag: str)
biomedclip_finetuning/open_clip/src/open_clip/pretrained.py:649
↓ 2 callersFunctionget_rel_pos
Get relative positional embeddings according to the relative positions of query and key sizes. Args: q_size (int): size o
segment-anything/segment_anything/modeling/image_encoder.py:292
↓ 2 callersMethodget_tr_and_val_datasets
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:570
↓ 2 callersFunctionget_trainer_from_args
(dataset_name_or_id: Union[int, str], configuration: str,
weak_segmentation/nnunetv2/run/run_training.py:31
↓ 2 callersMethodget_value
(self)
biomedclip_finetuning/open_clip/src/open_clip_train/data.py:57
↓ 2 callersFunctioninstall_model_from_zip_file
(zip_file: str)
weak_segmentation/nnunetv2/model_sharing/model_import.py:6
↓ 2 callersFunctionkey_to_label_or_region
(key: str)
weak_segmentation/nnunetv2/evaluation/evaluate_predictions.py:24
↓ 2 callersFunctionload_checkpoint
( model: Union[CLIP, CustomTextCLIP], checkpoint_path: str, strict: bool = True,
biomedclip_finetuning/open_clip/src/open_clip/factory.py:169
↓ 2 callersFunctionmask_to_rle_pytorch
Encodes masks to an uncompressed RLE, in the format expected by pycoco tools.
segment-anything/segment_anything/utils/amg.py:107
↓ 2 callersFunctionmaybe_load_checkpoint
(nnunet_trainer: nnUNetTrainer, continue_training: bool, validation_only: bool, pret
weak_segmentation/nnunetv2/run/run_training.py:77
↓ 2 callersFunctionmerge_preprocess_kwargs
(base: PreprocessCfg, **kwargs)
biomedclip_finetuning/open_clip/src/open_clip/transform.py:57
↓ 2 callersFunctionmove_plans_between_datasets
( source_dataset_name_or_id: Union[int, str], target_dataset_name_or_id: Union[int, str],
weak_segmentation/nnunetv2/experiment_planning/plans_for_pretraining/move_plans_between_datasets.py:11
↓ 2 callersFunctionneighbour_exchange_with_grad
(from_rank, to_rank, tensor, group=None)
biomedclip_finetuning/open_clip/src/open_clip/loss.py:336
↓ 2 callersMethodon_epoch_end
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:1009
↓ 2 callersMethodon_epoch_start
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:1006
↓ 2 callersMethodon_train_epoch_end
(self, train_outputs: List[dict])
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:894
↓ 2 callersMethodon_train_epoch_start
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:852
↓ 2 callersMethodon_train_start
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:791
↓ 2 callersMethodon_validation_epoch_end
(self, val_outputs: List[dict])
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:972
↓ 2 callersMethodon_validation_epoch_start
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:906
↓ 2 callersFunctionparse_args
(args)
biomedclip_finetuning/open_clip/src/open_clip_train/params.py:26
↓ 2 callersMethodperform_actual_validation
(self, save_probabilities: bool = False)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:1127
↓ 2 callersMethodplan_experiment
MOVE EVERYTHING INTO THE PLANS. MAXIMUM FLEXIBILITY Ideally I would like to move transpose_forward/backward into the configurations
weak_segmentation/nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py:371
↓ 2 callersFunctionplan_experiments
overwrite_target_spacing ONLY applies to 3d_fullres and 3d_cascade fullres!
weak_segmentation/nnunetv2/experiment_planning/plan_and_preprocess_api.py:71
↓ 2 callersMethodpostprocess_masks
Remove padding and upscale masks to the original image size. Arguments: masks (torch.Tensor): Batched masks from the m
segment-anything/segment_anything/modeling/sam.py:133
↓ 2 callersMethodpredict_logits_from_preprocessed_data
IMPORTANT! IF YOU ARE RUNNING THE CASCADE, THE SEGMENTATION FROM THE PREVIOUS STAGE MUST ALREADY BE STACKED ON TOP OF THE IMAGE AS ON
weak_segmentation/nnunetv2/inference/predict_from_raw_data.py:448
↓ 2 callersMethodpredict_masks
Predicts masks. See 'forward' for more details.
segment-anything/segment_anything/modeling/mask_decoder.py:112
↓ 2 callersMethodpredict_single_npy_array
image_properties must only have a 'spacing' key!
weak_segmentation/nnunetv2/inference/predict_from_raw_data.py:411
↓ 2 callersMethodpreprocess
Normalize pixel values and pad to a square input.
segment-anything/segment_anything/modeling/sam.py:164
↓ 2 callersFunctionpytorch_worker_seed
get dataloader worker seed from pytorch
biomedclip_finetuning/open_clip/src/open_clip_train/data.py:222
↓ 2 callersMethodread_images
(self, image_fnames: Union[List[str], Tuple[str, ...]])
weak_segmentation/nnunetv2/imageio/natural_image_reager_writer.py:36
↓ 2 callersMethodread_seg
(self, seg_fname: str)
weak_segmentation/nnunetv2/imageio/nibabel_reader_writer.py:90
↓ 2 callersFunctionrecursive_find_reader_writer_by_name
(rw_class_name: str)
weak_segmentation/nnunetv2/imageio/reader_writer_registry.py:73
↓ 2 callersFunctionremove_small_regions
Removes small disconnected regions and holes in a mask. Returns the mask and an indicator of if the mask has been modified.
segment-anything/segment_anything/utils/amg.py:266
↓ 2 callersFunctionresample_data_or_seg
separate_z=True will resample with order 0 along z :param data: :param new_shape: :param is_seg: :param axis: :param order:
weak_segmentation/nnunetv2/preprocessing/resampling/default_resampling.py:125
↓ 2 callersMethodresampling_fn_probabilities
(self)
weak_segmentation/nnunetv2/utilities/plans_handling/plans_handler.py:139
↓ 2 callersFunctionrle_to_mask
Compute a binary mask from an uncompressed RLE.
segment-anything/segment_anything/utils/amg.py:138
↓ 2 callersFunctionrun
(model, classifier, dataloader, args)
biomedclip_finetuning/open_clip/src/open_clip_train/zero_shot.py:17
↓ 2 callersMethodrun_training
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:1256
↓ 2 callersMethodsave_pretrained
(self, dest)
biomedclip_finetuning/open_clip/src/open_clip/tokenizer.py:427
↓ 2 callersFunctionsave_tar
(idx, num_samples)
biomedclip_finetuning/open_clip/tests/test_wds.py:24
↓ 2 callersFunctionselect_slice_to_plot2
image and segmentation are expected to be 3D (or 1, x, y) selects the slice with the largest amount of fg (how much percent of each class ar
weak_segmentation/nnunetv2/utilities/overlay_plots.py:110
↓ 2 callersMethodset_image
Calculates the image embeddings for the provided image, allowing masks to be predicted with the 'predict' method. Argume
segment-anything/segment_anything/predictor.py:34
↓ 2 callersFunctionsigmoid
(x)
postprocessing/postprocess_saliency_maps.py:11
↓ 2 callersMethodstatic_estimate_VRAM_usage
Works for PlainConvUNet, ResidualEncoderUNet
weak_segmentation/nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py:88
↓ 2 callersFunctionsummarize
(input_file, output_file, folds: Tuple[int, ...], configs: Tuple[str, ...], datasets, trainers)
weak_segmentation/nnunetv2/batch_running/release_trainings/nnunetv2_v1/collect_results.py:43
↓ 2 callersMethodtrain_step
(self, batch: dict)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:862
↓ 2 callersFunctionuncrop_boxes_xyxy
(boxes: torch.Tensor, crop_box: List[int])
segment-anything/segment_anything/utils/amg.py:236
↓ 2 callersFunctionunpack_dataset
all npz files in this folder belong to the dataset, unpack them all
weak_segmentation/nnunetv2/training/dataloading/utils.py:26
↓ 2 callersFunctionverify_dataset_integrity
folder needs the imagesTr, imagesTs and labelsTr subfolders. There also needs to be a dataset.json checks if the expected number of training
weak_segmentation/nnunetv2/experiment_planning/verify_dataset_integrity.py:123
↓ 2 callersFunctionwhitespace_clean
(text)
biomedclip_finetuning/open_clip/src/open_clip/tokenizer.py:72
↓ 2 callersFunctionworld_info_from_env
()
biomedclip_finetuning/open_clip/src/open_clip_train/distributed.py:73
↓ 2 callersMethodwrite_seg
(self, seg: np.ndarray, output_fname: str, properties: dict)
weak_segmentation/nnunetv2/imageio/nibabel_reader_writer.py:93
↓ 1 callersMethod__init__
( self, input_dim: int, hidden_dim: int, output_dim: int, num_lay
segment-anything/segment_anything/modeling/mask_decoder.py:155
↓ 1 callersMethod__init__
( self, embedding_dim: int, mlp_dim: int, act: Type[nn.Module] = nn.GELU,
segment-anything/segment_anything/modeling/common.py:14
↓ 1 callersMethod__init__
Encodes prompts for input to SAM's mask decoder. Arguments: embed_dim (int): The prompts' embedding dimension
segment-anything/segment_anything/modeling/prompt_encoder.py:17
↓ 1 callersMethod__init__
( self, text_config=None, text_projection_config=None, vision_config=None, projection_dim=512, logit_s
saliency_maps/model/configuration_biomed_clip.py:41
↓ 1 callersMethod__init__
(self, layer)
saliency_maps/scripts/iba.py:17
↓ 1 callersMethod__init__
(self, p=0.2)
biomedclip_finetuning/open_clip/src/open_clip/transform.py:262
↓ 1 callersMethod__init__
( self, embed_dim: int, vision_cfg: CLIPVisionCfg, text_cfg: C
biomedclip_finetuning/open_clip/src/open_clip/model.py:225
↓ 1 callersMethod__init__
(self, input_filename, transforms, img_key, caption_key, sep="\t", tokenizer=None)
biomedclip_finetuning/open_clip/src/open_clip_train/data.py:30
↓ 1 callersMethod__init__
(self, list_of_lists: List[List[str]], list_of_segs_from_prev_stage_files: Union[None, List[s
weak_segmentation/nnunetv2/inference/data_iterators.py:120
← previousnext →201–300 of 1,090, ranked by callers