MCPcopy Create free account

hub / github.com/allenai/satlas-super-resolution / functions

Functions102 in github.com/allenai/satlas-super-resolution

↓ 12 callersFunctionbuild_loss
Build loss from options. Args: opt (dict): Configuration. It must contain: type (str): Model type.
ssr/losses/__init__.py:21
↓ 9 callersMethod__init__
Initialize the OneHot layer. Parameters ---------- num_classes : int The number of classes to encode.
ssr/archs/arch_util.py:26
↓ 8 callersMethodsplit
Split the input tensor (revisits) into two parts/halves. Parameters ---------- x : Tensor The input tensor of sh
ssr/archs/arch_util.py:244
↓ 6 callersFunctionbuild_network
(opt)
ssr/utils/model_utils.py:5
↓ 4 callersFunction_ntuple
(n)
ssr/archs/arch_util.py:882
↓ 3 callersFunctioncalculate_metric
Calculate metric from data and options. Args: opt (dict): Configuration. It must contain: type (str): Model type.
ssr/metrics/__init__.py:13
↓ 3 callersFunctionyaml_load
Load yaml file or string. Args: f (str): File path or a python string. Returns: dict: Loaded dict.
ssr/utils/options.py:35
↓ 2 callersMethod__init__
(self, num_feat, num_grow_ch=32)
ssr/archs/rrdbnet_arch.py:57
↓ 2 callersMethodcompute_and_concat_reference_frame_to_input
(self, x)
ssr/archs/srcnn_arch.py:197
↓ 2 callersFunctiondefault_init_weights
Initialize network weights. Args: module_list (list[nn.Module] | nn.Module): Modules to be initialized. scale (float): Scale init
ssr/archs/arch_util.py:601
↓ 2 callersMethodencode_and_concatenate_masks_to_input
( self, x, mask, batch_size, revisits, height, width )
ssr/archs/srcnn_arch.py:204
↓ 2 callersMethodfeed_data
(self, data)
ssr/models/ssr_l2_model.py:25
↓ 2 callersFunctionformat_s2naip_data
(s2_data, n_s2_images, device)
ssr/utils/infer_utils.py:6
↓ 2 callersFunctionhas_black_pixels
(tensor)
ssr/utils/data_utils.py:3
↓ 2 callersFunctionnorm_cdf
(x)
ssr/archs/arch_util.py:821
↓ 2 callersFunctionordered_yaml
Support OrderedDict for yaml. Returns: tuple: yaml Loader and Dumper.
ssr/utils/options.py:10
↓ 2 callersMethodpad
Pad the input tensor with black revisits to a power of 2. Parameters ---------- x : Tensor The input tensor of s
ssr/archs/arch_util.py:338
↓ 2 callersFunctionparse_options
(root_path, is_train=True)
ssr/utils/options.py:50
↓ 2 callersFunctionpixel_unshuffle
Pixel unshuffle. Args: x (Tensor): Input feature with shape (b, c, hh, hw). scale (int): Downsample ratio. Returns:
ssr/archs/arch_util.py:769
↓ 2 callersFunctionreorder_image
Reorder images to 'HWC' order. If the input_order is (h, w), return (h, w, 1); If the input_order is (c, h, w), return (h, w, c); If the
ssr/utils/metric_utils.py:3
↓ 2 callersFunctionstitch
(chunks_dir, img_size, save_path, scale=4, grid_size=16, sentinel2=False)
ssr/utils/infer_utils.py:41
↓ 2 callersFunctionto_y_channel
Change to Y channel of YCbCr. Args: img (ndarray): Images with range [0, 255]. Returns: (ndarray): Images with range [0, 255
ssr/utils/metric_utils.py:28
↓ 1 callersMethod__init__
(self, in_channels)
ssr/archs/osm_obj_discriminator_arch.py:9
↓ 1 callersMethod__init__
(self, opt)
ssr/data/s2-naip_dataset.py:48
↓ 1 callersMethod__init__
(self, clip_loss_model, loss_weight=1.0)
ssr/losses/basic_loss.py:22
↓ 1 callersMethod_initialize_best_metric_results
Initialize the best metric results dict for recording the best metric value and iteration.
ssr/models/ssr_esrgan_model.py:254
↓ 1 callersMethod_initialize_best_metric_results
Initialize the best metric results dict for recording the best metric value and iteration.
ssr/models/osm_objs_esrgan_model.py:336
↓ 1 callersMethod_initialize_best_metric_results
Initialize the best metric results dict for recording the best metric value and iteration.
ssr/models/ssr_l2_model.py:70
↓ 1 callersFunction_no_grad_trunc_normal_
(tensor, mean, std, a, b)
ssr/archs/arch_util.py:817
↓ 1 callersFunctionbgr2ycbcr
Convert a BGR image to YCbCr image. The bgr version of rgb2ycbcr. It implements the ITU-R BT.601 conversion for standard-definition telev
ssr/utils/metric_utils.py:43
↓ 1 callersMethodfeed_data
(self, data)
ssr/models/ssr_esrgan_model.py:105
↓ 1 callersMethodfeed_data
(self, data)
ssr/models/osm_objs_esrgan_model.py:120
↓ 1 callersMethodget_current_visuals
(self)
ssr/models/ssr_esrgan_model.py:246
↓ 1 callersMethodget_current_visuals
(self)
ssr/models/osm_objs_esrgan_model.py:328
↓ 1 callersMethodget_current_visuals
(self)
ssr/models/ssr_l2_model.py:62
↓ 1 callersFunctionl1_loss
(pred, target)
ssr/losses/basic_loss.py:16
↓ 1 callersFunctionmake_layer
Make layers by stacking the same blocks. Args: basic_block (nn.module): nn.module class for basic block. num_basic_block (int): n
ssr/archs/arch_util.py:631
↓ 1 callersMethodoptimize_parameters
(self, current_iter)
ssr/models/ssr_l2_model.py:30
↓ 1 callersMethodreference_frame
Compute the reference frame as the median of all low-res revisits. Parameters ---------- x : Tensor The input te
ssr/archs/srcnn_arch.py:125
↓ 1 callersMethodtest
(self)
ssr/models/ssr_esrgan_model.py:235
↓ 1 callersMethodtest
(self)
ssr/models/osm_objs_esrgan_model.py:317
↓ 1 callersMethodtest
(self)
ssr/models/ssr_l2_model.py:56
↓ 1 callersFunctiontest_pipeline
(root_path)
ssr/test.py:15
↓ 1 callersFunctiontrain_pipeline
(root_path)
ssr/train.py:29
Method__getitem__
(self, index)
ssr/data/s2-naip_dataset.py:152
Method__init__
(self, skip_paddings=True, **kws)
ssr/archs/highresnet_arch.py:17
Method__init__
Initialize the DoubleConv2d layer. Parameters ---------- in_channels : int The number of input channels.
ssr/archs/arch_util.py:70
Method__init__
Initialize the ResidualBlock layer. Parameters ---------- in_channels : int The number of input channels.
ssr/archs/arch_util.py:140
Method__init__
Initialize the FusionBlock layer. Fuse workflow: xx ---> xx ---> x | ^ |-------^ Parameters -
ssr/archs/arch_util.py:198
Method__init__
Initialize the RecursiveFusion layer. Parameters ---------- in_channels : int The number of input channels.
ssr/archs/arch_util.py:311
Method__init__
Initialize the ConvTransposeBlock layer. Parameters ---------- in_channels : int The number of input channels.
ssr/archs/arch_util.py:396
Method__init__
(self, **kws)
ssr/archs/arch_util.py:570
Method__init__
(self, num_feat=64, res_scale=1, pytorch_init=False)
ssr/archs/arch_util.py:658
Method__init__
(self, scale, num_feat)
ssr/archs/arch_util.py:682
Method__init__
Initialize the Super-resolution CNN. Parameters ---------- in_channels : int The number of input channels.
ssr/archs/srcnn_arch.py:18
Method__init__
(self, num_feat=64, num_grow_ch=32)
ssr/archs/rrdbnet_arch.py:24
Method__init__
(self, num_in_ch, num_out_ch, scale=4, num_feat=64, num_block=23, num_grow_ch=32)
ssr/archs/rrdbnet_arch.py:92
Method__init__
(self, num_in_ch, num_feat=64, skip_connection=True)
ssr/archs/discriminator_arch.py:23
Method__init__
(self, num_in_ch, num_feat=64, skip_connection=True)
ssr/archs/osm_obj_discriminator_arch.py:43
Method__init__
(self, *args, **kwargs)
ssr/data/s2-naip_dataset.py:23
Method__init__
(self, opt)
ssr/models/ssr_esrgan_model.py:29
Method__init__
(self, opt)
ssr/models/osm_objs_esrgan_model.py:36
Method__init__
(self, opt)
ssr/models/ssr_l2_model.py:21
Method__init__
(self, loss_weight=1.0)
ssr/losses/basic_loss.py:53
Method__iter__
(self)
ssr/data/s2-naip_dataset.py:26
Method__len__
(self)
ssr/data/s2-naip_dataset.py:248
Functioncalculate_clipscore
(img, img2, clip_model, **kwargs)
ssr/metrics/clipscore.py:9
Functioncalculate_cpsnr
Implementation of cPSNR from PROBA-V: https://kelvins.esa.int/proba-v-super-resolution/scoring/ Adds maximization of translations and br
ssr/metrics/cpsnr.py:8
Functioncalculate_lpips
(img, img2, lpips_model, **kwargs)
ssr/metrics/lpips.py:7
Functiondict_constructor
(loader, node)
ssr/utils/options.py:27
Functiondict_representer
(dumper, data)
ssr/utils/options.py:24
Functionflow_warp
Warp an image or feature map with optical flow. Args: x (Tensor): Tensor with size (n, c, h, w). flow (Tensor): Tensor with size
ssr/archs/arch_util.py:696
Methodforward
Forward pass of the High-resolution CNN. Parameters ---------- x : Tensor The input tensor (low-res revisits).
ssr/archs/highresnet_arch.py:27
Methodforward
Forward pass. Parameters ---------- x : Tensor The input tensor. Returns ------- Tenso
ssr/archs/arch_util.py:37
Methodforward
Forward pass of the DoubleConv2d layer. Parameters ---------- x : Tensor The input tensor of shape (batch_size,
ssr/archs/arch_util.py:121
Methodforward
Forward pass of the ResidualBlock layer. Parameters ---------- x : Tensor The input tensor of shape (batch_size,
ssr/archs/arch_util.py:158
Methodforward
Forward pass of the DenseBlock layer. Parameters ---------- x : Tensor The input tensor of shape (batch_size, in
ssr/archs/arch_util.py:179
Methodforward
Forward pass of the FusionBlock layer. Parameters ---------- x : Tensor The input tensor of shape (batch_size,
ssr/archs/arch_util.py:268
Methodforward
Forward pass of the RecursiveFusion layer. Parameters ---------- x : Tensor The input tensor of shape (batch_siz
ssr/archs/arch_util.py:375
Methodforward
Forward pass of the ConvTransposeBlock layer. Parameters ---------- x : Tensor The input tensor of shape (batch_
ssr/archs/arch_util.py:465
Methodforward
(self, x)
ssr/archs/arch_util.py:668
Methodforward
(self, x, feat)
ssr/archs/arch_util.py:798
Methodforward
Forward pass of the Super-resolution CNN. Parameters ---------- x : Tensor The input tensor (low-res revisits).
ssr/archs/srcnn_arch.py:142
Methodforward
(self, x)
ssr/archs/rrdbnet_arch.py:37
Methodforward
(self, x)
ssr/archs/rrdbnet_arch.py:63
Methodforward
(self, x)
ssr/archs/rrdbnet_arch.py:116
Methodforward
(self, x)
ssr/archs/discriminator_arch.py:42
Methodforward
(self, x)
ssr/archs/osm_obj_discriminator_arch.py:16
Methodforward
(self, x, osm_objs)
ssr/archs/osm_obj_discriminator_arch.py:71
Methodforward
(self, x, gt)
ssr/losses/basic_loss.py:38
Methodforward
(self, x, gt)
ssr/losses/basic_loss.py:57
Methodget_tile_weight_sampler
(self, tile_weights)
ssr/data/s2-naip_dataset.py:132
Methodinit_training_settings
(self)
ssr/models/ssr_esrgan_model.py:33
Methodinit_training_settings
(self)
ssr/models/osm_objs_esrgan_model.py:48
Methodnondist_validation
(self, dataloader, current_iter, tb_logger, save_img)
ssr/models/ssr_esrgan_model.py:269
Methodnondist_validation
(self, dataloader, current_iter, tb_logger, save_img)
ssr/models/osm_objs_esrgan_model.py:351
Methodnondist_validation
(self, dataloader, current_iter, tb_logger, save_img)
ssr/models/ssr_l2_model.py:85
Methodoptimize_parameters
(self, current_iter)
ssr/models/ssr_esrgan_model.py:119
Methodoptimize_parameters
(self, current_iter)
ssr/models/osm_objs_esrgan_model.py:140
Functionparse
(x)
ssr/archs/arch_util.py:884
next →1–100 of 102, ranked by callers