MCPcopy Create free account

hub / github.com/MingtaoGuo/StyleSwap / functions

Functions255 in github.com/MingtaoGuo/StyleSwap

↓ 18 callersMethod__init__
(self, kernel, pad, upsample_factor=1, device='cpu')
face_model/gpen_model.py:80
↓ 12 callersFunctionget_block
(in_channel, depth, num_units, stride=2)
training/loss/helpers.py:25
↓ 6 callersMethod__init__
(self, n_classes, *args, **kwargs)
face_parsing/bisenet.py:230
↓ 5 callersMethod__init__
(self, pretrained=True, net='alex', version='0.1', lpips=True, spatial=False, pnet_rand=False, pnet_t
training/lpips/lpips.py:23
↓ 5 callersFunction_iresnet
(arch, block, layers, pretrained, progress, **kwargs)
face_model/arcface.py:165
↓ 5 callersFunctionadd_path
(path)
__init_paths.py:8
↓ 5 callersMethodbackward
(ctx, grad_output)
face_model/op/upfirdn2d.py:131
↓ 4 callersMethod_make_layer
(self, block, planes, blocks, stride=1, dilate=False)
face_model/arcface.py:122
↓ 4 callersFunctioncreate_layer_basic
(in_chan, out_chan, bnum, stride=1)
face_parsing/resnet.py:51
↓ 4 callersMethodforward
(self, in0, in1, retPerLayer=None)
training/lpips/lpips.py:184
↓ 4 callersFunctionget_world_size
()
distributed.py:34
↓ 4 callersFunctionrequires_grad
(model, flag=True)
train_simple.py:49
↓ 4 callersMethodsave
(self, path, label)
training/lpips/trainer.py:169
↓ 3 callersMethod__init__
(self, requires_grad=False, pretrained=True)
training/lpips/pretrained_networks.py:97
↓ 3 callersMethodextract_feats
(self, x)
training/loss/id_loss.py:18
↓ 3 callersMethodforward
Function computes the distance between image patches in0 and in1 INPUTS in0, in1 - torch.Tensor object of shape Nx3xXxY - image p
training/lpips/trainer.py:86
↓ 3 callersFunctionmake_kernel
(k)
face_model/gpen_model.py:24
↓ 3 callersFunctionmesh_grid
Generate the mesh grid, centering at zero. Args: kernel_size (int): Returns: xy (ndarray): with the shape (kernel_size, kern
training/data_loader/degradations.py:32
↓ 3 callersMethodsave_network
(self, network, path, network_label, epoch_label)
training/lpips/trainer.py:177
↓ 3 callersFunctionsigma_matrix2
Calculate the rotated sigma matrix (two dimensional matrix). Args: sig_x (float): sig_y (float): theta (float): Radian me
training/data_loader/degradations.py:16
↓ 3 callersFunctionupfirdn2d
(input, kernel, up=1, down=1, pad=(0, 0), device='cpu')
face_model/op/upfirdn2d.py:149
↓ 2 callersMethod__init__
(self, channels, reduction)
training/loss/helpers.py:57
↓ 2 callersFunction_umeyama
Estimate N-D similarity transformation with or without scaling. Parameters ---------- src : (M, N) array Source coordinates. d
align_faces.py:25
↓ 2 callersFunctionaccumulate
(model1, model2, decay=0.999)
train_simple.py:54
↓ 2 callersFunctionconv3x3
3x3 convolution with padding
face_parsing/resnet.py:14
↓ 2 callersFunctionconv3x3
3x3 convolution with padding
face_model/arcface.py:8
↓ 2 callersMethodconver_noise_withmask
(self, noise, mask)
face_model/gpen_model.py:507
↓ 2 callersFunctionfused_leaky_relu
(input, bias, negative_slope=0.2, scale=2 ** 0.5, device='cpu')
face_model/op/fused_act.py:92
↓ 2 callersFunctiongenerate_gaussian_noise
Generate Gaussian noise. Args: img (Numpy array): Input image, shape (h, w, c), range [0, 1], float32. sigma (float): Noise scale
training/data_loader/degradations.py:420
↓ 2 callersFunctiongenerate_gaussian_noise_pt
Add Gaussian noise (PyTorch version). Args: img (Tensor): Shape (b, c, h, w), range[0, 1], float32. scale (float | Tensor): Noise
training/data_loader/degradations.py:461
↓ 2 callersFunctiongenerate_poisson_noise
Generate poisson noise. Ref: https://github.com/scikit-image/scikit-image/blob/main/skimage/util/noise.py#L37-L219 Args: img (Numpy
training/data_loader/degradations.py:560
↓ 2 callersFunctiongenerate_poisson_noise_pt
Generate a batch of poisson noise (PyTorch version) Args: img (Tensor): Input image, shape (b, c, h, w), range [0, 1], float32. s
training/data_loader/degradations.py:610
↓ 2 callersFunctionget_affine_transform_matrix
(src_pts, dst_pts)
align_faces.py:187
↓ 2 callersFunctionget_model
Create encoder model.
misc/onnx_export.py:102
↓ 2 callersFunctionget_rank
()
distributed.py:9
↓ 2 callersFunctionim2tensor
(image, imtype=np.uint8, cent=1., factor=255./2.)
training/lpips/__init__.py:125
↓ 2 callersFunctionmodel_device
Please call after model_setenv.
misc/onnx_export.py:113
↓ 2 callersFunctionmodel_setenv
Setup environ ...
misc/onnx_export.py:119
↓ 2 callersFunctionnp2tensor
(np_obj)
training/lpips/__init__.py:67
↓ 2 callersFunctionrandom_bivariate_Gaussian
Randomly generate bivariate isotropic or anisotropic Gaussian kernels. In the isotropic mode, only `sigma_x_range` is used. `sigma_y_range` and `
training/data_loader/degradations.py:179
↓ 2 callersFunctionrandom_bivariate_generalized_Gaussian
Randomly generate bivariate generalized Gaussian kernels. In the isotropic mode, only `sigma_x_range` is used. `sigma_y_range` and `rotation_rang
training/data_loader/degradations.py:223
↓ 2 callersFunctionrandom_bivariate_plateau
Randomly generate bivariate plateau kernels. In the isotropic mode, only `sigma_x_range` is used. `sigma_y_range` and `rotation_range` is ignored
training/data_loader/degradations.py:275
↓ 2 callersFunctionspatial_average
(in_tens, keepdim=True)
training/lpips/lpips.py:14
↓ 2 callersFunctionto_numpy
(tensor)
misc/onnx_export.py:91
↓ 2 callersFunctionupsample
(in_tens, out_HW=(64,64))
training/lpips/lpips.py:17
↓ 1 callersMethod__init__
(self)
face_parsing/resnet.py:59
↓ 1 callersMethod__init__
(self, block, layers, dropout=0, num_features=512, zero_init_residual=False,
face_model/arcface.py:69
↓ 1 callersFunctionadd_jpg_compression
Add JPG compression artifacts. Args: img (Numpy array): Input image, shape (h, w, c), range [0, 1], float32. quality (float): JPG
training/data_loader/degradations.py:732
↓ 1 callersMethodbackward_train
(self)
training/lpips/trainer.py:136
↓ 1 callersFunctionbivariate_Gaussian
Generate a bivariate isotropic or anisotropic Gaussian kernel. In the isotropic mode, only `sig_x` is used. `sig_y` and `theta` is ignored.
training/data_loader/degradations.py:84
↓ 1 callersFunctionbivariate_generalized_Gaussian
Generate a bivariate generalized Gaussian kernel. Described in `Parameter Estimation For Multivariate Generalized Gaussian Distributio
training/data_loader/degradations.py:112
↓ 1 callersFunctionbivariate_plateau
Generate a plateau-like anisotropic kernel. 1 / (1+x^(beta)) Ref: https://stats.stackexchange.com/questions/203629/is-there-a-plateau-shaped-
training/data_loader/degradations.py:147
↓ 1 callersMethodclamp_weights
(self)
training/lpips/trainer.py:104
↓ 1 callersFunctionclean_folder
(folder)
misc/predict.py:96
↓ 1 callersMethodcompute_accuracy
d0, d1 are Variables, judge is a Tensor
training/lpips/trainer.py:139
↓ 1 callersFunctionconv1x1
1x1 convolution
face_model/arcface.py:20
↓ 1 callersFunctiond_logistic_loss
(real_pred, fake_pred)
train_simple.py:68
↓ 1 callersFunctiond_r1_loss
(real_pred, real_img)
train_simple.py:75
↓ 1 callersFunctiondata_sampler
(dataset, shuffle, distributed)
train_simple.py:38
↓ 1 callersFunctionexport_onnx
Export onnx model.
misc/onnx_export.py:26
↓ 1 callersMethodforward_impl
(self, x)
face_model/arcface.py:47
↓ 1 callersMethodforward_train
(self)
training/lpips/trainer.py:125
↓ 1 callersFunctiong_nonsaturating_loss
(fake_pred)
train_simple.py:84
↓ 1 callersFunctiong_path_regularize
(fake_img, latents, mean_path_length, decay=0.01)
train_simple.py:90
↓ 1 callersFunctionget_blocks
(num_layers)
training/loss/helpers.py:29
↓ 1 callersMethodget_params
(self)
face_parsing/bisenet.py:261
↓ 1 callersMethodget_params
(self)
face_parsing/resnet.py:90
↓ 1 callersFunctionget_reference_facial_points
(output_size=None, inner_padding_factor=0.0, o
align_faces.py:102
↓ 1 callersMethodinit_weight
(self)
face_parsing/bisenet.py:30
↓ 1 callersMethodinit_weight
(self)
face_parsing/bisenet.py:48
↓ 1 callersMethodinit_weight
(self)
face_parsing/bisenet.py:84
↓ 1 callersMethodinit_weight
(self)
face_parsing/bisenet.py:126
↓ 1 callersMethodinit_weight
(self)
face_parsing/bisenet.py:161
↓ 1 callersMethodinit_weight
(self)
face_parsing/bisenet.py:211
↓ 1 callersMethodinit_weight
(self)
face_parsing/bisenet.py:255
↓ 1 callersMethodinit_weight
(self)
face_parsing/resnet.py:82
↓ 1 callersFunctioniresnet50
(pretrained=False, progress=True, **kwargs)
face_model/arcface.py:182
↓ 1 callersFunctionl2_norm
(input, axis=1)
training/loss/helpers.py:15
↓ 1 callersFunctionmodel_load
Load model.
misc/onnx_export.py:14
↓ 1 callersFunctionpdf2
Calculate PDF of the bivariate Gaussian distribution. Args: sigma_matrix (ndarray): with the shape (2, 2) grid (ndarray): generat
training/data_loader/degradations.py:50
↓ 1 callersMethodpredict
(self, img_path)
face_parsing/face_parsing.py:23
↓ 1 callersFunctionrandom_generate_gaussian_noise
(img, sigma_range=(0, 10), gray_prob=0)
training/data_loader/degradations.py:516
↓ 1 callersFunctionrandom_generate_gaussian_noise_pt
(img, sigma_range=(0, 10), gray_prob=0)
training/data_loader/degradations.py:537
↓ 1 callersFunctionrandom_generate_poisson_noise
(img, scale_range=(0, 1.0), gray_prob=0)
training/data_loader/degradations.py:686
↓ 1 callersFunctionrandom_generate_poisson_noise_pt
(img, scale_range=(0, 1.0), gray_prob=0)
training/data_loader/degradations.py:707
↓ 1 callersFunctionreduce_loss_dict
(loss_dict)
distributed.py:104
↓ 1 callersFunctionreduce_sum
(tensor)
distributed.py:44
↓ 1 callersFunctionsample_data
(loader)
train_simple.py:62
↓ 1 callersFunctionsynchronize
()
distributed.py:19
↓ 1 callersFunctiontensor2im
(image_tensor, imtype=np.uint8, cent=1., factor=255./2.)
training/lpips/__init__.py:120
↓ 1 callersFunctiontensor2np
(tensor_obj)
training/lpips/__init__.py:63
↓ 1 callersFunctiontrain
(args, loader, generator, discriminator, arcface, vgg19, g_optim, d_optim, g_ema, device)
train_simple.py:106
↓ 1 callersFunctionupfirdn2d_native
( input, kernel, up_x, up_y, down_x, down_y, pad_x0, pad_x1, pad_y0, pad_y1 )
face_model/op/upfirdn2d.py:160
↓ 1 callersFunctionverify_onnx
Verify onnx model.
misc/onnx_export.py:73
FunctionIR_101
Constructs a ir-101 model.
training/loss/model_irse.py:58
FunctionIR_152
Constructs a ir-152 model.
training/loss/model_irse.py:64
FunctionIR_50
Constructs a ir-50 model.
training/loss/model_irse.py:52
FunctionIR_SE_101
Constructs a ir_se-101 model.
training/loss/model_irse.py:76
FunctionIR_SE_152
Constructs a ir_se-152 model.
training/loss/model_irse.py:82
FunctionIR_SE_50
Constructs a ir_se-50 model.
training/loss/model_irse.py:70
next →1–100 of 255, ranked by callers