Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HSG-AIML/MaskedSST
/ functions
Functions
198 in github.com/HSG-AIML/MaskedSST
⨍
Functions
198
◇
Types & classes
49
↓ 19 callers
Function
open_file
(dataset)
DeepHyperX/utils.py:30
↓ 14 callers
Method
__init__
(self, axis)
src/vit_spatial_spectral.py:804
↓ 11 callers
Method
__init__
(self, input_channels, n_classes, kernel_size=None, pool_size=None)
DeepHyperX/models.py:265
↓ 6 callers
Method
__init__
(self)
src/data_enmap.py:518
↓ 6 callers
Function
pair
(t)
src/vit_spatial_spectral.py:15
↓ 5 callers
Function
convert_to_color
(x)
DeepHyperX/main.py:262
↓ 5 callers
Function
save_model
(model, model_name, dataset_name, **kwargs)
DeepHyperX/models.py:1137
↓ 4 callers
Method
__init__
( self, *, image_size, patch_size, num_classes, dim, d
src/vit_original.py:104
↓ 4 callers
Function
build_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 callers
Function
get_model
Instantiate and obtain a model with adequate hyperparameters Args: name: string of the model name kwargs: hyperparameters
DeepHyperX/models.py:20
↓ 4 callers
Method
transformer_forward
(self, x)
src/vit_spatial_spectral.py:495
↓ 3 callers
Function
display_predictions
(pred, vis, gt=None, caption="")
DeepHyperX/utils.py:90
↓ 3 callers
Function
get_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 callers
Method
load_img
(self, path)
src/data_enmap.py:241
↓ 2 callers
Method
__init__
( self, *, encoder, masking_ratio=0.5, )
src/vit_simmim_original.py:44
↓ 2 callers
Method
__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 callers
Method
bool_mask_to_indices
(self, masked_bool_mask, batch, num_masked, device)
src/vit_simmim_original.py:372
↓ 2 callers
Function
convert_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 callers
Function
convert_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 callers
Method
embed
(self, patches)
src/vit_spatial_spectral.py:210
↓ 2 callers
Function
get_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 callers
Function
get_device
(ordinal)
DeepHyperX/utils.py:16
↓ 2 callers
Method
get_pos_embeddings
(self)
src/vit_spatial_spectral.py:501
↓ 2 callers
Function
get_spectral_pos_embedding
(dataset, n_bands, band_patch_size)
src/utils.py:415
↓ 2 callers
Function
get_supervised_data
(config, device)
src/utils.py:138
↓ 2 callers
Function
get_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 callers
Function
load_checkpoint
(config, model, classifier_name, device)
src/utils.py:276
↓ 2 callers
Method
load_label
(self, path)
src/data_enmap.py:251
↓ 2 callers
Function
merge_products
merge adjacent rasterio datasets into a single combined tile
enmap_data/create_enmap_dfc_dataset.py:44
↓ 2 callers
Function
pair
(t)
src/vit_original.py:11
↓ 2 callers
Function
sample_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 callers
Function
show_results
(results, vis, label_values=None, agregated=False)
DeepHyperX/utils.py:388
↓ 2 callers
Function
sliding_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 callers
Function
test
Test a model on a specific image
DeepHyperX/models.py:1157
↓ 2 callers
Function
train_step
(img, label, model, config, device, criterion, optimizer, acc_criterion)
src/utils.py:608
↓ 1 callers
Method
_get_final_flattened_size
(self)
DeepHyperX/models.py:259
↓ 1 callers
Method
_get_final_flattened_size
(self)
DeepHyperX/models.py:361
↓ 1 callers
Method
_get_final_flattened_size
(self)
DeepHyperX/models.py:507
↓ 1 callers
Method
_get_final_flattened_size
(self)
DeepHyperX/models.py:570
↓ 1 callers
Method
_get_final_flattened_size
(self)
DeepHyperX/models.py:629
↓ 1 callers
Method
_get_final_flattened_size
(self)
DeepHyperX/models.py:707
↓ 1 callers
Method
_get_final_flattened_size
(self)
DeepHyperX/models.py:773
↓ 1 callers
Method
_get_sizes
(self)
DeepHyperX/models.py:851
↓ 1 callers
Method
_get_sizes
(self)
DeepHyperX/models.py:944
↓ 1 callers
Method
_getitem_from_list
(self, idx)
src/data_enmap.py:286
↓ 1 callers
Function
camel_to_snake
(name)
DeepHyperX/utils.py:541
↓ 1 callers
Function
compute_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 callers
Function
convert_to_color
(x)
DeepHyperX/inference.py:139
↓ 1 callers
Function
count_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 callers
Function
dfc2018_loader
(folder)
DeepHyperX/custom_datasets.py:14
↓ 1 callers
Function
display_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 callers
Function
downsample
downsample by keeping most frequent value in factorxfactor window
enmap_data/create_enmap_dfc_dataset.py:25
↓ 1 callers
Function
explore_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 callers
Method
flip
(*arrays)
DeepHyperX/datasets.py:369
↓ 1 callers
Method
forward_features
(self, img)
src/vit_spatial_spectral.py:518
↓ 1 callers
Method
forward_features
(self, img)
src/vit_spatial_spectral.py:734
↓ 1 callers
Function
get_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 callers
Function
get_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
src/pos_embed.py:34
↓ 1 callers
Method
get_batch
(self, batch_size, channel_tokens, num_masked, device)
src/vit_simmim_original.py:384
↓ 1 callers
Method
get_batch_tube_masked
(self, batch_size, channel_tokens, num_masked, device)
src/vit_simmim_original.py:404
↓ 1 callers
Function
get_finetune_config
(finetune_config_path, general_config_path, seed, device)
src/utils.py:337
↓ 1 callers
Function
get_optimizers
(model, config)
src/utils.py:36
↓ 1 callers
Function
get_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 callers
Function
get_pretrain_config
(pretrain_config_path, general_config_path, seed, device)
src/utils.py:316
↓ 1 callers
Function
get_sweep_finetune_config
(finetune_config_path, general_config_path)
src/utils.py:367
↓ 1 callers
Function
get_unsupervised_data
(config, device)
src/utils.py:62
↓ 1 callers
Function
grouper
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 callers
Method
load_data
(self)
src/data_houston2018.py:257
↓ 1 callers
Method
load_from_pixel_location_file_to_memory
(self)
src/data_enmap.py:268
↓ 1 callers
Method
load_imgs
(self)
src/data_enmap.py:232
↓ 1 callers
Method
load_label
(self)
src/data_houston2018.py:276
↓ 1 callers
Method
load_labels
(self)
src/data_enmap.py:259
↓ 1 callers
Function
metrics
Compute and print metrics (accuracy, confusion matrix and F1 scores). Args: prediction: list of predicted labels target: list of
DeepHyperX/utils.py:331
↓ 1 callers
Method
mixture_noise
(self, data, label, beta=1 / 25)
DeepHyperX/datasets.py:384
↓ 1 callers
Function
plot_spectrums
Plot the specified dictionary of spectrums. Args: spectrums: dictionary (name -> spectrum) of spectrums to plot vis: Visdom displ
DeepHyperX/utils.py:163
↓ 1 callers
Method
radiation_noise
(data, alpha_range=(0.9, 1.1), beta=1 / 25)
DeepHyperX/datasets.py:379
↓ 1 callers
Function
stack_image_batch
tile image into multiple image_size,image_size patches and stack along batch dimension
src/utils.py:451
↓ 1 callers
Function
train
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 callers
Method
transformer_forward
(self, x)
src/vit_spatial_spectral.py:723
↓ 1 callers
Function
val
(net, data_loader, device="cpu", supervision="full")
DeepHyperX/models.py:1210
↓ 1 callers
Function
verify_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