SYMBOL INDEX (702 symbols across 88 files) FILE: app_sadtalker.py function toggle_audio_file (line 13) | def toggle_audio_file(choice): function ref_video_fn (line 19) | def ref_video_fn(path_of_ref_video): function sadtalker_demo (line 25) | def sadtalker_demo(checkpoint_path='checkpoints', config_path='src/confi... FILE: inference.py function main (line 15) | def main(args): FILE: launcher.py function check_python_version (line 23) | def check_python_version(): function commit_hash (line 49) | def commit_hash(): function run (line 63) | def run(command, desc=None, errdesc=None, custom_env=None, live=False): function check_run (line 91) | def check_run(command): function is_installed (line 96) | def is_installed(package): function repo_dir (line 105) | def repo_dir(name): function run_python (line 109) | def run_python(code, desc=None, errdesc=None): function run_pip (line 113) | def run_pip(args, desc=None): function check_run_python (line 121) | def check_run_python(code): function git_clone (line 125) | def git_clone(url, dir, name, commithash=None): function git_pull_recursive (line 146) | def git_pull_recursive(dir): function run_extension_installer (line 156) | def run_extension_installer(extension_dir): function prepare_environment (line 170) | def prepare_environment(): function start (line 195) | def start(): FILE: predict.py class Predictor (line 16) | class Predictor(BasePredictor): method setup (line 17) | def setup(self): method predict (line 44) | def predict( function load_default (line 172) | def load_default(): FILE: scripts/extension.py function check_all_files_safetensor (line 14) | def check_all_files_safetensor(current_dir): function check_all_files (line 33) | def check_all_files(current_dir): function download_model (line 58) | def download_model(local_dir='./checkpoints'): function get_source_image (line 62) | def get_source_image(image): function get_img_from_txt2img (line 65) | def get_img_from_txt2img(x): function get_img_from_img2img (line 73) | def get_img_from_img2img(x): function get_default_checkpoint_path (line 81) | def get_default_checkpoint_path(): function install (line 106) | def install(): function on_ui_tabs (line 162) | def on_ui_tabs(): function on_ui_settings (line 183) | def on_ui_settings(): FILE: src/audio2exp_models/audio2exp.py class Audio2Exp (line 6) | class Audio2Exp(nn.Module): method __init__ (line 7) | def __init__(self, netG, cfg, device, prepare_training_loss=False): method test (line 13) | def test(self, batch): FILE: src/audio2exp_models/networks.py class Conv2d (line 5) | class Conv2d(nn.Module): method __init__ (line 6) | def __init__(self, cin, cout, kernel_size, stride, padding, residual=F... method forward (line 16) | def forward(self, x): class SimpleWrapperV2 (line 26) | class SimpleWrapperV2(nn.Module): method __init__ (line 27) | def __init__(self) -> None: method forward (line 67) | def forward(self, x, ref, ratio): FILE: src/audio2pose_models/audio2pose.py class Audio2Pose (line 7) | class Audio2Pose(nn.Module): method __init__ (line 8) | def __init__(self, cfg, wav2lip_checkpoint, device='cuda'): method forward (line 24) | def forward(self, x): method test (line 48) | def test(self, x): FILE: src/audio2pose_models/audio_encoder.py class Conv2d (line 5) | class Conv2d(nn.Module): method __init__ (line 6) | def __init__(self, cin, cout, kernel_size, stride, padding, residual=F... method forward (line 15) | def forward(self, x): class AudioEncoder (line 21) | class AudioEncoder(nn.Module): method __init__ (line 22) | def __init__(self, wav2lip_checkpoint, device): method forward (line 54) | def forward(self, audio_sequences): FILE: src/audio2pose_models/cvae.py function class2onehot (line 6) | def class2onehot(idx, class_num): class CVAE (line 13) | class CVAE(nn.Module): method __init__ (line 14) | def __init__(self, cfg): method reparameterize (line 30) | def reparameterize(self, mu, logvar): method forward (line 35) | def forward(self, batch): method test (line 43) | def test(self, batch): class ENCODER (line 51) | class ENCODER(nn.Module): method __init__ (line 52) | def __init__(self, layer_sizes, latent_size, num_classes, method forward (line 73) | def forward(self, batch): class DECODER (line 99) | class DECODER(nn.Module): method __init__ (line 100) | def __init__(self, layer_sizes, latent_size, num_classes, method forward (line 123) | def forward(self, batch): FILE: src/audio2pose_models/discriminator.py class ConvNormRelu (line 5) | class ConvNormRelu(nn.Module): method __init__ (line 6) | def __init__(self, conv_type='1d', in_channels=3, out_channels=64, dow... method forward (line 49) | def forward(self, x): class PoseSequenceDiscriminator (line 59) | class PoseSequenceDiscriminator(nn.Module): method __init__ (line 60) | def __init__(self, cfg): method forward (line 72) | def forward(self, x): FILE: src/audio2pose_models/networks.py class ResidualConv (line 5) | class ResidualConv(nn.Module): method __init__ (line 6) | def __init__(self, input_dim, output_dim, stride, padding): method forward (line 24) | def forward(self, x): class Upsample (line 29) | class Upsample(nn.Module): method __init__ (line 30) | def __init__(self, input_dim, output_dim, kernel, stride): method forward (line 37) | def forward(self, x): class Squeeze_Excite_Block (line 41) | class Squeeze_Excite_Block(nn.Module): method __init__ (line 42) | def __init__(self, channel, reduction=16): method forward (line 52) | def forward(self, x): class ASPP (line 59) | class ASPP(nn.Module): method __init__ (line 60) | def __init__(self, in_dims, out_dims, rate=[6, 12, 18]): method forward (line 88) | def forward(self, x): method _init_weights (line 95) | def _init_weights(self): class Upsample_ (line 104) | class Upsample_(nn.Module): method __init__ (line 105) | def __init__(self, scale=2): method forward (line 110) | def forward(self, x): class AttentionBlock (line 114) | class AttentionBlock(nn.Module): method __init__ (line 115) | def __init__(self, input_encoder, input_decoder, output_dim): method forward (line 137) | def forward(self, x1, x2): FILE: src/audio2pose_models/res_unet.py class ResUnet (line 6) | class ResUnet(nn.Module): method __init__ (line 7) | def __init__(self, channel=1, filters=[32, 64, 128, 256]): method forward (line 39) | def forward(self, x): FILE: src/face3d/data/__init__.py function find_dataset_using_name (line 19) | def find_dataset_using_name(dataset_name): function get_option_setter (line 42) | def get_option_setter(dataset_name): function create_dataset (line 48) | def create_dataset(opt, rank=0): class CustomDatasetDataLoader (line 62) | class CustomDatasetDataLoader(): method __init__ (line 65) | def __init__(self, opt, rank=0): method set_epoch (line 99) | def set_epoch(self, epoch): method load_data (line 104) | def load_data(self): method __len__ (line 107) | def __len__(self): method __iter__ (line 111) | def __iter__(self): FILE: src/face3d/data/base_dataset.py class BaseDataset (line 13) | class BaseDataset(data.Dataset, ABC): method __init__ (line 23) | def __init__(self, opt): method modify_commandline_options (line 34) | def modify_commandline_options(parser, is_train): method __len__ (line 47) | def __len__(self): method __getitem__ (line 52) | def __getitem__(self, index): function get_transform (line 64) | def get_transform(grayscale=False): function get_affine_mat (line 71) | def get_affine_mat(opt, size): function apply_img_affine (line 98) | def apply_img_affine(img, affine_inv, method=Image.BICUBIC): function apply_lm_affine (line 101) | def apply_lm_affine(landmark, affine, flip, size): FILE: src/face3d/data/flist_dataset.py function default_flist_reader (line 19) | def default_flist_reader(flist): function jason_flist_reader (line 31) | def jason_flist_reader(flist): function parse_label (line 36) | def parse_label(label): class FlistDataset (line 40) | class FlistDataset(BaseDataset): method __init__ (line 46) | def __init__(self, opt): method __getitem__ (line 67) | def __getitem__(self, index): method _augmentation (line 111) | def _augmentation(self, img, lm, opt, msk=None): method __len__ (line 122) | def __len__(self): FILE: src/face3d/data/image_folder.py function is_image_file (line 20) | def is_image_file(filename): function make_dataset (line 24) | def make_dataset(dir, max_dataset_size=float("inf")): function default_loader (line 36) | def default_loader(path): class ImageFolder (line 40) | class ImageFolder(data.Dataset): method __init__ (line 42) | def __init__(self, root, transform=None, return_paths=False, method __getitem__ (line 55) | def __getitem__(self, index): method __len__ (line 65) | def __len__(self): FILE: src/face3d/data/template_dataset.py class TemplateDataset (line 19) | class TemplateDataset(BaseDataset): method modify_commandline_options (line 22) | def modify_commandline_options(parser, is_train): method __init__ (line 36) | def __init__(self, opt): method __getitem__ (line 54) | def __getitem__(self, index): method __len__ (line 73) | def __len__(self): FILE: src/face3d/extract_kp_videos.py class KeypointExtractor (line 14) | class KeypointExtractor(): method __init__ (line 15) | def __init__(self, device): method extract_keypoint (line 19) | def extract_keypoint(self, images, name=None, info=True): function read_video (line 58) | def read_video(filename): function run (line 72) | def run(data): FILE: src/face3d/extract_kp_videos_safe.py function init_alignment_model (line 19) | def init_alignment_model(model_name, half=False, device='cuda', model_ro... class KeypointExtractor (line 34) | class KeypointExtractor(): method __init__ (line 35) | def __init__(self, device='cuda'): method extract_keypoint (line 48) | def extract_keypoint(self, images, name=None, info=True): function read_video (line 101) | def read_video(filename): function run (line 115) | def run(data): FILE: src/face3d/models/__init__.py function find_model_using_name (line 25) | def find_model_using_name(model_name): function get_option_setter (line 48) | def get_option_setter(model_name): function create_model (line 54) | def create_model(opt): FILE: src/face3d/models/arcface_torch/backbones/__init__.py function get_model (line 5) | def get_model(name, **kwargs): FILE: src/face3d/models/arcface_torch/backbones/iresnet.py function conv3x3 (line 7) | def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): function conv1x1 (line 19) | def conv1x1(in_planes, out_planes, stride=1): class IBasicBlock (line 28) | class IBasicBlock(nn.Module): method __init__ (line 30) | def __init__(self, inplanes, planes, stride=1, downsample=None, method forward (line 46) | def forward(self, x): class IResNet (line 60) | class IResNet(nn.Module): method __init__ (line 62) | def __init__(self, method _make_layer (line 114) | def _make_layer(self, block, planes, blocks, stride=1, dilate=False): method forward (line 140) | def forward(self, x): function _iresnet (line 157) | def _iresnet(arch, block, layers, pretrained, progress, **kwargs): function iresnet18 (line 164) | def iresnet18(pretrained=False, progress=True, **kwargs): function iresnet34 (line 169) | def iresnet34(pretrained=False, progress=True, **kwargs): function iresnet50 (line 174) | def iresnet50(pretrained=False, progress=True, **kwargs): function iresnet100 (line 179) | def iresnet100(pretrained=False, progress=True, **kwargs): function iresnet200 (line 184) | def iresnet200(pretrained=False, progress=True, **kwargs): FILE: src/face3d/models/arcface_torch/backbones/iresnet2060.py function conv3x3 (line 10) | def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): function conv1x1 (line 22) | def conv1x1(in_planes, out_planes, stride=1): class IBasicBlock (line 31) | class IBasicBlock(nn.Module): method __init__ (line 34) | def __init__(self, inplanes, planes, stride=1, downsample=None, method forward (line 50) | def forward(self, x): class IResNet (line 64) | class IResNet(nn.Module): method __init__ (line 67) | def __init__(self, method _make_layer (line 119) | def _make_layer(self, block, planes, blocks, stride=1, dilate=False): method checkpoint (line 145) | def checkpoint(self, func, num_seg, x): method forward (line 151) | def forward(self, x): function _iresnet (line 168) | def _iresnet(arch, block, layers, pretrained, progress, **kwargs): function iresnet2060 (line 175) | def iresnet2060(pretrained=False, progress=True, **kwargs): FILE: src/face3d/models/arcface_torch/backbones/mobilefacenet.py class Flatten (line 11) | class Flatten(Module): method forward (line 12) | def forward(self, x): class ConvBlock (line 16) | class ConvBlock(Module): method __init__ (line 17) | def __init__(self, in_c, out_c, kernel=(1, 1), stride=(1, 1), padding=... method forward (line 25) | def forward(self, x): class LinearBlock (line 29) | class LinearBlock(Module): method __init__ (line 30) | def __init__(self, in_c, out_c, kernel=(1, 1), stride=(1, 1), padding=... method forward (line 37) | def forward(self, x): class DepthWise (line 41) | class DepthWise(Module): method __init__ (line 42) | def __init__(self, in_c, out_c, residual=False, kernel=(3, 3), stride=... method forward (line 51) | def forward(self, x): class Residual (line 63) | class Residual(Module): method __init__ (line 64) | def __init__(self, c, num_block, groups, kernel=(3, 3), stride=(1, 1),... method forward (line 71) | def forward(self, x): class GDC (line 75) | class GDC(Module): method __init__ (line 76) | def __init__(self, embedding_size): method forward (line 84) | def forward(self, x): class MobileFaceNet (line 88) | class MobileFaceNet(Module): method __init__ (line 89) | def __init__(self, fp16=False, num_features=512): method _initialize_weights (line 107) | def _initialize_weights(self): method forward (line 121) | def forward(self, x): function get_mbf (line 129) | def get_mbf(fp16, num_features): FILE: src/face3d/models/arcface_torch/dataset.py class BackgroundGenerator (line 13) | class BackgroundGenerator(threading.Thread): method __init__ (line 14) | def __init__(self, generator, local_rank, max_prefetch=6): method run (line 22) | def run(self): method next (line 28) | def next(self): method __next__ (line 34) | def __next__(self): method __iter__ (line 37) | def __iter__(self): class DataLoaderX (line 41) | class DataLoaderX(DataLoader): method __init__ (line 43) | def __init__(self, local_rank, **kwargs): method __iter__ (line 48) | def __iter__(self): method preload (line 54) | def preload(self): method __next__ (line 62) | def __next__(self): class MXFaceDataset (line 71) | class MXFaceDataset(Dataset): method __init__ (line 72) | def __init__(self, root_dir, local_rank): method __getitem__ (line 93) | def __getitem__(self, index): method __len__ (line 106) | def __len__(self): class SyntheticDataset (line 110) | class SyntheticDataset(Dataset): method __init__ (line 111) | def __init__(self, local_rank): method __getitem__ (line 120) | def __getitem__(self, index): method __len__ (line 123) | def __len__(self): FILE: src/face3d/models/arcface_torch/eval/verification.py class LFold (line 41) | class LFold: method __init__ (line 42) | def __init__(self, n_splits=2, shuffle=False): method split (line 47) | def split(self, indices): function calculate_roc (line 54) | def calculate_roc(thresholds, function calculate_accuracy (line 109) | def calculate_accuracy(threshold, dist, actual_issame): function calculate_val (line 124) | def calculate_val(thresholds, function calculate_val_far (line 165) | def calculate_val_far(threshold, dist, actual_issame): function evaluate (line 179) | def evaluate(embeddings, actual_issame, nrof_folds=10, pca=0): function load_bin (line 200) | def load_bin(path, image_size): function test (line 227) | def test(data_set, backbone, batch_size, nfolds=10): function dumpR (line 275) | def dumpR(data_set, FILE: src/face3d/models/arcface_torch/eval_ijbc.py class Embedding (line 54) | class Embedding(object): method __init__ (line 55) | def __init__(self, prefix, data_shape, batch_size=1): method get (line 75) | def get(self, rimg, landmark): method forward_db (line 104) | def forward_db(self, batch_data): function divideIntoNstrand (line 113) | def divideIntoNstrand(listTemp, n): function read_template_media_list (line 120) | def read_template_media_list(path): function read_template_pair_list (line 131) | def read_template_pair_list(path): function read_image_feature (line 145) | def read_image_feature(path): function get_image_feature (line 154) | def get_image_feature(img_path, files_list, model_path, epoch, gpu_id): function image2template_feature (line 212) | def image2template_feature(img_feats=None, templates=None, medias=None): function verification (line 252) | def verification(template_norm_feats=None, function verification2 (line 282) | def verification2(template_norm_feats=None, function read_score (line 306) | def read_score(path): FILE: src/face3d/models/arcface_torch/inference.py function inference (line 11) | def inference(weight, name, img): FILE: src/face3d/models/arcface_torch/losses.py function get_loss (line 5) | def get_loss(name): class CosFace (line 14) | class CosFace(nn.Module): method __init__ (line 15) | def __init__(self, s=64.0, m=0.40): method forward (line 20) | def forward(self, cosine, label): class ArcFace (line 29) | class ArcFace(nn.Module): method __init__ (line 30) | def __init__(self, s=64.0, m=0.5): method forward (line 35) | def forward(self, cosine: torch.Tensor, label): FILE: src/face3d/models/arcface_torch/onnx_helper.py class ArcFaceORT (line 15) | class ArcFaceORT: method __init__ (line 16) | def __init__(self, model_path, cpu=False): method check (line 22) | def check(self, track='cfat', test_img = None): method check_batch (line 184) | def check_batch(self, img): method meta_info (line 202) | def meta_info(self): method forward (line 206) | def forward(self, imgs): method benchmark (line 222) | def benchmark(self, img): FILE: src/face3d/models/arcface_torch/onnx_ijbc.py class AlignedDataSet (line 28) | class AlignedDataSet(mx.gluon.data.Dataset): method __init__ (line 29) | def __init__(self, root, lines, align=True): method __len__ (line 34) | def __len__(self): method __getitem__ (line 37) | def __getitem__(self, idx): function extract (line 54) | def extract(model_root, dataset): function read_template_media_list (line 78) | def read_template_media_list(path): function read_template_pair_list (line 85) | def read_template_pair_list(path): function read_image_feature (line 93) | def read_image_feature(path): function image2template_feature (line 99) | def image2template_feature(img_feats=None, function verification (line 125) | def verification(template_norm_feats=None, function verification2 (line 147) | def verification2(template_norm_feats=None, function main (line 169) | def main(args): FILE: src/face3d/models/arcface_torch/partial_fc.py class PartialFC (line 11) | class PartialFC(Module): method __init__ (line 20) | def __init__(self, rank, local_rank, world_size, batch_size, resume, method save_params (line 93) | def save_params(self): method sample (line 100) | def sample(self, total_label): method forward (line 125) | def forward(self, total_features, norm_weight): method update (line 133) | def update(self): method prepare (line 139) | def prepare(self, label, optimizer): method forward_backward (line 159) | def forward_backward(self, label, features, optimizer): FILE: src/face3d/models/arcface_torch/torch2onnx.py function convert_onnx (line 6) | def convert_onnx(net, path_module, output, opset=11, simplify=False): FILE: src/face3d/models/arcface_torch/train.py function main (line 21) | def main(args): FILE: src/face3d/models/arcface_torch/utils/plot.py function read_template_pair_list (line 19) | def read_template_pair_list(path): FILE: src/face3d/models/arcface_torch/utils/utils_amp.py class _MultiDeviceReplicator (line 14) | class _MultiDeviceReplicator(object): method __init__ (line 19) | def __init__(self, master_tensor: torch.Tensor) -> None: method get (line 24) | def get(self, device) -> torch.Tensor: class MaxClipGradScaler (line 32) | class MaxClipGradScaler(GradScaler): method __init__ (line 33) | def __init__(self, init_scale, max_scale: float, growth_interval=100): method scale_clip (line 37) | def scale_clip(self): method scale (line 46) | def scale(self, outputs): FILE: src/face3d/models/arcface_torch/utils/utils_callbacks.py class CallBackVerification (line 12) | class CallBackVerification(object): method __init__ (line 13) | def __init__(self, frequent, rank, val_targets, rec_prefix, image_size... method ver_test (line 23) | def ver_test(self, backbone: torch.nn.Module, global_step: int): method init_dataset (line 36) | def init_dataset(self, val_targets, data_dir, image_size): method __call__ (line 44) | def __call__(self, num_update, backbone: torch.nn.Module): class CallBackLogging (line 51) | class CallBackLogging(object): method __init__ (line 52) | def __init__(self, frequent, rank, total_step, batch_size, world_size,... method __call__ (line 64) | def __call__(self, class CallBackModelCheckpoint (line 105) | class CallBackModelCheckpoint(object): method __init__ (line 106) | def __init__(self, rank, output="./"): method __call__ (line 110) | def __call__(self, global_step, backbone, partial_fc, ): FILE: src/face3d/models/arcface_torch/utils/utils_config.py function get_config (line 5) | def get_config(config_file): FILE: src/face3d/models/arcface_torch/utils/utils_logging.py class AverageMeter (line 6) | class AverageMeter(object): method __init__ (line 10) | def __init__(self): method reset (line 17) | def reset(self): method update (line 23) | def update(self, val, n=1): function init_logging (line 30) | def init_logging(rank, models_root): FILE: src/face3d/models/base_model.py class BaseModel (line 12) | class BaseModel(ABC): method __init__ (line 22) | def __init__(self, opt): method dict_grad_hook_factory (line 49) | def dict_grad_hook_factory(add_func=lambda x: x): method modify_commandline_options (line 60) | def modify_commandline_options(parser, is_train): method set_input (line 73) | def set_input(self, input): method forward (line 82) | def forward(self): method optimize_parameters (line 87) | def optimize_parameters(self): method setup (line 91) | def setup(self, opt): method parallelize (line 107) | def parallelize(self, convert_sync_batchnorm=True): method data_dependent_initialize (line 138) | def data_dependent_initialize(self, data): method train (line 141) | def train(self): method eval (line 148) | def eval(self): method test (line 155) | def test(self): method compute_visuals (line 165) | def compute_visuals(self): method get_image_paths (line 169) | def get_image_paths(self, name='A'): method update_learning_rate (line 173) | def update_learning_rate(self): method get_current_visuals (line 184) | def get_current_visuals(self): method get_current_losses (line 192) | def get_current_losses(self): method save_networks (line 200) | def save_networks(self, epoch): method __patch_instance_norm_state_dict (line 230) | def __patch_instance_norm_state_dict(self, state_dict, module, keys, i... method load_networks (line 244) | def load_networks(self, epoch): method print_networks (line 284) | def print_networks(self, verbose): method set_requires_grad (line 302) | def set_requires_grad(self, nets, requires_grad=False): method generate_visuals_for_evaluation (line 315) | def generate_visuals_for_evaluation(self, data, mode): FILE: src/face3d/models/bfm.py function perspective_projection (line 11) | def perspective_projection(focal, center): class SH (line 19) | class SH: method __init__ (line 20) | def __init__(self): class ParametricFaceModel (line 26) | class ParametricFaceModel: method __init__ (line 27) | def __init__(self, method to (line 80) | def to(self, device): method compute_shape (line 87) | def compute_shape(self, id_coeff, exp_coeff): method compute_texture (line 103) | def compute_texture(self, tex_coeff, normalize=True): method compute_norm (line 118) | def compute_norm(self, face_shape): method compute_color (line 141) | def compute_color(self, face_texture, face_norm, gamma): method compute_rotation (line 175) | def compute_rotation(self, angles): method to_camera (line 211) | def to_camera(self, face_shape): method to_image (line 215) | def to_image(self, face_shape): method transform (line 230) | def transform(self, face_shape, rot, trans): method get_landmarks (line 243) | def get_landmarks(self, face_proj): method split_coeff (line 253) | def split_coeff(self, coeffs): method compute_for_render (line 275) | def compute_for_render(self, coeffs): method compute_for_render_woRotation (line 302) | def compute_for_render_woRotation(self, coeffs): FILE: src/face3d/models/facerecon_model.py class FaceReconModel (line 17) | class FaceReconModel(BaseModel): method modify_commandline_options (line 20) | def modify_commandline_options(parser, is_train=False): method __init__ (line 71) | def __init__(self, opt): method set_input (line 115) | def set_input(self, input): method forward (line 127) | def forward(self, output_coeff, device): method compute_losses (line 137) | def compute_losses(self): method optimize_parameters (line 169) | def optimize_parameters(self, isTrain=True): method compute_visuals (line 178) | def compute_visuals(self): method save_mesh (line 200) | def save_mesh(self, name): method save_coeff (line 211) | def save_coeff(self,name): FILE: src/face3d/models/losses.py function resize_n_crop (line 7) | def resize_n_crop(image, M, dsize=112): class PerceptualLoss (line 13) | class PerceptualLoss(nn.Module): method __init__ (line 14) | def __init__(self, recog_net, input_size=112): method forward (line 19) | def forward(imageA, imageB, M): function perceptual_loss (line 39) | def perceptual_loss(id_featureA, id_featureB): function photo_loss (line 45) | def photo_loss(imageA, imageB, mask, eps=1e-6): function landmark_loss (line 56) | def landmark_loss(predict_lm, gt_lm, weight=None): function reg_loss (line 76) | def reg_loss(coeffs_dict, opt=None): function reflectance_loss (line 101) | def reflectance_loss(texture, mask): FILE: src/face3d/models/networks.py function resize_n_crop (line 21) | def resize_n_crop(image, M, dsize=112): function filter_state_dict (line 26) | def filter_state_dict(state_dict, remove_name='fc'): function get_scheduler (line 34) | def get_scheduler(optimizer, opt): function define_net_recon (line 61) | def define_net_recon(net_recon, use_last_fc=False, init_path=None): function define_net_recog (line 64) | def define_net_recog(net_recog, pretrained_path=None): class ReconNetWrapper (line 69) | class ReconNetWrapper(nn.Module): method __init__ (line 71) | def __init__(self, net_recon, use_last_fc=False, init_path=None): method forward (line 97) | def forward(self, x): class RecogNetWrapper (line 107) | class RecogNetWrapper(nn.Module): method __init__ (line 108) | def __init__(self, net_recog, pretrained_path=None, input_size=112): method forward (line 121) | def forward(self, image, M): function conv3x3 (line 146) | def conv3x3(in_planes: int, out_planes: int, stride: int = 1, groups: in... function conv1x1 (line 152) | def conv1x1(in_planes: int, out_planes: int, stride: int = 1, bias: bool... class BasicBlock (line 157) | class BasicBlock(nn.Module): method __init__ (line 160) | def __init__( method forward (line 187) | def forward(self, x: Tensor) -> Tensor: class Bottleneck (line 206) | class Bottleneck(nn.Module): method __init__ (line 215) | def __init__( method forward (line 241) | def forward(self, x: Tensor) -> Tensor: class ResNet (line 264) | class ResNet(nn.Module): method __init__ (line 266) | def __init__( method _make_layer (line 331) | def _make_layer(self, block: Type[Union[BasicBlock, Bottleneck]], plan... method _forward_impl (line 356) | def _forward_impl(self, x: Tensor) -> Tensor: method forward (line 374) | def forward(self, x: Tensor) -> Tensor: function _resnet (line 378) | def _resnet( function resnet18 (line 394) | def resnet18(pretrained: bool = False, progress: bool = True, **kwargs: ... function resnet34 (line 406) | def resnet34(pretrained: bool = False, progress: bool = True, **kwargs: ... function resnet50 (line 418) | def resnet50(pretrained: bool = False, progress: bool = True, **kwargs: ... function resnet101 (line 430) | def resnet101(pretrained: bool = False, progress: bool = True, **kwargs:... function resnet152 (line 442) | def resnet152(pretrained: bool = False, progress: bool = True, **kwargs:... function resnext50_32x4d (line 454) | def resnext50_32x4d(pretrained: bool = False, progress: bool = True, **k... function resnext101_32x8d (line 468) | def resnext101_32x8d(pretrained: bool = False, progress: bool = True, **... function wide_resnet50_2 (line 482) | def wide_resnet50_2(pretrained: bool = False, progress: bool = True, **k... function wide_resnet101_2 (line 500) | def wide_resnet101_2(pretrained: bool = False, progress: bool = True, **... FILE: src/face3d/models/template_model.py class TemplateModel (line 24) | class TemplateModel(BaseModel): method modify_commandline_options (line 26) | def modify_commandline_options(parser, is_train=True): method __init__ (line 42) | def __init__(self, opt): method set_input (line 73) | def set_input(self, input): method forward (line 84) | def forward(self): method backward (line 88) | def backward(self): method optimize_parameters (line 95) | def optimize_parameters(self): FILE: src/face3d/options/base_options.py class BaseOptions (line 13) | class BaseOptions(): method __init__ (line 20) | def __init__(self, cmd_line=None): method initialize (line 27) | def initialize(self, parser): method gather_options (line 52) | def gather_options(self): method print_options (line 93) | def print_options(self, opt): method parse (line 122) | def parse(self): FILE: src/face3d/options/inference_options.py class InferenceOptions (line 4) | class InferenceOptions(BaseOptions): method initialize (line 10) | def initialize(self, parser): FILE: src/face3d/options/test_options.py class TestOptions (line 7) | class TestOptions(BaseOptions): method initialize (line 13) | def initialize(self, parser): FILE: src/face3d/options/train_options.py class TrainOptions (line 7) | class TrainOptions(BaseOptions): method initialize (line 13) | def initialize(self, parser): FILE: src/face3d/util/detect_lm68.py function save_label (line 12) | def save_label(labels, save_path): function draw_landmarks (line 15) | def draw_landmarks(img, landmark, save_name): function load_data (line 35) | def load_data(img_name, txt_name): function load_lm_graph (line 39) | def load_lm_graph(graph_filename): function detect_68p (line 53) | def detect_68p(img_path,sess,input_op,output_op): FILE: src/face3d/util/generate_list.py function write_list (line 7) | def write_list(lms_list, imgs_list, msks_list, mode='train',save_folder=... function check_list (line 21) | def check_list(rlms_list, rimgs_list, rmsks_list): FILE: src/face3d/util/html.py class HTML (line 6) | class HTML: method __init__ (line 14) | def __init__(self, web_dir, title, refresh=0): method get_image_dir (line 35) | def get_image_dir(self): method add_header (line 39) | def add_header(self, text): method add_images (line 48) | def add_images(self, ims, txts, links, width=400): method save (line 68) | def save(self): FILE: src/face3d/util/load_mats.py function LoadExpBasis (line 11) | def LoadExpBasis(bfm_folder='BFM'): function transferBFM09 (line 32) | def transferBFM09(bfm_folder='BFM'): function load_lm3d (line 105) | def load_lm3d(bfm_folder): FILE: src/face3d/util/my_awing_arch.py function calculate_points (line 8) | def calculate_points(heatmaps): class AddCoordsTh (line 44) | class AddCoordsTh(nn.Module): method __init__ (line 46) | def __init__(self, x_dim=64, y_dim=64, with_r=False, with_boundary=Fal... method forward (line 53) | def forward(self, input_tensor, heatmap=None): class CoordConvTh (line 110) | class CoordConvTh(nn.Module): method __init__ (line 113) | def __init__(self, x_dim, y_dim, with_r, with_boundary, in_channels, f... method forward (line 123) | def forward(self, input_tensor, heatmap=None): function conv3x3 (line 130) | def conv3x3(in_planes, out_planes, strd=1, padding=1, bias=False, dilati... class BasicBlock (line 135) | class BasicBlock(nn.Module): method __init__ (line 138) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 148) | def forward(self, x): class ConvBlock (line 165) | class ConvBlock(nn.Module): method __init__ (line 167) | def __init__(self, in_planes, out_planes): method forward (line 185) | def forward(self, x): class HourGlass (line 210) | class HourGlass(nn.Module): method __init__ (line 212) | def __init__(self, num_modules, depth, num_features, first_one=False): method _generate_network (line 230) | def _generate_network(self, level): method _forward (line 242) | def _forward(self, level, inp): method forward (line 264) | def forward(self, x, heatmap): class FAN (line 269) | class FAN(nn.Module): method __init__ (line 271) | def __init__(self, num_modules=1, end_relu=False, gray_scale=False, nu... method forward (line 324) | def forward(self, x): method get_landmarks (line 359) | def get_landmarks(self, img): FILE: src/face3d/util/nvdiffrast.py class MeshRenderer (line 32) | class MeshRenderer(nn.Module): method __init__ (line 33) | def __init__(self, method forward (line 50) | def forward(self, vertex, tri, feat=None): FILE: src/face3d/util/preprocess.py function POS (line 17) | def POS(xp, x): function resize_n_crop_img (line 42) | def resize_n_crop_img(img, lm, t, s, target_size=224., mask=None): function extract_5p (line 66) | def extract_5p(lm): function align_img (line 74) | def align_img(img, lm, lm3D, mask=None, target_size=224., rescale_factor... FILE: src/face3d/util/skin_mask.py class GMM (line 9) | class GMM: method __init__ (line 10) | def __init__(self, dim, num, w, mu, cov, cov_det, cov_inv): method likelihood (line 23) | def likelihood(self, data): function _rgb2ycbcr (line 42) | def _rgb2ycbcr(rgb): function _bgr2ycbcr (line 54) | def _bgr2ycbcr(bgr): function skinmask (line 90) | def skinmask(imbgr): function get_skin_mask (line 111) | def get_skin_mask(img_path): FILE: src/face3d/util/util.py function str2bool (line 14) | def str2bool(v): function copyconf (line 25) | def copyconf(default_opt, **kwargs): function genvalconf (line 31) | def genvalconf(train_opt, **kwargs): function find_class_in_module (line 43) | def find_class_in_module(target_cls_name, module): function tensor2im (line 56) | def tensor2im(input_image, imtype=np.uint8): function diagnose_network (line 77) | def diagnose_network(net, name='network'): function save_image (line 96) | def save_image(image_numpy, image_path, aspect_ratio=1.0): function print_numpy (line 116) | def print_numpy(x, val=True, shp=False): function mkdirs (line 132) | def mkdirs(paths): function mkdir (line 145) | def mkdir(path): function correct_resize_label (line 155) | def correct_resize_label(t, size): function correct_resize (line 169) | def correct_resize(t, size, mode=Image.BICUBIC): function draw_landmarks (line 180) | def draw_landmarks(img, landmark, color='r', step=2): FILE: src/face3d/util/visualizer.py function save_images (line 13) | def save_images(webpage, visuals, image_path, aspect_ratio=1.0, width=256): class Visualizer (line 44) | class Visualizer(): method __init__ (line 50) | def __init__(self, opt): method reset (line 77) | def reset(self): method display_current_results (line 82) | def display_current_results(self, visuals, total_iters, epoch, save_re... method plot_current_losses (line 117) | def plot_current_losses(self, total_iters, losses): method print_current_losses (line 131) | def print_current_losses(self, epoch, iters, losses, t_comp, t_data): class MyVisualizer (line 150) | class MyVisualizer: method __init__ (line 151) | def __init__(self, opt): method display_current_results (line 174) | def display_current_results(self, visuals, total_iters, epoch, dataset... method plot_current_losses (line 205) | def plot_current_losses(self, total_iters, losses, dataset='train'): method print_current_losses (line 210) | def print_current_losses(self, epoch, iters, losses, t_comp, t_data, d... FILE: src/face3d/visualize.py function gen_composed_video (line 12) | def gen_composed_video(args, device, first_frame_coeff, coeff_path, audi... FILE: src/facerender/animate.py class AnimateFromCoeff (line 33) | class AnimateFromCoeff(): method __init__ (line 35) | def __init__(self, sadtalker_path, device): method load_cpk_facevid2vid_safetensor (line 86) | def load_cpk_facevid2vid_safetensor(self, checkpoint_path, generator=N... method load_cpk_facevid2vid (line 113) | def load_cpk_facevid2vid(self, checkpoint_path, generator=None, discri... method load_cpk_mapping (line 143) | def load_cpk_mapping(self, checkpoint_path, mapping=None, discriminato... method generate (line 157) | def generate(self, x, video_save_dir, pic_path, crop_info, enhancer=No... FILE: src/facerender/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 59) | def create_deformed_feature(self, feature, sparse_motions): method create_heatmap_representations (line 68) | def create_heatmap_representations(self, feature, kp_driving, kp_source): method forward (line 80) | def forward(self, feature, kp_driving, kp_source): FILE: src/facerender/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: src/facerender/modules/generator.py class OcclusionAwareGenerator (line 8) | class OcclusionAwareGenerator(nn.Module): method __init__ (line 13) | def __init__(self, image_channel, feature_channel, num_kp, block_expan... method deform_input (line 61) | def deform_input(self, inp, deformation): method forward (line 70) | def forward(self, source_image, kp_driving, kp_source): class SPADEDecoder (line 120) | class SPADEDecoder(nn.Module): method __init__ (line 121) | def __init__(self): method forward (line 140) | def forward(self, feature): class OcclusionAwareSPADEGenerator (line 161) | class OcclusionAwareSPADEGenerator(nn.Module): method __init__ (line 163) | def __init__(self, image_channel, feature_channel, num_kp, block_expan... method deform_input (line 201) | def deform_input(self, inp, deformation): method forward (line 210) | def forward(self, source_image, kp_driving, kp_source): FILE: src/facerender/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: src/facerender/modules/make_animation.py function normalize_kp (line 7) | def normalize_kp(kp_source, kp_driving, kp_driving_initial, adapt_moveme... function headpose_pred_to_degree (line 29) | def headpose_pred_to_degree(pred): function get_rotation_matrix (line 37) | def get_rotation_matrix(yaw, pitch, roll): function keypoint_transformation (line 65) | def keypoint_transformation(kp_canonical, he, wo_exp=False): function make_animation (line 102) | def make_animation(source_image, source_semantics, target_semantics, class AnimateModel (line 141) | class AnimateModel(torch.nn.Module): method __init__ (line 146) | def __init__(self, generator, kp_extractor, mapping): method forward (line 156) | def forward(self, x): FILE: src/facerender/modules/mapping.py class MappingNet (line 8) | class MappingNet(nn.Module): method __init__ (line 9) | def __init__(self, coeff_nc, descriptor_nc, layer, num_kp, num_bins): method forward (line 32) | def forward(self, input_3dmm): FILE: src/facerender/modules/util.py function kp2gaussian (line 12) | def kp2gaussian(kp, spatial_size, kp_variance): function make_coordinate_grid_2d (line 35) | def make_coordinate_grid_2d(spatial_size, type): function make_coordinate_grid (line 54) | def make_coordinate_grid(spatial_size, type): class ResBottleneck (line 73) | class ResBottleneck(nn.Module): method __init__ (line 74) | def __init__(self, in_features, stride): method forward (line 88) | def forward(self, x): class ResBlock2d (line 105) | class ResBlock2d(nn.Module): method __init__ (line 110) | def __init__(self, in_features, kernel_size, padding): method forward (line 119) | def forward(self, x): class ResBlock3d (line 130) | class ResBlock3d(nn.Module): method __init__ (line 135) | def __init__(self, in_features, kernel_size, padding): method forward (line 144) | def forward(self, x): class UpBlock2d (line 155) | class UpBlock2d(nn.Module): method __init__ (line 160) | def __init__(self, in_features, out_features, kernel_size=3, padding=1... method forward (line 167) | def forward(self, x): class UpBlock3d (line 174) | class UpBlock3d(nn.Module): method __init__ (line 179) | def __init__(self, in_features, out_features, kernel_size=3, padding=1... method forward (line 186) | def forward(self, x): class DownBlock2d (line 195) | class DownBlock2d(nn.Module): method __init__ (line 200) | def __init__(self, in_features, out_features, kernel_size=3, padding=1... method forward (line 207) | def forward(self, x): class DownBlock3d (line 215) | class DownBlock3d(nn.Module): method __init__ (line 220) | def __init__(self, in_features, out_features, kernel_size=3, padding=1... method forward (line 231) | def forward(self, x): class SameBlock2d (line 239) | class SameBlock2d(nn.Module): method __init__ (line 244) | def __init__(self, in_features, out_features, groups=1, kernel_size=3,... method forward (line 254) | def forward(self, x): class Encoder (line 261) | class Encoder(nn.Module): method __init__ (line 266) | def __init__(self, block_expansion, in_features, num_blocks=3, max_fea... method forward (line 276) | def forward(self, x): class Decoder (line 283) | class Decoder(nn.Module): method __init__ (line 288) | def __init__(self, block_expansion, in_features, num_blocks=3, max_fea... method forward (line 305) | def forward(self, x): class Hourglass (line 319) | class Hourglass(nn.Module): method __init__ (line 324) | def __init__(self, block_expansion, in_features, num_blocks=3, max_fea... method forward (line 330) | def forward(self, x): class KPHourglass (line 334) | class KPHourglass(nn.Module): method __init__ (line 339) | def __init__(self, block_expansion, in_features, reshape_features, res... method forward (line 360) | def forward(self, x): class AntiAliasInterpolation2d (line 371) | class AntiAliasInterpolation2d(nn.Module): method __init__ (line 375) | def __init__(self, channels, scale): method forward (line 409) | def forward(self, input): class SPADE (line 420) | class SPADE(nn.Module): method __init__ (line 421) | def __init__(self, norm_nc, label_nc): method forward (line 433) | def forward(self, x, segmap): class SPADEResnetBlock (line 443) | class SPADEResnetBlock(nn.Module): method __init__ (line 444) | def __init__(self, fin, fout, norm_G, label_nc, use_se=False, dilation... method forward (line 467) | def forward(self, x, seg1): method shortcut (line 474) | def shortcut(self, x, seg1): method actvn (line 481) | def actvn(self, x): class audio2image (line 484) | class audio2image(nn.Module): method __init__ (line 485) | def __init__(self, generator, kp_extractor, he_estimator_video, he_est... method headpose_pred_to_degree (line 494) | def headpose_pred_to_degree(self, pred): method get_rotation_matrix (line 503) | def get_rotation_matrix(self, yaw, pitch, roll): method keypoint_transformation (line 531) | def keypoint_transformation(self, kp_canonical, he): method forward (line 557) | def forward(self, source_image, target_audio): FILE: src/facerender/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: src/facerender/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: src/facerender/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: src/facerender/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: src/generate_batch.py function crop_pad_audio (line 10) | def crop_pad_audio(wav, audio_length): function parse_audio_length (line 17) | def parse_audio_length(audio_length, sr, fps): function generate_blink_seq (line 25) | def generate_blink_seq(num_frames): function generate_blink_seq_randomly (line 37) | def generate_blink_seq_randomly(num_frames): function get_data (line 51) | def get_data(first_coeff_path, audio_path, device, ref_eyeblink_coeff_pa... FILE: src/generate_facerender_batch.py function get_facerender_data (line 8) | def get_facerender_data(coeff_path, pic_path, first_coeff_path, audio_path, function transform_semantic_1 (line 88) | def transform_semantic_1(semantic, semantic_radius): function transform_semantic_target (line 93) | def transform_semantic_target(coeff_3dmm, frame_index, semantic_radius): function gen_camera_pose (line 100) | def gen_camera_pose(camera_degree_list, frame_num, batch_size): FILE: src/gradio_demo.py function mp3_to_wav (line 14) | def mp3_to_wav(mp3_filename,wav_filename,frame_rate): class SadTalker (line 19) | class SadTalker(): method __init__ (line 21) | def __init__(self, checkpoint_path='checkpoints', config_path='src/con... method test (line 36) | def test(self, source_image, driven_audio, preprocess='crop', FILE: src/test_audio2coeff.py function load_cpk (line 16) | def load_cpk(checkpoint_path, model=None, optimizer=None, device="cpu"): class Audio2Coeff (line 25) | class Audio2Coeff(): method __init__ (line 27) | def __init__(self, sadtalker_path, device): method generate (line 74) | def generate(self, batch, coeff_save_dir, pose_style, ref_pose_coeff_p... method using_refpose (line 107) | def using_refpose(self, coeffs_pred_numpy, ref_pose_coeff_path): FILE: src/utils/audio.py function load_wav (line 9) | def load_wav(path, sr): function save_wav (line 12) | def save_wav(wav, path, sr): function save_wavenet_wav (line 17) | def save_wavenet_wav(wav, path, sr): function preemphasis (line 20) | def preemphasis(wav, k, preemphasize=True): function inv_preemphasis (line 25) | def inv_preemphasis(wav, k, inv_preemphasize=True): function get_hop_size (line 30) | def get_hop_size(): function linearspectrogram (line 37) | def linearspectrogram(wav): function melspectrogram (line 45) | def melspectrogram(wav): function _lws_processor (line 53) | def _lws_processor(): function _stft (line 57) | def _stft(y): function num_frames (line 65) | def num_frames(length, fsize, fshift): function pad_lr (line 76) | def pad_lr(x, fsize, fshift): function librosa_pad_lr (line 86) | def librosa_pad_lr(x, fsize, fshift): function _linear_to_mel (line 92) | def _linear_to_mel(spectogram): function _build_mel_basis (line 98) | def _build_mel_basis(): function _amp_to_db (line 103) | def _amp_to_db(x): function _db_to_amp (line 107) | def _db_to_amp(x): function _normalize (line 110) | def _normalize(S): function _denormalize (line 124) | def _denormalize(D): FILE: src/utils/croper.py class Preprocesser (line 19) | class Preprocesser: method __init__ (line 20) | def __init__(self, device='cuda'): method get_landmark (line 23) | def get_landmark(self, img_np): method align_face (line 43) | def align_face(self, img, lm, output_size=1024): method crop (line 126) | def crop(self, img_np_list, still=False, xsize=512): # first frame ... FILE: src/utils/face_enhancer.py class GeneratorWithLen (line 13) | class GeneratorWithLen(object): method __init__ (line 16) | def __init__(self, gen, length): method __len__ (line 20) | def __len__(self): method __iter__ (line 23) | def __iter__(self): function enhancer_list (line 26) | def enhancer_list(images, method='gfpgan', bg_upsampler='realesrgan'): function enhancer_generator_with_len (line 30) | def enhancer_generator_with_len(images, method='gfpgan', bg_upsampler='r... function enhancer_generator_no_len (line 42) | def enhancer_generator_no_len(images, method='gfpgan', bg_upsampler='rea... FILE: src/utils/hparams.py class HParams (line 4) | class HParams: method __init__ (line 5) | def __init__(self, **kwargs): method __getattr__ (line 11) | def __getattr__(self, key): method set_hparam (line 16) | def set_hparam(self, key, value): function hparams_debug_string (line 157) | def hparams_debug_string(): FILE: src/utils/init_path.py function init_path (line 4) | def init_path(checkpoint_dir, config_dir, size=512, old_version=False, p... FILE: src/utils/model2safetensor.py function load_cpk_facevid2vid (line 43) | def load_cpk_facevid2vid(checkpoint_path, generator=None, discriminator=... function load_cpk_facevid2vid_safetensor (line 75) | def load_cpk_facevid2vid_safetensor(checkpoint_path, generator=None, class SadTalker (line 125) | class SadTalker(torch.nn.Module): method __init__ (line 126) | def __init__(self, kp_extractor, generator, netG, audio2pose, face_3dr... FILE: src/utils/paste_pic.py function paste_pic (line 8) | def paste_pic(video_path, pic_path, crop_info, new_audio_path, full_vide... FILE: src/utils/preprocess.py function split_coeff (line 22) | def split_coeff(coeffs): class CropAndExtract (line 46) | class CropAndExtract(): method __init__ (line 47) | def __init__(self, sadtalker_path, device): method generate (line 63) | def generate(self, input_path, save_dir, crop_or_resize='crop', source... FILE: src/utils/safetensor_helper.py function load_x_from_safetensor (line 3) | def load_x_from_safetensor(checkpoint, key): FILE: src/utils/text2speech.py class TTSTalker (line 6) | class TTSTalker(): method __init__ (line 7) | def __init__(self) -> None: method test (line 11) | def test(self, text, language='en'): FILE: src/utils/videoio.py function load_video_to_cv2 (line 8) | def load_video_to_cv2(input_path): function save_video_with_watermark (line 20) | def save_video_with_watermark(video, audio, save_path, watermark=False):