MCPcopy Create free account

hub / github.com/HSG-AIML/MaskedSST / functions

Functions198 in github.com/HSG-AIML/MaskedSST

↓ 19 callersFunctionopen_file
(dataset)
DeepHyperX/utils.py:30
↓ 14 callersMethod__init__
(self, axis)
src/vit_spatial_spectral.py:804
↓ 11 callersMethod__init__
(self, input_channels, n_classes, kernel_size=None, pool_size=None)
DeepHyperX/models.py:265
↓ 6 callersMethod__init__
(self)
src/data_enmap.py:518
↓ 6 callersFunctionpair
(t)
src/vit_spatial_spectral.py:15
↓ 5 callersFunctionconvert_to_color
(x)
DeepHyperX/main.py:262
↓ 5 callersFunctionsave_model
(model, model_name, dataset_name, **kwargs)
DeepHyperX/models.py:1137
↓ 4 callersMethod__init__
( self, *, image_size, patch_size, num_classes, dim, d
src/vit_original.py:104
↓ 4 callersFunctionbuild_dataset
Create a list of training samples based on an image and a mask. Args: mat: 3D hyperspectral matrix to extract the spectrums from
DeepHyperX/utils.py:178
↓ 4 callersFunctionget_model
Instantiate and obtain a model with adequate hyperparameters Args: name: string of the model name kwargs: hyperparameters
DeepHyperX/models.py:20
↓ 4 callersMethodtransformer_forward
(self, x)
src/vit_spatial_spectral.py:495
↓ 3 callersFunctiondisplay_predictions
(pred, vis, gt=None, caption="")
DeepHyperX/utils.py:90
↓ 3 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)
src/pos_embed.py:45
↓ 3 callersMethodload_img
(self, path)
src/data_enmap.py:241
↓ 2 callersMethod__init__
( self, *, encoder, masking_ratio=0.5, )
src/vit_simmim_original.py:44
↓ 2 callersMethod__init__
if fix_train_patches: fix patches that will be used for training during initialization if False, patches will be drawn randomly from the train
src/data_houston2018.py:99
↓ 2 callersMethodbool_mask_to_indices
(self, masked_bool_mask, batch, num_masked, device)
src/vit_simmim_original.py:372
↓ 2 callersFunctionconvert_from_color_
Convert an RGB-encoded image to grayscale labels. Args: arr_3d: int 2D image of color-coded labels on 3 channels palette: dict of
DeepHyperX/utils.py:67
↓ 2 callersFunctionconvert_to_color_
Convert an array of labels to RGB color-encoded image. Args: arr_2d: int 2D array of labels palette: dict of colors used (label n
DeepHyperX/utils.py:45
↓ 2 callersMethodembed
(self, patches)
src/vit_spatial_spectral.py:210
↓ 2 callersFunctionget_dataset
Gets the dataset specified by name and return the related components. Args: dataset_name: string with the name of the dataset targ
DeepHyperX/datasets.py:99
↓ 2 callersFunctionget_device
(ordinal)
DeepHyperX/utils.py:16
↓ 2 callersMethodget_pos_embeddings
(self)
src/vit_spatial_spectral.py:501
↓ 2 callersFunctionget_spectral_pos_embedding
(dataset, n_bands, band_patch_size)
src/utils.py:415
↓ 2 callersFunctionget_supervised_data
(config, device)
src/utils.py:138
↓ 2 callersFunctionget_val_epochs
fix the number of validation runs training will last for `epochs` or `max_steps`, whatever takes longer for small data_fraction and fixed batc
src/utils.py:432
↓ 2 callersFunctionload_checkpoint
(config, model, classifier_name, device)
src/utils.py:276
↓ 2 callersMethodload_label
(self, path)
src/data_enmap.py:251
↓ 2 callersFunctionmerge_products
merge adjacent rasterio datasets into a single combined tile
enmap_data/create_enmap_dfc_dataset.py:44
↓ 2 callersFunctionpair
(t)
src/vit_original.py:11
↓ 2 callersFunctionsample_gt
Extract a fixed percentage of samples from an array of labels. Args: gt: a 2D array of int labels percentage: [0, 1] float Re
DeepHyperX/utils.py:443
↓ 2 callersFunctionshow_results
(results, vis, label_values=None, agregated=False)
DeepHyperX/utils.py:388
↓ 2 callersFunctionsliding_window
Sliding window generator over an input image. Args: image: 2D+ image to slide the window on, e.g. RGB or hyperspectral step: int
DeepHyperX/utils.py:252
↓ 2 callersFunctiontest
Test a model on a specific image
DeepHyperX/models.py:1157
↓ 2 callersFunctiontrain_step
(img, label, model, config, device, criterion, optimizer, acc_criterion)
src/utils.py:608
↓ 1 callersMethod_get_final_flattened_size
(self)
DeepHyperX/models.py:259
↓ 1 callersMethod_get_final_flattened_size
(self)
DeepHyperX/models.py:361
↓ 1 callersMethod_get_final_flattened_size
(self)
DeepHyperX/models.py:507
↓ 1 callersMethod_get_final_flattened_size
(self)
DeepHyperX/models.py:570
↓ 1 callersMethod_get_final_flattened_size
(self)
DeepHyperX/models.py:629
↓ 1 callersMethod_get_final_flattened_size
(self)
DeepHyperX/models.py:707
↓ 1 callersMethod_get_final_flattened_size
(self)
DeepHyperX/models.py:773
↓ 1 callersMethod_get_sizes
(self)
DeepHyperX/models.py:851
↓ 1 callersMethod_get_sizes
(self)
DeepHyperX/models.py:944
↓ 1 callersMethod_getitem_from_list
(self, idx)
src/data_enmap.py:286
↓ 1 callersFunctioncamel_to_snake
(name)
DeepHyperX/utils.py:541
↓ 1 callersFunctioncompute_imf_weights
Compute inverse median frequency weights for class balancing. For each class i, it computes its frequency f_i, i.e the ratio between the num
DeepHyperX/utils.py:507
↓ 1 callersFunctionconvert_to_color
(x)
DeepHyperX/inference.py:139
↓ 1 callersFunctioncount_sliding_window
Count the number of windows in an image. Args: image: 2D+ image to slide the window on, e.g. RGB or hyperspectral, ... step: int
DeepHyperX/utils.py:299
↓ 1 callersFunctiondfc2018_loader
(folder)
DeepHyperX/custom_datasets.py:14
↓ 1 callersFunctiondisplay_dataset
Display the specified dataset. Args: img: 3D hyperspectral image gt: 2D array labels bands: tuple of RGB bands to select
DeepHyperX/utils.py:100
↓ 1 callersFunctiondownsample
downsample by keeping most frequent value in factorxfactor window
enmap_data/create_enmap_dfc_dataset.py:25
↓ 1 callersFunctionexplore_spectrums
Plot sampled spectrums with mean + std for each class. Args: img: 3D hyperspectral image complete_gt: 2D array of labels
DeepHyperX/utils.py:123
↓ 1 callersMethodflip
(*arrays)
DeepHyperX/datasets.py:369
↓ 1 callersMethodforward_features
(self, img)
src/vit_spatial_spectral.py:518
↓ 1 callersMethodforward_features
(self, img)
src/vit_spatial_spectral.py:734
↓ 1 callersFunctionget_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [1+grid_size*grid_size, embed_dim] (w/
src/pos_embed.py:16
↓ 1 callersFunctionget_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
src/pos_embed.py:34
↓ 1 callersMethodget_batch
(self, batch_size, channel_tokens, num_masked, device)
src/vit_simmim_original.py:384
↓ 1 callersMethodget_batch_tube_masked
(self, batch_size, channel_tokens, num_masked, device)
src/vit_simmim_original.py:404
↓ 1 callersFunctionget_finetune_config
(finetune_config_path, general_config_path, seed, device)
src/utils.py:337
↓ 1 callersFunctionget_optimizers
(model, config)
src/utils.py:36
↓ 1 callersFunctionget_pos_for_spectral_embedding
For each spectral block in wavelengths, return the index of the closest spectral block in reference_wavelengths usecase: model pre-trained on
src/vit_spatial_spectral.py:767
↓ 1 callersFunctionget_pretrain_config
(pretrain_config_path, general_config_path, seed, device)
src/utils.py:316
↓ 1 callersFunctionget_sweep_finetune_config
(finetune_config_path, general_config_path)
src/utils.py:367
↓ 1 callersFunctionget_unsupervised_data
(config, device)
src/utils.py:62
↓ 1 callersFunctiongrouper
Browse an iterable by grouping n elements by n elements. Args: n: int, size of the groups iterable: the iterable to Browse Y
DeepHyperX/utils.py:313
↓ 1 callersMethodload_data
(self)
src/data_houston2018.py:257
↓ 1 callersMethodload_from_pixel_location_file_to_memory
(self)
src/data_enmap.py:268
↓ 1 callersMethodload_imgs
(self)
src/data_enmap.py:232
↓ 1 callersMethodload_label
(self)
src/data_houston2018.py:276
↓ 1 callersMethodload_labels
(self)
src/data_enmap.py:259
↓ 1 callersFunctionmetrics
Compute and print metrics (accuracy, confusion matrix and F1 scores). Args: prediction: list of predicted labels target: list of
DeepHyperX/utils.py:331
↓ 1 callersMethodmixture_noise
(self, data, label, beta=1 / 25)
DeepHyperX/datasets.py:384
↓ 1 callersFunctionplot_spectrums
Plot the specified dictionary of spectrums. Args: spectrums: dictionary (name -> spectrum) of spectrums to plot vis: Visdom displ
DeepHyperX/utils.py:163
↓ 1 callersMethodradiation_noise
(data, alpha_range=(0.9, 1.1), beta=1 / 25)
DeepHyperX/datasets.py:379
↓ 1 callersFunctionstack_image_batch
tile image into multiple image_size,image_size patches and stack along batch dimension
src/utils.py:451
↓ 1 callersFunctiontrain
Training loop to optimize a network for several epochs and a specified loss Args: net: a PyTorch model optimizer: a PyTorch
DeepHyperX/models.py:998
↓ 1 callersMethodtransformer_forward
(self, x)
src/vit_spatial_spectral.py:723
↓ 1 callersFunctionval
(net, data_loader, device="cpu", supervision="full")
DeepHyperX/models.py:1210
↓ 1 callersFunctionverify_sweep_params
Ensure that boolean flags are correctly handeled
src/utils.py:222
Method__call__
(self)
src/vit_simmim_original.py:362
Method__call__
(self, x)
src/data_enmap.py:454
Method__call__
(self, x)
src/data_enmap.py:500
Method__call__
(self, x)
src/data_enmap.py:511
Method__call__
(self, x)
src/data_enmap.py:521
Method__call__
(self, x)
src/data_enmap.py:544
Method__call__
(self, x)
src/data_enmap.py:571
Method__call__
(self, x)
src/data_houston2018.py:442
Method__call__
(self, x)
src/data_houston2018.py:460
Method__getitem__
(self, idx)
src/data_enmap.py:295
Method__getitem__
(self, idx=None)
src/data_houston2018.py:297
Method__getitem__
(self, i)
DeepHyperX/datasets.py:400
Method__init__
(self, dim, num_spectral_blocks, pixels_per_patch, precision)
src/vit_simmim_original.py:10
Method__init__
( self, *, encoder, masking_ratio=0.5, mask_patch_size=1, tube
src/vit_simmim_original.py:140
Method__init__
( self, input_size=16, mask_patch_size=4, model_patch_size=1, mask_ratio=0.6 )
src/vit_simmim_original.py:345
Method__init__
(self, dim, fn)
src/vit_original.py:19
Method__init__
(self, dim, hidden_dim, dropout=0.0)
src/vit_original.py:29
Method__init__
(self, dim, heads=8, dim_head=64, dropout=0.0)
src/vit_original.py:44
Method__init__
(self, dim, depth, heads, dim_head, mlp_dim, dropout=0.0)
src/vit_original.py:78
next →1–100 of 198, ranked by callers