MCPcopy Create free account

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

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

↓ 2 callersFunctionbuild_loss
Build loss.
annotator/uniformer/mmseg/models/builder.py:30
↓ 2 callersFunctioncheck_outside_inside
(segments_info, connect_idx)
annotator/mlsd/utils.py:406
↓ 2 callersFunctioncheck_prerequisites
A decorator factory to check if prerequisites are satisfied. Args: prerequisites (str of list[str]): Prerequisites to be checked.
annotator/uniformer/mmcv/utils/misc.py:206
↓ 2 callersMethodcontrast
Contrast distortion.
annotator/uniformer/mmseg/datasets/pipelines/transforms.py:819
↓ 2 callersFunctionconv3x3
3x3 convolution with padding.
annotator/uniformer/mmcv/cnn/resnet.py:10
↓ 2 callersMethodcopy_grads_to_fp32
Copy gradients from fp16 model to fp32 weight copy.
annotator/uniformer/mmcv/runner/hooks/optimizer.py:193
↓ 2 callersMethodcopy_params_to_fp16
Copy updated params from fp32 weight copy to fp16 model.
annotator/uniformer/mmcv/runner/hooks/optimizer.py:203
↓ 2 callersMethodcopy_to
(self, model)
ldm/modules/ema.py:50
↓ 2 callersFunctioncount_flops_attn
A counter for the `thop` package to count the operations in an attention operation. Meant to be used like: macs, params = thop.pr
ldm/modules/diffusionmodules/openaimodel.py:326
↓ 2 callersFunctioncubic
(x)
ldm/modules/image_degradation/utils_image.py:700
↓ 2 callersMethodcurrent_lr
Get current learning rates. Returns: list[float] | dict[str, list[float]]: Current learning rates of all param gr
annotator/uniformer/mmcv/runner/base_runner.py:205
↓ 2 callersMethoddata_prediction_fn
Return the data prediction model (with thresholding).
ldm/models/diffusion/dpm_solver/dpm_solver.py:352
↓ 2 callersFunctiondeccode_output_score_and_ptss
tpMap: center: tpMap[1, 0, :, :] displacement: tpMap[1, 1:5, :, :]
annotator/mlsd/utils.py:19
↓ 2 callersMethoddelta_border
:param h: height :param w: width :return: normalized distance to image border, wtith min distance = 0 at border and
ldm/models/diffusion/ddpm.py:684
↓ 2 callersFunctiondenormalize
Denormalize input grid from range [0, 1] to [-1, 1] Args: grid (Tensor): The grid to be denormalize, range [0, 1]. Returns: Te
annotator/uniformer/mmcv/ops/point_sample.py:105
↓ 2 callersFunctiondisable_verbosity
()
models/hack.py:11
↓ 2 callersMethodema_scope
(self, context=None)
ldm/models/autoencoder.py:64
↓ 2 callersMethodema_scope
(self, context=None)
ldm/models/diffusion/ddpm.py:195
↓ 2 callersMethodencode
(self, *args, **kwargs)
ldm/modules/encoders/modules.py:15
↓ 2 callersMethodencode
(self, x0, c, t_enc, use_original_steps=False, return_intermediates=None, unconditional_guidanc
ldm/models/diffusion/ddim.py:258
↓ 2 callersMethodend_of_epoch
(self, runner)
annotator/uniformer/mmcv/runner/hooks/hook.py:64
↓ 2 callersMethodevaluate
Evaluate the dataset. Args: results (list): Testing results of the dataset. metric (str | list[str]): Metrics to be e
annotator/uniformer/mmseg/datasets/custom.py:306
↓ 2 callersMethodextract_feat
Extract features from images.
annotator/uniformer/mmseg/models/segmentors/encoder_decoder.py:77
↓ 2 callersFunctionflatten_binary_logits
Flattens predictions in the batch (binary case) Remove labels equal to 'ignore_index'.
annotator/uniformer/mmseg/models/losses/lovasz_loss.py:29
↓ 2 callersFunctionflatten_probs
Flattens predictions in the batch.
annotator/uniformer/mmseg/models/losses/lovasz_loss.py:42
↓ 2 callersFunctionflops_to_string
Convert FLOPs number into a string. Note that Here we take a multiply-add counts as one FLOP. Args: flops (float): FLOPs number to b
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:118
↓ 2 callersMethodforward
Placeholder of forward function.
annotator/uniformer/mmseg/models/decode_heads/decode_head.py:166
↓ 2 callersMethodforward
(self, fine_grained_point_feats, coarse_point_feats)
annotator/uniformer/mmseg/models/decode_heads/point_head.py:115
↓ 2 callersMethodforward
Forward function.
annotator/uniformer/mmseg/models/decode_heads/enc_head.py:129
↓ 2 callersMethodforward
Placeholder of forward function.
annotator/uniformer/mmseg/models/decode_heads/cascade_decode_head.py:14
↓ 2 callersMethodforward
(target_gpus, input)
annotator/uniformer/mmcv/parallel/_functions.py:67
↓ 2 callersMethodforward_single
Scatters points into voxels. Args: points (torch.Tensor): Points to be reduced into voxels. coors (torch.Tensor): Cor
annotator/uniformer/mmcv/ops/scatter_points.py:82
↓ 2 callersMethodget
Read data from a given ``filepath`` with 'rb' mode. Args: filepath (str or Path): Path to read data. Returns:
annotator/uniformer/mmcv/fileio/file_client.py:147
↓ 2 callersMethodget_crop_bbox
Randomly get a crop bounding box.
annotator/uniformer/mmseg/datasets/pipelines/transforms.py:512
↓ 2 callersMethodget_epoch
(self, runner)
annotator/uniformer/mmcv/runner/hooks/logger/base.py:72
↓ 2 callersMethodget_frame
Get frame by index. Args: frame_id (int): Index of the expected frame, 0-based. Returns: ndarray or None: Re
annotator/uniformer/mmcv/video/io.py:160
↓ 2 callersMethodget_hook_info
(self)
annotator/uniformer/mmcv/runner/base_runner.py:309
↓ 2 callersFunctionget_host_info
Get hostname and username. Return empty string if exception raised, e.g. ``getpass.getuser()`` will lead to error in docker container
annotator/uniformer/mmcv/runner/utils.py:16
↓ 2 callersMethodget_input
(self, batch, k, return_first_stage_outputs=False, force_c_encode=False, cond_key=None, retu
ldm/models/diffusion/ddpm.py:767
↓ 2 callersMethodget_lr
(self, runner, base_lr)
annotator/uniformer/mmcv/runner/hooks/lr_updater.py:68
↓ 2 callersFunctionget_model_input_time
Convert the continuous-time `t_continuous` (in [epsilon, T]) to the model input time. For discrete-time DPMs, we convert `t_continuou
ldm/models/diffusion/dpm_solver/dpm_solver.py:246
↓ 2 callersFunctionget_model_parameters_number
Calculate parameter number of a model. Args: model (nn.module): The model for parameter number calculation. Returns: float:
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:307
↓ 2 callersFunctionget_modules_mapping
()
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:553
↓ 2 callersMethodget_momentum
(self, runner, base_momentum)
annotator/uniformer/mmcv/runner/hooks/momentum_updater.py:52
↓ 2 callersMethodget_momentum
(self, runner, param_group)
annotator/uniformer/mmcv/runner/hooks/momentum_updater.py:465
↓ 2 callersFunctionget_readout_oper
(vit_features, features, use_readout, start_index=1)
annotator/midas/midas/vit.py:166
↓ 2 callersMethodget_regular_lr
(self, runner)
annotator/uniformer/mmcv/runner/hooks/lr_updater.py:71
↓ 2 callersMethodget_regular_momentum
(self, runner)
annotator/uniformer/mmcv/runner/hooks/momentum_updater.py:55
↓ 2 callersFunctionget_state_dict
(d)
models/util.py:8
↓ 2 callersFunctionget_torchvision_models
()
annotator/uniformer/mmcv_custom/checkpoint.py:172
↓ 2 callersMethodget_v
(self, x, noise, t)
ldm/models/diffusion/ddpm.py:361
↓ 2 callersMethodget_warmup_lr
(self, cur_iters)
annotator/uniformer/mmcv/runner/hooks/lr_updater.py:85
↓ 2 callersMethodget_warmup_momentum
(self, cur_iters)
annotator/uniformer/mmcv/runner/hooks/momentum_updater.py:71
↓ 2 callersMethodhas_overflow
Check if params contain overflow.
annotator/uniformer/mmcv/runner/fp16_utils.py:349
↓ 2 callersFunctionhook
(model, input, output)
annotator/midas/midas/vit.py:160
↓ 2 callersMethodimport_wandb
(self)
annotator/uniformer/mmcv/runner/hooks/logger/wandb.py:25
↓ 2 callersMethodinit_from_ckpt
(self, path, ignore_keys=list(), only_model=False)
ldm/models/diffusion/ddpm.py:210
↓ 2 callersMethodinit_weights
(self)
annotator/uniformer/mmcv/ops/modulated_deform_conv.py:192
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
ldm/models/diffusion/dpm_solver/dpm_solver.py:1104
↓ 2 callersFunctionis_list_of
Check whether it is a list of some type. A partial method of :func:`is_seq_of`.
annotator/uniformer/mmcv/utils/misc.py:152
↓ 2 callersFunctionis_method_overridden
Check if a method of base class is overridden in derived class. Args: method (str): the method name to check. base_class (type):
annotator/uniformer/mmcv/utils/misc.py:348
↓ 2 callersFunctioniter_cast
Cast elements of an iterable object into some type. Args: inputs (Iterable): The input object. dst_type (type): Destination type.
annotator/uniformer/mmcv/utils/misc.py:87
↓ 2 callersMethodjoin_path
Concatenate all file paths. Args: filepath (str or Path): Path to be concatenated. Returns: str: The result
annotator/uniformer/mmcv/fileio/file_client.py:281
↓ 2 callersFunctionkeep_and_drop
(conditions, keep_all_prob, drop_all_prob, drop_each_prob)
src/train/util.py:18
↓ 2 callersFunctionlast_zero_init
(m)
annotator/uniformer/mmcv/cnn/bricks/context_block.py:9
↓ 2 callersFunctionload_state_dict
Load state_dict to a module. This method is modified from :meth:`torch.nn.Module.load_state_dict`. Default value for ``strict`` is set to ``F
annotator/uniformer/mmcv/runner/checkpoint.py:41
↓ 2 callersFunctionload_state_dict
(ckpt_path, location='cpu')
models/util.py:12
↓ 2 callersFunctionlovasz_grad
Computes gradient of the Lovasz extension w.r.t sorted errors. See Alg. 1 in paper.
annotator/uniformer/mmseg/models/losses/lovasz_loss.py:14
↓ 2 callersFunctionlovasz_hinge_flat
Binary Lovasz hinge loss. Args: logits (torch.Tensor): [P], logits at each prediction (between -infty and +infty). la
annotator/uniformer/mmseg/models/losses/lovasz_loss.py:59
↓ 2 callersFunctionlovasz_softmax_flat
Multi-class Lovasz-Softmax loss. Args: probs (torch.Tensor): [P, C], class probabilities at each prediction (between 0 and 1)
annotator/uniformer/mmseg/models/losses/lovasz_loss.py:128
↓ 2 callersFunctionmake_beta_schedule
(schedule, n_timestep, linear_start=1e-4, linear_end=2e-2, cosine_s=8e-3)
ldm/modules/diffusionmodules/util.py:21
↓ 2 callersFunctionmkdir
(path)
ldm/modules/image_degradation/utils_image.py:153
↓ 2 callersMethodmode
(self)
ldm/modules/distributions/distributions.py:20
↓ 2 callersFunctionmulti_gpu_test
Test model with multiple gpus. This method tests model with multiple gpus and collects the results under two different modes: gpu and cpu mod
annotator/uniformer/mmseg/apis/test.py:106
↓ 2 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The initi
ldm/models/diffusion/dpm_solver/dpm_solver.py:855
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
ldm/models/diffusion/dpm_solver/dpm_solver.py:346
↓ 2 callersMethodnorm1
nn.Module: normalization layer after the first convolution layer
annotator/uniformer/mmseg/models/backbones/resnet.py:250
↓ 2 callersFunctionnorm_cdf
(x)
annotator/uniformer/mmseg/models/utils/weight_init.py:14
↓ 2 callersFunctionnorm_cdf
(x)
annotator/uniformer/mmcv/cnn/utils/weight_init.py:628
↓ 2 callersMethodp_sample
(self, x, c, t, clip_denoised=False, repeat_noise=False, return_codebook_ids=False, quantize_
ldm/models/diffusion/ddpm.py:954
↓ 2 callersMethodp_sample_ddim
(self, x, c, t, index, repeat_noise=False, use_original_steps=False, quantize_denoised=False,
ldm/models/diffusion/ddim.py:185
↓ 2 callersMethodp_sample_ddim
(self, x, c, t, index, repeat_noise=False, use_original_steps=False, quantize_denoised=False,
models/ddim_hacked.py:183
↓ 2 callersFunctionparams_to_string
Convert parameter number into a string. Args: num_params (float): Parameter number to be converted. units (str | None): Converted
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:161
↓ 2 callersFunctionparse
(x)
annotator/uniformer/mmcv/utils/misc.py:16
↓ 2 callersMethodpre_pipeline
Prepare results dict for pipeline.
annotator/uniformer/mmseg/datasets/custom.py:170
↓ 2 callersMethodpredict_eps_from_z_and_v
(self, x_t, t, v)
ldm/models/diffusion/ddpm.py:298
↓ 2 callersMethodpredict_start_from_noise
(self, x_t, t, noise)
ldm/models/diffusion/ddpm.py:284
↓ 2 callersMethodpredict_start_from_z_and_v
(self, x_t, t, v)
ldm/models/diffusion/ddpm.py:290
↓ 2 callersMethodprogressive_denoising
(self, cond, shape, verbose=True, callback=None, quantize_denoised=False, img_ca
ldm/models/diffusion/ddpm.py:985
↓ 2 callersMethodput
Write data to a given ``filepath`` with 'wb' mode. Note: ``put`` should create a directory if the directory of ``filepath``
annotator/uniformer/mmcv/fileio/file_client.py:1007
↓ 2 callersMethodput_text
Write data to a given ``filepath`` with 'w' mode. Note: ``put_text`` should create a directory if the directory of ``
annotator/uniformer/mmcv/fileio/file_client.py:1020
↓ 2 callersMethodq_posterior
(self, x_start, x_t, t)
ldm/models/diffusion/ddpm.py:304
↓ 2 callersFunctionrandom_crop
(lq, hq, sf=4, lq_patchsize=64)
ldm/modules/image_degradation/bsrgan.py:427
↓ 2 callersMethodrandom_sample
Randomly sample an img_scale when ``multiscale_mode=='range'``. Args: img_scales (list[tuple]): Images scale range for sampling.
annotator/uniformer/mmseg/datasets/pipelines/transforms.py:86
↓ 2 callersMethodrandom_sample_ratio
Randomly sample an img_scale when ``ratio_range`` is specified. A ratio will be randomly sampled from the range specified by ``ratio_
annotator/uniformer/mmseg/datasets/pipelines/transforms.py:113
↓ 2 callersMethodregister_schedule
(self, given_betas=None, beta_schedule="linear", timesteps=1000, linear_start=1e-4,
ldm/models/diffusion/ddpm.py:138
↓ 2 callersFunctionrel_roi_point_to_rel_img_point
Convert roi based relative point coordinates to image based absolute point coordinates. Args: rois (Tensor): RoIs or BBoxes, shape (N
annotator/uniformer/mmcv/ops/point_sample.py:216
↓ 2 callersFunctionrescale_size
Calculate the new size to be rescaled to. Args: old_size (tuple[int]): The old size (w, h) of image. scale (float | tuple[int]):
annotator/uniformer/mmcv/image/geometric.py:184
↓ 2 callersMethodreset_num_updates
(self)
ldm/modules/ema.py:25
↓ 2 callersMethodresize_pos_embed
Resize pos_embed weights. Resize pos_embed using bicubic interpolate method. Args: pos_embed (torch.Tensor): pos_embed we
annotator/uniformer/mmseg/models/backbones/vit.py:392
← previousnext →301–400 of 2,265, ranked by callers