MCPcopy Create free account

hub / github.com/Picsart-AI-Research/Text2Video-Zero / functions

Functions1,788 in github.com/Picsart-AI-Research/Text2Video-Zero

↓ 2 callersFunctionallreduce_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 callersFunctionbbox_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 callersMethodbefore_epoch
(self, runner)
annotator/uniformer/mmcv/runner/hooks/hook.py:19
↓ 2 callersMethodbefore_iter
(self, runner)
annotator/uniformer/mmcv/runner/hooks/hook.py:25
↓ 2 callersFunctionbgr2gray
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 callersFunctionbuild_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 callersFunctionbuild_dataset
Build datasets.
annotator/uniformer/mmseg/datasets/builder.py:61
↓ 2 callersFunctionbuild_dropout
Builder for drop out layers.
annotator/uniformer/mmcv/cnn/bricks/drop.py:63
↓ 2 callersFunctionbuild_loss
Build loss.
annotator/uniformer/mmseg/models/builder.py:30
↓ 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 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 callersMethoddecode_latents
(self, latents)
text_to_video_pipeline.py:193
↓ 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 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_lr
(self, runner, base_lr)
annotator/uniformer/mmcv/runner/hooks/lr_updater.py:68
↓ 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_torchvision_models
()
annotator/uniformer/mmcv_custom/checkpoint.py:172
↓ 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_weights
(self)
annotator/uniformer/mmcv/ops/modulated_deform_conv.py:192
↓ 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 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 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 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 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 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 callersMethodprepare_latents
(self, batch_size, num_channels_latents, video_length, height, width, dtype, device, generator, latents=None)
text_to_video_pipeline.py:64
↓ 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 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 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 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
↓ 2 callersMethodresume
(self, checkpoint, resume_optimizer=True, map_location='default')
annotator/uniformer/mmcv/runner/base_runner.py:345
↓ 2 callersMethodrun_iter
(self, data_batch, train_mode, **kwargs)
annotator/uniformer/mmcv/runner/epoch_based_runner.py:24
↓ 2 callersFunctionsave_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/runner/checkpoint.py:634
↓ 2 callersMethodsave_checkpoint
(self, out_dir, filename_tmpl, save_op
annotator/uniformer/mmcv/runner/base_runner.py:197
↓ 2 callersFunctionscandir
Scan a directory to find the interested files. Args: dir_path (str | obj:`Path`): Path of the directory. suffix (str | tuple(str)
annotator/uniformer/mmcv/utils/path.py:39
↓ 2 callersFunctionscatter
Scatter inputs to target gpus. The only difference from original :func:`scatter` is to add support for :type:`~mmcv.parallel.DataContainer`.
annotator/uniformer/mmcv/parallel/scatter_gather.py:9
↓ 2 callersFunctionscatter
Scatters tensor across multiple GPUs.
annotator/uniformer/mmcv/parallel/_functions.py:6
↓ 2 callersMethodscatter
(self, inputs, kwargs, device_ids)
annotator/uniformer/mmcv/parallel/distributed.py:26
↓ 2 callersMethodshow_result
Draw `result` over `img`. Args: img (str or Tensor): The image to be displayed. result (Tensor): The semantic segment
annotator/uniformer/mmseg/models/segmentors/base.py:208
↓ 2 callersMethodsince_last_check
Time since the last checking. Either :func:`since_start` or :func:`since_last_check` is a checking operation. Returns (float
annotator/uniformer/mmcv/utils/timer.py:74
↓ 2 callersFunctionsingle_gpu_test
Test with single GPU. Args: model (nn.Module): Model to be tested. data_loader (utils.data.Dataloader): Pytorch data loader.
annotator/uniformer/mmseg/apis/test.py:34
↓ 2 callersMethodstart
Start the timer.
annotator/uniformer/mmcv/utils/timer.py:57
↓ 2 callersMethodstart
(self)
annotator/uniformer/mmcv/utils/progressbar.py:26
↓ 2 callersFunctiontrack_progress
Track the progress of tasks execution with a progress bar. Tasks are done with a simple for-loop. Args: func (callable): The functio
annotator/uniformer/mmcv/utils/progressbar.py:64
↓ 2 callersMethodtrain_step
(self, *inputs, **kwargs)
annotator/uniformer/mmcv/parallel/data_parallel.py:47
↓ 2 callersFunctiontrunc_normal_init
(module: nn.Module, mean: float = 0, std: float = 1,
annotator/uniformer/mmcv/cnn/utils/weight_init.py:73
↓ 2 callersFunctionuniform_init
(module, a=0, b=1, bias=0)
annotator/uniformer/mmcv/cnn/utils/weight_init.py:85
↓ 2 callersMethodupdate_scale
update the current loss scale value when overflow happens.
annotator/uniformer/mmcv/runner/fp16_utils.py:372
↓ 2 callersMethodval_step
(self, *inputs, **kwargs)
annotator/uniformer/mmcv/parallel/data_parallel.py:69
↓ 2 callersFunctionwrap_fp16_model
Wrap the FP32 model to FP16. If you are using PyTorch >= 1.6, torch.cuda.amp is used as the backend, otherwise, original mmcv implementation
annotator/uniformer/mmcv/runner/fp16_utils.py:234
↓ 2 callersFunctionwrite_frame
(file_idx)
annotator/uniformer/mmcv/video/io.py:308
↓ 1 callersMethodDDPM_forward
(self, x0, t0, tMax, generator, device, shape, text_embeddings)
text_to_video_pipeline.py:50
↓ 1 callersFunctionNEG_INF_DIAG
Returns a diagonal matrix of size [n, n]. The diagonal are all "-inf". This is for avoiding calculating the overlapped element in the Criss-C
annotator/uniformer/mmcv/ops/cc_attention.py:9
↓ 1 callersMethod__call__
(self, module)
annotator/uniformer/mmcv/cnn/utils/weight_init.py:222
↓ 1 callersMethod__enter__
(self)
annotator/uniformer/mmcv/utils/timer.py:49
↓ 1 callersMethod__getattr__
(self, name)
annotator/uniformer/mmcv/utils/config.py:506
← previousnext →201–300 of 1,788, ranked by callers