Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DragonisCV/RAM
/ functions
Functions
659 in github.com/DragonisCV/RAM
⨍
Functions
659
◇
Types & classes
149
Method
get_text
(self, filepath)
ram/utils/file_client.py:18
Method
get_text
(self, filepath)
ram/utils/file_client.py:54
Method
get_text
(self, filepath)
ram/utils/file_client.py:67
Method
get_text
(self, filepath)
ram/utils/file_client.py:128
Method
get_text
(self, filepath)
ram/utils/file_client.py:166
Function
gradient_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
Function
img_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
Method
init_training_settings
(self)
ram/models/ram_finetune_model.py:53
Function
load_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
Function
load_patched_inception_v3
(device='cuda', resize_input=True, normalize_input=False)
ram/metrics/fid.py:10
Function
make_cuda_ext
(name, module, sources, sources_cuda=None)
setup.py:82
Function
make_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
Function
master_only
(func)
ram/utils/dist_util.py:74
Function
mod_crop
Mod crop images, used during testing. Args: img (ndarray): Input image. scale (int): Scale factor. Returns: ndarray:
ram/data/utils/transforms.py:6
Function
modulated_deform_conv_backward
ram/ops/dcn/src/deform_conv_ext.cpp:127
Function
modulated_deform_conv_forward
ram/ops/dcn/src/deform_conv_ext.cpp:107
Method
next
(self)
ram/data/utils/prefetch_dataloader.py:74
Method
no_weight_decay
(self)
ram/archs/swinir_arch.py:809
Method
no_weight_decay_keywords
(self)
ram/archs/swinir_arch.py:813
Method
nondist_validation
(self, dataloader, current_iter, tb_logger, save_img, test_num=-1, save_num=-1)
ram/models/ram_plus_finetune_model.py:352
Method
optimize_parameters
(self, current_iter)
ram/models/ram_plus_pretrain_model.py:141
Method
optimize_parameters
(self, current_iter)
ram/models/ram_plus_finetune_model.py:125
Method
optimize_parameters
(self, current_iter)
ram/models/ram_base_model.py:93
Method
optimize_parameters
(self, current_iter)
ram/models/ram_pretrain_model.py:54
Method
optimize_parameters
(self, current_iter)
ram/models/ram_finetune_model.py:83
Function
paired_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
Function
paired_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
Function
parse
(x)
ram/archs/arch_util.py:301
Function
paths_from_folder
Generate paths from folder. Args: folder (str): Folder path. Returns: list[str]: Returned path list.
ram/data/utils/data_util.py:147
Function
pixel_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
Function
r1_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
Function
read_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
Function
read_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
Function
read_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
Method
register
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
Method
reset
(self)
ram/data/utils/prefetch_dataloader.py:80
Method
reshape_features
(feat)
ram/utils/dino_feature_extractor.py:48
Function
resize_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
Function
rgb2ycbcr
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
Method
run
(self)
ram/data/utils/prefetch_dataloader.py:25
Function
save
Save tensor as image.
scripts/analysis_utils.py:75
Method
save
(self, epoch, current_iter)
ram/models/ram_plus_pretrain_model.py:170
Method
save
(self, epoch, current_iter)
ram/models/ram_plus_finetune_model.py:513
Method
save
(self, epoch, current_iter)
ram/models/ram_base_model.py:172
Method
save
(self, epoch, current_iter)
ram/models/ram_pretrain_model.py:158
Method
save_image
(self, current_iter, img_name)
ram/models/ram_plus_pretrain_model.py:199
Method
save_image
(self, current_iter, img_name)
ram/models/ram_plus_finetune_model.py:467
Function
smooth_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
Function
tensor2img_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
Method
test
(self)
ram/models/ram_base_model.py:119
Function
upfirdn2d
(input, kernel, up=1, down=1, pad=(0, 0))
ram/ops/upfirdn2d/upfirdn2d.py:153
Function
upfirdn2d
ram/ops/upfirdn2d/src/upfirdn2d.cpp:13
Function
usm_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
Function
weighted_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
Function
worker_init_fn
(worker_id, num_workers, rank, seed)
ram/data/__init__.py:97
Function
wrapper
(*args, **kwargs)
ram/utils/dist_util.py:77
Function
wrapper
(pred, target, weight=None, reduction='mean', **kwargs)
ram/losses/loss_util.py:90
Function
ycbcr2bgr
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
Function
ycbcr2rgb
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
← previous
601–659 of 659, ranked by callers