MCPcopy Create free account

hub / github.com/cschenxiang/DRSformer / functions

Functions336 in github.com/cschenxiang/DRSformer

↓ 57 callersMethodget
(self, filepath, client_key='default')
basicsr/utils/file_client.py:177
↓ 18 callersMethod__init__
(self, dim, layer_num=1, steps=4)
basicsr/models/archs/DRSformer_arch.py:329
↓ 18 callersMethod__init__
(self, dim, layer_num=1, steps=4)
basicsr/models/archs/DRSformer_arch_200L+SPA.py:329
↓ 14 callersFunctionmake_lmdb_from_imgs
Make lmdb from images. Contents of lmdb. The file structure is: example.lmdb ├── data.mdb ├── lock.mdb ├── meta_info.txt The
basicsr/utils/lmdb_util.py:9
↓ 14 callersFunctionprepare_keys
Prepare image path list and keys for DIV2K dataset. Args: folder_path (str): Folder path. Returns: list[str]: Image path lis
basicsr/utils/create_lmdb.py:7
↓ 13 callersFunctionscandir
Scan a directory to find the interested files. Args: dir_path (str): Path of the directory. suffix (str | tuple(str), optional):
basicsr/utils/misc.py:53
↓ 10 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
basicsr/utils/logger.py:108
↓ 7 callersMethodclose
(self)
basicsr/utils/lmdb_util.py:205
↓ 6 callersFunctionimg2tensor
Numpy array to tensor. Args: imgs (list[ndarray] | ndarray): Input images. bgr2rgb (bool): Whether to change bgr to rgb.
basicsr/utils/img_util.py:9
↓ 5 callersFunction_3d_gaussian_calculator
(img, conv3d)
basicsr/metrics/psnr_ssim.py:131
↓ 5 callersMethodget_bare_model
Get bare model, especially under wrapping with DistributedDataParallel or DataParallel.
basicsr/models/base_model.py:135
↓ 5 callersFunctionimfrombytes
Read an image from bytes. Args: content (bytes): Image bytes got from files or other streams. flag (str): Flags specifying the co
basicsr/utils/img_util.py:101
↓ 5 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
basicsr/metrics/metric_util.py:6
↓ 5 callersMethodsave
Save networks and training state.
basicsr/models/base_model.py:33
↓ 5 callersFunctionto_y_channel
Change to Y channel of YCbCr. Args: img (ndarray): Images with range [0, 255]. Returns: (ndarray): Images with range [0, 255
basicsr/metrics/metric_util.py:34
↓ 4 callersMethod__init__
(self, optimizer, total_iter, last_epoch=-1)
basicsr/models/lr_scheduler.py:59
↓ 4 callersFunction_convert_input_type_range
Convert the type and range of the input image. It converts the input image to np.float32 type and range of [0, 1]. It is mainly used for pre-
basicsr/utils/matlab_functions.py:305
↓ 4 callersFunction_convert_output_type_range
Convert the type and range of the image according to dst_type. It converts the image to desired type and range. If `dst_type` is np.uint8, im
basicsr/utils/matlab_functions.py:333
↓ 4 callersFunctionget_dist_info
()
basicsr/utils/dist_util.py:61
↓ 4 callersFunctionimwrite
Write image to file. Args: img (ndarray): Image array to be written. file_path (str): Image file path. params (None or li
basicsr/utils/img_util.py:181
↓ 3 callersMethod__init__
(self, loss_weight=1.0, reduction='mean')
basicsr/models/losses/losses.py:35
↓ 3 callersFunctioncreate_dataloader
Create dataloader. Args: dataset (torch.utils.data.Dataset): Dataset. dataset_opt (dict): Dataset options. It contains the follow
basicsr/data/__init__.py:56
↓ 3 callersFunctioncreate_dataset
Create dataset. Args: dataset_opt (dict): Configuration for dataset. It constains: name (str): Dataset name. type
basicsr/data/__init__.py:29
↓ 3 callersFunctioncreate_model
Create model. Args: opt (dict): Configuration. It constains: model_type (str): Model type.
basicsr/models/__init__.py:21
↓ 3 callersFunctionget_time_str
()
basicsr/utils/misc.py:21
↓ 3 callersFunctionimfrombytesDP
Read an image from bytes. Args: content (bytes): Image bytes got from files or other streams. flag (str): Flags specifying the co
basicsr/utils/img_util.py:127
↓ 3 callersFunctionmake_cuda_ext
(name, module, sources, sources_cuda=None)
setup.py:90
↓ 3 callersFunctionmkdir_and_rename
mkdirs. If path exists, rename it with timestamp and create a new one. Args: path (str): Folder path.
basicsr/utils/misc.py:25
↓ 3 callersMethodpreload
(self)
basicsr/data/prefetch_dataloader.py:105
↓ 3 callersMethodput
(self, img_byte, key, img_shape)
basicsr/utils/lmdb_util.py:194
↓ 3 callersFunctionrandom_augmentation
(*args)
basicsr/data/transforms.py:270
↓ 3 callersFunctionssim
(img1, img2)
utils.py:54
↓ 3 callersMethodvalidation
Validation function. Args: dataloader (torch.utils.data.DataLoader): Validation dataloader. current_iter (int): Curre
basicsr/models/base_model.py:37
↓ 2 callersMethod__init__
(self, opt)
basicsr/data/paired_image_dataset.py:45
↓ 2 callersMethod__init__
(self, loader)
basicsr/data/prefetch_dataloader.py:70
↓ 2 callersFunction_scandir
(dir_path, suffix, recursive)
basicsr/utils/misc.py:74
↓ 2 callersFunction_totensor
(img, bgr2rgb, float32)
basicsr/utils/img_util.py:22
↓ 2 callersFunctioncalculate_weights_indices
Calculate weights and indices, used for imresize function. Args: in_length (int): Input length. out_length (int): Output length.
basicsr/utils/matlab_functions.py:17
↓ 2 callersFunctioncubic
cubic function used for calculate_weights_indices.
basicsr/utils/matlab_functions.py:6
↓ 2 callersFunctiondefine_network
(opt)
basicsr/models/archs/__init__.py:43
↓ 2 callersFunctiondict2str
dict to string for printing options. Args: opt (dict): Option dict. indent_level (int): Indent level. Default: 1. Return:
basicsr/utils/options.py:92
↓ 2 callersFunctionestimate_aggd_param
Estimate AGGD (Asymmetric Generalized Gaussian Distribution) paramters. Args: block (ndarray): 2D Image block. Returns: tupl
basicsr/metrics/niqe.py:10
↓ 2 callersFunctionget_env_info
Get environment information. Currently, only log the software version.
basicsr/utils/logger.py:150
↓ 2 callersFunctionget_position_from_periods
Get the position from a period list. It will return the index of the right-closest number in the period list. For example, the cumulative_per
basicsr/models/lr_scheduler.py:115
↓ 2 callersFunctioninit_dist
(launcher, backend='nccl', **kwargs)
basicsr/utils/dist_util.py:10
↓ 2 callersMethodload_network
Load network. Args: load_path (str): The path of networks to be loaded. net (nn.Module): Network. strict
basicsr/models/base_model.py:281
↓ 2 callersFunctionmake_exp_dirs
Make dirs for experiments.
basicsr/utils/misc.py:39
↓ 2 callersMethodmodel_ema
(self, decay=0.999)
basicsr/models/base_model.py:54
↓ 2 callersMethodnext
(self)
basicsr/data/prefetch_dataloader.py:118
↓ 2 callersMethodnondist_validation
(self, dataloader, current_iter, tb_logger, save_img, rgb2bgr, use_image)
basicsr/models/image_restoration_model.py:213
↓ 2 callersFunctionpadding
(img_lq, img_gt, gt_size)
basicsr/utils/img_util.py:148
↓ 2 callersFunctionpaired_random_crop
Paired random crop. It crops lists of lq and gt images with corresponding locations. Args: img_gts (list[ndarray] | ndarray): GT ima
basicsr/data/transforms.py:24
↓ 2 callersFunctionparse_options
(is_train=True)
basicsr/train.py:23
↓ 2 callersFunctionpaths_from_lmdb
Generate paths from lmdb. Args: folder (str): Folder path. Returns: list[str]: Returned path list.
basicsr/data/data_util.py:322
↓ 2 callersMethodsave_network
Save networks. Args: net (nn.Module | list[nn.Module]): Network(s) to be saved. net_label (str): Network label.
basicsr/models/base_model.py:214
↓ 2 callersFunctionsizeof_fmt
Get human readable file size. Args: size (int): File size. suffix (str): Suffix. Default: 'B'. Return: str: Formated
basicsr/utils/misc.py:166
↓ 2 callersFunctiontensor2img
Convert torch Tensors into image numpy arrays. After clamping to [min, max], values will be normalized to [0, 1]. Args: tensor (Tens
basicsr/utils/img_util.py:36
↓ 1 callersMethod__init__
(self, mixup_beta, use_identity, device)
basicsr/models/image_restoration_model.py:23
↓ 1 callersMethod__init__
(self, scale, num_feat)
basicsr/models/archs/arch_util.py:104
↓ 1 callersMethod__iter__
(self)
basicsr/data/prefetch_dataloader.py:36
↓ 1 callersFunction_augment
(img)
basicsr/data/transforms.py:162
↓ 1 callersFunction_augment_flow
(flow)
basicsr/data/transforms.py:171
↓ 1 callersFunction_generate_3d_gaussian_kernel
()
basicsr/metrics/psnr_ssim.py:135
↓ 1 callersMethod_get_init_lr
Get the initial lr, which is set by the scheduler.
basicsr/models/base_model.py:174
↓ 1 callersFunction_init_dist_pytorch
(backend, **kwargs)
basicsr/utils/dist_util.py:21
↓ 1 callersFunction_init_dist_slurm
Initialize slurm distributed training environment. If argument ``port`` is not specified, then the master port will be system environment var
basicsr/utils/dist_util.py:28
↓ 1 callersMethod_log_validation_metric_values
(self, current_iter, dataset_name, tb_logger)
basicsr/models/image_restoration_model.py:300
↓ 1 callersFunction_minimal_ext_cmd
(cmd)
setup.py:25
↓ 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
basicsr/models/base_model.py:246
↓ 1 callersMethod_set_lr
Set learning rate for warmup. Args: lr_groups_l (list): List for lr_groups, each for an optimizer.
basicsr/models/base_model.py:164
↓ 1 callersFunction_ssim_3d
(img1, img2, max_value)
basicsr/metrics/psnr_ssim.py:145
↓ 1 callersFunction_ssim_cly
(img1, img2)
basicsr/metrics/psnr_ssim.py:184
↓ 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
basicsr/utils/matlab_functions.py:207
↓ 1 callersFunctioncheck_resume
Check resume states and pretrain_network paths. Args: opt (dict): Options. resume_iter (int): Resume iteration.
basicsr/utils/misc.py:137
↓ 1 callersFunctioncompute_feature
Compute features. Args: block (ndarray): 2D Image block. Returns: list: Features with length of 18.
basicsr/metrics/niqe.py:40
↓ 1 callersFunctioncreate_train_val_dataloader
(opt, logger)
basicsr/train.py:81
↓ 1 callersFunctiondata_augmentation
Performs data augmentation of the input image Input: image: a cv2 (OpenCV) image mode: int. Choice of transformation to apply
basicsr/data/transforms.py:223
↓ 1 callersFunctiondefault_init_weights
Initialize network weights. Args: module_list (list[nn.Module] | nn.Module): Modules to be initialized. scale (float): Scale init
basicsr/models/archs/arch_util.py:19
↓ 1 callersFunctiondequantize
Dequantize an array. Args: arr (ndarray): Input array. min_val (scalar): Minimum value to be clipped. max_val (scalar): M
basicsr/utils/flow_util.py:157
↓ 1 callersFunctiondequantize_flow
Recover from quantized flow. Args: dx (ndarray): Quantized dx. dy (ndarray): Quantized dy. max_val (float): Maximum value
basicsr/utils/flow_util.py:106
↓ 1 callersMethoddist_validation
(self, dataloader, current_iter, tb_logger, save_img, rgb2bgr, use_image)
basicsr/models/image_restoration_model.py:207
↓ 1 callersFunctiondynamic_instantiation
Dynamically instantiate class. Args: modules (list[importlib modules]): List of modules from importlib files. cls_typ
basicsr/models/archs/__init__.py:21
↓ 1 callersMethodfeed_data
(self, data)
basicsr/models/image_restoration_model.py:144
↓ 1 callersMethodfeed_train_data
(self, data)
basicsr/models/image_restoration_model.py:136
↓ 1 callersFunctiongenerate_gaussian_kernel
Generate Gaussian kernel used in `duf_downsample`. Args: kernel_size (int): Kernel size. Default: 13. sigma (float): Sigma of the
basicsr/data/data_util.py:338
↓ 1 callersFunctionget_confirm_token
(response)
basicsr/utils/download_util.py:41
↓ 1 callersMethodget_current_learning_rate
(self)
basicsr/models/base_model.py:207
↓ 1 callersMethodget_current_log
(self)
basicsr/models/base_model.py:64
↓ 1 callersMethodget_current_visuals
(self)
basicsr/models/image_restoration_model.py:311
↓ 1 callersFunctionget_git_hash
()
setup.py:23
↓ 1 callersFunctionget_hash
()
setup.py:49
↓ 1 callersFunctionget_requirements
(filename='requirements.txt')
setup.py:116
↓ 1 callersFunctionget_version
()
setup.py:84
↓ 1 callersFunctionget_weights_and_parameters
(task, parameters)
test.py:36
↓ 1 callersFunctioninit_loggers
(opt)
basicsr/train.py:60
↓ 1 callersFunctioninit_tb_logger
(log_dir)
basicsr/utils/logger.py:81
↓ 1 callersMethodinit_training_settings
(self)
basicsr/models/image_restoration_model.py:78
↓ 1 callersFunctioninit_wandb_logger
We now only use wandb to sync tensorboard log.
basicsr/utils/logger.py:88
↓ 1 callersFunctionl1_loss
(pred, target)
basicsr/models/losses/losses.py:12
↓ 1 callersFunctionload_img
(filepath)
test.py:24
next →1–100 of 336, ranked by callers