MCPcopy Create free account

hub / github.com/black0017/MedicalZooPytorch / functions

Functions419 in github.com/black0017/MedicalZooPytorch

↓ 45 callersFunctionconvBlock
(nin, nout, kernel_size=3, batchNorm=False, layer=nn.Conv3d, bias=True, dropout_rate=0.0, dilation=1)
lib/medzoo/HyperDensenet.py:248
↓ 40 callersFunctioncroppCenter
(tensorToCrop, finalShape)
lib/medzoo/HyperDensenet.py:237
↓ 29 callersFunctionshow_mid_slice
Accepts an 3D numpy array and shows median slices in all three planes :param img_numpy:
lib/visual3D_temp/viz_2d.py:6
↓ 12 callersFunctioncreate_sub_volumes
:param ls: list of modality paths, where the last path is the segmentation map :param dataset_name: which dataset is used :param mode: t
lib/medloaders/medical_loader_utils.py:63
↓ 12 callersFunctionroundup
(x, base=32)
lib/visual3D_temp/viz.py:37
↓ 11 callersMethoddevice
(self)
lib/medzoo/BaseModelClass.py:35
↓ 10 callersMethodtraining
(self)
lib/train/trainer.py:33
↓ 8 callersMethod__init__
(self, in_channels=256, in_dim=(10, 10, 10), out_dim=(2, 64, 64, 64))
lib/medzoo/ResNet3D_VAE.py:184
↓ 7 callersFunctionELUCons
(elu, nchan)
lib/medzoo/Vnet.py:18
↓ 6 callersMethod__init__
(self, elu=True, in_channels=1, classes=4)
lib/medzoo/Vnet.py:133
↓ 6 callersFunctionexpand_as_one_hot
Converts NxDxHxW label image to NxCxDxHxW, where each label gets converted to its corresponding one-hot vector :param input: 4D input image (
lib/losses3D/basic.py:5
↓ 5 callersMethod__init__
(self, in_channels)
lib/medzoo/HighResNet3D.py:31
↓ 5 callersMethod__init__
(self, num_input_features, num_output_channels, drop_rate)
lib/medzoo/Densenet3D.py:13
↓ 5 callersMethod__init__
(self, in_ch, out_ch, bilinear=True)
lib/medzoo/Unet2D.py:50
↓ 5 callersFunctioncheck_path_in_list
Checks a path if exist in the other list
lib/medloaders/miccai_2019_pathology.py:130
↓ 5 callersMethoddisplay_terminal
:param iter: iteration or partial epoch :param epoch: epoch of training :param loss: any loss numpy :param mode: tra
lib/utils/covid_utils.py:69
↓ 5 callersFunctionflatten
Flattens a given tensor such that the channel axis is first. The shapes are transformed as follows: (N, C, D, H, W) -> (C, N * D * H * W)
lib/losses3D/basic.py:68
↓ 5 callersMethodreset
(self)
lib/utils/covid_utils.py:44
↓ 4 callersMethod__init__
(self, num_input_features, growth_rate, bn_size, drop_rate=0.2)
lib/medzoo/DenseVoxelNet.py:27
↓ 4 callersMethod_make_layer
(self, block, planes, blocks, shortcut_type, stride=1, dilation=1)
lib/medzoo/ResNet3DMedNet.py:243
↓ 4 callersFunctionconv1x1x1
(in_planes, out_planes, stride=1)
lib/medzoo/ResNet3DMedNet.py:41
↓ 4 callersFunctionconv3x3x3
(in_planes, out_planes, stride=1, dilation=1, padding=1)
lib/medzoo/ResNet3DMedNet.py:28
↓ 4 callersMethodconv_norm_lrelu
(self, feat_in, feat_out)
lib/medzoo/Unet3D.py:84
↓ 4 callersFunctionelastic_transform_3d
:param img_numpy: 3D medical image modality :param labels: 3D medical image labels :param alpha: scaling factor of gaussian filter :p
lib/augment3D/elastic_deform.py:23
↓ 4 callersMethodflatten
(self, tensor)
lib/losses3D/Dice2D.py:17
↓ 4 callersFunctionget_viz_set
Returns total 3d input volumes (t1 and t2 or more) and segmentation maps 3d total vol shape : torch.Size([1, 144, 192, 256])
lib/medloaders/medical_loader_utils.py:5
↓ 4 callersMethodnorm_lrelu_conv
(self, feat_in, feat_out)
lib/medzoo/Unet3D.py:90
↓ 4 callersMethodnorm_lrelu_upscale_conv_norm_lrelu
(self, feat_in, feat_out)
lib/medzoo/Unet3D.py:101
↓ 4 callersFunctionrandom_rotate3D
Returns a random rotated array in the same shape :param img_numpy: 3D numpy array :param min_angle: in degrees :param max_angle: in d
lib/augment3D/random_rotate.py:5
↓ 4 callersFunctionrandom_shift
(img_numpy, max_percentage=0.2)
lib/augment3D/random_shift.py:10
↓ 4 callersFunctionrandom_zoom
:param img_numpy: :param min_percentage: :param max_percentage: :return: zoom in/out aigmented img
lib/augment3D/random_rescale.py:5
↓ 4 callersMethodupdate_scores
:param iter: iteration or partial epoch :param loss: any loss torch.tensor.item() :param channel_score: per channel score or
lib/visual3D_temp/BaseWriter.py:91
↓ 3 callersMethod__init__
(self, in_planes, planes, stride=1, dilation=1, downsample=None)
lib/medzoo/ResNet3DMedNet.py:61
↓ 3 callersMethod__init__
(self, num_input_features, growth_rate, bn_size, drop_rate)
lib/medzoo/SkipDenseNet3D.py:16
↓ 3 callersFunctionconv
(nin, nout, kernel_size=3, stride=1, padding=1, bias=False, layer=nn.Conv2d, BN=False, ws=False, acti
lib/medzoo/HyperDensenet.py:11
↓ 3 callersFunctioncreate_2d_views
Comparative 2d vizualization of median slices: axial, saggital and transpose. Save to png file and to tensorboard :param predictions:
lib/visual3D_temp/viz_2d.py:42
↓ 3 callersMethodcreate_dil2
(self, in_channels)
lib/medzoo/HighResNet3D.py:149
↓ 3 callersMethodcreate_dil4
(self, in_channels)
lib/medzoo/HighResNet3D.py:154
↓ 3 callersMethodcreate_red
(self, in_channels)
lib/medzoo/HighResNet3D.py:144
↓ 3 callersFunctiondisplay_status_4_classes
(epoch, train_loss, dice_avg_coeff, avg_air, avg_csf, avg_gm, avg_wm, partial_epo
lib/train/train_old.py:89
↓ 3 callersFunctionfix_seg_map
(segmentation_map, dataset="iseg2017")
lib/medloaders/medical_loader_utils.py:33
↓ 3 callersFunctionprepare_input
(input_tuple, inModalities=-1, inChannels=-1, cuda=False, args=None)
lib/utils/general.py:42
↓ 3 callersFunctionrandom_crop_to_labels
Random center crop near the label area
lib/augment3D/random_crop.py:4
↓ 3 callersFunctionrandom_flip
(img_numpy, label=None, axis_for_flip=0)
lib/augment3D/random_flip.py:6
↓ 3 callersFunctionsave_3d_vol
(predictions, affine, save_path)
lib/visual3D_temp/viz.py:211
↓ 3 callersMethodtrain
Full training logic
lib/train/BaseTrainer.py:60
↓ 2 callersMethod__init__
(self, classes, model='resnet18')
lib/medzoo/COVIDNet.py:177
↓ 2 callersMethod__init__
(self, nin, nout, bias=False, BN=False, ws=False, activ=nn.LeakyReLU(0.2))
lib/medzoo/HyperDensenet.py:31
↓ 2 callersFunction_make_nConv
(nchan, depth, elu)
lib/medzoo/Vnet.py:38
↓ 2 callersFunctionaccuracy
(output, target)
lib/utils/covid_utils.py:4
↓ 2 callersFunctionclip_range
Cut off outliers that are related to detected black in the image (the air area)
lib/medloaders/medical_image_process.py:177
↓ 2 callersFunctionconv_block
(in_dim, out_dim, act_fn, kernel_size=3, stride=1, padding=1, dilation=1)
lib/medzoo/HyperDensenet.py:65
↓ 2 callersFunctioncreate_3d_subvol
(full_volume, dim)
lib/visual3D_temp/viz.py:149
↓ 2 callersMethoddisplay_terminal
:param iter: iteration or partial epoch :param epoch: epoch of training :param loss: any loss numpy :param mode: tra
lib/visual3D_temp/BaseWriter.py:46
↓ 2 callersFunctionfind_crop_dims
(full_size, mini_dim, adjust_dimension=2)
lib/visual3D_temp/viz.py:175
↓ 2 callersFunctionflip_axis
(img_numpy, axis)
lib/augment3D/random_flip.py:20
↓ 2 callersFunctiongenerate_padded_subvolumes
(full_volume, kernel_dim=(32, 32, 32))
lib/medloaders/medical_loader_utils.py:179
↓ 2 callersMethodinference
(self, input_tensor)
lib/medzoo/BaseModelClass.py:129
↓ 2 callersFunctionload_medical_image
(path, type=None, resample=None, viz3d=False, to_canonical=False, rescale=None, normali
lib/medloaders/medical_image_process.py:13
↓ 2 callersFunctionnormalize_intensity
Accepts an image tensor and normalizes it :param normalization: choices = "max", "mean" , type=str
lib/medloaders/medical_image_process.py:143
↓ 2 callersFunctionread_filepaths
(file)
lib/medloaders/COVIDxdataset.py:55
↓ 2 callersFunctionrescale_data_volume
Resize the 3d numpy array to the dim size :param out_dim is the new 3d tuple
lib/medloaders/medical_image_process.py:115
↓ 2 callersMethodreset
(self, mode)
lib/visual3D_temp/BaseWriter.py:84
↓ 2 callersFunctionsave_checkpoint
(state, is_best, path, prefix, filename='checkpoint.pth.tar')
lib/utils/save_old.py:10
↓ 2 callersMethodshortcut_pad
(self, x, desired_channels)
lib/medzoo/HighResNet3D.py:130
↓ 2 callersMethodupdate
(self, key, value, n=1, writer_step=1)
lib/utils/covid_utils.py:48
↓ 2 callersMethodupdate_all_metrics
(self, iteration, values_dict, n=1, writer_step=1)
lib/utils/covid_utils.py:53
↓ 2 callersMethodwrite_end_of_epoch
(self, epoch)
lib/visual3D_temp/BaseWriter.py:113
↓ 1 callersMethodISEG2017
(self)
tests/test_dataloaders.py:29
↓ 1 callersMethodMRBRAINS_4_class
(self)
tests/test_dataloaders.py:17
↓ 1 callersMethodMRBRAINS_9_class
(self)
tests/test_dataloaders.py:23
↓ 1 callersFunctionTEST_the_writer
()
tests/test_basewriter.py:40
↓ 1 callersMethod__init__
(self, loss, ignore_index)
lib/losses3D/__init__.py:85
↓ 1 callersMethod_class_weights
(input)
lib/losses3D/weight_cross_entropy.py:19
↓ 1 callersMethod_compute_cluster_means
(self, input, target)
lib/losses3D/ContrastiveLoss.py:22
↓ 1 callersMethod_compute_distance_term
(self, cluster_means, C)
lib/losses3D/ContrastiveLoss.py:61
↓ 1 callersMethod_compute_regularizer_term
(self, cluster_means, C)
lib/losses3D/ContrastiveLoss.py:90
↓ 1 callersMethod_compute_variance_term
(self, cluster_means, embeddings_per_instance, target)
lib/losses3D/ContrastiveLoss.py:46
↓ 1 callersMethod_prepare_device
setup GPU device if available, move model into configured device
lib/train/BaseTrainer.py:104
↓ 1 callersMethod_train_epoch
Training logic for an epoch :param epoch: Current epoch number
lib/train/BaseTrainer.py:52
↓ 1 callersMethodbrats2018
(self)
tests/test_dataloaders.py:38
↓ 1 callersFunctioncompute_per_channel_dice
Computes DiceCoefficient as defined in https://arxiv.org/abs/1606.04797 given a multi channel input and target. Assumes the input is a norma
lib/losses3D/basic.py:39
↓ 1 callersMethodcompute_per_channel_dice
(self, input, target)
lib/losses3D/Dice2D.py:35
↓ 1 callersMethodcreate_data_structure
(self, )
lib/visual3D_temp/BaseWriter.py:35
↓ 1 callersMethodcreate_input_data
(self)
lib/medloaders/ixi_t1_t2.py:69
↓ 1 callersFunctioncreate_loss
(name, weight=None, ignore_index=None, pos_weight=None)
lib/losses3D/__init__.py:24
↓ 1 callersMethodcreate_stats_files
(self, path)
lib/visual3D_temp/BaseWriter.py:79
↓ 1 callersFunctioncrop_img
(img_tensor, crop_size, crop)
lib/medloaders/medical_image_process.py:66
↓ 1 callersFunctiondatestr
()
lib/utils/general.py:30
↓ 1 callersMethoddice
(self, input, target, weight)
lib/losses3D/dice.py:17
↓ 1 callersMethoddice
(self, input, target, weight)
lib/losses3D/BaseClass.py:30
↓ 1 callersMethoddilation2
(self, x_red_3, x_red_2)
lib/medzoo/HighResNet3D.py:166
↓ 1 callersMethoddilation4
(self, x_dil2_3, x_dil2_2)
lib/medzoo/HighResNet3D.py:176
↓ 1 callersFunctionexpand_as_one_hot
(target, classes)
lib/visual3D_temp/conf_matrix.py:75
↓ 1 callersMethodexpand_as_one_hot
Converts label image to CxHxW, where each label gets converted to its corresponding one-hot vector :param target is of shape
lib/losses3D/Dice2D.py:20
↓ 1 callersFunctionfind_non_zero_labels_mask
(segmentation_map, th_percent, crop_size, crop)
lib/medloaders/medical_loader_utils.py:235
↓ 1 callersFunctionfind_padding
Dynamically computes padding to keep input conv size equal to the output for stride = 1 :return:
lib/medzoo/ResNet3DMedNet.py:49
↓ 1 callersFunctionfind_random_crop_dim
(full_vol_dim, crop_size)
lib/medloaders/medical_loader_utils.py:203
↓ 1 callersMethodforward
(self, x)
lib/medzoo/Unet3D.py:111
↓ 1 callersMethodforward
(self, x)
lib/medzoo/ResNet3DMedNet.py:267
next →1–100 of 419, ranked by callers