MCPcopy Create free account

hub / github.com/Zj-BinXia/AMSA / functions

Functions312 in github.com/Zj-BinXia/AMSA

↓ 31 callersMethodget
(self, filepath, client_key='default')
AMSA/mmsr/utils/file_client.py:209
↓ 8 callersMethod__init__
(self, loss_weight=1.0, reduction='mean')
AMSA/mmsr/models/losses.py:40
↓ 8 callersMethodupdate
(self, msg='In progress...')
AMSA/mmsr/utils/util.py:285
↓ 7 callersMethodload_network
Load network. Args: load_path (str): The path of networks to be loaded. net (nn.Module): Network. strict
AMSA/mmsr/models/base_model.py:245
↓ 7 callersMethodmodel_to_device
Model to device. It also warps models with DistributedDataParallel or DataParallel. Args: net (nn.Module)
AMSA/mmsr/models/base_model.py:62
↓ 6 callersMethod__init__
(self, in_channels, out_channels, kernel_size,
AMSA/mmsr/models/archs/DCNv2/dcn_v2.py:100
↓ 6 callersMethodbackward
(ctx, grad_output)
AMSA/mmsr/models/archs/DCNv2/dcn_v2.py:36
↓ 6 callersFunctiondynamical_instantiation
Dynamically instantiate class. Args: modules (list[importlib modules]): List of modules from importlib files. cls_type (s
AMSA/mmsr/models/networks.py:4
↓ 6 callersFunctionmod_crop
Mod crop images, used during testing. Args: img (ndarray): Input image. scale (int): Scale factor. Returns: ndarray:
AMSA/mmsr/data/transforms.py:7
↓ 6 callersFunctiontotensor
Numpy array to tensor. Args: imgs (list[ndarray] | ndarray): Input images. bgr2rgb (bool) float32 (bool) Returns:
AMSA/mmsr/data/transforms.py:149
↓ 5 callersMethodprint_network
Print the str and parameter number of a network. Args: net (nn.Module)
AMSA/mmsr/models/base_model.py:118
↓ 5 callersMethodsave_network
Save networks. Args: net (nn.Module): Network to be saved. net_label (str): Network label. current_iter (
AMSA/mmsr/models/base_model.py:186
↓ 4 callersMethod__init__
(self, filter_size)
AMSA/mmsr/models/archs/patch_match_arch.py:36
↓ 4 callersFunctioncalculate_weights_indices
(in_length, out_length, scale, kernel, kernel_width, antialiasing)
AMSA/mmsr/data/util.py:342
↓ 4 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
AMSA/mmsr/utils/metrics.py:5
↓ 4 callersMethodsave_training_state
Save training states during training, which will be used for resuming. Args: epoch (int): Current epoch. curr
AMSA/mmsr/models/base_model.py:268
↓ 4 callersMethodsetup_schedulers
Set up schedulers.
AMSA/mmsr/models/base_model.py:77
↓ 4 callersFunctionsingle_forward
PyTorch model forward (single test), it is just a simple warpper Args: model (PyTorch model) inp (Tensor): inputs defined by the m
AMSA/mmsr/utils/util.py:203
↓ 3 callersMethod__init__
(self, in_channels, out_channels, kernel_size,
AMSA/mmsr/models/archs/dcn/deform_conv.py:195
↓ 3 callersFunction_augment
(img)
AMSA/mmsr/data/transforms.py:111
↓ 3 callersFunctioncreate_dataloader
Create dataloader. Args: dataset (torch.utils.data.Dataset): Dataset. dataset_opt (dict): Dataset options. It contains the follow
AMSA/mmsr/data/__init__.py:52
↓ 3 callersFunctioncreate_dataset
Create dataset. Args: dataset_opt (dict): Configuration for dataset. It constains: name (str): Dataset name. type
AMSA/mmsr/data/__init__.py:25
↓ 3 callersMethodforward
Args: pred (Tensor): of shape (N, C, H, W). Predicted tensor. target (Tensor): of shape (N, C, H, W). Ground truth te
AMSA/mmsr/models/losses.py:48
↓ 3 callersFunctionget_root_logger
Get the root logger. The logger will be initialized if it has not been initialized. By default a StreamHandler will be added. If `log_file` i
AMSA/mmsr/utils/logger.py:84
↓ 3 callersFunctionpaired_paths_from_ann_file
Generate paired paths from an anno file. Annotation file is a txt file listing all paths of pairs. Each line contains the relative lq and gt
AMSA/mmsr/data/util.py:153
↓ 3 callersFunctionpaired_paths_from_folder
Generate paired paths from folders. Args: folders (list): A list of folder path. The order of list should be: [input_folder,
AMSA/mmsr/data/util.py:194
↓ 3 callersFunctionpaired_paths_from_lmdb
Generate paired paths from lmdb files. Contents of lmdb. Taking the `lq.lmdb` for example, the file structure is: lq.lmdb ├── data.mdb
AMSA/mmsr/data/util.py:84
↓ 3 callersMethodsave
(self, epoch, current_iter)
AMSA/mmsr/models/sr_model.py:218
↓ 3 callersFunctionshape_check
AMSA/mmsr/models/archs/dcn/src/deform_conv_cuda.cpp:61
↓ 3 callersFunctiontensor_shift
Tensor shift. Args: x (Tensor): the input tensor. The shape is [b, h, w, c]. shift (tuple): shift pixel. fill_val (float
AMSA/mmsr/models/archs/arch_util.py:290
↓ 2 callersMethod__init__
(self, scale, nf)
AMSA/mmsr/models/archs/arch_util.py:146
↓ 2 callersMethod__init__
(self, ngf=64, n_blocks=16, groups=8)
AMSA/mmsr/models/archs/ref_restoration_arch.py:33
↓ 2 callersMethod_gram_mat
(self, x)
AMSA/mmsr/models/losses.py:233
↓ 2 callersFunction_totensor
(img, bgr2rgb, float32)
AMSA/mmsr/data/transforms.py:162
↓ 2 callersFunctionaugment
Augment: horizontal flips or rotate (0, 90, 180, 270 degrees). Use vertical flip and transpose for rotation implementation. All the images in
AMSA/mmsr/data/transforms.py:89
↓ 2 callersFunctioncreate_model
Create model. Args: opt (dict): Configuration. It constains: model_type (str): Model type.
AMSA/mmsr/models/__init__.py:22
↓ 2 callersFunctioncubic
(x)
AMSA/mmsr/data/util.py:332
↓ 2 callersFunctiondefault_init_weights
Initialize network weights. Args: module_list (list[nn.Module] | nn.Module): Modules to be initialized. scale (float): Scale init
AMSA/mmsr/models/archs/arch_util.py:36
↓ 2 callersFunctiondict_to_nonedict
Convert to NoneDict, which returns None for missing keys. Args: opt (dict): Option dict. Returns: (dict): NoneDict for optio
AMSA/mmsr/utils/options.py:129
↓ 2 callersMethodfeed_data
(self, data)
AMSA/mmsr/models/sr_model.py:89
↓ 2 callersFunctiongenerate_lq_and_ref
(img)
AMSA/mmsr/scripts/create_cufed_lmdb.py:65
↓ 2 callersMethodgram_matrix
(self, features)
AMSA/mmsr/models/losses.py:466
↓ 2 callersFunctiongrid_positions
(h, w, device, matrix=False)
AMSA/mmsr/models/teacher_contras_model.py:20
↓ 2 callersFunctiongrid_positions
(h, w, device, matrix=False)
AMSA/mmsr/models/student_contras_distillation_model.py:20
↓ 2 callersFunctionimage_pair_generation
(img, random_perturb_range=(0, 32), cropping_window_size=1
AMSA/mmsr/data/contras_dataset.py:13
↓ 2 callersMethodloss_function
(self)
AMSA/mmsr/models/teacher_contras_model.py:115
↓ 2 callersMethodloss_function
(self)
AMSA/mmsr/models/student_contras_distillation_model.py:129
↓ 2 callersFunctionmake_exp_dirs
Make dirs for experiments.
AMSA/mmsr/utils/util.py:62
↓ 2 callersFunctionmake_lmdb_cufed
Make lmdb. Contents of lmdb. The file structure is: example.lmdb ├── data.mdb ├── lock.mdb ├── meta_info.txt The data.mdb an
AMSA/mmsr/scripts/create_cufed_lmdb.py:83
↓ 2 callersFunctionmkdir_and_rename
mkdirs. If path exists, rename it with timestamp and create a new one. Args: path (str): Folder path.
AMSA/mmsr/utils/util.py:47
↓ 2 callersFunctionparse
Parse option file. Args: opt_path (str): Option file path. is_train (str): Indicate whether in training or not. Default: True.
AMSA/mmsr/utils/options.py:32
↓ 2 callersFunctionprepare_keys_cufed
Prepare image path list and keys for DIV2K dataset. Args: folder_path (str): Folder path. Returns: list[str]: Image path lis
AMSA/mmsr/scripts/create_cufed_lmdb.py:47
↓ 2 callersMethodsave
Save networks and training state.
AMSA/mmsr/models/base_model.py:40
↓ 2 callersFunctiontensor2img
Convert torch Tensors into image numpy arrays. After clamping to [min, max], values will be normalized to [0, 1]. Args: tensor (Tens
AMSA/mmsr/utils/util.py:107
↓ 2 callersMethodvalidation
Validation function. Args: dataloder (torch.utils.data.DataLoader): Validation dataloader. current_iter (int): Curren
AMSA/mmsr/models/base_model.py:44
↓ 1 callersMethod__init__
(self, opt)
AMSA/mmsr/data/contras_dataset.py:121
↓ 1 callersMethod__init__
(self, optimizer, milestones, gamma=0.1, r
AMSA/mmsr/models/lr_scheduler.py:20
↓ 1 callersMethod__init__
(self)
AMSA/mmsr/models/archs/contras_extractor_arch.py:46
↓ 1 callersFunction_augment_flow
(flow)
AMSA/mmsr/data/transforms.py:120
↓ 1 callersMethod_get_init_lr
Get the initial lr, which is set by the scheduler.
AMSA/mmsr/models/base_model.py:146
↓ 1 callersMethod_get_max_bar_width
(self)
AMSA/mmsr/utils/util.py:266
↓ 1 callersMethod_get_network_description
Get the string and total parameters of the network
AMSA/mmsr/models/base_model.py:110
↓ 1 callersMethod_infer_shape
(ctx, input, weight)
AMSA/mmsr/models/archs/dcn/deform_conv.py:177
↓ 1 callersFunction_minimal_ext_cmd
(cmd)
AMSA/setup.py:30
↓ 1 callersMethod_output_size
(input, weight, padding, dilation, stride)
AMSA/mmsr/models/archs/dcn/deform_conv.py:100
↓ 1 callersMethod_print_different_keys_loading
Print keys with differnet name or different size when loading models. 1. Print keys with differnet names. 2. If strict=False, print t
AMSA/mmsr/models/base_model.py:208
↓ 1 callersMethod_set_lr
Set learning rate for warmup. Args: lr_groups_l (list): List for lr_groups, each for an optimizer.
AMSA/mmsr/models/base_model.py:136
↓ 1 callersFunction_ssim
Calculate SSIM (structural similarity) for one channel images. It is called by func:`calculate_ssim`. Args: img1, img2 (ndarray): Im
AMSA/mmsr/utils/metrics.py:69
↓ 1 callersFunctionbgr2ycbcr
bgr version of rgb2ycbcr only_y: only return Y channel Input: uint8, [0, 255] float, [0, 1]
AMSA/mmsr/data/util.py:276
↓ 1 callersFunctioncharbonnier_loss
(pred, target, eps=1e-6)
AMSA/mmsr/models/losses.py:27
↓ 1 callersFunctioncheck_resume
Check resume states and pretrain_model paths. Args: opt (dict): Options. resume_iter (int): Resume iteration.
AMSA/mmsr/utils/util.py:20
↓ 1 callersFunctioncreate_lmdb_for_cufed
Create lmdb files for DIV2K dataset. Usage: Before run this script, please run `extract_subimages.py`. Typically, there are four
AMSA/mmsr/scripts/create_cufed_lmdb.py:13
↓ 1 callersFunctiondict2str
dict to string for printing options. Args: opt (dict): Option dict. indent_level (int): Indent level. Default: 1. Return:
AMSA/mmsr/utils/options.py:101
↓ 1 callersMethoddist_validation
(self, dataloader, current_iter, tb_logger, save_img)
AMSA/mmsr/models/sr_model.py:160
↓ 1 callersFunctiondownscale_positions
(pos, scaling_steps=0)
AMSA/mmsr/models/teacher_contras_model.py:36
↓ 1 callersFunctiondownscale_positions
(pos, scaling_steps=0)
AMSA/mmsr/models/student_contras_distillation_model.py:36
↓ 1 callersMethodfeed_data
(self, data)
AMSA/mmsr/models/ref_restoration_model.py:187
↓ 1 callersMethodfeed_data
(self, data)
AMSA/mmsr/models/teacher_contras_model.py:109
↓ 1 callersMethodfeed_data
(self, data)
AMSA/mmsr/models/student_contras_distillation_model.py:122
↓ 1 callersMethodget_current_learning_rate
(self)
AMSA/mmsr/models/base_model.py:179
↓ 1 callersMethodget_current_log
(self)
AMSA/mmsr/models/base_model.py:59
↓ 1 callersMethodget_current_visuals
(self)
AMSA/mmsr/models/sr_model.py:210
↓ 1 callersMethodget_current_visuals
(self)
AMSA/mmsr/models/ref_restoration_model.py:347
↓ 1 callersFunctionget_extensions
()
AMSA/mmsr/models/archs/DCNv2/setup.py:13
↓ 1 callersFunctionget_git_hash
()
AMSA/setup.py:29
↓ 1 callersFunctionget_hash
()
AMSA/setup.py:54
↓ 1 callersFunctionget_requirements
(filename='requirements.txt')
AMSA/setup.py:111
↓ 1 callersMethodget_target_label
Get target label. Args: input (Tensor): Input tensor. target_is_real (bool): Whether the targe is real or fake.
AMSA/mmsr/models/losses.py:322
↓ 1 callersFunctionget_version
()
AMSA/setup.py:83
↓ 1 callersFunctiongkern
(kernlen=13, nsig=1.6)
AMSA/mmsr/utils/util.py:176
↓ 1 callersFunctiongradient_penalty_loss
Calculate gradient penalty for wgan-gp. Args: discriminator (nn.Module): Network for the discriminator. real_data (Tensor): Real
AMSA/mmsr/models/losses.py:366
↓ 1 callersMethodindex_to_flow
(self, max_idx)
AMSA/mmsr/models/archs/corres_generation_arch.py:30
↓ 1 callersMethodinit_offset
(self)
AMSA/mmsr/models/archs/dcn/deform_conv.py:257
↓ 1 callersMethodinit_offset
(self)
AMSA/mmsr/models/archs/dcn/deform_conv.py:330
↓ 1 callersMethodinit_offset
(self)
AMSA/mmsr/models/archs/DCNv2/dcn_v2.py:122
↓ 1 callersMethodinit_offset
(self)
AMSA/mmsr/models/archs/DCNv2/dcn_v2.py:163
↓ 1 callersMethodinit_offset
(self)
AMSA/mmsr/models/archs/DCNv2/dcn_v2.py:218
↓ 1 callersMethodinit_offset
(self)
AMSA/mmsr/models/archs/DCNv2/dcn_v2.py:287
↓ 1 callersFunctioninit_tb_logger
(log_dir)
AMSA/mmsr/utils/logger.py:78
↓ 1 callersMethodinit_training_settings
(self)
AMSA/mmsr/models/sr_model.py:41
next →1–100 of 312, ranked by callers