Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ShihaoZhaoZSH/Uni-ControlNet
/ functions
Functions
2,265 in github.com/ShihaoZhaoZSH/Uni-ControlNet
⨍
Functions
2,265
◇
Types & classes
474
↳
Endpoints
1
↓ 3 callers
Function
_scale_channel
Scale the data in the corresponding channel.
annotator/uniformer/mmcv/image/photometric.py:145
↓ 3 callers
Method
_sync_params
(self)
annotator/uniformer/mmcv/parallel/distributed_deprecated.py:37
↓ 3 callers
Function
accuracy
Calculate accuracy according to the prediction and target. Args: pred (torch.Tensor): The model prediction, shape (N, num_class, ...)
annotator/uniformer/mmseg/models/losses/accuracy.py:4
↓ 3 callers
Function
add_blur
(img, sf=4)
ldm/modules/image_degradation/bsrgan_light.py:324
↓ 3 callers
Function
allreduce_params
Allreduce parameters. Args: params (list[torch.Parameters]): List of parameters or buffers of a model. coalesce (bool
annotator/uniformer/mmcv/runner/dist_utils.py:99
↓ 3 callers
Function
color_val
Convert various input to color tuples. Args: color (:obj:`Color`/str/tuple/int/ndarray): Color inputs Returns: tuple[int]: A
annotator/uniformer/mmcv/visualization/color.py:24
↓ 3 callers
Function
convert_video
Convert a video with ffmpeg. This provides a general api to ffmpeg, the executed command is:: `ffmpeg -y <pre_options> -i <in_file> <opt
annotator/uniformer/mmcv/video/processing.py:11
↓ 3 callers
Function
count_params
(model, verbose=False)
ldm/util.py:65
↓ 3 callers
Method
crop
Crop from ``img``
annotator/uniformer/mmseg/datasets/pipelines/transforms.py:523
↓ 3 callers
Method
decode
(self, z)
ldm/models/autoencoder.py:88
↓ 3 callers
Method
dpm_solver_first_update
DPM-Solver-1 (equivalent to DDIM) from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
ldm/models/diffusion/dpm_solver/dpm_solver.py:469
↓ 3 callers
Method
encode_decode
Encode images with backbone and decode into a semantic segmentation map of the same size as input.
annotator/uniformer/mmseg/models/segmentors/encoder_decoder.py:84
↓ 3 callers
Method
encode_first_stage
(self, x)
ldm/models/diffusion/ddpm.py:831
↓ 3 callers
Method
every_n_epochs
(self, runner, n)
annotator/uniformer/mmcv/runner/hooks/hook.py:55
↓ 3 callers
Method
forward_train
Placeholder for Forward function for training.
annotator/uniformer/mmseg/models/segmentors/base.py:51
↓ 3 callers
Method
forward_train
Forward function for training. Args: img (Tensor): Input images. img_metas (list[dict]): List of image info dict wher
annotator/uniformer/mmseg/models/segmentors/encoder_decoder.py:136
↓ 3 callers
Function
fspecial
python code from: https://github.com/ronaldosena/imagens-medicas-2/blob/40171a6c259edec7827a6693a93955de2bd39e76/Aulas/aula_2_-_uniform_filte
ldm/modules/image_degradation/bsrgan_light.py:209
↓ 3 callers
Function
fspecial
python code from: https://github.com/ronaldosena/imagens-medicas-2/blob/40171a6c259edec7827a6693a93955de2bd39e76/Aulas/aula_2_-_uniform_filte
ldm/modules/image_degradation/bsrgan.py:210
↓ 3 callers
Function
get_class_weight
Get class weight for loss function. Args: class_weight (list[float] | str | None): If class_weight is a str, take it as a fil
annotator/uniformer/mmseg/models/losses/utils.py:8
↓ 3 callers
Method
get_first_stage_encoding
(self, encoder_posterior)
ldm/models/diffusion/ddpm.py:655
↓ 3 callers
Method
get_input
(self, batch, k)
ldm/models/autoencoder.py:102
↓ 3 callers
Method
get_loss
(self, pred, target, mean=True)
ldm/models/diffusion/ddpm.py:367
↓ 3 callers
Method
get_text
Read data from a given ``filepath`` with 'r' mode. Args: filepath (str or Path): Path to read data. encoding (str): T
annotator/uniformer/mmcv/fileio/file_client.py:994
↓ 3 callers
Method
get_unconditional_conditioning
(self, batch_size, null_label=None)
ldm/models/diffusion/ddpm.py:1124
↓ 3 callers
Method
get_weighting
(self, h, w, Ly, Lx, device)
ldm/models/diffusion/ddpm.py:698
↓ 3 callers
Function
imresize
Resize image to a given size. Args: img (ndarray): The input image. size (tuple[int]): Target size (w, h). return_scale (
annotator/uniformer/mmcv/image/geometric.py:51
↓ 3 callers
Function
imshow
Show an image. Args: img (str or ndarray): The image to be displayed. win_name (str): The window name. wait_time (int): V
annotator/uniformer/mmcv/visualization/image.py:9
↓ 3 callers
Function
imwrite
Write image to file. Args: img (ndarray): Image array to be written. file_path (str): Image file path. params (None or li
annotator/uniformer/mmcv/image/io.py:242
↓ 3 callers
Method
inference
Inference with slide/whole style. Args: img (Tensor): The input image of shape (N, 3, H, W). img_meta (dict): Image i
annotator/uniformer/mmseg/models/segmentors/encoder_decoder.py:233
↓ 3 callers
Function
isimage
(x)
ldm/util.py:41
↓ 3 callers
Function
ismap
(x)
ldm/util.py:35
↓ 3 callers
Function
load_from_http
load checkpoint through HTTP or HTTPS scheme path. In distributed setting, this function only download checkpoint at local rank 0. Args:
annotator/uniformer/mmcv/runner/checkpoint.py:267
↓ 3 callers
Method
log_images
(self, batch, N=8, n_row=2, sample=True, return_keys=None, **kwargs)
ldm/models/diffusion/ddpm.py:477
↓ 3 callers
Method
low_vram_shift
(self, is_diffusing)
models/uni_controlnet.py:157
↓ 3 callers
Method
make_block_plugins
make plugins for block. Args: in_channels (int): Input channels of plugin. plugins (list[dict]): List of plugins cfg
annotator/uniformer/mmseg/models/backbones/resnet.py:219
↓ 3 callers
Function
make_ddim_sampling_parameters
(alphacums, ddim_timesteps, eta, verbose=True)
ldm/modules/diffusionmodules/util.py:63
↓ 3 callers
Function
make_ddim_timesteps
(ddim_discr_method, num_ddim_timesteps, num_ddpm_timesteps, verbose=True)
ldm/modules/diffusionmodules/util.py:46
↓ 3 callers
Function
make_layers
(block, no_relu_layers)
annotator/openpose/model.py:7
↓ 3 callers
Method
marginal_alpha
Compute alpha_t of a given continuous-time label t in [0, T].
ldm/models/diffusion/dpm_solver/dpm_solver.py:120
↓ 3 callers
Method
put
(self, key, val)
annotator/uniformer/mmcv/video/io.py:30
↓ 3 callers
Method
scatter
(self, inputs, kwargs, device_ids)
annotator/uniformer/mmcv/parallel/distributed_deprecated.py:52
↓ 3 callers
Method
shared_step
(self, batch)
ldm/models/diffusion/ddpm.py:427
↓ 3 callers
Method
singlestep_dpm_solver_second_update
Singlestep solver DPM-Solver-2 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
ldm/models/diffusion/dpm_solver/dpm_solver.py:515
↓ 3 callers
Function
ssim
(img1, img2)
ldm/modules/image_degradation/utils_image.py:669
↓ 3 callers
Function
timestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be
ldm/modules/diffusionmodules/util.py:154
↓ 3 callers
Method
to_rgb
(self, x)
ldm/models/autoencoder.py:192
↓ 3 callers
Method
to_rgb
(self, x)
ldm/models/diffusion/ddpm.py:1303
↓ 2 callers
Function
Normalize
(in_channels)
ldm/modules/attention.py:88
↓ 2 callers
Method
__exit__
(self, type, value, traceback)
annotator/uniformer/mmcv/utils/timer.py:53
↓ 2 callers
Method
__init__
(self, ocr_channels, scale=1, **kwargs)
annotator/uniformer/mmseg/models/decode_heads/ocr_head.py:97
↓ 2 callers
Method
__init__
(self, in_channels, channels)
annotator/uniformer/mmseg/models/decode_heads/da_head.py:20
↓ 2 callers
Method
__init__
(self, kernel_size, group_size, scale_factor)
annotator/uniformer/mmcv/ops/carafe.py:194
↓ 2 callers
Method
__init__
(self, output_size, spatial_scale=1.0, sampling_ratio=0,
annotator/uniformer/mmcv/ops/deform_roi_pool.py:94
↓ 2 callers
Method
__init__
(self, depth, num_stages=4, strides=(1, 2, 2, 2),
annotator/uniformer/mmcv/cnn/resnet.py:210
↓ 2 callers
Method
__init__
(self)
ldm/modules/diffusionmodules/upscaling.py:58
↓ 2 callers
Function
_allreduce_coalesced
(tensors, world_size, bucket_size_mb=-1)
annotator/uniformer/mmcv/runner/dist_utils.py:145
↓ 2 callers
Function
_any
Since built-in ``any`` works only when the element of iterable is not iterable, implement the function.
annotator/uniformer/mmcv/utils/testing.py:25
↓ 2 callers
Method
_build_input_conv
(self, channel, conv_cfg, norm_cfg)
annotator/uniformer/mmcv/ops/merge_cells.py:78
↓ 2 callers
Method
_dist_broadcast_coalesced
(self, tensors, buffer_size)
annotator/uniformer/mmcv/parallel/distributed_deprecated.py:29
↓ 2 callers
Method
_do_evaluate
perform evaluation and save ckpt.
annotator/uniformer/mmcv/runner/hooks/evaluation.py:269
↓ 2 callers
Method
_dump_log
(self, log_dict, runner)
annotator/uniformer/mmcv/runner/hooks/logger/text.py:185
↓ 2 callers
Method
_freeze_stages
Freeze stages param and norm stats.
annotator/uniformer/mmseg/models/backbones/resnet.py:581
↓ 2 callers
Method
_get_coarse_point_feats
Sample from fine grained features. Args: prev_output (list[Tensor]): Prediction of previous decode head. points (Tens
annotator/uniformer/mmseg/models/decode_heads/point_head.py:147
↓ 2 callers
Method
_get_fine_grained_point_feats
Sample from fine grained features. Args: x (list[Tensor]): Feature pyramid from by neck or backbone. points (Tensor):
annotator/uniformer/mmseg/models/decode_heads/point_head.py:123
↓ 2 callers
Function
_get_mmcv_home
()
annotator/uniformer/mmcv/runner/checkpoint.py:30
↓ 2 callers
Function
_get_mmcv_home
()
annotator/uniformer/mmcv_custom/checkpoint.py:30
↓ 2 callers
Method
_get_real_position
(self)
annotator/uniformer/mmcv/video/io.py:124
↓ 2 callers
Method
_get_rows_from_list
(self, samples)
ldm/models/diffusion/ddpm.py:469
↓ 2 callers
Method
_get_weight
(self, weight)
annotator/uniformer/mmcv/cnn/bricks/conv_ws.py:101
↓ 2 callers
Method
_init_rule
Initialize rule, key_indicator, comparison_func, and best score. Here is the rule to determine which rule is used for key indicator w
annotator/uniformer/mmcv/runner/hooks/evaluation.py:153
↓ 2 callers
Function
_initialize
(module, cfg, wholemodule=False)
annotator/uniformer/mmcv/cnn/utils/weight_init.py:511
↓ 2 callers
Function
_jpegflag
(flag='color', channel_order='bgr')
annotator/uniformer/mmcv/image/io.py:69
↓ 2 callers
Method
_load_from_state_dict
Override default load function. AWS overrides the function _load_from_state_dict to recover weight_gamma and weight_beta if they are
annotator/uniformer/mmcv/cnn/bricks/conv_ws.py:114
↓ 2 callers
Method
_merge_a_into_b
merge dict ``a`` into dict ``b`` (non-inplace). Values in ``a`` will overwrite ``b``. ``b`` is copied first to avoid in-place modific
annotator/uniformer/mmcv/utils/config.py:274
↓ 2 callers
Function
_pillow2array
Convert a pillow image to numpy array. Args: img (:obj:`PIL.Image.Image`): The image loaded using PIL flag (str): Flags specifyin
annotator/uniformer/mmcv/image/io.py:85
↓ 2 callers
Method
_register_backend
(cls, name, backend, force=False, prefixes=None)
annotator/uniformer/mmcv/fileio/file_client.py:886
↓ 2 callers
Method
_register_scheme
(cls, prefixes, loader, force=False)
annotator/uniformer/mmcv/runner/checkpoint.py:168
↓ 2 callers
Method
_resize
(self, x, size)
annotator/uniformer/mmcv/ops/merge_cells.py:92
↓ 2 callers
Method
_save_checkpoint
Save the current checkpoint and delete unwanted checkpoint.
annotator/uniformer/mmcv/runner/hooks/checkpoint.py:119
↓ 2 callers
Method
_save_ckpt
Save the best checkpoint. It will compare the score according to the compare function, write related information (best score, best ch
annotator/uniformer/mmcv/runner/hooks/evaluation.py:314
↓ 2 callers
Function
_scale_size
Rescale a size by a ratio. Args: size (tuple[int]): (w, h). scale (float | tuple(float)): Scaling factor. Returns: t
annotator/uniformer/mmcv/image/geometric.py:16
↓ 2 callers
Method
_should_evaluate
Judge whether to perform evaluation. Here is the rule to judge whether to perform evaluation: 1. It will not perform evaluation durin
annotator/uniformer/mmcv/runner/hooks/evaluation.py:279
↓ 2 callers
Method
_swap_ema_parameters
Swap the parameter of model with parameter in ema_buffer.
annotator/uniformer/mmcv/runner/hooks/ema.py:83
↓ 2 callers
Method
_validation_step
(self, batch, batch_idx, postfix="")
ldm/models/autoencoder.py:136
↓ 2 callers
Function
add_Gaussian_noise
(img, noise_level1=2, noise_level2=25)
ldm/modules/image_degradation/bsrgan_light.py:372
↓ 2 callers
Function
add_Poisson_noise
(img)
ldm/modules/image_degradation/bsrgan.py:404
↓ 2 callers
Function
add_resize
(img, sf=4)
ldm/modules/image_degradation/bsrgan.py:339
↓ 2 callers
Function
add_speckle_noise
(img, noise_level1=2, noise_level2=25)
ldm/modules/image_degradation/bsrgan.py:386
↓ 2 callers
Method
after_epoch
(self, runner)
annotator/uniformer/mmcv/runner/hooks/hook.py:22
↓ 2 callers
Method
after_iter
(self, runner)
annotator/uniformer/mmcv/runner/hooks/hook.py:28
↓ 2 callers
Function
allreduce_grads
Allreduce gradients. Args: params (list[torch.Parameters]): List of parameters of a model coalesce (bool, optional): Whether allr
annotator/uniformer/mmcv/runner/dist_utils.py:121
↓ 2 callers
Function
bbox_clip
Clip bboxes to fit the image shape. Args: bboxes (ndarray): Shape (..., 4*k) img_shape (tuple[int]): (height, width) of the image
annotator/uniformer/mmcv/image/geometric.py:342
↓ 2 callers
Method
before_epoch
(self, runner)
annotator/uniformer/mmcv/runner/hooks/hook.py:19
↓ 2 callers
Method
before_iter
(self, runner)
annotator/uniformer/mmcv/runner/hooks/hook.py:25
↓ 2 callers
Function
bgr2gray
Convert a BGR image to grayscale image. Args: img (ndarray): The input image. keepdim (bool): If False (by default), then return
annotator/uniformer/mmcv/image/colorspace.py:22
↓ 2 callers
Function
bicubic_degradation
Args: x: HxWxC image, [0, 1] sf: down-scale factor Return: bicubicly downsampled LR image
ldm/modules/image_degradation/bsrgan_light.py:227
↓ 2 callers
Function
bicubic_degradation
Args: x: HxWxC image, [0, 1] sf: down-scale factor Return: bicubicly downsampled LR image
ldm/modules/image_degradation/bsrgan.py:228
↓ 2 callers
Function
build_dataloader
Build PyTorch DataLoader. In distributed training, each GPU/process has a dataloader. In non-distributed training, there is only one dataload
annotator/uniformer/mmseg/datasets/builder.py:78
↓ 2 callers
Function
build_dataset
Build datasets.
annotator/uniformer/mmseg/datasets/builder.py:61
↓ 2 callers
Function
build_dropout
Builder for drop out layers.
annotator/uniformer/mmcv/cnn/bricks/drop.py:63
← previous
next →
201–300 of 2,265, ranked by callers