MCPcopy Create free account

hub / github.com/HPLQAQ/SAM-Deblur / functions

Functions372 in github.com/HPLQAQ/SAM-Deblur

↓ 80 callersMethodget
(self, filepath, client_key='default')
basicsr/utils/file_client.py:183
↓ 20 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:59
↓ 17 callersMethodclose
(self)
basicsr/utils/lmdb_util.py:211
↓ 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:15
↓ 12 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:127
↓ 10 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:13
↓ 9 callersMethod__init__
(self, n_feat)
basicsr/models/archs/restormer_arch.py:182
↓ 9 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:147
↓ 8 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:107
↓ 5 callersFunction_3d_gaussian_calculator
(img, conv3d)
basicsr/metrics/psnr_ssim.py:157
↓ 5 callersMethod__init__
(self, c)
basicsr/models/archs/NAFSSR_arch.py:29
↓ 5 callersMethodconvert
(self, *args, train_size, **kwargs)
basicsr/models/archs/local_arch.py:100
↓ 5 callersFunctionget_dist_info
()
basicsr/utils/dist_util.py:68
↓ 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:12
↓ 5 callersMethodsave
Save networks and training state.
basicsr/models/base_model.py:39
↓ 5 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:42
↓ 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:40
↓ 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:311
↓ 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:339
↓ 4 callersFunctioncreate_lmdb_for_gopro
()
basicsr/utils/create_lmdb.py:64
↓ 4 callersFunctioncreate_model
Create model. Args: opt (dict): Configuration. It constains: model_type (str): Model type.
basicsr/models/__init__.py:27
↓ 4 callersMethodget_bare_model
Get bare model, especially under wrapping with DistributedDataParallel or DataParallel.
basicsr/models/base_model.py:116
↓ 4 callersMethodput
(self, img_byte, key, img_shape)
basicsr/utils/lmdb_util.py:200
↓ 3 callersMethod__init__
(self, optimizer, total_iter, last_epoch=-1)
basicsr/models/lr_scheduler.py:64
↓ 3 callersMethod__init__
(self, img_channel=3, mask=False, width=16, middle_blk_num=1, enc_blk_nums=[], dec_blk_nums=[])
basicsr/models/archs/NAFNet_arch.py:85
↓ 3 callersMethod__init__
(self, img_channel=3, width=16, middle_blk_num=1, enc_blk_nums=[], dec_blk_nums=[], dw_expand=1, ffn_expand=2)
basicsr/models/archs/Baseline_arch.py:84
↓ 3 callersFunction_augment
(img)
basicsr/data/paired_image_group_mask_dataset.py:407
↓ 3 callersFunction_cal_ssim
(img1, img2)
basicsr/metrics/psnr_ssim.py:307
↓ 3 callersFunction_psnr
(img1, img2)
basicsr/metrics/psnr_ssim.py:62
↓ 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:63
↓ 3 callersFunctioncreate_dataset
Create dataset. Args: dataset_opt (dict): Configuration for dataset. It constains: name (str): Dataset name. type
basicsr/data/__init__.py:36
↓ 3 callersFunctiondefine_network
(opt)
basicsr/models/archs/__init__.py:49
↓ 3 callersFunctionget_time_str
()
basicsr/utils/misc.py:27
↓ 3 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:15
↓ 3 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:262
↓ 3 callersFunctionmake_cuda_ext
(name, module, sources, sources_cuda=None)
setup.py:82
↓ 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:31
↓ 3 callersFunctionparse_options
(is_train=True)
basicsr/train.py:28
↓ 3 callersMethodpreload
(self)
basicsr/data/prefetch_dataloader.py:111
↓ 3 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:195
↓ 3 callersMethodvalidation
Validation function. Args: dataloader (torch.utils.data.DataLoader): Validation dataloader. current_iter (int): Curre
basicsr/models/base_model.py:43
↓ 2 callersMethod__init__
(self, loader)
basicsr/data/prefetch_dataloader.py:76
↓ 2 callersMethod__init__
(self, scale, num_feat)
basicsr/models/archs/arch_util.py:110
↓ 2 callersMethod__init__
(self, img_channel=3, seg_channel=3, width=16, middle_blk_num=1, mask_dropout = 0.5, enc_blk_nums=[], dec_blk_
basicsr/models/archs/SegNAFNet_arch.py:25
↓ 2 callersMethod__init__
(self, loss_weight=1.0, reduction='mean')
basicsr/models/losses/losses.py:41
↓ 2 callersFunction_scandir
(dir_path, suffix, recursive)
basicsr/utils/misc.py:80
↓ 2 callersFunction_totensor
(img, bgr2rgb, float32)
basicsr/utils/img_util.py:28
↓ 2 callersFunction_totensor
(img, bgr2rgb, float32)
basicsr/data/paired_image_mask_dataset.py:359
↓ 2 callersFunction_totensor
(img, bgr2rgb, float32)
basicsr/data/paired_image_group_mask_dataset.py:501
↓ 2 callersMethodbackward
(ctx, grad_output)
basicsr/models/archs/arch_util.py:278
↓ 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:23
↓ 2 callersFunctioncubic
cubic function used for calculate_weights_indices.
basicsr/utils/matlab_functions.py:12
↓ 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:99
↓ 2 callersFunctionestimate_aggd_param
Estimate AGGD (Asymmetric Generalized Gaussian Distribution) paramters. Args: block (ndarray): 2D Image block. Returns: tupl
basicsr/metrics/niqe.py:16
↓ 2 callersFunctionextract_subimages
Crop images to subimages. Args: opt (dict): Configuration dict. It contains: input_folder (str): Path to the input folder.
scripts/data_preparation/crop_gopro.py:40
↓ 2 callersMethodfeed_data
(self, data)
basicsr/models/base_model.py:30
↓ 2 callersMethodget_current_learning_rate
(self)
basicsr/models/base_model.py:188
↓ 2 callersMethodget_current_log
(self)
basicsr/models/base_model.py:60
↓ 2 callersFunctionget_env_info
Get environment information. Currently, only log the software version.
basicsr/utils/logger.py:166
↓ 2 callersMethodgrids
(self)
basicsr/models/image_restoration_model.py:112
↓ 2 callersMethodgrids_inverse
(self)
basicsr/models/image_restoration_model.py:166
↓ 2 callersFunctionimg2tensor
(imgs, bgr2rgb=True, float32=True)
basicsr/data/paired_image_mask_dataset.py:358
↓ 2 callersFunctioninit_dist
(launcher, backend='nccl', **kwargs)
basicsr/utils/dist_util.py:17
↓ 2 callersFunctionmake_exp_dirs
Make dirs for experiments.
basicsr/utils/misc.py:45
↓ 2 callersMethodmodel_to_device
Model to device. It also warps models with DistributedDataParallel or DataParallel. Args: net (nn.Module)
basicsr/models/base_model.py:63
↓ 2 callersMethodnext
(self)
basicsr/data/prefetch_dataloader.py:124
↓ 2 callersMethodnondist_validation
(self, dataloader, current_iter, tb_logger, save_img, rgb2bgr, use_image)
basicsr/models/image_clean_model.py:213
↓ 2 callersFunctionprepare_keys
(folder_path, suffix='png')
scripts/data_preparation/lmdb_create_ReLoBlur.py:14
↓ 2 callersMethodreduce_loss_dict
reduce loss dict. In distributed training, it averages the losses among different GPUs . Args: loss_dict (OrderedDict):
basicsr/models/base_model.py:331
↓ 2 callersMethodsave_training_state
Save training states during training, which will be used for resuming. Args: epoch (int): Current epoch. curr
basicsr/models/base_model.py:290
↓ 2 callersMethodsetup_schedulers
Set up schedulers.
basicsr/models/base_model.py:83
↓ 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:172
↓ 2 callersMethodtest
(self)
basicsr/models/image_restoration_model.py:242
↓ 1 callersMethod__init__
(self, mixup_beta, use_identity, device)
basicsr/models/image_clean_model.py:23
↓ 1 callersMethod__iter__
(self)
basicsr/data/prefetch_dataloader.py:42
↓ 1 callersFunction_augment
(img)
basicsr/data/transforms.py:184
↓ 1 callersFunction_augment
(img)
basicsr/data/paired_image_mask_dataset.py:308
↓ 1 callersFunction_augment_flow
(flow)
basicsr/data/transforms.py:195
↓ 1 callersFunction_augment_flow
(flow)
basicsr/data/paired_image_mask_dataset.py:327
↓ 1 callersFunction_augment_flow
(flow)
basicsr/data/paired_image_group_mask_dataset.py:426
↓ 1 callersFunction_augment_mask
(mask)
basicsr/data/paired_image_group_mask_dataset.py:482
↓ 1 callersFunction_generate_3d_gaussian_kernel
()
basicsr/metrics/psnr_ssim.py:161
↓ 1 callersMethod_get_init_lr
Get the initial lr, which is set by the scheduler.
basicsr/models/base_model.py:155
↓ 1 callersFunction_init_dist_pytorch
(backend, **kwargs)
basicsr/utils/dist_util.py:28
↓ 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:35
↓ 1 callersMethod_log_validation_metric_values
(self, current_iter, dataset_name, tb_logger)
basicsr/models/image_clean_model.py:300
↓ 1 callersMethod_log_validation_metric_values
(self, current_iter, dataset_name, tb_logger, metric_dict)
basicsr/models/image_restoration_model.py:397
↓ 1 callersFunction_minimal_ext_cmd
(cmd)
setup.py:20
↓ 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:227
↓ 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:145
↓ 1 callersFunction_ssim
Calculate SSIM (structural similarity) for one channel images. It is called by func:`calculate_ssim`. Args: img1 (ndarray): Images w
basicsr/metrics/psnr_ssim.py:92
↓ 1 callersFunction_ssim_3d
(img1, img2, max_value)
basicsr/metrics/psnr_ssim.py:171
↓ 1 callersFunction_ssim_cly
(img1, img2)
basicsr/metrics/psnr_ssim.py:210
↓ 1 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:157
↓ 1 callersFunctionaugment
(imgs, hflip=True, rotation=True, flows=None, return_status=False, vflip=False)
basicsr/data/paired_image_mask_dataset.py:302
↓ 1 callersFunctionaugment_with_masks
(img_gt, img_lq, img_mask, hflip=True, rotation=True, flows=None, return_status=False, vflip=False)
basicsr/data/paired_image_group_mask_dataset.py:457
↓ 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:213
↓ 1 callersFunctioncalculate_psnr
Calculate PSNR (Peak Signal-to-Noise Ratio). Ref: https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio Args: img1 (ndarray/tenso
basicsr/metrics/psnr_ssim.py:16
↓ 1 callersFunctioncalculate_skimage_ssim
(img1, img2)
basicsr/metrics/psnr_ssim.py:352
↓ 1 callersFunctioncalculate_ssim
Calculate SSIM (structural similarity). Ref: Image quality assessment: From error visibility to structural similarity The results are th
basicsr/metrics/psnr_ssim.py:251
next →1–100 of 372, ranked by callers