MCPcopy Create free account

hub / github.com/caiyuanhao1998/Retinexformer / functions

Functions364 in github.com/caiyuanhao1998/Retinexformer

↓ 71 callersMethodget
(self, filepath, client_key='default')
basicsr/utils/file_client.py:177
↓ 16 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:110
↓ 16 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
↓ 15 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:76
↓ 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
↓ 12 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
↓ 9 callersFunctionread_img_seq
Read a sequence of images from a given folder path. Args: path (list[str] | str): List of image paths or image folder path. requi
basicsr/data/data_util.py:12
↓ 8 callersMethodclose
(self)
basicsr/utils/lmdb_util.py:205
↓ 7 callersMethod__init__
( self, dim, dim_head=64, heads=8, num_blocks=2,
basicsr/models/archs/RetinexFormer_arch.py:204
↓ 6 callersMethodget_bare_model
Get bare model, especially under wrapping with DistributedDataParallel or DataParallel.
basicsr/models/base_model.py:135
↓ 5 callersFunction_3d_gaussian_calculator
(img, conv3d)
basicsr/metrics/psnr_ssim.py:131
↓ 5 callersMethod__init__
(self, in_dim=30, out_dim=30, dim=30, stage=2, num_blocks=[2,4,4])
basicsr/models/archs/MST_Plus_Plus_arch.py:167
↓ 5 callersFunctionget_time_str
()
basicsr/utils/misc.py:22
↓ 5 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:26
↓ 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, opt)
basicsr/data/paired_image_dataset.py:47
↓ 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 callersFunctionaugment
Augment: horizontal flips OR rotate (0, 90, 180, 270 degrees). We use vertical flip and transpose for rotation implementation. All the images
basicsr/data/transforms.py:140
↓ 4 callersFunctioncreate_model
Create model. Args: opt (dict): Configuration. It constains: model_type (str): Model type.
basicsr/models/__init__.py:21
↓ 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
↓ 4 callersFunctionrandom_augmentation
(*args)
basicsr/data/transforms.py:276
↓ 4 callersFunctionself_ensemble
(x, model)
Enhancement/test_from_dataset.py:29
↓ 3 callersMethod__init__
(self, loss_weight=1.0, reduction='mean')
basicsr/models/losses/losses.py:35
↓ 3 callersFunction_augment
(img)
basicsr/data/util.py:237
↓ 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:59
↓ 3 callersFunctioncreate_dataset
Create dataset. Args: dataset_opt (dict): Configuration for dataset. It constains: name (str): Dataset name. type
basicsr/data/__init__.py:32
↓ 3 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
↓ 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 callersFunctionpadding
(img_lq, img_gt, gt_size)
basicsr/utils/img_util.py:148
↓ 3 callersFunctionpaired_paths_from_folder
Generate paired paths from folders. Args: folders (list[str]): A list of folder path. The order of list should be [input_fold
basicsr/data/data_util.py:208
↓ 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
basicsr/data/data_util.py:92
↓ 3 callersFunctionpaired_paths_from_meta_info_file
Generate paired paths from an meta information file. Each line in the meta information file contains the image names and image shape (usually
basicsr/data/data_util.py:158
↓ 3 callersMethodpreload
(self)
basicsr/data/prefetch_dataloader.py:105
↓ 3 callersMethodput
(self, img_byte, key, img_shape)
basicsr/utils/lmdb_util.py:194
↓ 3 callersFunctionssim
(img1, img2)
Enhancement/utils.py:69
↓ 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, loader)
basicsr/data/prefetch_dataloader.py:70
↓ 2 callersMethod__init__
(self, opt)
basicsr/data/video_test_dataset.py:44
↓ 2 callersFunction_read_img_lmdb
read image from lmdb with key (w/ and w/o fixed size) size: (C, H, W) tuple
basicsr/data/util.py:71
↓ 2 callersFunction_scandir
(dir_path, suffix, recursive)
basicsr/utils/misc.py:97
↓ 2 callersFunction_totensor
(img, bgr2rgb, float32)
basicsr/utils/img_util.py:22
↓ 2 callersMethodarguement
(self, img, rotTimes, vFlip, hFlip)
basicsr/data/paired_image_dataset.py:214
↓ 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 callersFunctionconv
(in_channels, out_channels, kernel_size, bias=False, padding=1, stride=1)
basicsr/models/archs/RetinexFormer_arch.py:76
↓ 2 callersFunctioncubic
cubic function used for calculate_weights_indices.
basicsr/utils/matlab_functions.py:6
↓ 2 callersFunctiondefine_network
(opt)
basicsr/models/archs/__init__.py:45
↓ 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:93
↓ 2 callersFunctionduf_downsample
Downsamping with Gaussian kernel used in the DUF official code. Args: x (Tensor): Frames to be downsampled, with shape (b, t, c, h, w).
basicsr/data/data_util.py:358
↓ 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 callersFunctionflip
(x, dim)
basicsr/data/util.py:18
↓ 2 callersFunctiongenerate_frame_indices
Generate an index list for reading `num_frames` frames from a sequence of images. Args: crt_idx (int): Current center index.
basicsr/data/data_util.py:36
↓ 2 callersFunctionget_env_info
Get environment information. Currently, only log the software version.
basicsr/utils/logger.py:157
↓ 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:53
↓ 2 callersFunctionmkdir_and_rename2
mkdirs. If path exists, rename it with timestamp and create a new one. Args: path (str): Folder path.
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:243
↓ 2 callersFunctionnorm_cdf
(x)
basicsr/models/archs/RetinexFormer_arch.py:13
↓ 2 callersFunctionnorm_cdf
(x)
basicsr/models/archs/MST_Plus_Plus_arch.py:10
↓ 2 callersFunctionparse
Parse option file. Args: opt_path (str): Option file path. is_train (str): Indicate whether in training or not. Default: True.
basicsr/utils/options.py:31
↓ 2 callersFunctionparse_options
(is_train=True)
basicsr/train.py:28
↓ 2 callersFunctionpaths_from_lmdb
Generate paths from lmdb. Args: folder (str): Folder path. Returns: list[str]: Returned path list.
basicsr/data/data_util.py:324
↓ 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:191
↓ 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
↓ 2 callersFunctiontrunc_normal_
(tensor, mean=0., std=1., a=-2., b=2.)
basicsr/models/archs/RetinexFormer_arch.py:31
↓ 1 callersMethod__init__
(self, mixup_beta, use_identity, device)
basicsr/models/image_restoration_model.py:31
↓ 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:166
↓ 1 callersFunction_augment_flow
(flow)
basicsr/data/transforms.py:175
↓ 1 callersFunction_augment_flow
(flow)
basicsr/data/util.py:285
↓ 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_get_paths_from_images
get image path list from image folder
basicsr/data/util.py:29
↓ 1 callersFunction_get_paths_from_lmdb
get image path list from lmdb meta info
basicsr/data/util.py:42
↓ 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:328
↓ 1 callersFunction_minimal_ext_cmd
(cmd)
setup.py:25
↓ 1 callersFunction_no_grad_trunc_normal_
(tensor, mean, std, a, b)
basicsr/models/archs/RetinexFormer_arch.py:12
↓ 1 callersFunction_no_grad_trunc_normal_
(tensor, mean, std, a, b)
basicsr/models/archs/MST_Plus_Plus_arch.py:9
↓ 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 callersFunctionbgr2ycbcr
bgr version of rgb2ycbcr only_y: only return Y channel Input: uint8, [0, 255] float, [0, 1]
basicsr/data/util.py:341
↓ 1 callersFunctioncheck_resume
Check resume states and pretrain_network paths. Args: opt (dict): Options. resume_iter (int): Resume iteration.
basicsr/utils/misc.py:162
↓ 1 callersFunctioncompute_feature
Compute features. Args: block (ndarray): 2D Image block. Returns: list: Features with length of 18.
basicsr/metrics/niqe.py:40
next →1–100 of 364, ranked by callers