MCPcopy Create free account

hub / github.com/ShihaoZhaoZSH/Uni-ControlNet / functions

Functions2,265 in github.com/ShihaoZhaoZSH/Uni-ControlNet

Functionpoints_in_boxes_part
Find the box in which each point is (CUDA). Args: points (torch.Tensor): [B, M, 3], [x, y, z] in LiDAR/DEPTH coordinate boxes (to
annotator/uniformer/mmcv/ops/points_in_boxes.py:11
Functionpool_flops_counter_hook
(module, input, output)
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:425
Methodposition
int: Current cursor position, indicating frame decoded.
annotator/uniformer/mmcv/video/io.py:120
Functionposterize
Posterize an image (reduce the number of bits for each color channel) Args: img (ndarray): Image to be posterized. bits (int): Nu
annotator/uniformer/mmcv/image/photometric.py:85
Functionpred_squares
shape = [height, width]
annotator/mlsd/utils.py:89
Methodpretty_text
(self)
annotator/uniformer/mmcv/utils/config.py:407
Functionprocess
(canny_image, mlsd_image, hed_image, sketch_image, openpose_image, midas_image, seg_image, content_image, prom
src/test/test.py:45
Methodput
Write data to a given ``filepath`` with 'wb' mode. Note: ``put`` will create a directory if the directory of ``filepath``
annotator/uniformer/mmcv/fileio/file_client.py:538
Methodput_text
Save data to a given ``filepath``. Args: obj (str): Data to be written. filepath (str or Path): Path to write data.
annotator/uniformer/mmcv/fileio/file_client.py:190
Methodput_text
Write data to a given ``filepath`` with 'w' mode. Note: ``put_text`` will create a directory if the directory of ``fi
annotator/uniformer/mmcv/fileio/file_client.py:553
Methodrank
int: Rank of current process. (distributed training)
annotator/uniformer/mmcv/runner/base_runner.py:144
Functionread_image
Read image and output RGB image (0-1). Args: path (str): path to file Returns: array: RGB image (0-1)
annotator/midas/utils.py:97
Functionread_img
(path)
ldm/modules/image_degradation/utils_image.py:220
Functionread_pfm
Read pfm file. Args: path (str): path to file Returns: tuple: (data, scale)
annotator/midas/utils.py:9
Methodregister_backend
Register a backend to FileClient. This method can be used as a normal class method or a decorator. .. code-block:: python
annotator/uniformer/mmcv/fileio/file_client.py:922
Functionregister_handler
(file_formats, **kwargs)
annotator/uniformer/mmcv/fileio/io.py:145
Methodregister_profiler_hook
(self, profiler_config)
annotator/uniformer/mmcv/runner/base_runner.py:493
Methodregister_schedule
(self, given_betas=None, beta_schedule="linear", timesteps=1000,
ldm/models/diffusion/ddpm.py:606
Methodregister_scheme
Register a loader to CheckpointLoader. This method can be used as a normal class method or a decorator. Args: prefixes (
annotator/uniformer/mmcv/runner/checkpoint.py:185
Methodregister_training_hooks
Register default hooks for iter-based training. Checkpoint hook, optimizer stepper hook and logger hooks will be set to `by_epoch=Fal
annotator/uniformer/mmcv/runner/iter_based_runner.py:224
Functionrelu_flops_counter_hook
(module, input, output)
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:413
Methodremove
Remove a file. Args: filepath (str or Path): Path to be removed.
annotator/uniformer/mmcv/fileio/file_client.py:204
Methodremove
Remove a file. Args: filepath (str or Path): Path to be removed.
annotator/uniformer/mmcv/fileio/file_client.py:573
Functionremove_flops_counter_hook_function
(module)
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:546
Functionrequires_executable
A decorator to check if some executable files are installed. Example: >>> @requires_executable('ffmpeg') >>> func(arg1, args):
annotator/uniformer/mmcv/utils/misc.py:276
Functionrequires_package
A decorator to check if some python packages are installed. Example: >>> @requires_package('numpy') >>> func(arg1, args):
annotator/uniformer/mmcv/utils/misc.py:260
Methodreset_classifier
(self, num_classes, global_pool='')
annotator/uniformer/mmseg/models/backbones/uniformer.py:379
Functionreset_flops_count
Reset statistics computed so far. A method to Reset computed statistics, which will be available after `add_flops_counting_methods()` is call
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:389
Functionresize_depth
Resize depth map and bring to CPU (numpy). Args: depth (tensor): depth width (int): image width height (int): image heigh
annotator/midas/utils.py:146
Functionresize_image
Resize image and make it fit for network. Args: img (array): image Returns: tensor: data ready for network
annotator/midas/utils.py:116
Functionresize_video
Resize a video. Args: in_file (str): Input video filename. out_file (str): Output video filename. size (tuple): Expected
annotator/uniformer/mmcv/video/processing.py:55
Methodresolution
tuple: Video resolution (width, height).
annotator/uniformer/mmcv/video/io.py:100
Methodresume
Resume model from checkpoint. Args: checkpoint (str): Checkpoint to resume from. resume_optimizer (bool, optional): W
annotator/uniformer/mmcv/runner/iter_based_runner.py:140
Functionrevert_sync_batchnorm
Helper function to convert all `SyncBatchNorm` (SyncBN) and `mmcv.ops.sync_bn.SyncBatchNorm`(MMSyncBN) layers in the model to `BatchNormXd` la
annotator/uniformer/mmcv/cnn/utils/sync_bn.py:21
Functionrgb2gray
Convert a RGB image to grayscale image. Args: img (ndarray): The input image. keepdim (bool): If False (by default), then return
annotator/uniformer/mmcv/image/colorspace.py:39
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
annotator/uniformer/mmcv/image/colorspace.py:143
Functionrgb2ycbcr
same as matlab rgb2ycbcr only_y: only return Y channel Input: uint8, [0, 255] float, [0, 1]
ldm/modules/image_degradation/utils_image.py:529
Methodrun
Start running. Args: data_loaders (list[:obj:`DataLoader`]): Dataloaders for training and validation.
annotator/uniformer/mmcv/runner/epoch_based_runner.py:72
Methodrun
Start running. Args: data_loaders (list[:obj:`DataLoader`]): Dataloaders for training and validation.
annotator/uniformer/mmcv/runner/iter_based_runner.py:87
Methodsample
Placeholder for sample function.
annotator/uniformer/mmseg/core/seg/sampler/base_pixel_sampler.py:11
Methodsample
(self)
ldm/modules/distributions/distributions.py:6
Methodsample
(self)
ldm/modules/distributions/distributions.py:35
Methodsample
(self, S, batch_size, shape, conditioning=None,
ldm/models/diffusion/plms.py:59
Methodsample
(self, S, batch_size, shape, conditioning=None,
ldm/models/diffusion/dpm_solver/sampler.py:27
Functionsave_checkpoint
Save checkpoint to file. The checkpoint will have 3 fields: ``meta``, ``state_dict`` and ``optimizer``. By default ``meta`` will contain vers
annotator/uniformer/mmcv_custom/checkpoint.py:438
Methodsave_checkpoint
Save the checkpoint. Args: out_dir (str): The directory that checkpoints are saved. filename_tmpl (str, optional): Th
annotator/uniformer/mmcv/runner/epoch_based_runner.py:132
Methodsave_checkpoint
Save checkpoint to file. Args: out_dir (str): Directory to save checkpoint files. filename_tmpl (str, optional): Chec
annotator/uniformer/mmcv/runner/iter_based_runner.py:179
Functionscale_module
Scale the parameters of a module and return it.
ldm/modules/diffusionmodules/util.py:186
Methodscope
(self)
annotator/uniformer/mmcv/utils/registry.py:175
Functionset_default
Set default json values for non-serializable values. It helps convert ``set``, ``range`` and ``np.ndarray`` data types to list. It also conve
annotator/uniformer/mmcv/fileio/handlers/json_handler.py:9
Functionset_random_seed
Set random seed. Args: seed (int): Seed to be used. deterministic (bool): Whether to set the deterministic option for
annotator/uniformer/mmseg/apis/train.py:14
Functionset_random_seed
Set random seed. Args: seed (int): Seed to be used. deterministic (bool): Whether to set the deterministic option for
annotator/uniformer/mmcv/runner/utils.py:70
Methodshared_step
(self, batch, **kwargs)
ldm/models/diffusion/ddpm.py:834
Functionshave
(img_in, border=0)
ldm/modules/image_degradation/utils_image.py:510
Methodsimple_test
Simple test with single image.
annotator/uniformer/mmseg/models/segmentors/encoder_decoder.py:268
Functionsingle2tensor3
(img)
ldm/modules/image_degradation/utils_image.py:302
Functionsingle2tensor4
(img)
ldm/modules/image_degradation/utils_image.py:307
Functionsingle2tensor5
(img)
ldm/modules/image_degradation/utils_image.py:329
Functionsingle2uint
(img)
ldm/modules/image_degradation/utils_image.py:254
Functionsingle2uint16
(img)
ldm/modules/image_degradation/utils_image.py:264
Functionsingle32tensor5
(img)
ldm/modules/image_degradation/utils_image.py:333
Functionsingle42tensor4
(img)
ldm/modules/image_degradation/utils_image.py:337
Functionsingle_gpu_test
Test model with a single gpu. This method tests model with a single gpu and displays test progress bar. Args: model (nn.Module): Mod
annotator/uniformer/mmcv/engine/test.py:15
Functionskip_no_elena
(func)
annotator/uniformer/mmcv/utils/parrots_jit.py:36
Functionslice_list
Slice a list into several sub lists by a list of given length. Args: in_list (list): The list to be sliced. lens(int or list): Th
annotator/uniformer/mmcv/utils/misc.py:168
Functionsoft_nms
Dispatch to only CPU Soft NMS implementations. The input can be either a torch tensor or numpy array. The returned type will always be the sa
annotator/uniformer/mmcv/ops/nms.py:181
Functionsolarize
Solarize an image (invert all pixel values above a threshold) Args: img (ndarray): Image to be solarized. thr (int): Threshold fo
annotator/uniformer/mmcv/image/photometric.py:71
Functionsparse_flow_from_bytes
Read the optical flow in KITTI datasets from bytes. This function is modified from RAFT load the `KITTI datasets <https://github.com/princeto
annotator/uniformer/mmcv/video/optflow.py:234
Functionspatial_norm_thresholding
(x0, value)
ldm/models/diffusion/sampling_util.py:19
Functionsplit_imageset
split the large images from original_dataroot into small overlapped images with size (p_size)x(p_size), and save them into taget_dataroot; on
ldm/modules/image_degradation/utils_image.py:125
Functionsrmd_degradation
blur + bicubic downsampling Args: x: HxWxC image, [0, 1] k: hxw, double sf: down-scale factor Return: downsam
ldm/modules/image_degradation/bsrgan_light.py:239
Functionsrmd_degradation
blur + bicubic downsampling Args: x: HxWxC image, [0, 1] k: hxw, double sf: down-scale factor Return: downsam
ldm/modules/image_degradation/bsrgan.py:240
Functionstart_flops_count
Activate the computation of mean flops consumption per image. A method to activate the computation of mean flops consumption per image. which
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:355
Methodstochastic_encode
(self, x0, t, use_original_steps=False, noise=None)
ldm/models/diffusion/ddim.py:305
Methodstochastic_encode
(self, x0, t, use_original_steps=False, noise=None)
models/ddim_hacked.py:283
Functionstop_flops_count
Stop computing the mean flops consumption per image. A method to stop computing the mean flops consumption per image, which will be available
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:378
Functionsurf
(Z, cmap='rainbow', figsize=None)
ldm/modules/image_degradation/utils_image.py:47
Methodsymbolic
(g, features, masks, kernel_size, group_size, scale_factor)
annotator/uniformer/mmcv/ops/carafe.py:20
Methodsymbolic
(g, features, masks, kernel_size, group_size, scale_factor)
annotator/uniformer/mmcv/ops/carafe.py:103
Methodsymbolic
(g, input, boxes, pool_size)
annotator/uniformer/mmcv/ops/border_align.py:19
Methodsymbolic
(g, bboxes, scores, iou_threshold, offset, score_threshold, max_num)
annotator/uniformer/mmcv/ops/nms.py:36
Methodsymbolic
(g, boxes, scores, iou_threshold, sigma, min_score, method, offset)
annotator/uniformer/mmcv/ops/nms.py:100
Methodsymbolic
(g, input, offset, mask, weight, bias, stride, padding, dilation, groups, deform_groups)
annotator/uniformer/mmcv/ops/modulated_deform_conv.py:22
Methodsymbolic
(g, features, mask, weight, bias, padding, stride)
annotator/uniformer/mmcv/ops/masked_conv.py:19
Methodsymbolic
(g, input, psa_type, mask_size)
annotator/uniformer/mmcv/ops/psa_mask.py:15
Methodsymbolic
(g, input)
annotator/uniformer/mmcv/ops/corner_pool.py:20
Methodsymbolic
(g, input)
annotator/uniformer/mmcv/ops/corner_pool.py:41
Methodsymbolic
(g, input)
annotator/uniformer/mmcv/ops/corner_pool.py:62
Methodsymbolic
(g, input)
annotator/uniformer/mmcv/ops/corner_pool.py:83
Methodsymbolic
(g, input, rois, output_size, spatial_scale, sampling_ratio, pool_mode, aligned)
annotator/uniformer/mmcv/ops/roi_align.py:17
Methodsymbolic
(g, input, offset, weight, stride,
annotator/uniformer/mmcv/ops/deform_conv.py:25
Methodsymbolic
(g, input, rois, offset, output_size, spatial_scale, sampling_ratio, gamma)
annotator/uniformer/mmcv/ops/deform_roi_pool.py:16
Methodsymbolic
(g, input, running_mean, running_var, weight, bias, momentum, eps, group, group_size, stats_m
annotator/uniformer/mmcv/ops/sync_bn.py:22
Methodsymbolic
(g, features, rois, out_size, spatial_scale, sample_num, aligned, clockwise)
annotator/uniformer/mmcv/ops/roi_align_rotated.py:14
Methodsymbolic
(g, input, rois, output_size, spatial_scale)
annotator/uniformer/mmcv/ops/roi_pool.py:17
Methodsymbolic
(g, input, target, gamma, alpha, weight, reduction)
annotator/uniformer/mmcv/ops/focal_loss.py:18
Methodsymbolic
(g, input, target, gamma, alpha, weight, reduction)
annotator/uniformer/mmcv/ops/focal_loss.py:112
Functionsymlink
(src, dst, overwrite=True, **kwargs)
annotator/uniformer/mmcv/utils/path.py:33
Functiontensor2img
Converts a torch Tensor into an image Numpy array of BGR channel order Input: 4D(B,(3/1),H,W), 3D(C,H,W), or 2D(H,W), any range, RGB channel
ldm/modules/image_degradation/utils_image.py:342
Functiontensor2single
(img)
ldm/modules/image_degradation/utils_image.py:312
← previousnext →2,101–2,200 of 2,265, ranked by callers