MCPcopy Create free account

hub / github.com/NVlabs/imaginaire / functions

Functions1,077 in github.com/NVlabs/imaginaire

↓ 2 callersMethodloss
r"""GAN loss computation. Args: dis_output (tensor): Discriminator outputs. t_real (bool): If ``True``, uses the real
imaginaire/losses/gan.py:87
↓ 2 callersFunctionmake_logging_dir
r"""Create the logging directory Args: logdir (str): Log directory name
imaginaire/utils/logging.py:41
↓ 2 callersFunctionmaster_only_print
r"""master-only print
imaginaire/utils/distributed.py:70
↓ 2 callersMethodmc2reduced
(self, mc, ign2dirt=False)
imaginaire/model_utils/gancraft/mc_utils.py:329
↓ 2 callersMethodmodulate
(self, x, w, b)
imaginaire/generators/gancraft_base.py:197
↓ 2 callersFunctionmsid_descriptor
Compute the msid descriptor for a single sample x Arguments: x: x samples ts: temperature values k: number of neighbo
imaginaire/evaluation/msid.py:62
↓ 2 callersMethodone_up_conv_layer
r"""One residual block layer in the main branch. Args: x (4D tensor) : Current feature map. encoded_label (list of te
imaginaire/generators/fs_vid2vid.py:202
↓ 2 callersMethodpre_process
r"""Do any data pre-processing here. Args: data (dict): Data used for the current iteration.
imaginaire/trainers/vid2vid.py:210
↓ 2 callersFunctionremove_other_ppl
r"""Remove other people in the label map except for the current target by looking at the id in the densemask map. Args: labels (NxCxH
imaginaire/model_utils/fs_vid2vid.py:347
↓ 2 callersMethodreset
r"""Reset the meter values
imaginaire/utils/meters.py:93
↓ 2 callersMethodreset
r"""Reset the trainer (for inference) at the beginning of a sequence.
imaginaire/trainers/vid2vid.py:292
↓ 2 callersMethodreshape_embed_input
r"""Reshape input to be (B x C) X H X W. Args: x (tensor or list of tensors): Input features. Returns: x (ten
imaginaire/generators/fs_vid2vid.py:845
↓ 2 callersMethodsave_image
r"""Save the output images to path. Note when the generate_raw_output is FALSE. Then, first_net_G_output['fake_raw_images'] is None an
imaginaire/trainers/vid2vid.py:810
↓ 2 callersFunctionselect_object
r"""Select the object/person in the dict according to the object index. Currently it's used to select the target person in OpenPose dict. Arg
imaginaire/model_utils/fs_vid2vid.py:373
↓ 2 callersFunctionset_color
r"""Set pixels of the image to the given color. Args: im (HxWxC numpy array): Canvas to draw. xx (1D numpy array): x coordinates
imaginaire/utils/visualization/face.py:422
↓ 2 callersMethodset_sample_class_idx
r"""Set sample class idx. This is not used in this class... Args: class_idx (int): Which class idx to sample from.
imaginaire/datasets/images.py:24
↓ 2 callersFunctionslice_tensor
r"""Slice all tensors from start to end. Args: data (dict, list or tensor): Input data.
imaginaire/utils/misc.py:146
↓ 2 callersMethodstart_of_iteration
r"""Things to do before an iteration. Args: data (dict): Data used for the current iteration. current_iteration (int)
imaginaire/trainers/base.py:337
↓ 2 callersMethodstart_of_iteration
r"""Things to do before an iteration. Args: data (dict): Data used for the current iteration. current_iteration (int)
imaginaire/trainers/wc_vid2vid.py:51
↓ 2 callersMethodupdate_average
r"""Update the moving average.
imaginaire/utils/model_average.py:95
↓ 2 callersFunctionweights_rescale
()
imaginaire/utils/init_weight.py:78
↓ 2 callersFunctionwrap_model_and_optimizer
r"""Wrap the networks and the optimizers with AMP DDP and (optionally) model average. Args: cfg (obj): Global configuration.
imaginaire/utils/trainer.py:132
↓ 2 callersMethodwrite
(self, key, value)
imaginaire/datasets/cache.py:35
↓ 2 callersMethodwrite_metrics
r"""Compute metrics and save them to tensorboard
imaginaire/trainers/unit.py:175
↓ 2 callersMethodwrite_metrics
r"""Write metrics to the tensorboard.
imaginaire/trainers/base.py:553
↓ 1 callersMethodSPADE_combine
r"""Using Multi-SPADE to combine raw synthesized image with warped images. Args: encoded_label (list of tensors): Origina
imaginaire/generators/fs_vid2vid.py:359
↓ 1 callersMethod__init__
(self, filename=None, verbose=False)
imaginaire/config.py:80
↓ 1 callersMethod__init__
(self, in_features, style_features, mod_bias=True
imaginaire/model_utils/gancraft/layers.py:19
↓ 1 callersMethod__init__
(self, dis_cfg, data_cfg)
imaginaire/discriminators/funit.py:21
↓ 1 callersMethod__init__
(self, dis_cfg, data_cfg)
imaginaire/discriminators/fs_vid2vid.py:26
↓ 1 callersMethod__init__
(self, dis_cfg, data_cfg)
imaginaire/discriminators/gancraft.py:24
↓ 1 callersMethod__init__
(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1, dilation=1, groups=1, b
imaginaire/layers/residual_deep.py:326
↓ 1 callersMethod__init__
(self, weight_name, bias_name)
imaginaire/layers/weight_norm.py:77
↓ 1 callersMethod__init__
r"""COCO-FUNIT Generator constructor. Args: gen_cfg (obj): Generator definition part of the yaml config file. data_cf
imaginaire/generators/coco_funit.py:16
↓ 1 callersMethod__init__
(self, cfg)
imaginaire/losses/flow.py:52
↓ 1 callersMethod__init__
(self, network='vgg19', layers='relu_4_1', weights=None, criterion='l1', resize=False, resize
imaginaire/losses/perceptual.py:32
↓ 1 callersMethod__init__
(self)
imaginaire/third_party/flow_net/flownet2/networks/submodules.py:79
↓ 1 callersMethod__iter__
(self)
imaginaire/third_party/flow_net/flownet2/utils/tools.py:142
↓ 1 callersMethod__repr__
Print all variables.
imaginaire/config.py:52
↓ 1 callersMethod_addindent
(s_, numSpaces)
imaginaire/layers/vit.py:195
↓ 1 callersFunction_alexnet
r"""Get alexnet layers
imaginaire/losses/perceptual.py:233
↓ 1 callersFunction_bias_act
(x, b=None, dim=1, act='linear', alpha=None, gain=None, clamp=None, impl='cuda')
imaginaire/third_party/bias_act/bias_act.py:46
↓ 1 callersFunction_bias_act_cuda
Fast CUDA implementation of `bias_act()` using custom ops.
imaginaire/third_party/bias_act/bias_act.py:94
↓ 1 callersFunction_bias_act_ref
(x, b=None, dim=1, act='linear', alpha=None, gain=None, clamp=None)
imaginaire/third_party/bias_act/bias_act.py:59
↓ 1 callersMethod_build_augmentation_ops
r"""Builds sequence of augmentation ops. Returns: (list of alb.ops): List of augmentation ops.
imaginaire/utils/data.py:93
↓ 1 callersFunction_build_graph
Return Laplacian from data or load preconstructed from path Arguments: data: samples k: number of neighbours for graph const
imaginaire/evaluation/msid.py:95
↓ 1 callersMethod_build_individual_video_frame_augmentation_ops
r"""Builds sequence of augmentation ops that will be applied to each frame in the video independently. Returns: (list of alb.ops):
imaginaire/utils/data.py:69
↓ 1 callersMethod_choose_image_key
r"""Choose key to replace with 'image' for input to albumentations. Returns: key (str): Chosen key to be replace with 'image'
imaginaire/utils/data.py:177
↓ 1 callersMethod_choose_keypoint_key
r"""Choose key to replace with 'keypoints' for input to albumentations. Returns: key (str): Chosen key to be replace with 'keypoin
imaginaire/utils/data.py:189
↓ 1 callersMethod_collate_augmented
r"""Collate separated images back into sequence, grouped by keys. Args: augmented (dict): Dict containing frames with keys of the
imaginaire/utils/data.py:246
↓ 1 callersMethod_compute_dataset_stats
r"""Computes required statistics about dataset. All children need to implement their own.
imaginaire/datasets/base.py:238
↓ 1 callersMethod_compute_fid
r"""Compute FID. We will compute a FID value per test class. That is if you have 30 test classes, we will compute 30 different FID values.
imaginaire/trainers/funit.py:160
↓ 1 callersMethod_compute_fid
r"""Compute FID for both domains.
imaginaire/trainers/unit.py:193
↓ 1 callersMethod_compute_fid
r"""FID computation function to be overloaded.
imaginaire/trainers/base.py:668
↓ 1 callersMethod_compute_fid
r"""Compute FID for both domains.
imaginaire/trainers/munit.py:295
↓ 1 callersMethod_compute_kid
(self)
imaginaire/trainers/funit.py:192
↓ 1 callersMethod_create_augmentation_targets
r"""Create additional targets as required by the albumentation library. Args: inputs (dict): Keys are from self.augmentable_data_
imaginaire/utils/data.py:202
↓ 1 callersMethod_create_mapping
r"""Creates mapping from idx to key in LMDB. Returns: (tuple): - self.mapping (dict): Dict of seq_len to list of se
imaginaire/datasets/paired_few_shot_videos.py:81
↓ 1 callersMethod_create_mapping
r"""Creates mapping from data sample idx to actual LMDB keys. All children need to implement their own. Returns: self
imaginaire/datasets/base.py:229
↓ 1 callersMethod_create_mapping
r"""Creates mapping from idx to key in LMDB. Returns: (tuple): - self.mapping (dict): Dict of seq_len to list of se
imaginaire/datasets/paired_videos.py:116
↓ 1 callersMethod_create_sequence_keys
r"""Create the LMDB key for this piece of information. Args: sequence_name (str): Which sequence from the chosen dataset.
imaginaire/datasets/paired_few_shot_videos_native.py:109
↓ 1 callersMethod_define_custom_losses
r"""All other custom losses are defined here.
imaginaire/trainers/vid2vid.py:153
↓ 1 callersFunction_encode_onehot
r"""Make input one-hot. Args: label_map (torch.Tensor): (C, H, W) tensor containing indices. num_classes (int): Number of labels
imaginaire/model_utils/label.py:72
↓ 1 callersMethod_end_of_epoch
r"""Operations to do after an epoch. Args: data (dict): Data used for the current iteration. current_epoch (int): Cur
imaginaire/trainers/base.py:650
↓ 1 callersMethod_end_of_iteration
r"""Operations to do after an iteration. Args: data (dict): Data used for the current iteration. current_epoch (int):
imaginaire/trainers/base.py:640
↓ 1 callersMethod_extra_dis_step
(self, data)
imaginaire/trainers/base.py:822
↓ 1 callersMethod_extra_gen_step
(self, data)
imaginaire/trainers/base.py:750
↓ 1 callersMethod_forward_perpix_sub
r"""Forwarding the MLP. Args: blk_feats (K x C1 tensor): Sparse block features. worldcoord2 (N x H x W x L x 3 tensor
imaginaire/generators/gancraft_base.py:429
↓ 1 callersMethod_get_batch
r"""Sample camera poses and perform ray-voxel intersection. Args: batch_size (int): Expected batch size of the current batch
imaginaire/generators/gancraft.py:85
↓ 1 callersMethod_get_conv_layer
(self, in_channels, out_channels, kernel_size, stride, padding, dilation, groups, bias
imaginaire/layers/vit.py:150
↓ 1 callersMethod_get_conv_layer
(self, in_channels, out_channels, kernel_size, stride, padding, dilation, groups, bias
imaginaire/layers/conv.py:150
↓ 1 callersMethod_get_custom_dis_losses
r"""All other custom losses go here. Args: net_D_output (dict): Output of the discriminator.
imaginaire/trainers/vid2vid.py:648
↓ 1 callersMethod_get_custom_gen_losses
r"""All other custom generator losses go here. Args: data_t (dict): Training data at the current time t. net_G_output
imaginaire/trainers/vid2vid.py:563
↓ 1 callersMethod_get_fn_params
r"""Find key-value inputs to function from string definition. Args: function_string (str): String with function name and args. e.
imaginaire/datasets/base.py:572
↓ 1 callersFunction_get_prdc
r""" Computes precision, recall, density, and coverage given two manifolds. Args: real_features: numpy.ndarray([N, feature_dim], dtyp
imaginaire/evaluation/prdc.py:80
↓ 1 callersMethod_get_resize_h_w
r"""Get height and width to resize to, given smallest side. Args: height (int): Input image height. width (int): Inpu
imaginaire/utils/data.py:269
↓ 1 callersMethod_get_stride_blur
(self)
imaginaire/layers/residual_deep.py:172
↓ 1 callersMethod_get_stride_blur
(self)
imaginaire/layers/residual.py:158
↓ 1 callersFunction_get_test_dataset_object
r"""Return dataset object for the test set Args: cfg (obj): Global configuration file. Returns: (obj): PyTorch dataset objec
imaginaire/utils/dataset.py:90
↓ 1 callersFunction_get_train_and_val_dataset_objects
r"""Return dataset objects for the training and validation sets. Args: cfg (obj): Global configuration file. Returns: (dict)
imaginaire/utils/dataset.py:13
↓ 1 callersMethod_get_visualizations
r"""Compute visualization outputs. Args: data (dict): Data used for the current iteration.
imaginaire/trainers/base.py:660
↓ 1 callersMethod_getitem
r"""Gets selected files. Args: index (int): Index into dataset. concat (bool): Concatenate all items in labels?
imaginaire/datasets/paired_few_shot_videos_native.py:124
↓ 1 callersMethod_getitem
r"""Gets selected files. Args: index (int): Index into dataset. concat (bool): Concatenate all items in labels?
imaginaire/datasets/paired_videos.py:222
↓ 1 callersFunction_inception_v3
r"""Get inception v3 layers
imaginaire/losses/perceptual.py:249
↓ 1 callersMethod_init_hparams
r"""Initialize a dictionary of hyperparameters that we want to monitor in the HParams dashboard in tensorBoard.
imaginaire/trainers/base.py:171
↓ 1 callersMethod_init_loss
r"""Every trainer should implement its own init loss function.
imaginaire/trainers/base.py:672
↓ 1 callersMethod_init_tensorboard
r"""Initialize the tensorboard. Different algorithms might require different performance metrics. Hence, custom tensorboard initializa
imaginaire/trainers/base.py:157
↓ 1 callersFunction_laplacian_sparse
(A, normalized=True)
imaginaire/evaluation/msid.py:368
↓ 1 callersFunction_mmd2_and_variance
r"""Based on https://github.com/dougalsutherland/opt-mmd/blob/master/two_sample/mmd.py but changed to not compute the full kernel matrix at on
imaginaire/evaluation/kid.py:228
↓ 1 callersFunction_normalize_msid
(msid, normalization, n, k, ts)
imaginaire/evaluation/msid.py:121
↓ 1 callersMethod_perform_unpaired_augmentation
r"""Perform different data augmentation on different image inputs. Note that this operation only works Args: inputs (dict): Keys
imaginaire/utils/data.py:296
↓ 1 callersFunction_polynomial_mmd
r"""Computes MMD between two sets of features using polynomial kernels. It performs a number of repetitions of subset sampling without replacement
imaginaire/evaluation/kid.py:196
↓ 1 callersMethod_pre_save_checkpoint
r"""Implement the things you want to do before saving a checkpoint. For example, you can compute the K-mean features (pix2pixHD) before
imaginaire/trainers/base.py:229
↓ 1 callersMethod_resize_data
r"""Resize input label maps and images so that it can be properly generated by the generator. Args: data (dict): Input di
imaginaire/trainers/spade.py:267
↓ 1 callersFunction_resnet50
r"""Get resnet50 layers
imaginaire/losses/perceptual.py:278
↓ 1 callersFunction_robust_resnet50
r"""Get robust resnet50 layers
imaginaire/losses/perceptual.py:297
↓ 1 callersMethod_sample_keys
r"""Gets files to load for this sample. Args: index (int): Index in [0, len(dataset)]. Returns: key (dict):
imaginaire/datasets/paired_few_shot_videos.py:123
↓ 1 callersMethod_sample_keys
r"""Gets files to load for this sample. Args: index (int): Index in [0, len(dataset)]. Returns: keys (dict):
imaginaire/datasets/images.py:90
↓ 1 callersMethod_sample_keys
r"""Gets files to load for this sample. Args: index (int): Index in [0, len(dataset)]. Returns: (tuple):
imaginaire/datasets/paired_few_shot_videos_native.py:89
↓ 1 callersMethod_sample_keys
r"""Gets files to load for this sample. Args: index (int): Index in [0, len(dataset)]. Returns: key (dict):
imaginaire/datasets/paired_videos.py:156
← previousnext →201–300 of 1,077, ranked by callers