Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVlabs/imaginaire
/ functions
Functions
1,077 in github.com/NVlabs/imaginaire
⨍
Functions
1,077
◇
Types & classes
229
↓ 1 callers
Method
_sample_keys
r"""Gets files to load for this sample. Args: index (int): Index in [0, len(dataset)]. Returns: (tuple):
imaginaire/datasets/unpaired_few_shot_images.py:97
↓ 1 callers
Method
_sample_keys
r"""Gets files to load for this sample. Args: index (int): Index in [0, len(dataset)]. Returns: keys (dict):
imaginaire/datasets/unpaired_images.py:49
↓ 1 callers
Function
_save_checkpoint
r"""Save network weights, optimizer parameters, scheduler parameters in the checkpoint. Args: cfg (obj): Global configuration.
imaginaire/trainers/base.py:944
↓ 1 callers
Function
_slq_ts_fs
Compute the trace of matrix functions Arguments: A: square matrix in trace(exp(-t*A)), where t is temperature m: number of L
imaginaire/evaluation/msid.py:269
↓ 1 callers
Method
_start_of_epoch
r"""Operations to do before starting an epoch. Args: current_epoch (int): Current number of epoch.
imaginaire/trainers/base.py:620
↓ 1 callers
Method
_start_of_iteration
r"""Operations to do before starting an iteration. Args: data (dict): Data used for the current iteration. current_it
imaginaire/trainers/base.py:628
↓ 1 callers
Method
_start_of_iteration
r"""Model specific custom start of iteration process. We will do two things. First, put all the data to GPU. Second, we will resize the
imaginaire/trainers/spade.py:81
↓ 1 callers
Method
_time_before_leave_dis
r""" Record forward, backward, loss time for the discriminator update.
imaginaire/trainers/base.py:930
↓ 1 callers
Method
_time_before_leave_gen
r""" Record forward, backward, loss, and model average time for the generator update.
imaginaire/trainers/base.py:916
↓ 1 callers
Method
_time_before_model_avg
r""" Record time before applying model average.
imaginaire/trainers/base.py:908
↓ 1 callers
Function
_transform
(n_px)
imaginaire/evaluation/caption/clip.py:78
↓ 1 callers
Method
_truncate_voxel
(self)
imaginaire/model_utils/gancraft/mc_utils.py:227
↓ 1 callers
Function
_upfirdn2d_ref
Slow reference implementation of `upfirdn2d()` using standard PyTorch ops.
imaginaire/third_party/upfirdn2d/upfirdn2d.py:243
↓ 1 callers
Function
_vgg16
r"""Get vgg16 layers
imaginaire/losses/perceptual.py:216
↓ 1 callers
Function
_vgg19
r"""Get vgg19 layers
imaginaire/losses/perceptual.py:190
↓ 1 callers
Function
_vgg_face_dag
(layers)
imaginaire/losses/perceptual.py:323
↓ 1 callers
Method
_write_custom_meters
r"""Dummy member function to be overloaded by the child class. In the child class, you can write down whatever you want to track.
imaginaire/trainers/base.py:209
↓ 1 callers
Method
_write_loss_meters
r"""Write all loss values to tensorboard.
imaginaire/trainers/base.py:195
↓ 1 callers
Method
_write_tensorboard
r"""Write values to tensorboard. By default, we will log the time used per iteration, time used per epoch, generator learning rate, and
imaginaire/trainers/base.py:177
↓ 1 callers
Method
attention
(self, x: torch.Tensor)
imaginaire/evaluation/caption/clip.py:293
↓ 1 callers
Method
build_attention_mask
(self)
imaginaire/evaluation/caption/clip.py:454
↓ 1 callers
Function
build_lmdb
r"""Write out lmdb containing (key, contents of filepath) to file. Args: filepaths (list): List of filepath strings. keys (list):
imaginaire/utils/lmdb.py:56
↓ 1 callers
Function
calc_height_map
r"""Calculate height map given a voxel grid [Y, X, Z] as input. The height is defined as the Y index of the surface (non-air) block Args:
imaginaire/model_utils/gancraft/mc_utils.py:44
↓ 1 callers
Function
check_and_add
r"""Add filepath and key to list of filepaths and keys. Args: filepath (str): Filepath to add. key (str): LMDB key for this filep
imaginaire/utils/lmdb.py:19
↓ 1 callers
Function
clean_resize
(img_batch)
imaginaire/evaluation/common.py:342
↓ 1 callers
Function
cluster_features
r"""Use clustering to compute the features. Args: cfg (obj): Global configuration file. train_data_loader (obj): Dataloader for i
imaginaire/model_utils/pix2pixHD.py:17
↓ 1 callers
Method
coco2reduced
(self, coco)
imaginaire/model_utils/gancraft/mc_utils.py:336
↓ 1 callers
Function
compute_color
compute optical flow color map :param u: horizontal optical flow :param v: vertical optical flow :return:
imaginaire/third_party/flow_net/flownet2/utils/flow_utils.py:122
↓ 1 callers
Method
compute_flow_losses
r"""Compute losses on the generated flow maps. Args: flow (tensor or list of tensors): Generated flow maps. warpe
imaginaire/losses/flow.py:133
↓ 1 callers
Function
compute_hist
(pred, gt, n_classes, use_dont_care)
imaginaire/evaluation/segmentation/common.py:72
↓ 1 callers
Function
compute_kid
r"""Compute the kid score. Args: kid_path (str): Location for store feature activations. data_loader (obj): PyTorch dataloader ob
imaginaire/evaluation/kid.py:32
↓ 1 callers
Method
compute_mask_losses
r"""Compute losses on the generated occlusion masks. Args: occ_mask (tensor or list of tensors): Generated occlusion masks.
imaginaire/losses/flow.py:225
↓ 1 callers
Function
compute_pairwise_distance
r""" Args: data_x: numpy.ndarray([N, feature_dim], dtype=np.float32) data_y: numpy.ndarray([N, feature_dim], dtype=np.float32)
imaginaire/evaluation/common.py:611
↓ 1 callers
Function
concat
r"""Concat prev and now frames in first dimension, up to t frames.
imaginaire/utils/visualization/face.py:138
↓ 1 callers
Function
connect_pose_keypoints
r"""Draw edges by connecting the keypoints onto the label map. Args: pts (Px3 numpy array): Keypoint xy coordinates + confidence.
imaginaire/utils/visualization/pose.py:176
↓ 1 callers
Function
construct_file_path
Get file path for our dataset structure.
imaginaire/utils/lmdb.py:14
↓ 1 callers
Function
construct_graph
(input_features, k, num_splits=10)
imaginaire/evaluation/msid.py:351
↓ 1 callers
Function
construct_graph_kgraph
(data, k)
imaginaire/evaluation/msid.py:339
↓ 1 callers
Function
construct_graph_sparse
(data, k)
imaginaire/evaluation/msid.py:325
↓ 1 callers
Method
conv_blocks
( self, x, *cond_inputs, separate_cond=False, **kw_cond_inputs )
imaginaire/layers/residual_deep.py:213
↓ 1 callers
Method
conv_blocks
r"""Returns the output of the residual branch. Args: x (tensor): Input tensor. cond_inputs (list of tensors) : Condit
imaginaire/layers/residual.py:187
↓ 1 callers
Function
convert_weights
Convert applicable model parameters to fp16
imaginaire/evaluation/caption/clip.py:504
↓ 1 callers
Method
copy_s2t
r""" Copy state_dictionary from source to target. Here source is the regular module and the target is the moving average module. Basic
imaginaire/utils/model_average.py:164
↓ 1 callers
Method
create_sequence_output_dir
r"""Create output subdir for this sequence. Args: output_dir (str): Root output dir. key (str): LMDB key which contai
imaginaire/trainers/vid2vid.py:308
↓ 1 callers
Method
create_sequence_output_dir
r"""Create output subdir for this sequence. Args: output_dir (str): Root output dir. key (str): LMDB key which contai
imaginaire/trainers/wc_vid2vid.py:89
↓ 1 callers
Function
cumsum_exclusive
(tensor, dim)
imaginaire/model_utils/gancraft/mc_utils.py:84
↓ 1 callers
Method
custom_init
r"""Weight initialization of GANcraft components.
imaginaire/generators/gancraft.py:72
↓ 1 callers
Function
define_edge_lists
r"""Define the list of keypoints that should be connected to form the edges. Args: basic_points_only (bool): Whether to use only the basi
imaginaire/utils/visualization/pose.py:280
↓ 1 callers
Function
detach
r"""Detach tensors in the dict. Args: output (dict): Output dict. Returns: output (dict): Detached output dict.
imaginaire/model_utils/fs_vid2vid.py:850
↓ 1 callers
Function
diff_aug
(x, policy='', channels_first=True, **kwargs)
imaginaire/utils/diff_aug.py:34
↓ 1 callers
Method
dis_forward
r"""Every trainer should implement its own discriminator forward.
imaginaire/trainers/base.py:818
↓ 1 callers
Method
discriminate_video
r"""Discriminate a sequence of images. Args: real_B (NxCxHxW tensor): Real image. fake_B (NxCxHxW tensor): Fake image
imaginaire/discriminators/fs_vid2vid.py:175
↓ 1 callers
Method
dtype
(self)
imaginaire/evaluation/caption/clip.py:463
↓ 1 callers
Method
encode
r"""Encoder images to get their content and style codes. Args: images (tensor): Input image tensor.
imaginaire/generators/funit.py:145
↓ 1 callers
Method
encode
r"""Encoder images to get their content and style codes. Args: images (tensor): Input image tensor.
imaginaire/generators/coco_funit.py:168
↓ 1 callers
Function
encode_features
r"""Compute feature embeddings for an image image. TODO(Ting-Chun): To make this funciton dataset independent. Args: net_E (nn.Module
imaginaire/model_utils/pix2pixHD.py:72
↓ 1 callers
Method
encode_reference
r"""Encode the reference image to get features for weight generation. Args: ref_image ((NxK)x3xHxW tensor): Reference images.
imaginaire/generators/fs_vid2vid.py:617
↓ 1 callers
Method
encode_text
(self, text)
imaginaire/evaluation/caption/clip.py:469
↓ 1 callers
Method
end_of_epoch
r"""Things to do after an epoch. Args: data (dict): Data used for the current iteration. current_epoch (int): Curren
imaginaire/trainers/base.py:451
↓ 1 callers
Method
end_of_iteration
r"""Things to do after an iteration. Args: data (dict): Data used for the current iteration. current_epoch (int): Cur
imaginaire/trainers/base.py:356
↓ 1 callers
Function
extract_valid_keypoints
r"""Use only the valid keypoints by looking at the detection confidences. If the confidences for all keypoints in an edge are above threshold,
imaginaire/utils/visualization/pose.py:143
↓ 1 callers
Method
finetune
r"""Finetune the model for a few iterations on the inference data.
imaginaire/trainers/fs_vid2vid.py:264
↓ 1 callers
Function
flow2img
convert optical flow into color image :param flow_data: :return: color image
imaginaire/third_party/flow_net/flownet2/utils/flow_utils.py:82
↓ 1 callers
Method
flow_generation
r"""Generates flows and masks for warping reference / previous images. Args: label (NxCxHxW tensor): Target label map.
imaginaire/generators/fs_vid2vid.py:305
↓ 1 callers
Method
flush
r"""Write the value in the tensorboard. Args: step (int): Epoch or iteration number.
imaginaire/utils/meters.py:106
↓ 1 callers
Method
forward
r"""Coarse-to-fine generator forward. Args: data (dict) : Dictionary of input data. random_style (bool): Always set t
imaginaire/generators/pix2pixHD.py:100
↓ 1 callers
Method
forward
(self, image, text)
imaginaire/evaluation/caption/clip.py:486
↓ 1 callers
Method
forward
(self, input1, input2)
imaginaire/third_party/resample2d/resample2d.py:56
↓ 1 callers
Method
forward
(self, input1, input2)
imaginaire/third_party/correlation/correlation.py:93
↓ 1 callers
Method
forward
(self, input1)
imaginaire/third_party/channelnorm/channelnorm.py:38
↓ 1 callers
Function
fuse_math_min_mean_neg
r"""Fuse operation min mean for hinge loss computation of negative samples
imaginaire/losses/gan.py:23
↓ 1 callers
Function
fuse_math_min_mean_pos
r"""Fuse operation min mean for hinge loss computation of positive samples
imaginaire/losses/gan.py:14
↓ 1 callers
Function
gen_corner_voxel
r"""Converting voxel center array to voxel corner array. The size of the produced array grows by 1 on every dimension. Args: voxel (t
imaginaire/model_utils/gancraft/mc_utils.py:29
↓ 1 callers
Method
gen_forward
r"""Every trainer should implement its own generator forward.
imaginaire/trainers/base.py:746
↓ 1 callers
Method
getCpuAffinity
r"""Get CPU affinity
imaginaire/utils/gpu_affinity.py:34
↓ 1 callers
Function
get_all_filenames_from_list
r"""Get all filenames from list. Args: list_name (str): Path to filename list. Returns: all_filenames (dict): Folder name for
imaginaire/utils/lmdb.py:77
↓ 1 callers
Function
get_all_skipped_frames
r"""Get temporally skipped frames from the input frames. Args: past_frames (list of tensors): Past real frames / generator outputs.
imaginaire/discriminators/fs_vid2vid.py:199
↓ 1 callers
Function
get_confirm_token
r"""Get confirm token Args: response: Check if the file exists. Returns:
imaginaire/utils/io.py:80
↓ 1 callers
Method
get_conv_weights
r"""Adaptively generate weights for layer i in main branch convolutions. Args: x (NxCxHxW tensor): Input features. i
imaginaire/generators/fs_vid2vid.py:751
↓ 1 callers
Function
get_crop_h_w
r"""Get height and width of crop. Args: augmentation (dict): Dict of applied augmentations. Returns: (dict): - cro
imaginaire/utils/data.py:582
↓ 1 callers
Function
get_date_uid
Generate a unique id based on date. Returns: str: Return uid string, e.g. '20171122171307111552'.
imaginaire/utils/logging.py:13
↓ 1 callers
Method
get_dis_losses
r"""Compute discriminator losses. Args: net_D_output (dict): Output of the discriminator.
imaginaire/trainers/vid2vid.py:573
↓ 1 callers
Function
get_edges
r""" Compute edge maps for a given input instance map. Args: t (4D tensor): Input instance map. Returns: (4D tensor): Output
imaginaire/model_utils/pix2pixHD.py:137
↓ 1 callers
Function
get_face_bbox_for_output
r"""Get pixel coordinates of the face bounding box. Args: data_cfg (obj): Data configuration. pose (NxCxHxW tensor): Pose label m
imaginaire/model_utils/fs_vid2vid.py:661
↓ 1 callers
Method
get_gen_losses
r"""Compute generator losses. Args: data_t (dict): Training data at the current time t. net_G_output (dict): Output o
imaginaire/trainers/vid2vid.py:463
↓ 1 callers
Function
get_grid
r"""Get a grid ranging [-1, 1] of 2D/3D coordinates. Args: batchsize (int) : Batch size. size (tuple) : (height, width) or (depth
imaginaire/model_utils/fs_vid2vid.py:36
↓ 1 callers
Method
get_guidance_images_and_masks
r"""Do stuff.
imaginaire/generators/wc_vid2vid.py:98
↓ 1 callers
Function
get_hand_bbox_for_output
r"""Get coordinates of the hand bounding box. Args: data_cfg (obj): Data configuration. pose (NxCxHxW tensor): Pose label map.
imaginaire/model_utils/fs_vid2vid.py:743
↓ 1 callers
Function
get_lmdb_data_types
r"""Get the data types which should be put in LMDB. Args: cfg: Configuration object.
imaginaire/utils/lmdb.py:104
↓ 1 callers
Method
get_norm_weights
r"""Adaptively generate weights for SPADE in layer i of generator. Args: x (NxCxHxW tensor): Input features. i (int):
imaginaire/generators/fs_vid2vid.py:697
↓ 1 callers
Method
get_num_reduced_lbls
(self)
imaginaire/model_utils/gancraft/mc_utils.py:341
↓ 1 callers
Function
get_optimizer_with_params
r"""Return the optimizer object. Args: cfg (obj): Global config. net_G (obj): Generator network. net_D (obj): Discriminat
imaginaire/model_utils/pix2pixHD.py:204
↓ 1 callers
Method
get_param_groups
(self, cfg_opt)
imaginaire/generators/gancraft_base.py:388
↓ 1 callers
Method
get_partial
r"""Get if convs should be partial or not. Args: num_downs (int) : How many downsamples at current layer. Returns:
imaginaire/generators/wc_vid2vid.py:318
↓ 1 callers
Method
get_pseudo_gt
r"""Evaluating img2img network to obtain pseudo-ground truth images. Args: pseudo_gen (callable): Function converting mask to ima
imaginaire/generators/gancraft.py:180
↓ 1 callers
Function
get_skipped_frames
r"""Get temporally skipped frames from the input frames. Args: all_frames (NxTxCxHxW tensor): All past frames. frame (Nx1xCxHxW t
imaginaire/discriminators/fs_vid2vid.py:225
↓ 1 callers
Function
get_test_dataloader
r"""Return dataset objects for testing Args: cfg (obj): Global configuration file. Returns: (obj): Val data loader. It may n
imaginaire/utils/dataset.py:104
↓ 1 callers
Method
get_test_output_images
r"""Get the visualization output of test function. Args: data (dict): Training data at the current iteration.
imaginaire/trainers/vid2vid.py:412
↓ 1 callers
Method
get_test_output_images
r"""Get the visualization output of test function. Args: data (dict): Training data at the current iteration.
imaginaire/trainers/wc_vid2vid.py:201
↓ 1 callers
Function
get_train_params
r"""Get train parameters. Args: net (obj): Network object. param_names_start_with (list of strings): Params whose names
imaginaire/model_utils/pix2pixHD.py:157
← previous
next →
301–400 of 1,077, ranked by callers