MCPcopy Create free account

hub / github.com/DragonisCV/RAM / functions

Functions659 in github.com/DragonisCV/RAM

Methodget_text
(self, filepath)
ram/utils/file_client.py:18
Methodget_text
(self, filepath)
ram/utils/file_client.py:54
Methodget_text
(self, filepath)
ram/utils/file_client.py:67
Methodget_text
(self, filepath)
ram/utils/file_client.py:128
Methodget_text
(self, filepath)
ram/utils/file_client.py:166
Functiongradient_penalty_loss
Calculate gradient penalty for wgan-gp. Args: discriminator (nn.Module): Network for the discriminator. real_data (Tensor): Real
ram/losses/losses.py:507
Functionimg_rotate
Rotate image. Args: img (ndarray): Image to be rotated. angle (float): Rotation angle in degrees. Positive values mean
ram/data/utils/transforms.py:196
Methodinit_training_settings
(self)
ram/models/ram_finetune_model.py:53
Functionload_file_from_url
Load file form http url, will download models if necessary. Reference: https://github.com/1adrianb/face-alignment/blob/master/face_alignment/util
ram/utils/download_util.py:69
Functionload_patched_inception_v3
(device='cuda', resize_input=True, normalize_input=False)
ram/metrics/fid.py:10
Functionmake_cuda_ext
(name, module, sources, sources_cuda=None)
setup.py:82
Functionmake_layer
Make layers by stacking the same blocks. Args: basic_block (nn.module): nn.module class for basic block. num_basic_block (int): n
ram/archs/arch_util.py:48
Functionmaster_only
(func)
ram/utils/dist_util.py:74
Functionmod_crop
Mod crop images, used during testing. Args: img (ndarray): Input image. scale (int): Scale factor. Returns: ndarray:
ram/data/utils/transforms.py:6
Functionmodulated_deform_conv_backward
ram/ops/dcn/src/deform_conv_ext.cpp:127
Functionmodulated_deform_conv_forward
ram/ops/dcn/src/deform_conv_ext.cpp:107
Methodnext
(self)
ram/data/utils/prefetch_dataloader.py:74
Methodno_weight_decay
(self)
ram/archs/swinir_arch.py:809
Methodno_weight_decay_keywords
(self)
ram/archs/swinir_arch.py:813
Methodnondist_validation
(self, dataloader, current_iter, tb_logger, save_img, test_num=-1, save_num=-1)
ram/models/ram_plus_finetune_model.py:352
Methodoptimize_parameters
(self, current_iter)
ram/models/ram_plus_pretrain_model.py:141
Methodoptimize_parameters
(self, current_iter)
ram/models/ram_plus_finetune_model.py:125
Methodoptimize_parameters
(self, current_iter)
ram/models/ram_base_model.py:93
Methodoptimize_parameters
(self, current_iter)
ram/models/ram_pretrain_model.py:54
Methodoptimize_parameters
(self, current_iter)
ram/models/ram_finetune_model.py:83
Functionpaired_paths_from_lmdb
Generate paired paths from lmdb files. Contents of lmdb. Taking the `lq.lmdb` for example, the file structure is: :: lq.lmdb
ram/data/utils/data_util.py:6
Functionpaired_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
ram/data/utils/data_util.py:67
Functionparse
(x)
ram/archs/arch_util.py:301
Functionpaths_from_folder
Generate paths from folder. Args: folder (str): Folder path. Returns: list[str]: Returned path list.
ram/data/utils/data_util.py:147
Functionpixel_unshuffle
Pixel unshuffle. Args: x (Tensor): Input feature with shape (b, c, hh, hw). scale (int): Downsample ratio. Returns:
ram/archs/arch_util.py:186
Functionr1_penalty
R1 regularization for discriminator. The core idea is to penalize the gradient on real data alone: when the generator distribution pro
ram/losses/losses.py:478
Functionread_data_from_tensorboard
Get raw data (steps and values) from tensorboard events. Args: log_path (str): Path to the tensorboard log. tag (str): tag to be
ram/utils/plot_util.py:4
Functionread_data_from_txt_1v
Read data from txt with 1 returned values. Args: path (str): path to the txt file. pattern (str): re (regular expression) pattern
ram/utils/plot_util.py:48
Functionread_data_from_txt_2v
Read data from txt with 2 returned values (usually [step, value]). Args: path (str): path to the txt file. pattern (str): re (reg
ram/utils/plot_util.py:23
Methodregister
Register the given object under the the name `obj.__name__`. Can be used as either a decorator or not. See docstring of this
ram/utils/registry.py:46
Methodreset
(self)
ram/data/utils/prefetch_dataloader.py:80
Methodreshape_features
(feat)
ram/utils/dino_feature_extractor.py:48
Functionresize_flow
Resize a flow according to ratio or shape. Args: flow (Tensor): Precomputed flow. shape [N, 2, H, W]. size_type (str): 'ratio' or
ram/archs/arch_util.py:147
Functionrgb2ycbcr
Convert a RGB image to YCbCr image. This function produces the same results as Matlab's `rgb2ycbcr` function. It implements the ITU-R BT.601
ram/utils/color_util.py:5
Methodrun
(self)
ram/data/utils/prefetch_dataloader.py:25
Functionsave
Save tensor as image.
scripts/analysis_utils.py:75
Methodsave
(self, epoch, current_iter)
ram/models/ram_plus_pretrain_model.py:170
Methodsave
(self, epoch, current_iter)
ram/models/ram_plus_finetune_model.py:513
Methodsave
(self, epoch, current_iter)
ram/models/ram_base_model.py:172
Methodsave
(self, epoch, current_iter)
ram/models/ram_pretrain_model.py:158
Methodsave_image
(self, current_iter, img_name)
ram/models/ram_plus_pretrain_model.py:199
Methodsave_image
(self, current_iter, img_name)
ram/models/ram_plus_finetune_model.py:467
Functionsmooth_data
Smooth data using 1st-order IIR low-pass filter (what tensorflow does). Reference: https://github.com/tensorflow/tensorboard/blob/f801ebf1f9fbfe
ram/utils/plot_util.py:68
Functiontensor2img_fast
This implementation is slightly faster than tensor2img. It now only supports torch tensor with shape (1, c, h, w). Args: tensor (Tens
ram/utils/img_util.py:97
Methodtest
(self)
ram/models/ram_base_model.py:119
Functionupfirdn2d
(input, kernel, up=1, down=1, pad=(0, 0))
ram/ops/upfirdn2d/upfirdn2d.py:153
Functionupfirdn2d
ram/ops/upfirdn2d/src/upfirdn2d.cpp:13
Functionusm_sharp
USM sharpening. Input image: I; Blurry image: B. 1. sharp = I + weight * (I - B) 2. Mask = 1 if abs(I - B) > threshold, else: 0 3. Bl
ram/utils/img_process_util.py:34
Functionweighted_loss
Create a weighted version of a given loss function. To use this decorator, the loss function must have the signature like `loss_func(pred, ta
ram/losses/loss_util.py:58
Functionworker_init_fn
(worker_id, num_workers, rank, seed)
ram/data/__init__.py:97
Functionwrapper
(*args, **kwargs)
ram/utils/dist_util.py:77
Functionwrapper
(pred, target, weight=None, reduction='mean', **kwargs)
ram/losses/loss_util.py:90
Functionycbcr2bgr
Convert a YCbCr image to BGR image. The bgr version of ycbcr2rgb. It implements the ITU-R BT.601 conversion for standard-definition telev
ram/utils/color_util.py:100
Functionycbcr2rgb
Convert a YCbCr image to RGB image. This function produces the same results as Matlab's ycbcr2rgb function. It implements the ITU-R BT.601 co
ram/utils/color_util.py:71
← previous601–659 of 659, ranked by callers