Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVlabs/imaginaire
/ types & classes
Types & classes
229 in github.com/NVlabs/imaginaire
⨍
Functions
1,077
◇
Types & classes
229
↓ 48 callers
Class
Conv2dBlock
r"""A Wrapper class that wraps ``torch.nn.Conv2d`` with normalization and nonlinearity. Args: in_channels (int): Number of channels i
imaginaire/layers/conv.py:556
↓ 25 callers
Class
LinearBlock
r"""A Wrapper class that wraps ``torch.nn.Linear`` with normalization and nonlinearity. Args: in_features (int): Number of channels i
imaginaire/layers/conv.py:380
↓ 20 callers
Class
AttrDict
Dict as attribute trick.
imaginaire/config.py:19
↓ 9 callers
Class
Res2dBlock
r"""Residual block for 2D input. Args: in_channels (int) : Number of channels in the input tensor. out_channels (int) : Number of
imaginaire/layers/residual.py:448
↓ 9 callers
Class
tofp32
imaginaire/third_party/flow_net/flownet2/networks/submodules.py:86
↓ 8 callers
Class
Config
r"""Configuration class. This should include every human specifiable hyperparameter values for your training.
imaginaire/config.py:76
↓ 8 callers
Class
GANLoss
r"""GAN loss constructor. Args: gan_mode (str): Type of GAN loss. ``'hinge'``, ``'least_square'``, ``'non_saturated'``, ``'wa
imaginaire/losses/gan.py:31
↓ 8 callers
Class
tofp16
imaginaire/third_party/flow_net/flownet2/networks/submodules.py:78
↓ 7 callers
Class
_PerceptualNetwork
r"""The network that extracts features to compute the perceptual loss. Args: network (nn.Sequential) : The network that extracts features
imaginaire/losses/perceptual.py:158
↓ 6 callers
Class
PerceptualLoss
r"""Perceptual loss initialization. Args: network (str) : The name of the loss network: 'vgg16' | 'vgg19'. layers (str or list of s
imaginaire/losses/perceptual.py:16
↓ 6 callers
Class
unetConv2
imaginaire/evaluation/segmentation/celebamask_hq.py:86
↓ 5 callers
Class
LabelEmbedder
r"""Embed the input label map to get embedded features. Args: emb_cfg (obj): Embed network configuration. num_input_channels (int
imaginaire/generators/fs_vid2vid.py:1072
↓ 5 callers
Class
LayerNorm
Subclass torch's LayerNorm to handle fp16.
imaginaire/evaluation/caption/clip.py:264
↓ 5 callers
Class
ModLinear
r"""Linear layer with affine modulation (Based on StyleGAN2 mod demod). Equivalent to affine modulation following linear, but faster when the same
imaginaire/model_utils/gancraft/layers.py:66
↓ 4 callers
Class
Blur
imaginaire/third_party/upfirdn2d/upfirdn2d.py:116
↓ 4 callers
Class
FIDInceptionC
InceptionC block patched for FID computation
imaginaire/evaluation/pretrained.py:137
↓ 4 callers
Class
FeatureMatchingLoss
r"""Compute feature matching loss
imaginaire/losses/feature_matching.py:8
↓ 4 callers
Class
MLP
r"""Improved FUNIT style decoder. Args: input_dim (int): Input dimension (style code dimension). output_dim (int): Output dimensi
imaginaire/generators/funit.py:359
↓ 4 callers
Class
NLayerPatchDiscriminator
r"""Patch Discriminator constructor. Args: kernel_size (int): Convolution kernel size. num_input_channels (int): Num. of channels
imaginaire/discriminators/multires_patch.py:244
↓ 4 callers
Class
ResDiscriminator
r"""Global residual discriminator. Args: image_channels (int): Num. of channels in the real/fake image. num_filters (int): Num. o
imaginaire/discriminators/residual.py:14
↓ 4 callers
Class
unetUp
imaginaire/evaluation/segmentation/celebamask_hq.py:114
↓ 3 callers
Class
ApplyNoise
r"""Add Gaussian noise to the input tensor.
imaginaire/layers/misc.py:9
↓ 3 callers
Class
BlurUpsample
imaginaire/third_party/upfirdn2d/upfirdn2d.py:52
↓ 3 callers
Class
Colorize
Class to colorize segmentation maps.
imaginaire/utils/visualization/common.py:261
↓ 3 callers
Class
FIDInceptionA
InceptionA block patched for FID computation
imaginaire/evaluation/pretrained.py:111
↓ 3 callers
Class
GaussianKLLoss
r"""Compute KL loss in VAE for Gaussian distributions
imaginaire/losses/kl.py:9
↓ 3 callers
Class
Meter
Meter is to keep track of statistics along steps. Meters write values for purpose like printing average values. Meters can be flushed to log f
imaginaire/utils/meters.py:76
↓ 3 callers
Class
MultiPatchDiscriminator
r"""Multi-resolution patch discriminator. Args: dis_cfg (obj): Discriminator part of the yaml config file. num_input_channels (in
imaginaire/discriminators/fs_vid2vid.py:259
↓ 3 callers
Class
MultiResPatchDiscriminator
r"""Multi-resolution patch discriminator. Args: num_discriminators (int): Num. of discriminators (one per scale). kernel_size (in
imaginaire/discriminators/multires_patch.py:103
↓ 2 callers
Class
AutoEncoder
r"""Improved UNIT autoencoder. Args: num_filters (int): Base filter numbers. max_num_filters (int): Maximum number of filters in
imaginaire/generators/unit.py:91
↓ 2 callers
Class
AutoEncoder
r"""Improved MUNIT autoencoder. Args: num_filters (int): Base filter numbers. max_num_filters (int): Maximum number of filters in
imaginaire/generators/munit.py:159
↓ 2 callers
Class
BlurDownsample
imaginaire/third_party/upfirdn2d/upfirdn2d.py:87
↓ 2 callers
Class
Bottleneck
imaginaire/evaluation/caption/clip.py:110
↓ 2 callers
Class
CleanInceptionV3
imaginaire/evaluation/common.py:329
↓ 2 callers
Class
ContentEncoder
r"""Improved FUNIT Content Encoder. This is basically the same as the original FUNIT content encoder. Args: num_downsamples (int): Nu
imaginaire/generators/funit.py:303
↓ 2 callers
Class
ContentEncoder
r"""Improved UNIT encoder. The network consists of: - input layers - $(num_downsamples) convolutional blocks - $(num_res_blocks) residual
imaginaire/generators/unit.py:166
↓ 2 callers
Class
Decoder
r"""Improved FUNIT decoder. Args: num_enc_output_channels (int): Number of content feature channels. style_channels (int): Dimens
imaginaire/generators/funit.py:167
↓ 2 callers
Class
FlowGenerator
r"""flow generator constructor. Args: flow_cfg (obj): Flow definition part of the yaml config file. data_cfg (obj): Data definition
imaginaire/generators/fs_vid2vid.py:972
↓ 2 callers
Class
InceptionV3
imaginaire/evaluation/pretrained.py:67
↓ 2 callers
Class
MaskedL1Loss
r"""Masked L1 loss constructor.
imaginaire/losses/flow.py:17
↓ 2 callers
Class
ModelAverage
r"""In this model average implementation, the spectral layers are absorbed in the model parameter by default. If such options are turned on, b
imaginaire/utils/model_average.py:35
↓ 2 callers
Class
ReducedLabelMapper
imaginaire/model_utils/gancraft/mc_lbl_reduction.py:9
↓ 2 callers
Class
SPADEGenerator
r"""SPADE Image Generator constructor. Args: num_labels (int): Number of different labels. out_image_small_side_size (int): min(w
imaginaire/generators/spade.py:228
↓ 2 callers
Class
StyleEncoder
r"""Improved FUNIT Style Encoder. This is basically the same as the original FUNIT Style Encoder. Args: num_downsamples (int): Number
imaginaire/generators/funit.py:247
↓ 2 callers
Class
SwAV
imaginaire/evaluation/pretrained.py:40
↓ 2 callers
Class
TFInceptionV3
imaginaire/evaluation/pretrained.py:81
↓ 2 callers
Class
Transformer
imaginaire/evaluation/caption/clip.py:305
↓ 2 callers
Class
Vgg16
imaginaire/evaluation/pretrained.py:53
↓ 2 callers
Class
WeightReshaper
r"""Handles all weight reshape related tasks.
imaginaire/generators/fs_vid2vid.py:786
↓ 2 callers
Class
WeightSharedMultiResPatchDiscriminator
r"""Multi-resolution patch discriminator with shared weights. Args: num_discriminators (int): Num. of discriminators (one per scale).
imaginaire/discriminators/multires_patch.py:175
↓ 2 callers
Class
WrappedModel
r"""Dummy wrapping the module.
imaginaire/utils/trainer.py:185
↓ 2 callers
Class
vgg16
imaginaire/evaluation/lpips.py:115
↓ 1 callers
Class
AdaptiveNorm
r"""Adaptive normalization layer. The layer first normalizes the input, then performs an affine transformation using parameters computed from the
imaginaire/layers/activation_norm.py:20
↓ 1 callers
Class
AffineMod
r"""Learning affine modulation of activation. Args: in_features (int): Number of input features. style_features (int): Number of
imaginaire/model_utils/gancraft/layers.py:10
↓ 1 callers
Class
AttentionModule
r"""Attention module constructor. Args: atn_cfg (obj): Generator definition part of the yaml config file. data_cfg (obj): Data defi
imaginaire/generators/fs_vid2vid.py:886
↓ 1 callers
Class
AttentionPool2d
imaginaire/evaluation/caption/clip.py:157
↓ 1 callers
Class
Augmentor
r"""Handles data augmentation using albumentations library.
imaginaire/utils/data.py:28
↓ 1 callers
Class
CLIP
imaginaire/evaluation/caption/clip.py:364
↓ 1 callers
Class
COCOFUNITTranslator
r"""COCO-FUNIT Generator architecture. Args: num_filters (int): Base filter numbers. num_filters_mlp (int): Base filter number in
imaginaire/generators/coco_funit.py:71
↓ 1 callers
Class
Cache
r"""This creates an on disk cache, which saves files as bytes. Args: root (str): Path to the cache dir. size_MB (float): Size of c
imaginaire/datasets/cache.py:16
↓ 1 callers
Class
Decoder
r"""Improved UNIT decoder. The network consists of: - $(num_res_blocks) residual blocks. - $(num_upsamples) residual blocks or convolutional
imaginaire/generators/unit.py:241
↓ 1 callers
Class
Decoder
r"""Improved MUNIT decoder. The network consists of - $(num_res_blocks) residual blocks. - $(num_upsamples) residual blocks or convolutional
imaginaire/generators/munit.py:342
↓ 1 callers
Class
DeepLabV2
imaginaire/evaluation/segmentation/cocostuff.py:10
↓ 1 callers
Class
DualAdaptiveNorm
imaginaire/layers/activation_norm.py:266
↓ 1 callers
Class
Embedding2d
imaginaire/layers/conv.py:1370
↓ 1 callers
Class
Encoder
r"""Encoder for getting region-wise features for style control. Args: enc_cfg (obj): Encoder definition part of the yaml config file.
imaginaire/generators/pix2pixHD.py:276
↓ 1 callers
Class
FIDInceptionE_1
First InceptionE block patched for FID computation
imaginaire/evaluation/pretrained.py:166
↓ 1 callers
Class
FIDInceptionE_2
Second InceptionE block patched for FID computation
imaginaire/evaluation/pretrained.py:200
↓ 1 callers
Class
FPSEDiscriminator
r"""# Feature-Pyramid Semantics Embedding Discriminator. This is a copy of the discriminator in https://arxiv.org/pdf/1910.06809.pdf
imaginaire/discriminators/fpse.py:15
↓ 1 callers
Class
FPSEDiscriminator
imaginaire/discriminators/gancraft.py:133
↓ 1 callers
Class
FUNITTranslator
r""" Args: num_filters (int): Base filter numbers. num_filters_mlp (int): Base filter number in the MLP module. style_
imaginaire/generators/funit.py:68
↓ 1 callers
Class
Flatten
imaginaire/losses/perceptual.py:361
↓ 1 callers
Class
FlowGenerator
r"""Flow generator constructor. Args: flow_cfg (obj): Flow definition part of the yaml config file. data_cfg (obj): Data definition
imaginaire/generators/vid2vid.py:390
↓ 1 callers
Class
FlowLoss
r"""Flow loss constructor. Args: cfg (obj): Configuration.
imaginaire/losses/flow.py:45
↓ 1 callers
Class
FlowNet
imaginaire/third_party/flow_net/flow_net.py:17
↓ 1 callers
Class
FolderDataset
r"""This deals with opening, and reading from an Folder dataset. Args: root (str): Path to the folder. metadata (dict): Containin
imaginaire/datasets/folder.py:16
↓ 1 callers
Class
Fromage
r"""Fromage optimizer implementation (https://arxiv.org/abs/2002.03432)
imaginaire/optimizers/fromage.py:11
↓ 1 callers
Class
FusedNonlinearity
imaginaire/third_party/bias_act/bias_act.py:190
↓ 1 callers
Class
GauGANLoader
r"""Manages the SPADE/GauGAN model used to generate pseudo-GTs for training GANcraft. Args: gaugan_cfg (Config): SPADE configuration.
imaginaire/trainers/gancraft.py:23
↓ 1 callers
Class
GlobalGenerator
r"""Coarse generator constructor. This is the main generator in the pix2pixHD architecture. Args: gen_cfg (obj): Generator definition
imaginaire/generators/pix2pixHD.py:223
↓ 1 callers
Class
HyperConv2d
r"""Hyper Conv2d initialization. Args: in_channels (int): Dummy parameter. out_channels (int): Dummy parameter. kernel_si
imaginaire/layers/conv.py:806
↓ 1 callers
Class
HyperRes2dBlock
r"""Hyper residual block for 2D input. Args: in_channels (int) : Number of channels in the input tensor. out_channels (int) : Num
imaginaire/layers/residual.py:667
↓ 1 callers
Class
HyperSpatiallyAdaptiveNorm
r"""Spatially Adaptive Normalization (SPADE) initialization. Args: num_features (int) : Number of channels in the input tensor. c
imaginaire/layers/activation_norm.py:334
↓ 1 callers
Class
ImageEncoder
imaginaire/evaluation/caption/common.py:42
↓ 1 callers
Class
InfoNCELoss
imaginaire/losses/info_nce.py:33
↓ 1 callers
Class
LMDBDataset
r"""This deals with opening, and reading from an LMDB dataset. Args: root (str): Path to the LMDB file.
imaginaire/datasets/lmdb.py:19
↓ 1 callers
Class
LPIPSNet
imaginaire/evaluation/lpips.py:58
↓ 1 callers
Class
LPNet
imaginaire/evaluation/lpips.py:77
↓ 1 callers
Class
LayerNorm2d
r"""Layer Normalization as introduced in https://arxiv.org/abs/1607.06450. This is the usual way to apply layer normalization in CNNs. Not
imaginaire/layers/activation_norm.py:425
↓ 1 callers
Class
LocalEnhancer
r"""Local enhancer constructor. These are sub-networks that are useful when aiming to produce high-resolution outputs. Args: gen_cfg
imaginaire/generators/pix2pixHD.py:164
↓ 1 callers
Class
MLP
r"""The multi-layer perceptron (MLP) that maps Gaussian style code to a feature vector that is given as the conditional input to AdaIN. Args:
imaginaire/generators/munit.py:430
↓ 1 callers
Class
Madam
r"""MADAM optimizer implementation (https://arxiv.org/abs/2006.14560)
imaginaire/optimizers/madam.py:9
↓ 1 callers
Class
ModifiedResNet
A ResNet class that is similar to torchvision's but contains the following changes: - There are now 3 "stem" convolutions as opposed to 1, wi
imaginaire/evaluation/caption/clip.py:198
↓ 1 callers
Class
ModulatedConv2d
imaginaire/layers/conv.py:278
↓ 1 callers
Class
NetLinLayer
A single linear layer used as placeholder for LPIPS learnt weights
imaginaire/evaluation/lpips.py:35
↓ 1 callers
Class
ObjectStoreDataset
r"""This deals with opening, and reading from an AWS S3 bucket. Args: root (str): Path to the AWS S3 bucket. aws_credentials_file
imaginaire/datasets/object_store.py:23
↓ 1 callers
Class
PixelLayerNorm
imaginaire/layers/activation_norm.py:555
↓ 1 callers
Class
PixelNorm
imaginaire/layers/activation_norm.py:503
↓ 1 callers
Class
QuickGELU
imaginaire/evaluation/caption/clip.py:273
↓ 1 callers
Class
RenderCNN
r"""CNN converting intermediate feature map to final image.
imaginaire/generators/gancraft_base.py:172
next →
1–100 of 229, ranked by callers