MCPcopy Create free account

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

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

↓ 3 callersFunction_build_vision_tower
( embed_dim: int, vision_cfg: CLIPVisionCfg, quick_gelu: bool = False, cast_dt
biomedclip_finetuning/open_clip/src/open_clip/model.py:105
↓ 3 callersMethod_global_pool
(self, x: torch.Tensor)
biomedclip_finetuning/open_clip/src/open_clip/transformer.py:598
↓ 3 callersMethod_pe_encoding
Positionally encode points that are normalized to [0,1].
segment-anything/segment_anything/modeling/prompt_encoder.py:185
↓ 3 callersMethod_separate_heads
(self, x: Tensor, num_heads: int)
segment-anything/segment_anything/modeling/transformer.py:208
↓ 3 callersFunction_sytem_assert
(string)
biomedclip_finetuning/open_clip/tests/util_test.py:196
↓ 3 callersFunction_warmup_lr
(base_lr, warmup_length, step)
biomedclip_finetuning/open_clip/src/open_clip_train/scheduler.py:9
↓ 3 callersFunctionaccumulate_cv_results
There are a lot of things that can get fucked up, so the simplest way to deal with potential problems is to collect the cv results into a sep
weak_segmentation/nnunetv2/evaluation/accumulate_cv_results.py:12
↓ 3 callersMethodapply_coords
Expects a numpy array of length 2 in the final dimension. Requires the original image size in (H, W) format.
segment-anything/segment_anything/utils/transforms.py:33
↓ 3 callersFunctionapply_postprocessing_to_folder
If plans_file_or_dict or dataset_json_file_or_dict are None, we will look for them in input_folder
weak_segmentation/nnunetv2/postprocessing/remove_connected_components.py:248
↓ 3 callersFunctionassign_learning_rate
(optimizer, new_lr)
biomedclip_finetuning/open_clip/src/open_clip_train/scheduler.py:4
↓ 3 callersFunctionbuild_params
(input_shards, seed=0)
biomedclip_finetuning/open_clip/tests/test_wds.py:56
↓ 3 callersFunctioncalculate_stability_score
Computes the stability score for a batch of masks. The stability score is the IoU between the binary masks obtained by thresholding th
segment-anything/segment_anything/utils/amg.py:156
↓ 3 callersFunctioncompute_new_shape
(old_shape: Union[Tuple[int, ...], List[int], np.ndarray], old_spacing: Union[Tuple[floa
weak_segmentation/nnunetv2/preprocessing/resampling/default_resampling.py:23
↓ 3 callersMethodconfigure_rotation_dummyDA_mirroring_and_inital_patch_size
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/variants/training_length/nnUNetTrainer_Xepochs_NoMirroring.py:12
↓ 3 callersFunctionconvert_id_to_dataset_name
(dataset_id: int)
weak_segmentation/nnunetv2/utilities/dataset_name_id_conversion.py:42
↓ 3 callersFunctioncount_params
(model)
biomedclip_finetuning/open_clip/src/open_clip_train/profiler.py:125
↓ 3 callersFunctioncreate_lists_from_splitted_dataset_folder
does not rely on dataset.json
weak_segmentation/nnunetv2/utilities/utils.py:32
↓ 3 callersFunctiondetermine_postprocessing
Determines nnUNet postprocessing. Its output is a postprocessing.pkl file in folder_predictions which can be used with apply_postprocessing_t
weak_segmentation/nnunetv2/postprocessing/remove_connected_components.py:53
↓ 3 callersFunctionexpand_urls
(urls, weights=None)
biomedclip_finetuning/open_clip/src/open_clip_train/data.py:74
↓ 3 callersFunctionfind_best_configuration
(dataset_name_or_id, allowed_trained_models: Union[List[dict], Tuple[dict, ...]] =
weak_segmentation/nnunetv2/evaluation/find_best_configuration.py:81
↓ 3 callersFunctionfix_types_iterable
(iterable, output_type)
weak_segmentation/nnunetv2/utilities/json_export.py:39
↓ 3 callersFunctionfreeze_batch_norm_2d
Converts all `BatchNorm2d` and `SyncBatchNorm` layers of provided module into `FrozenBatchNorm2d`. If `module` is itself an instance of eithe
biomedclip_finetuning/open_clip/src/open_clip/utils.py:9
↓ 3 callersMethodgenerate_data_identifier
configurations are unique within each plans file but differnet plans file can have configurations with the same name. In order to dis
weak_segmentation/nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py:521
↓ 3 callersMethodget_dense_pe
Returns the positional encoding used to encode point prompts, applied to a dense set of points the shape of the image encoding.
segment-anything/segment_anything/modeling/prompt_encoder.py:62
↓ 3 callersFunctionget_input_dtype
(precision: str)
biomedclip_finetuning/open_clip/src/open_clip/model.py:96
↓ 3 callersMethodget_logits
(self, image_features, text_features, logit_scale)
biomedclip_finetuning/open_clip/src/open_clip/loss.py:102
↓ 3 callersFunctionget_model_config
Fetch model config from builtin (local library) configs.
biomedclip_finetuning/open_clip/src/open_clip/factory.py:69
↓ 3 callersMethodget_plans_for_configuration
(self, spacing: Union[np.ndarray, Tuple[float, ...], List[float]],
weak_segmentation/nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py:229
↓ 3 callersFunctionget_pool_and_conv_props
this is the same as get_pool_and_conv_props_v2 from old nnunet :param spacing: :param patch_size: :param min_feature_map_size: min e
weak_segmentation/nnunetv2/experiment_planning/experiment_planners/network_topology.py:30
↓ 3 callersFunctionget_tp_fp_fn_tn
net_output must be (b, c, x, y(, z))) gt must be a label map (shape (b, 1, x, y(, z)) OR shape (b, x, y(, z))) or one hot encoding (b, c, x,
weak_segmentation/nnunetv2/training/loss/dice.py:120
↓ 3 callersFunctionget_wds_dataset
(args, preprocess_img, is_train, epoch=0, floor=False, tokenizer=None)
biomedclip_finetuning/open_clip/src/open_clip_train/data.py:328
↓ 3 callersFunctionhas_hf_hub
(necessary=False)
biomedclip_finetuning/open_clip/src/open_clip/pretrained.py:700
↓ 3 callersFunctionimage_transform_v2
( cfg: PreprocessCfg, is_train: bool, aug_cfg: Optional[Union[Dict[str, Any], Augmenta
biomedclip_finetuning/open_clip/src/open_clip/transform.py:393
↓ 3 callersMethodinitialize
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:205
↓ 3 callersMethodlock
lock modules Args: unlocked_groups (int): leave last n layer groups unlocked (default: 0)
biomedclip_finetuning/open_clip/src/open_clip/timm_model.py:111
↓ 3 callersFunctionnormalize
(x)
saliency_maps/scripts/utils.py:12
↓ 3 callersFunctionrandom_seed
(seed=42, rank=0)
biomedclip_finetuning/open_clip/src/open_clip_train/main.py:43
↓ 3 callersMethodread_images
(self, image_fnames: Union[List[str], Tuple[str, ...]])
weak_segmentation/nnunetv2/imageio/nibabel_reader_writer.py:37
↓ 3 callersFunctionrecursive_find_resampling_fn_by_name
(resampling_fn: str)
weak_segmentation/nnunetv2/preprocessing/resampling/utils.py:8
↓ 3 callersFunctionregion_or_label_to_mask
(segmentation: np.ndarray, region_or_label: Union[int, Tuple[int, ...]])
weak_segmentation/nnunetv2/evaluation/evaluate_predictions.py:67
↓ 3 callersFunctionremote_sync
(local_dir, remote_dir, protocol)
biomedclip_finetuning/open_clip/src/open_clip_train/file_utils.py:44
↓ 3 callersMethodreset
(self)
biomedclip_finetuning/open_clip/src/open_clip_train/train.py:29
↓ 3 callersMethodreset_alpha
(self)
saliency_maps/scripts/iba.py:115
↓ 3 callersMethodreset_image
Resets the currently set image.
segment-anything/segment_anything/predictor.py:262
↓ 3 callersMethodrun
(self, src)
biomedclip_finetuning/open_clip/src/open_clip_train/data.py:255
↓ 3 callersMethodrun
(self, overwrite_existing: bool = False)
weak_segmentation/nnunetv2/experiment_planning/dataset_fingerprint/fingerprint_extractor.py:107
↓ 3 callersMethodset_deep_supervision_enabled
This function is specific for the default architecture in nnU-Net. If you change the architecture, there are chances you need to chan
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:781
↓ 3 callersMethodset_grad_checkpointing
(self, enable=True)
biomedclip_finetuning/open_clip/src/open_clip/model.py:263
↓ 3 callersFunctionsummarize
(input_file, output_file, folds: Tuple[int, ...], configs: Tuple[str, ...], datasets, trainers)
weak_segmentation/nnunetv2/batch_running/collect_results_custom_Decathlon.py:43
↓ 3 callersFunctiontext_global_pool
(x, text: Optional[torch.Tensor] = None, pool_type: str = 'argmax')
biomedclip_finetuning/open_clip/src/open_clip/transformer.py:653
↓ 3 callersMethodtranspose_for_scores
(self, x: torch.Tensor)
saliency_maps/model/modeling_biomed_clip.py:177
↓ 3 callersFunctionuncertainty_from_mask_and_valmap
(p_values_map: np.ndarray, mask: np.ndarray , plot: bool = False , image: np.ndarray = None)
weak_segmentation/nnunetv2/nnunet/uncertainty_utils.py:226
↓ 3 callersFunctionvision_heatmap_iba
(text_t, image_t, model, layer_idx, beta, var, lr=1, train_steps=10,ensemble=False, progbar=True)
saliency_maps/scripts/methods.py:53
↓ 3 callersMethodwrite_seg
(self, seg: np.ndarray, output_fname: str, properties: dict)
weak_segmentation/nnunetv2/imageio/tif_reader_writer.py:71
↓ 2 callersFunctionT_test_on_single_image
(class1_array: np.ndarray, class2_array: np.ndarray ,title:str = 'p_values_map' , plot_results: bool = False)
weak_segmentation/nnunetv2/nnunet/uncertainty_utils.py:210
↓ 2 callersMethod__init__
( self, embedding_dim: int, num_heads: int, downsample_rate: int = 1,
segment-anything/segment_anything/modeling/transformer.py:191
↓ 2 callersMethod__init__
(self, features)
saliency_maps/scripts/utils.py:49
↓ 2 callersMethod__init__
(self, inplanes, planes, stride=1)
biomedclip_finetuning/open_clip/src/open_clip/modified_resnet.py:13
↓ 2 callersMethod__init__
(self, use_pooler_output=True)
biomedclip_finetuning/open_clip/src/open_clip/hf_model.py:67
↓ 2 callersMethod__init__
Weights for CE and Dice do not need to sum to one. You can set whatever you want. :param soft_dice_kwargs: :param ce_kwargs:
weak_segmentation/nnunetv2/training/loss/compound_losses.py:9
↓ 2 callersMethod__init__
(self, plans: dict, configuration: str, fold: int, dataset_json: dict, unpack_dataset: bool = True,
weak_segmentation/nnunetv2/training/nnUNetTrainer/variants/sampling/nnUNetTrainer_probabilisticOversampling.py:19
↓ 2 callersMethod__init__
(self, plans: dict, configuration: str, fold: int, dataset_json: dict, unpack_dataset: bool = True,
weak_segmentation/nnunetv2/training/nnUNetTrainer/variants/optimizer/nnUNetTrainerAdan.py:27
↓ 2 callersMethod_check_all_same_array
(input_list)
weak_segmentation/nnunetv2/imageio/base_reader_writer.py:34
↓ 2 callersFunction_convert_openclip_txt
(module: TextTransformer, prefix)
biomedclip_finetuning/open_clip/src/open_clip/convert.py:134
↓ 2 callersFunction_convert_timm_img
(module, prefix)
biomedclip_finetuning/open_clip/src/open_clip/convert.py:39
↓ 2 callersMethod_encode_text
(self, text, normalize: bool = True)
biomedclip_finetuning/open_clip/src/open_clip/coca_model.py:154
↓ 2 callersFunction_expand_token
(token, batch_size: int)
biomedclip_finetuning/open_clip/src/open_clip/transformer.py:315
↓ 2 callersMethod_get_deep_supervision_scales
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:295
↓ 2 callersFunction_get_hf_config
Fetch model config from HuggingFace Hub.
biomedclip_finetuning/open_clip/src/open_clip/factory.py:78
↓ 2 callersFunction_process_batch
(batch_classnames)
biomedclip_finetuning/open_clip/src/open_clip/zero_shot_classifier.py:52
↓ 2 callersFunction_rescan_model_configs
()
biomedclip_finetuning/open_clip/src/open_clip/factory.py:32
↓ 2 callersMethod_set_batch_size_and_oversample
(self)
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:300
↓ 2 callersFunction_token_to_tensor
(token_id, device: str = "cpu")
biomedclip_finetuning/open_clip/src/open_clip/coca_model.py:81
↓ 2 callersMethod_train_bottleneck
(self, text_t: torch.Tensor, image_t: torch.Tensor)
saliency_maps/scripts/iba.py:173
↓ 2 callersMethodapply_boxes_torch
Expects a torch tensor with shape Bx4. Requires the original image size in (H, W) format.
segment-anything/segment_anything/utils/transforms.py:83
↓ 2 callersMethodapply_coords_torch
Expects a torch tensor with length 2 in the last dimension. Requires the original image size in (H, W) format.
segment-anything/segment_anything/utils/transforms.py:67
↓ 2 callersMethodapply_inference_nonlin
logits has to have shape (c, x, y(, z)) where c is the number of classes/regions
weak_segmentation/nnunetv2/utilities/label_handling/label_handling.py:128
↓ 2 callersMethodattention
( self, q_x: torch.Tensor, k_x: Optional[torch.Tensor] = None,
biomedclip_finetuning/open_clip/src/open_clip/transformer.py:239
↓ 2 callersFunctionbackward
(total_loss, scaler)
biomedclip_finetuning/open_clip/src/open_clip_train/train.py:57
↓ 2 callersMethodbackward
(ctx, grad_output)
biomedclip_finetuning/open_clip/src/open_clip/loss.py:332
↓ 2 callersFunctionbatched_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
segment-anything/segment_anything/utils/amg.py:302
↓ 2 callersFunctionbox_xyxy_to_xywh
(box_xyxy: torch.Tensor)
segment-anything/segment_anything/utils/amg.py:91
↓ 2 callersFunctionbroadcast_object
(args, obj, src=0)
biomedclip_finetuning/open_clip/src/open_clip_train/distributed.py:198
↓ 2 callersFunctionbuild_model_from_openai_state_dict
( state_dict: dict, quick_gelu=True, cast_dtype=torch.float16, )
biomedclip_finetuning/open_clip/src/open_clip/model.py:450
↓ 2 callersMethodbuild_network_architecture
his is where you build the architecture according to the plans. There is no obligation to use get_network_from_plans, this is just a
weak_segmentation/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py:268
↓ 2 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
biomedclip_finetuning/open_clip/src/open_clip/tokenizer.py:32
↓ 2 callersMethodcalc_loss
Calculate the combined loss expression for optimization of lambda
saliency_maps/scripts/iba.py:213
↓ 2 callersFunctioncanonicalize_text
Returns canonicalized `text` (lowercase and punctuation removed). From: https://github.com/google-research/big_vision/blob/53f18caf27a9419231bbf0
biomedclip_finetuning/open_clip/src/open_clip/tokenizer.py:104
↓ 2 callersFunctioncollate_outputs
used to collate default train_step and validation_step outputs. If you want something different then you gotta extend this we expect out
weak_segmentation/nnunetv2/utilities/collate_outputs.py:6
↓ 2 callersFunctioncollect_results
(trainers: dict, datasets: List, output_file: str, configurations=("2d", "3d_fullres", "3d
weak_segmentation/nnunetv2/batch_running/collect_results_custom_Decathlon.py:12
↓ 2 callersFunctioncompute_gaussian
(tile_size: Union[Tuple[int, ...], List[int]], sigma_scale: float = 1. / 8, value_scaling
weak_segmentation/nnunetv2/inference/sliding_window_prediction.py:11
↓ 2 callersFunctioncompute_steps_for_sliding_window
(image_size: Tuple[int, ...], tile_size: Tuple[int, ...], tile_step_size: float)
weak_segmentation/nnunetv2/inference/sliding_window_prediction.py:32
↓ 2 callersFunctioncontrastive_loss
(logits: torch.Tensor)
saliency_maps/model/modeling_biomed_clip.py:66
↓ 2 callersFunctionconvert_dataset_name_to_id
(dataset_name: str)
weak_segmentation/nnunetv2/utilities/dataset_name_id_conversion.py:58
↓ 2 callersMethodconvert_logits_to_segmentation
(self, predicted_logits: Union[np.ndarray, torch.Tensor])
weak_segmentation/nnunetv2/utilities/label_handling/label_handling.py:177
↓ 2 callersFunctionconvert_mobile_clip_state_dict
(model: CustomTextCLIP, state_dict, fastvit = True)
biomedclip_finetuning/open_clip/src/open_clip/convert.py:152
↓ 2 callersFunctionconvert_msd_dataset
(source_folder: str, overwrite_target_id: Optional[int] = None, num_processes: int = d
weak_segmentation/nnunetv2/dataset_conversion/convert_MSD_dataset.py:41
↓ 2 callersFunctionconvert_predicted_logits_to_segmentation_with_correct_shape
(predicted_logits: Union[torch.Tensor, np.ndarray],
weak_segmentation/nnunetv2/inference/export_prediction.py:15
↓ 2 callersMethodconvert_probabilities_to_segmentation
assumes that inference_nonlinearity was already applied! predicted_probabilities has to have shape (c, x, y(, z)) where c is the num
weak_segmentation/nnunetv2/utilities/label_handling/label_handling.py:143
↓ 2 callersFunctionconvert_weights_to_lp
Convert applicable model parameters to low-precision (bf16 or fp16)
biomedclip_finetuning/open_clip/src/open_clip/model.py:398
← previousnext →101–200 of 1,090, ranked by callers