SYMBOL INDEX (785 symbols across 83 files) FILE: animate.py function normalize_kp (line 14) | def normalize_kp(kp_source, kp_driving, kp_driving_initial, adapt_moveme... FILE: augmentation.py function crop_clip (line 20) | def crop_clip(clip, min_h, min_w, h, w): function pad_clip (line 34) | def pad_clip(clip, h, w): function resize_clip (line 42) | def resize_clip(clip, size, interpolation='bilinear'): function get_resize_sizes (line 81) | def get_resize_sizes(im_h, im_w, size): class RandomFlip (line 91) | class RandomFlip(object): method __init__ (line 92) | def __init__(self, time_flip=False, horizontal_flip=False): method __call__ (line 96) | def __call__(self, clip): class RandomResize (line 105) | class RandomResize(object): method __init__ (line 115) | def __init__(self, ratio=(3. / 4., 4. / 3.), interpolation='nearest'): method __call__ (line 119) | def __call__(self, clip): class RandomCrop (line 136) | class RandomCrop(object): method __init__ (line 143) | def __init__(self, size): method __call__ (line 149) | def __call__(self, clip): class RandomRotation (line 175) | class RandomRotation(object): method __init__ (line 184) | def __init__(self, degrees): method __call__ (line 197) | def __call__(self, clip): class ColorJitter (line 217) | class ColorJitter(object): method __init__ (line 230) | def __init__(self, brightness=0, contrast=0, saturation=0, hue=0): method get_params (line 236) | def get_params(self, brightness, contrast, saturation, hue): method __call__ (line 261) | def __call__(self, clip): class AllAugmentationTransform (line 323) | class AllAugmentationTransform: method __init__ (line 324) | def __init__(self, resize_param=None, rotation_param=None, flip_param=... method __call__ (line 342) | def __call__(self, clip): FILE: demo.py function load_checkpoints (line 26) | def load_checkpoints(config_path, checkpoint_path, gen, cpu=False): function headpose_pred_to_degree (line 72) | def headpose_pred_to_degree(pred): function get_rotation_matrix (line 112) | def get_rotation_matrix(yaw, pitch, roll): function keypoint_transformation (line 140) | def keypoint_transformation(kp_canonical, he, estimate_jacobian=True, fr... function make_animation (line 187) | def make_animation(source_image, driving_video, generator, kp_detector, ... function find_best_frame (line 219) | def find_best_frame(source, driving, cpu=False): FILE: frames_dataset.py function read_video (line 26) | def read_video(name, frame_shape): class FramesDataset (line 69) | class FramesDataset(Dataset): method __init__ (line 77) | def __init__(self, root_dir, frame_shape=(256, 256, 3), id_sampling=Fa... method __len__ (line 143) | def __len__(self): method __getitem__ (line 146) | def __getitem__(self, idx): class DatasetRepeater (line 267) | class DatasetRepeater(Dataset): method __init__ (line 272) | def __init__(self, dataset, num_repeats=100): method __len__ (line 276) | def __len__(self): method __getitem__ (line 279) | def __getitem__(self, idx): FILE: logger.py class Logger (line 13) | class Logger: method __init__ (line 14) | def __init__(self, log_dir, checkpoint_freq=100, visualizer_params=Non... method log_scores (line 29) | def log_scores(self, loss_names): method visualize_rec (line 39) | def visualize_rec(self, inp, out): method save_cpk (line 43) | def save_cpk(self, emergent=False): method load_cpk (line 51) | def load_cpk(checkpoint_path, generator=None, discriminator=None, kp_d... method __enter__ (line 79) | def __enter__(self): method __exit__ (line 82) | def __exit__(self, exc_type, exc_val, exc_tb): method log_iter (line 87) | def log_iter(self, losses): method log_epoch (line 93) | def log_epoch(self, epoch, models, inp, out): class Visualizer (line 102) | class Visualizer: method __init__ (line 103) | def __init__(self, kp_size=5, draw_border=False, colormap='gist_rainbo... method draw_image_with_kp (line 108) | def draw_image_with_kp(self, image, kp_array): method create_image_column_with_kp (line 118) | def create_image_column_with_kp(self, images, kp): method create_image_column (line 122) | def create_image_column(self, images): method create_image_grid (line 129) | def create_image_grid(self, *args): method visualize (line 138) | def visualize(self, driving, source, out): FILE: modules/dense_motion.py class DenseMotionNetwork (line 9) | class DenseMotionNetwork(nn.Module): method __init__ (line 14) | def __init__(self, block_expansion, num_blocks, max_features, num_kp, ... method create_sparse_motions (line 34) | def create_sparse_motions(self, feature, kp_driving, kp_source): method create_deformed_feature (line 71) | def create_deformed_feature(self, feature, sparse_motions): method create_heatmap_representations (line 80) | def create_heatmap_representations(self, feature, kp_driving, kp_source): method forward (line 92) | def forward(self, feature, kp_driving, kp_source): FILE: modules/discriminator.py class DownBlock2d (line 7) | class DownBlock2d(nn.Module): method __init__ (line 12) | def __init__(self, in_features, out_features, norm=False, kernel_size=... method forward (line 25) | def forward(self, x): class Discriminator (line 36) | class Discriminator(nn.Module): method __init__ (line 41) | def __init__(self, num_channels=3, block_expansion=64, num_blocks=4, m... method forward (line 57) | def forward(self, x): class MultiScaleDiscriminator (line 69) | class MultiScaleDiscriminator(nn.Module): method __init__ (line 74) | def __init__(self, scales=(), **kwargs): method forward (line 82) | def forward(self, x): FILE: modules/generator.py class OcclusionAwareGenerator (line 10) | class OcclusionAwareGenerator(nn.Module): method __init__ (line 15) | def __init__(self, image_channel, feature_channel, num_kp, block_expan... method deform_input (line 63) | def deform_input(self, inp, deformation): method forward (line 72) | def forward(self, source_image, kp_driving, kp_source): class SPADEDecoder (line 124) | class SPADEDecoder(nn.Module): method __init__ (line 125) | def __init__(self): method forward (line 144) | def forward(self, feature): class OcclusionAwareSPADEGenerator (line 165) | class OcclusionAwareSPADEGenerator(nn.Module): method __init__ (line 167) | def __init__(self, image_channel, feature_channel, num_kp, block_expan... method deform_input (line 205) | def deform_input(self, inp, deformation): method forward (line 214) | def forward(self, source_image, frame_idx, kp_driving, kp_source): FILE: modules/hopenet.py class Hopenet (line 7) | class Hopenet(nn.Module): method __init__ (line 10) | def __init__(self, block, layers, num_bins): method _make_layer (line 38) | def _make_layer(self, block, planes, blocks, stride=1): method forward (line 55) | def forward(self, x): class ResNet (line 74) | class ResNet(nn.Module): method __init__ (line 76) | def __init__(self, block, layers, num_classes=1000): method _make_layer (line 99) | def _make_layer(self, block, planes, blocks, stride=1): method forward (line 116) | def forward(self, x): class AlexNet (line 132) | class AlexNet(nn.Module): method __init__ (line 135) | def __init__(self, num_bins): method forward (line 164) | def forward(self, x): FILE: modules/keypoint_detector.py class KPDetector (line 9) | class KPDetector(nn.Module): method __init__ (line 14) | def __init__(self, block_expansion, feature_channel, num_kp, image_cha... method gaussian2kp (line 44) | def gaussian2kp(self, heatmap): method forward (line 56) | def forward(self, x): class HEEstimator (line 85) | class HEEstimator(nn.Module): method __init__ (line 90) | def __init__(self, block_expansion, feature_channel, num_kp, image_cha... method forward (line 136) | def forward(self, x): FILE: modules/model.py class Vgg19 (line 18) | class Vgg19(torch.nn.Module): method __init__ (line 22) | def __init__(self, requires_grad=False): method forward (line 50) | def forward(self, X): class ImagePyramide (line 61) | class ImagePyramide(torch.nn.Module): method __init__ (line 65) | def __init__(self, scales, num_channels): method forward (line 72) | def forward(self, x): class Transform (line 79) | class Transform: method __init__ (line 83) | def __init__(self, bs, **kwargs): method transform_frame (line 97) | def transform_frame(self, frame): method warp_coordinates (line 103) | def warp_coordinates(self, coordinates): method jacobian (line 123) | def jacobian(self, coordinates): function detach_kp (line 131) | def detach_kp(kp): function headpose_pred_to_degree (line 135) | def headpose_pred_to_degree(pred): function get_rotation_matrix (line 175) | def get_rotation_matrix(yaw, pitch, roll): function keypoint_transformation (line 203) | def keypoint_transformation(kp_canonical, he, estimate_jacobian=True): class GeneratorFullModel (line 233) | class GeneratorFullModel(torch.nn.Module): method __init__ (line 238) | def __init__(self, kp_extractor, he_estimator, generator, discriminato... method forward (line 289) | def forward(self, x, config): class DiscriminatorFullModel (line 521) | class DiscriminatorFullModel(torch.nn.Module): method __init__ (line 526) | def __init__(self, kp_extractor, generator, discriminator, train_params): method get_zero_tensor (line 541) | def get_zero_tensor(self, input): method forward (line 547) | def forward(self, x, generated): FILE: modules/util.py function kp2gaussian (line 13) | def kp2gaussian(kp, spatial_size, kp_variance): function make_coordinate_grid_2d (line 36) | def make_coordinate_grid_2d(spatial_size, type): function make_coordinate_grid (line 55) | def make_coordinate_grid(spatial_size, type): class ResBottleneck (line 74) | class ResBottleneck(nn.Module): method __init__ (line 75) | def __init__(self, in_features, stride): method forward (line 89) | def forward(self, x): class ResBlock2d (line 106) | class ResBlock2d(nn.Module): method __init__ (line 111) | def __init__(self, in_features, kernel_size, padding): method forward (line 120) | def forward(self, x): class ResBlock3d (line 131) | class ResBlock3d(nn.Module): method __init__ (line 136) | def __init__(self, in_features, kernel_size, padding): method forward (line 145) | def forward(self, x): class UpBlock2d (line 156) | class UpBlock2d(nn.Module): method __init__ (line 161) | def __init__(self, in_features, out_features, kernel_size=3, padding=1... method forward (line 168) | def forward(self, x): class UpBlock3d (line 175) | class UpBlock3d(nn.Module): method __init__ (line 180) | def __init__(self, in_features, out_features, kernel_size=3, padding=1... method forward (line 187) | def forward(self, x): class DownBlock2d (line 196) | class DownBlock2d(nn.Module): method __init__ (line 201) | def __init__(self, in_features, out_features, kernel_size=3, padding=1... method forward (line 208) | def forward(self, x): class DownBlock3d (line 216) | class DownBlock3d(nn.Module): method __init__ (line 221) | def __init__(self, in_features, out_features, kernel_size=3, padding=1... method forward (line 232) | def forward(self, x): class SameBlock2d (line 240) | class SameBlock2d(nn.Module): method __init__ (line 245) | def __init__(self, in_features, out_features, groups=1, kernel_size=3,... method forward (line 255) | def forward(self, x): class Encoder (line 262) | class Encoder(nn.Module): method __init__ (line 267) | def __init__(self, block_expansion, in_features, num_blocks=3, max_fea... method forward (line 277) | def forward(self, x): class Decoder (line 284) | class Decoder(nn.Module): method __init__ (line 289) | def __init__(self, block_expansion, in_features, num_blocks=3, max_fea... method forward (line 306) | def forward(self, x): class Hourglass (line 320) | class Hourglass(nn.Module): method __init__ (line 325) | def __init__(self, block_expansion, in_features, num_blocks=3, max_fea... method forward (line 331) | def forward(self, x): class KPHourglass (line 335) | class KPHourglass(nn.Module): method __init__ (line 340) | def __init__(self, block_expansion, in_features, reshape_features, res... method forward (line 361) | def forward(self, x): class AntiAliasInterpolation2d (line 372) | class AntiAliasInterpolation2d(nn.Module): method __init__ (line 376) | def __init__(self, channels, scale): method forward (line 410) | def forward(self, input): class SPADE (line 421) | class SPADE(nn.Module): method __init__ (line 422) | def __init__(self, norm_nc, label_nc): method forward (line 434) | def forward(self, x, segmap): class SPADEResnetBlock (line 444) | class SPADEResnetBlock(nn.Module): method __init__ (line 445) | def __init__(self, fin, fout, norm_G, label_nc, use_se=False, dilation... method forward (line 468) | def forward(self, x, seg1): method shortcut (line 475) | def shortcut(self, x, seg1): method actvn (line 482) | def actvn(self, x): FILE: sync_batchnorm/batchnorm.py function _sum_ft (line 24) | def _sum_ft(tensor): function _unsqueeze_ft (line 29) | def _unsqueeze_ft(tensor): class _SynchronizedBatchNorm (line 38) | class _SynchronizedBatchNorm(_BatchNorm): method __init__ (line 39) | def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=True): method forward (line 48) | def forward(self, input): method __data_parallel_replicate__ (line 80) | def __data_parallel_replicate__(self, ctx, copy_id): method _data_parallel_master (line 90) | def _data_parallel_master(self, intermediates): method _compute_mean_std (line 113) | def _compute_mean_std(self, sum_, ssum, size): class SynchronizedBatchNorm1d (line 128) | class SynchronizedBatchNorm1d(_SynchronizedBatchNorm): method _check_input_dim (line 184) | def _check_input_dim(self, input): class SynchronizedBatchNorm2d (line 191) | class SynchronizedBatchNorm2d(_SynchronizedBatchNorm): method _check_input_dim (line 247) | def _check_input_dim(self, input): class SynchronizedBatchNorm3d (line 254) | class SynchronizedBatchNorm3d(_SynchronizedBatchNorm): method _check_input_dim (line 311) | def _check_input_dim(self, input): FILE: sync_batchnorm/comm.py class FutureResult (line 18) | class FutureResult(object): method __init__ (line 21) | def __init__(self): method put (line 26) | def put(self, result): method get (line 32) | def get(self): class SlavePipe (line 46) | class SlavePipe(_SlavePipeBase): method run_slave (line 49) | def run_slave(self, msg): class SyncMaster (line 56) | class SyncMaster(object): method __init__ (line 67) | def __init__(self, master_callback): method __getstate__ (line 78) | def __getstate__(self): method __setstate__ (line 81) | def __setstate__(self, state): method register_slave (line 84) | def register_slave(self, identifier): method run_master (line 102) | def run_master(self, master_msg): method nr_slaves (line 136) | def nr_slaves(self): FILE: sync_batchnorm/replicate.py class CallbackContext (line 23) | class CallbackContext(object): function execute_replication_callbacks (line 27) | def execute_replication_callbacks(modules): class DataParallelWithCallback (line 50) | class DataParallelWithCallback(DataParallel): method replicate (line 64) | def replicate(self, module, device_ids): function patch_replication_callback (line 70) | def patch_replication_callback(data_parallel): FILE: sync_batchnorm/unittest.py function as_numpy (line 17) | def as_numpy(v): class TorchTestCase (line 23) | class TorchTestCase(unittest.TestCase): method assertTensorClose (line 24) | def assertTensorClose(self, a, b, atol=1e-3, rtol=1e-3): FILE: upsampler/app_gradio.py function main (line 48) | def main(): FILE: upsampler/configs/transforms_config.py class TransformsConfig (line 6) | class TransformsConfig(object): method __init__ (line 8) | def __init__(self, opts): method get_transforms (line 12) | def get_transforms(self): class EncodeTransforms (line 16) | class EncodeTransforms(TransformsConfig): method __init__ (line 18) | def __init__(self, opts): method get_transforms (line 21) | def get_transforms(self): class FrontalizationTransforms (line 41) | class FrontalizationTransforms(TransformsConfig): method __init__ (line 43) | def __init__(self, opts): method get_transforms (line 46) | def get_transforms(self): class SketchToImageTransforms (line 70) | class SketchToImageTransforms(TransformsConfig): method __init__ (line 72) | def __init__(self, opts): method get_transforms (line 75) | def get_transforms(self): class SegToImageTransforms (line 95) | class SegToImageTransforms(TransformsConfig): method __init__ (line 97) | def __init__(self, opts): method get_transforms (line 100) | def get_transforms(self): class SuperResTransforms (line 122) | class SuperResTransforms(TransformsConfig): method __init__ (line 124) | def __init__(self, opts): method get_transforms (line 127) | def get_transforms(self): class SuperResTransforms_320 (line 157) | class SuperResTransforms_320(TransformsConfig): method __init__ (line 159) | def __init__(self, opts): method get_transforms (line 162) | def get_transforms(self): class ToonifyTransforms (line 192) | class ToonifyTransforms(TransformsConfig): method __init__ (line 194) | def __init__(self, opts): method get_transforms (line 197) | def get_transforms(self): class EditingTransforms (line 218) | class EditingTransforms(TransformsConfig): method __init__ (line 220) | def __init__(self, opts): method get_transforms (line 223) | def get_transforms(self): FILE: upsampler/criteria/id_loss.py class IDLoss (line 7) | class IDLoss(nn.Module): method __init__ (line 8) | def __init__(self): method extract_feats (line 16) | def extract_feats(self, x): method forward (line 22) | def forward(self, y_hat, y, x): FILE: upsampler/criteria/lpips/lpips.py class LPIPS (line 8) | class LPIPS(nn.Module): method __init__ (line 16) | def __init__(self, net_type: str = 'alex', version: str = '0.1'): method forward (line 29) | def forward(self, x: torch.Tensor, y: torch.Tensor): FILE: upsampler/criteria/lpips/networks.py function get_network (line 12) | def get_network(net_type: str): class LinLayers (line 23) | class LinLayers(nn.ModuleList): method __init__ (line 24) | def __init__(self, n_channels_list: Sequence[int]): class BaseNet (line 36) | class BaseNet(nn.Module): method __init__ (line 37) | def __init__(self): method set_requires_grad (line 46) | def set_requires_grad(self, state: bool): method z_score (line 50) | def z_score(self, x: torch.Tensor): method forward (line 53) | def forward(self, x: torch.Tensor): class SqueezeNet (line 66) | class SqueezeNet(BaseNet): method __init__ (line 67) | def __init__(self): class AlexNet (line 77) | class AlexNet(BaseNet): method __init__ (line 78) | def __init__(self): class VGG16 (line 88) | class VGG16(BaseNet): method __init__ (line 89) | def __init__(self): FILE: upsampler/criteria/lpips/utils.py function normalize_activation (line 6) | def normalize_activation(x, eps=1e-10): function get_state_dict (line 11) | def get_state_dict(net_type: str = 'alex', version: str = '0.1'): FILE: upsampler/criteria/moco_loss.py class MocoLoss (line 7) | class MocoLoss(nn.Module): method __init__ (line 9) | def __init__(self): method __load_model (line 17) | def __load_model(): method extract_feats (line 40) | def extract_feats(self, x): method forward (line 47) | def forward(self, y_hat, y, x): FILE: upsampler/criteria/w_norm.py class WNormLoss (line 5) | class WNormLoss(nn.Module): method __init__ (line 7) | def __init__(self, start_from_latent_avg=True): method forward (line 11) | def forward(self, latent, latent_avg=None): FILE: upsampler/datasets/augmentations.py class ToOneHot (line 8) | class ToOneHot(object): method __init__ (line 10) | def __init__(self, n_classes=None): method onehot_initialization (line 13) | def onehot_initialization(self, a): method __all_idx (line 20) | def __all_idx(self, idx, axis): method __call__ (line 25) | def __call__(self, img): class BilinearResize (line 31) | class BilinearResize(object): method __init__ (line 32) | def __init__(self, factors=[1, 2, 4, 8, 16, 32]): method __call__ (line 35) | def __call__(self, image): class BicubicDownSample (line 44) | class BicubicDownSample(nn.Module): method bicubic_kernel (line 45) | def bicubic_kernel(self, x, a=-0.50): method __init__ (line 58) | def __init__(self, factor=4, cuda=True, padding='reflect'): method forward (line 74) | def forward(self, x, nhwc=False, clip_round=False, byte_output=False): FILE: upsampler/datasets/ffhq_degradation_dataset.py class FFHQDegradationDataset (line 17) | class FFHQDegradationDataset(data.Dataset): method __init__ (line 30) | def __init__(self, opt): method color_jitter (line 89) | def color_jitter(img, shift): method color_jitter_pt (line 97) | def color_jitter_pt(img, brightness, contrast, saturation, hue): method get_component_coordinates (line 118) | def get_component_coordinates(self, index, status): method __getitem__ (line 145) | def __getitem__(self, index): method __len__ (line 234) | def __len__(self): FILE: upsampler/datasets/gt_res_dataset.py class GTResDataset (line 8) | class GTResDataset(Dataset): method __init__ (line 10) | def __init__(self, root_path, gt_dir=None, transform=None, transform_t... method __len__ (line 20) | def __len__(self): method __getitem__ (line 23) | def __getitem__(self, index): FILE: upsampler/datasets/images_dataset.py class ImagesDataset (line 6) | class ImagesDataset(Dataset): method __init__ (line 8) | def __init__(self, source_root, target_root, opts, target_transform=No... method __len__ (line 15) | def __len__(self): method __getitem__ (line 18) | def __getitem__(self, index): FILE: upsampler/datasets/inference_dataset.py class InferenceDataset (line 6) | class InferenceDataset(Dataset): method __init__ (line 8) | def __init__(self, root, opts, transform=None): method __len__ (line 13) | def __len__(self): method __getitem__ (line 16) | def __getitem__(self, index): FILE: upsampler/image_translation.py class TestOptions (line 21) | class TestOptions(): method __init__ (line 22) | def __init__(self): method parse (line 34) | def parse(self): FILE: upsampler/inversion.py class TestOptions (line 21) | class TestOptions(): method __init__ (line 22) | def __init__(self): method parse (line 30) | def parse(self): FILE: upsampler/latent_optimization.py function latent_optimization (line 9) | def latent_optimization(frame, pspex, landmarkpredictor, step=500, devic... FILE: upsampler/models/bisenet/model.py class ConvBNReLU (line 14) | class ConvBNReLU(nn.Module): method __init__ (line 15) | def __init__(self, in_chan, out_chan, ks=3, stride=1, padding=1, *args... method forward (line 26) | def forward(self, x): method init_weight (line 31) | def init_weight(self): class BiSeNetOutput (line 37) | class BiSeNetOutput(nn.Module): method __init__ (line 38) | def __init__(self, in_chan, mid_chan, n_classes, *args, **kwargs): method forward (line 44) | def forward(self, x): method init_weight (line 49) | def init_weight(self): method get_params (line 55) | def get_params(self): class AttentionRefinementModule (line 67) | class AttentionRefinementModule(nn.Module): method __init__ (line 68) | def __init__(self, in_chan, out_chan, *args, **kwargs): method forward (line 76) | def forward(self, x): method init_weight (line 85) | def init_weight(self): class ContextPath (line 92) | class ContextPath(nn.Module): method __init__ (line 93) | def __init__(self, *args, **kwargs): method forward (line 104) | def forward(self, x): method init_weight (line 127) | def init_weight(self): method get_params (line 133) | def get_params(self): class SpatialPath (line 146) | class SpatialPath(nn.Module): method __init__ (line 147) | def __init__(self, *args, **kwargs): method forward (line 155) | def forward(self, x): method init_weight (line 162) | def init_weight(self): method get_params (line 168) | def get_params(self): class FeatureFusionModule (line 180) | class FeatureFusionModule(nn.Module): method __init__ (line 181) | def __init__(self, in_chan, out_chan, *args, **kwargs): method forward (line 200) | def forward(self, fsp, fcp): method init_weight (line 212) | def init_weight(self): method get_params (line 218) | def get_params(self): class BiSeNet (line 230) | class BiSeNet(nn.Module): method __init__ (line 231) | def __init__(self, n_classes, *args, **kwargs): method forward (line 241) | def forward(self, x): method init_weight (line 256) | def init_weight(self): method get_params (line 262) | def get_params(self): FILE: upsampler/models/bisenet/resnet.py function conv3x3 (line 14) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 20) | class BasicBlock(nn.Module): method __init__ (line 21) | def __init__(self, in_chan, out_chan, stride=1): method forward (line 36) | def forward(self, x): function create_layer_basic (line 51) | def create_layer_basic(in_chan, out_chan, bnum, stride=1): class Resnet18 (line 58) | class Resnet18(nn.Module): method __init__ (line 59) | def __init__(self): method forward (line 71) | def forward(self, x): method init_weight (line 82) | def init_weight(self): method get_params (line 90) | def get_params(self): FILE: upsampler/models/encoders/helpers.py class Flatten (line 10) | class Flatten(Module): method forward (line 11) | def forward(self, input): function l2_norm (line 15) | def l2_norm(input, axis=1): class Bottleneck (line 21) | class Bottleneck(namedtuple('Block', ['in_channel', 'depth', 'stride'])): function get_block (line 25) | def get_block(in_channel, depth, num_units, stride=2): function get_blocks (line 29) | def get_blocks(num_layers): class SEModule (line 56) | class SEModule(Module): method __init__ (line 57) | def __init__(self, channels, reduction): method forward (line 65) | def forward(self, x): class bottleneck_IR (line 75) | class bottleneck_IR(Module): method __init__ (line 76) | def __init__(self, in_channel, depth, stride): method forward (line 91) | def forward(self, x): class bottleneck_IR_SE (line 97) | class bottleneck_IR_SE(Module): method __init__ (line 98) | def __init__(self, in_channel, depth, stride): method forward (line 116) | def forward(self, x): FILE: upsampler/models/encoders/model_irse.py class Backbone (line 9) | class Backbone(Module): method __init__ (line 10) | def __init__(self, input_size, num_layers, mode='ir', drop_ratio=0.4, ... method forward (line 44) | def forward(self, x): function IR_50 (line 51) | def IR_50(input_size): function IR_101 (line 57) | def IR_101(input_size): function IR_152 (line 63) | def IR_152(input_size): function IR_SE_50 (line 69) | def IR_SE_50(input_size): function IR_SE_101 (line 75) | def IR_SE_101(input_size): function IR_SE_152 (line 81) | def IR_SE_152(input_size): FILE: upsampler/models/encoders/psp_encoders.py class GradualStyleBlock (line 11) | class GradualStyleBlock(Module): method __init__ (line 12) | def __init__(self, in_c, out_c, spatial, max_pooling=False): method forward (line 29) | def forward(self, x): class AdaptiveInstanceNorm (line 41) | class AdaptiveInstanceNorm(nn.Module): method __init__ (line 42) | def __init__(self, fin, style_dim=512): method forward (line 51) | def forward(self, input, style): class FusionLayer (line 59) | class FusionLayer(Module): ##### modified method __init__ (line 60) | def __init__(self, inchannel, outchannel, use_skip_torgb=True, use_att... method forward (line 87) | def forward(self, feat, out, skip, editing_w=None): class ResnetBlock (line 102) | class ResnetBlock(nn.Module): method __init__ (line 103) | def __init__(self, dim): method forward (line 111) | def forward(self, x): class ResnetGenerator (line 118) | class ResnetGenerator(nn.Module): method __init__ (line 119) | def __init__(self, in_channel=19, res_num=2): method forward (line 137) | def forward(self, input): class GradualStyleEncoder (line 140) | class GradualStyleEncoder(Module): method __init__ (line 141) | def __init__(self, num_layers, mode='ir', opts=None): method _upsample_add (line 194) | def _upsample_add(self, x, y): method forward (line 219) | def forward(self, x, return_feat=False, return_full=False): ##### modi... method get_feat (line 269) | def get_feat(self, x): ##### modified class BackboneEncoderUsingLastLayerIntoW (line 290) | class BackboneEncoderUsingLastLayerIntoW(Module): method __init__ (line 291) | def __init__(self, num_layers, mode='ir', opts=None): method forward (line 314) | def forward(self, x): class BackboneEncoderUsingLastLayerIntoWPlus (line 323) | class BackboneEncoderUsingLastLayerIntoWPlus(Module): method __init__ (line 324) | def __init__(self, num_layers, mode='ir', opts=None): method forward (line 351) | def forward(self, x): FILE: upsampler/models/mtcnn/mtcnn.py class MTCNN (line 12) | class MTCNN(): method __init__ (line 13) | def __init__(self): method align (line 23) | def align(self, img): method align_multi (line 31) | def align_multi(self, img, limit=None, min_face_size=30.0): method detect_faces (line 45) | def detect_faces(self, image, min_face_size=20.0, FILE: upsampler/models/mtcnn/mtcnn_pytorch/src/align_trans.py class FaceWarpException (line 26) | class FaceWarpException(Exception): method __str__ (line 27) | def __str__(self): function get_reference_facial_points (line 32) | def get_reference_facial_points(output_size=None, function get_affine_transform_matrix (line 163) | def get_affine_transform_matrix(src_pts, dst_pts): function warp_and_crop_face (line 210) | def warp_and_crop_face(src_img, FILE: upsampler/models/mtcnn/mtcnn_pytorch/src/box_utils.py function nms (line 5) | def nms(boxes, overlap_threshold=0.5, mode='union'): function convert_to_square (line 71) | def convert_to_square(bboxes): function calibrate_box (line 94) | def calibrate_box(bboxes, offsets): function get_image_boxes (line 127) | def get_image_boxes(bounding_boxes, img, size=24): function correct_bboxes (line 162) | def correct_bboxes(bboxes, width, height): function _preprocess (line 226) | def _preprocess(img): FILE: upsampler/models/mtcnn/mtcnn_pytorch/src/detector.py function detect_faces (line 9) | def detect_faces(image, min_face_size=20.0, FILE: upsampler/models/mtcnn/mtcnn_pytorch/src/first_stage.py function run_first_stage (line 12) | def run_first_stage(image, net, scale, threshold): function _generate_bboxes (line 51) | def _generate_bboxes(probs, offsets, scale, threshold): FILE: upsampler/models/mtcnn/mtcnn_pytorch/src/get_nets.py class Flatten (line 13) | class Flatten(nn.Module): method __init__ (line 15) | def __init__(self): method forward (line 18) | def forward(self, x): class PNet (line 32) | class PNet(nn.Module): method __init__ (line 34) | def __init__(self): method forward (line 63) | def forward(self, x): class RNet (line 78) | class RNet(nn.Module): method __init__ (line 80) | def __init__(self): method forward (line 107) | def forward(self, x): class ONet (line 122) | class ONet(nn.Module): method __init__ (line 124) | def __init__(self): method forward (line 157) | def forward(self, x): FILE: upsampler/models/mtcnn/mtcnn_pytorch/src/matlab_cp2tform.py class MatlabCp2tormException (line 13) | class MatlabCp2tormException(Exception): method __str__ (line 14) | def __str__(self): function tformfwd (line 19) | def tformfwd(trans, uv): function tforminv (line 45) | def tforminv(trans, uv): function findNonreflectiveSimilarity (line 68) | def findNonreflectiveSimilarity(uv, xy, options=None): function findSimilarity (line 119) | def findSimilarity(uv, xy, options=None): function get_similarity_transform (line 159) | def get_similarity_transform(src_pts, dst_pts, reflective=True): function cvt_tform_mat_for_cv2 (line 199) | def cvt_tform_mat_for_cv2(trans): function get_similarity_transform_for_cv2 (line 227) | def get_similarity_transform_for_cv2(src_pts, dst_pts, reflective=True): FILE: upsampler/models/mtcnn/mtcnn_pytorch/src/visualization_utils.py function show_bboxes (line 4) | def show_bboxes(img, bounding_boxes, facial_landmarks=[]): FILE: upsampler/models/psp.py function get_keys (line 15) | def get_keys(d, name): class pSp (line 22) | class pSp(nn.Module): method __init__ (line 24) | def __init__(self, opts, ckpt=None): method set_encoder (line 36) | def set_encoder(self): method load_weights (line 47) | def load_weights(self, ckpt=None): method forward (line 84) | def forward(self, x1, x2=None, resize=True, latent_mask=None, randomiz... method set_opts (line 139) | def set_opts(self, opts): method __load_latent_avg (line 142) | def __load_latent_avg(self, ckpt, repeat=None): FILE: upsampler/models/stylegan2/lpips/__init__.py class PerceptualLoss (line 14) | class PerceptualLoss(torch.nn.Module): method __init__ (line 15) | def __init__(self, model='net-lin', net='alex', colorspace='rgb', spat... method forward (line 27) | def forward(self, pred, target, normalize=False): function normalize_tensor (line 43) | def normalize_tensor(in_feat,eps=1e-10): function l2 (line 47) | def l2(p0, p1, range=255.): function psnr (line 50) | def psnr(p0, p1, peak=255.): function dssim (line 53) | def dssim(p0, p1, range=255.): function rgb2lab (line 56) | def rgb2lab(in_img,mean_cent=False): function tensor2np (line 63) | def tensor2np(tensor_obj): function np2tensor (line 67) | def np2tensor(np_obj): function tensor2tensorlab (line 71) | def tensor2tensorlab(image_tensor,to_norm=True,mc_only=False): function tensorlab2tensor (line 85) | def tensorlab2tensor(lab_tensor,return_inbnd=False): function rgb2lab (line 103) | def rgb2lab(input): function tensor2im (line 107) | def tensor2im(image_tensor, imtype=np.uint8, cent=1., factor=255./2.): function im2tensor (line 112) | def im2tensor(image, imtype=np.uint8, cent=1., factor=255./2.): function tensor2vec (line 116) | def tensor2vec(vector_tensor): function voc_ap (line 119) | def voc_ap(rec, prec, use_07_metric=False): function tensor2im (line 152) | def tensor2im(image_tensor, imtype=np.uint8, cent=1., factor=255./2.): function im2tensor (line 158) | def im2tensor(image, imtype=np.uint8, cent=1., factor=255./2.): FILE: upsampler/models/stylegan2/lpips/base_model.py class BaseModel (line 8) | class BaseModel(): method __init__ (line 9) | def __init__(self): method name (line 12) | def name(self): method initialize (line 15) | def initialize(self, use_gpu=True, gpu_ids=[0]): method forward (line 19) | def forward(self): method get_image_paths (line 22) | def get_image_paths(self): method optimize_parameters (line 25) | def optimize_parameters(self): method get_current_visuals (line 28) | def get_current_visuals(self): method get_current_errors (line 31) | def get_current_errors(self): method save (line 34) | def save(self, label): method save_network (line 38) | def save_network(self, network, path, network_label, epoch_label): method load_network (line 44) | def load_network(self, network, network_label, epoch_label): method update_learning_rate (line 50) | def update_learning_rate(): method get_image_paths (line 53) | def get_image_paths(self): method save_done (line 56) | def save_done(self, flag=False): FILE: upsampler/models/stylegan2/lpips/dist_model.py class DistModel (line 24) | class DistModel(BaseModel): method name (line 25) | def name(self): method initialize (line 28) | def initialize(self, model='net-lin', net='alex', colorspace='Lab', pn... method forward (line 109) | def forward(self, in0, in1, retPerLayer=False): method optimize_parameters (line 120) | def optimize_parameters(self): method clamp_weights (line 127) | def clamp_weights(self): method set_input (line 132) | def set_input(self, data): method forward_train (line 148) | def forward_train(self): # run forward pass method backward_train (line 162) | def backward_train(self): method compute_accuracy (line 165) | def compute_accuracy(self,d0,d1,judge): method get_current_errors (line 171) | def get_current_errors(self): method get_current_visuals (line 180) | def get_current_visuals(self): method save (line 195) | def save(self, path, label): method update_learning_rate (line 202) | def update_learning_rate(self,nepoch_decay): function score_2afc_dataset (line 212) | def score_2afc_dataset(data_loader, func, name=''): function score_jnd_dataset (line 247) | def score_jnd_dataset(data_loader, func, name=''): FILE: upsampler/models/stylegan2/lpips/networks_basic.py function spatial_average (line 17) | def spatial_average(in_tens, keepdim=True): function upsample (line 20) | def upsample(in_tens, out_H=64): # assumes scale factor is same for H and W class PNetLin (line 27) | class PNetLin(nn.Module): method __init__ (line 28) | def __init__(self, pnet_type='vgg', pnet_rand=False, pnet_tune=False, ... method forward (line 64) | def forward(self, in0, in1, retPerLayer=False): class ScalingLayer (line 94) | class ScalingLayer(nn.Module): method __init__ (line 95) | def __init__(self): method forward (line 100) | def forward(self, inp): class NetLinLayer (line 104) | class NetLinLayer(nn.Module): method __init__ (line 106) | def __init__(self, chn_in, chn_out=1, use_dropout=False): class Dist2LogitLayer (line 114) | class Dist2LogitLayer(nn.Module): method __init__ (line 116) | def __init__(self, chn_mid=32, use_sigmoid=True): method forward (line 128) | def forward(self,d0,d1,eps=0.1): class BCERankingLoss (line 131) | class BCERankingLoss(nn.Module): method __init__ (line 132) | def __init__(self, chn_mid=32): method forward (line 138) | def forward(self, d0, d1, judge): class FakeNet (line 144) | class FakeNet(nn.Module): method __init__ (line 145) | def __init__(self, use_gpu=True, colorspace='Lab'): class L2 (line 150) | class L2(FakeNet): method forward (line 152) | def forward(self, in0, in1, retPerLayer=None): class DSSIM (line 167) | class DSSIM(FakeNet): method forward (line 169) | def forward(self, in0, in1, retPerLayer=None): function print_network (line 182) | def print_network(net): FILE: upsampler/models/stylegan2/lpips/pretrained_networks.py class squeezenet (line 6) | class squeezenet(torch.nn.Module): method __init__ (line 7) | def __init__(self, requires_grad=False, pretrained=True): method forward (line 36) | def forward(self, X): class alexnet (line 57) | class alexnet(torch.nn.Module): method __init__ (line 58) | def __init__(self, requires_grad=False, pretrained=True): method forward (line 81) | def forward(self, X): class vgg16 (line 97) | class vgg16(torch.nn.Module): method __init__ (line 98) | def __init__(self, requires_grad=False, pretrained=True): method forward (line 121) | def forward(self, X): class resnet (line 139) | class resnet(torch.nn.Module): method __init__ (line 140) | def __init__(self, requires_grad=False, pretrained=True, num=18): method forward (line 163) | def forward(self, X): FILE: upsampler/models/stylegan2/model.py class PixelNorm (line 11) | class PixelNorm(nn.Module): method __init__ (line 12) | def __init__(self): method forward (line 15) | def forward(self, input): function make_kernel (line 19) | def make_kernel(k): class Upsample (line 30) | class Upsample(nn.Module): method __init__ (line 31) | def __init__(self, kernel, factor=2): method forward (line 45) | def forward(self, input): class Downsample (line 51) | class Downsample(nn.Module): method __init__ (line 52) | def __init__(self, kernel, factor=2): method forward (line 66) | def forward(self, input): class Blur (line 72) | class Blur(nn.Module): method __init__ (line 73) | def __init__(self, kernel, pad, upsample_factor=1): method forward (line 85) | def forward(self, input): class EqualConv2d (line 91) | class EqualConv2d(nn.Module): method __init__ (line 92) | def __init__( method forward (line 112) | def forward(self, input): method __repr__ (line 124) | def __repr__(self): class EqualLinear (line 131) | class EqualLinear(nn.Module): method __init__ (line 132) | def __init__( method forward (line 150) | def forward(self, input): method __repr__ (line 162) | def __repr__(self): class ScaledLeakyReLU (line 168) | class ScaledLeakyReLU(nn.Module): method __init__ (line 169) | def __init__(self, negative_slope=0.2): method forward (line 174) | def forward(self, input): class ModulatedConv2d (line 180) | class ModulatedConv2d(nn.Module): method __init__ (line 181) | def __init__( method __repr__ (line 243) | def __repr__(self): method forward (line 249) | def forward(self, input, style): class NoiseInjection (line 305) | class NoiseInjection(nn.Module): method __init__ (line 306) | def __init__(self): method forward (line 311) | def forward(self, image, noise=None): class ConstantInput (line 324) | class ConstantInput(nn.Module): method __init__ (line 325) | def __init__(self, channel, size=4): method forward (line 330) | def forward(self, input): class StyledConv (line 337) | class StyledConv(nn.Module): method __init__ (line 338) | def __init__( method forward (line 365) | def forward(self, input, style, noise=None): class ToRGB (line 373) | class ToRGB(nn.Module): method __init__ (line 374) | def __init__(self, in_channel, style_dim, upsample=True, blur_kernel=[... method forward (line 394) | def forward(self, input, style, skip=None): class Generator (line 411) | class Generator(nn.Module): method __init__ (line 412) | def __init__( method make_noise (line 498) | def make_noise(self): method mean_latent (line 509) | def mean_latent(self, n_latent): method get_latent (line 517) | def get_latent(self, input): method forward (line 527) | def forward( class ConvLayer (line 633) | class ConvLayer(nn.Sequential): method __init__ (line 634) | def __init__( class ResBlock (line 684) | class ResBlock(nn.Module): method __init__ (line 685) | def __init__(self, in_channel, out_channel, blur_kernel=[1, 3, 3, 1]): method forward (line 695) | def forward(self, input): class Discriminator (line 705) | class Discriminator(nn.Module): method __init__ (line 706) | def __init__(self, size, channel_multiplier=2, blur_kernel=[1, 3, 3, 1... method forward (line 747) | def forward(self, input): FILE: upsampler/models/stylegan2/op/conv2d_gradfix.py function no_weight_gradients (line 13) | def no_weight_gradients(): function conv2d (line 22) | def conv2d(input, weight, bias=None, stride=1, padding=0, dilation=1, gr... function conv_transpose2d (line 45) | def conv_transpose2d( function could_use_op (line 78) | def could_use_op(input): function ensure_tuple (line 95) | def ensure_tuple(xs, ndim): function conv2d_gradfix (line 104) | def conv2d_gradfix( FILE: upsampler/models/stylegan2/op/fused_act.py class FusedLeakyReLU (line 6) | class FusedLeakyReLU(nn.Module): method __init__ (line 7) | def __init__(self, channel, bias=True, negative_slope=0.2, scale=2 ** ... method forward (line 19) | def forward(self, inputs): function fused_leaky_relu (line 23) | def fused_leaky_relu(inputs, bias=None, negative_slope=0.2, scale=2 ** 0... FILE: upsampler/models/stylegan2/op/upfirdn2d.py function upfirdn2d (line 7) | def upfirdn2d(inputs, kernel, up=1, down=1, pad=(0, 0)): function upfirdn2d_native (line 20) | def upfirdn2d_native( FILE: upsampler/models/stylegan2/op2/upfirdn2d.cpp function upfirdn2d (line 17) | torch::Tensor upfirdn2d(const torch::Tensor &input, const torch::Tensor ... function PYBIND11_MODULE (line 29) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: upsampler/models/stylegan2/op2/upfirdn2d.py class UpFirDn2dBackward (line 20) | class UpFirDn2dBackward(Function): method forward (line 22) | def forward( method backward (line 64) | def backward(ctx, gradgrad_input): class UpFirDn2d (line 89) | class UpFirDn2d(Function): method forward (line 91) | def forward(ctx, input, kernel, up, down, pad): method backward (line 128) | def backward(ctx, grad_output): function upfirdn2d (line 149) | def upfirdn2d(input, kernel, up=1, down=1, pad=(0, 0)): function upfirdn2d_native (line 168) | def upfirdn2d_native( FILE: upsampler/models/stylegan2/op_old/fused_act.py class FusedLeakyReLUFunctionBackward (line 18) | class FusedLeakyReLUFunctionBackward(Function): method forward (line 20) | def forward(ctx, grad_output, out, negative_slope, scale): method backward (line 41) | def backward(ctx, gradgrad_input, gradgrad_bias): class FusedLeakyReLUFunction (line 50) | class FusedLeakyReLUFunction(Function): method forward (line 52) | def forward(ctx, input, bias, negative_slope, scale): method backward (line 62) | def backward(ctx, grad_output): class FusedLeakyReLU (line 72) | class FusedLeakyReLU(nn.Module): method __init__ (line 73) | def __init__(self, channel, negative_slope=0.2, scale=2 ** 0.5): method forward (line 80) | def forward(self, input): function fused_leaky_relu (line 84) | def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): FILE: upsampler/models/stylegan2/op_old/fused_bias_act.cpp function fused_bias_act (line 11) | torch::Tensor fused_bias_act(const torch::Tensor& input, const torch::Te... function PYBIND11_MODULE (line 19) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: upsampler/models/stylegan2/op_old/upfirdn2d.cpp function upfirdn2d (line 12) | torch::Tensor upfirdn2d(const torch::Tensor& input, const torch::Tensor&... function PYBIND11_MODULE (line 21) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: upsampler/models/stylegan2/op_old/upfirdn2d.py class UpFirDn2dBackward (line 17) | class UpFirDn2dBackward(Function): method forward (line 19) | def forward( method backward (line 60) | def backward(ctx, gradgrad_input): class UpFirDn2d (line 85) | class UpFirDn2d(Function): method forward (line 87) | def forward(ctx, input, kernel, up, down, pad): method backward (line 124) | def backward(ctx, grad_output): function upfirdn2d (line 142) | def upfirdn2d(input, kernel, up=1, down=1, pad=(0, 0)): function upfirdn2d_native (line 150) | def upfirdn2d_native( FILE: upsampler/models/stylegan2/simple_augment.py function reduce_sum (line 12) | def reduce_sum(tensor): class AdaptiveAugment (line 25) | class AdaptiveAugment: method __init__ (line 26) | def __init__(self, ada_aug_target, ada_aug_len, update_every, device): method tune (line 37) | def tune(self, real_pred): function translate_mat (line 80) | def translate_mat(t_x, t_y, device="cpu"): function rotate_mat (line 90) | def rotate_mat(theta, device="cpu"): function scale_mat (line 102) | def scale_mat(s_x, s_y, device="cpu"): function translate3d_mat (line 112) | def translate3d_mat(t_x, t_y, t_z): function rotate3d_mat (line 122) | def rotate3d_mat(axis, theta): function scale3d_mat (line 143) | def scale3d_mat(s_x, s_y, s_z): function luma_flip_mat (line 154) | def luma_flip_mat(axis, i): function saturation_mat (line 164) | def saturation_mat(axis, i): function lognormal_sample (line 175) | def lognormal_sample(size, mean=0, std=1, device="cpu"): function category_sample (line 179) | def category_sample(size, categories, device="cpu"): function uniform_sample (line 186) | def uniform_sample(size, low, high, device="cpu"): function normal_sample (line 190) | def normal_sample(size, mean=0, std=1, device="cpu"): function bernoulli_sample (line 194) | def bernoulli_sample(size, p, device="cpu"): function random_mat_apply (line 198) | def random_mat_apply(p, transform, prev, eye, device="cpu"): function sample_affine (line 206) | def sample_affine(p, size, height, width, device="cpu"): function sample_color (line 265) | def sample_color(p, size): function make_grid (line 299) | def make_grid(shape, x0, x1, y0, y1, device): function affine_grid (line 309) | def affine_grid(grid, mat): function get_padding (line 314) | def get_padding(G, height, width, kernel_size): function try_sample_affine_and_pad (line 337) | def try_sample_affine_and_pad(img, p, kernel_size, G=None): class GridSampleForward (line 352) | class GridSampleForward(autograd.Function): method forward (line 354) | def forward(ctx, input, grid): method backward (line 363) | def backward(ctx, grad_output): class GridSampleBackward (line 370) | class GridSampleBackward(autograd.Function): method forward (line 372) | def forward(ctx, grad_output, input, grid): method backward (line 380) | def backward(ctx, grad_grad_input, grad_grad_grid): function scale_mat_single (line 393) | def scale_mat_single(s_x, s_y): function translate_mat_single (line 397) | def translate_mat_single(t_x, t_y): function random_apply_affine (line 401) | def random_apply_affine(img, p, G=None, antialiasing_kernel=SYM6): function apply_color (line 454) | def apply_color(img, mat): function random_apply_color (line 465) | def random_apply_color(img, p, C=None): function augment (line 474) | def augment(img, p, transform_matrix=(None, None)): FILE: upsampler/options/test_options.py class TestOptions (line 4) | class TestOptions: method __init__ (line 6) | def __init__(self): method initialize (line 10) | def initialize(self): method parse (line 31) | def parse(self): FILE: upsampler/options/train_options.py class TrainOptions (line 5) | class TrainOptions: method __init__ (line 7) | def __init__(self): method initialize (line 11) | def initialize(self): method parse (line 79) | def parse(self): FILE: upsampler/scripts/align_all_parallel.py function get_landmark (line 32) | def get_landmark(filepath, predictor): function align_face (line 59) | def align_face(filepath, predictor): function chunks (line 153) | def chunks(lst, n): function extract_on_paths (line 159) | def extract_on_paths(file_paths): function parse_args (line 179) | def parse_args(): function run (line 187) | def run(args): FILE: upsampler/scripts/calc_id_loss_parallel.py function chunks (line 22) | def chunks(lst, n): function extract_on_paths (line 28) | def extract_on_paths(file_paths): function parse_args (line 71) | def parse_args(): function run (line 80) | def run(args): FILE: upsampler/scripts/calc_losses_on_images.py function parse_args (line 18) | def parse_args(): function run (line 29) | def run(args): FILE: upsampler/scripts/download_ffhq1280.py function download_file (line 59) | def download_file(session, file_spec, stats, chunk_size=128, num_attempt... function choose_bytes_unit (line 135) | def choose_bytes_unit(num_bytes): function format_time (line 145) | def format_time(seconds): function download_files (line 155) | def download_files(file_specs, num_threads=32, status_delay=0.2, timing_... function _download_thread (line 209) | def _download_thread(spec_queue, exception_queue, stats, download_kwargs): function print_statistics (line 220) | def print_statistics(json_data): function find_coeffs (line 259) | def find_coeffs(pa, pb): function recreate_aligned_images (line 272) | def recreate_aligned_images(json_data, source_dir, dst_dir='realign1280x... function run (line 405) | def run(tasks, **download_kwargs): function run_cmdline (line 437) | def run_cmdline(argv): FILE: upsampler/scripts/generate_sketch_data.py function sobel (line 15) | def sobel(img): function sketch (line 21) | def sketch(frame): function get_sketch_image (line 31) | def get_sketch_image(image_path): FILE: upsampler/scripts/inference.py function run (line 22) | def run(): function run_on_batch (line 112) | def run_on_batch(inputs, net, opts): FILE: upsampler/scripts/pretrain.py function requires_grad (line 20) | def requires_grad(model, flag=True): class TrainOptions (line 25) | class TrainOptions(): method __init__ (line 26) | def __init__(self): method parse (line 36) | def parse(self): FILE: upsampler/scripts/style_mixing.py function run (line 21) | def run(): FILE: upsampler/scripts/train.py function main (line 16) | def main(): FILE: upsampler/training/coach.py class Coach (line 25) | class Coach: method __init__ (line 26) | def __init__(self, opts): method train (line 111) | def train(self): method validate (line 260) | def validate(self): method checkpoint_me (line 374) | def checkpoint_me(self, loss_dict, is_best): method configure_optimizers (line 387) | def configure_optimizers(self): method configure_datasets (line 400) | def configure_datasets(self): method calc_loss (line 435) | def calc_loss(self, x, y, y_hat, latent, y0_hat=None): method log_metrics (line 480) | def log_metrics(self, metrics_dict, prefix): method print_metrics (line 486) | def print_metrics(self, metrics_dict, prefix): method parse_and_log_images (line 491) | def parse_and_log_images(self, id_logs, x, y, y_hat, title, subscript=... method log_images (line 505) | def log_images(self, name, im_data, subscript=None, log_latest=False): method __get_save_dict (line 518) | def __get_save_dict(self): method discriminator_loss (line 534) | def discriminator_loss(real_pred, fake_pred, loss_dict): method discriminator_r1_loss (line 544) | def discriminator_r1_loss(real_pred, real_w): method requires_grad (line 553) | def requires_grad(model, flag=True): method train_discriminator (line 557) | def train_discriminator(self, real_img, fake_img): method validate_discriminator (line 590) | def validate_discriminator(self, real_img, fake_img): FILE: upsampler/training/ranger.py class Ranger (line 29) | class Ranger(Optimizer): method __init__ (line 31) | def __init__(self, params, lr=1e-3, # lr method __setstate__ (line 75) | def __setstate__(self, state): method step (line 78) | def step(self, closure=None): FILE: upsampler/utils/common.py function log_input_image (line 8) | def log_input_image(x, opts): function tensor2im (line 17) | def tensor2im(var): function tensor2map (line 26) | def tensor2map(var): function tensor2sketch (line 36) | def tensor2sketch(var): function get_colors (line 44) | def get_colors(): function vis_faces (line 52) | def vis_faces(log_hooks): function vis_faces_with_id (line 67) | def vis_faces_with_id(hooks_dict, fig, gs, i): function vis_faces_no_id (line 79) | def vis_faces_no_id(hooks_dict, fig, gs, i): FILE: upsampler/utils/data_utils.py function is_image_file (line 13) | def is_image_file(filename): function make_dataset (line 17) | def make_dataset(dir): FILE: upsampler/utils/inference_utils.py function visualize (line 16) | def visualize(img_arr, dpi): function save_image (line 22) | def save_image(img, filename): function load_image (line 26) | def load_image(filename): function get_video_crop_parameter (line 36) | def get_video_crop_parameter(filepath, predictor, padding=[256,256,256,2... function tensor2cv2 (line 63) | def tensor2cv2(img): function noise_regularize (line 67) | def noise_regularize(noises): function noise_normalize_ (line 91) | def noise_normalize_(noises): function get_lr (line 99) | def get_lr(t, initial_lr, rampdown=0.25, rampup=0.05): function latent_noise (line 107) | def latent_noise(latent, strength): function make_image (line 113) | def make_image(tensor): function tensor2label (line 129) | def tensor2label(label_tensor, n_label, imtype=np.uint8): function uint82bin (line 139) | def uint82bin(n, count=8): function labelcolormap (line 143) | def labelcolormap(N): class Colorize (line 167) | class Colorize(object): method __init__ (line 168) | def __init__(self, n=35): method __call__ (line 172) | def __call__(self, gray_image): FILE: upsampler/utils/train_utils.py function aggregate_loss_dict (line 2) | def aggregate_loss_dict(agg_loss_dict): FILE: upsampler/utils/wandb_utils.py class WBLogger (line 9) | class WBLogger: method __init__ (line 11) | def __init__(self, opts): method log_best_model (line 16) | def log_best_model(): method log (line 20) | def log(prefix, metrics_dict, global_step): method log_dataset_wandb (line 26) | def log_dataset_wandb(dataset, dataset_name, n_images=16): method log_images_to_wandb (line 32) | def log_images_to_wandb(x, y, y_hat, id_logs, prefix, step, opts): FILE: upsampler/video_editing.py class TestOptions (line 21) | class TestOptions(): method __init__ (line 22) | def __init__(self): method parse (line 31) | def parse(self): FILE: upsampler/webUI/app_task.py function create_demo_sr (line 7) | def create_demo_sr(process): function create_demo_s2f (line 46) | def create_demo_s2f(process): function create_demo_m2f (line 78) | def create_demo_m2f(process): function create_demo_editing (line 113) | def create_demo_editing(process): function create_demo_toonify (line 145) | def create_demo_toonify(process): function create_demo_vediting (line 172) | def create_demo_vediting(process, max_frame_num = 4): function create_demo_vtoonify (line 214) | def create_demo_vtoonify(process, max_frame_num = 4): function create_demo_inversion (line 252) | def create_demo_inversion(process, allow_optimization=False): FILE: upsampler/webUI/styleganex_model.py class Model (line 27) | class Model(): method __init__ (line 28) | def __init__(self, device): method load_model (line 67) | def load_model(self, task_name: str) -> None: method load_G_model (line 89) | def load_G_model(self, model_type: str) -> None: method tensor2np (line 101) | def tensor2np(self, img): method process_sr (line 105) | def process_sr(self, input_image: str, resize_scale: int, model: str) ... method process_s2f (line 149) | def process_s2f(self, input_image: str, seed: int) -> np.ndarray: method process_m2f (line 169) | def process_m2f(self, input_image: str, input_type: str, seed: int) ->... method process_editing (line 221) | def process_editing(self, input_image: str, scale_factor: float, model... method process_vediting (line 262) | def process_vediting(self, input_video: str, scale_factor: float, mode... method process_toonify (line 321) | def process_toonify(self, input_image: str, style_type: str) -> np.nda... method process_vtoonify (line 364) | def process_vtoonify(self, input_video: str, style_type: str, frame_nu... method process_inversion (line 424) | def process_inversion(self, input_image: str, optimize: str, input_lat...