MCPcopy Create free account

hub / github.com/fudan-generative-vision/hallo2 / functions

Functions805 in github.com/fudan-generative-vision/hallo2

↓ 1 callersMethodinit_training_settings
(self)
basicsr/models/sr_model.py:34
↓ 1 callersFunctioninit_wandb_logger
We now only use wandb to sync tensorboard log.
basicsr/utils/logger.py:85
↓ 1 callersMethodinit_weights
(self)
basicsr/ops/dcn/deform_conv.py:365
↓ 1 callersFunctioninit_yolov5face_model
(model_name, device='cuda')
facelib/detection/__init__.py:49
↓ 1 callersFunctioninsert_bn
Insert bn layer after each conv. Args: names (list): The list of layer names. Returns: list: The list of layer names with bn
basicsr/archs/vgg_arch.py:36
↓ 1 callersFunctionintersect
We resize both tensors to [A,B,2] without new malloc: [A,2] -> [A,1,2] -> [A,B,2] [B,2] -> [1,B,2] -> [A,B,2] Then we compute the area of
facelib/detection/retinaface/retinaface_utils.py:79
↓ 1 callersFunctionisListempty
(inList)
facelib/detection/yolov5face/face_detector.py:22
↓ 1 callersFunctionjaccard
Compute the jaccard overlap of two sets of boxes. The jaccard overlap is simply the intersection over union of two boxes. Here we operate on
facelib/detection/retinaface/retinaface_utils.py:98
↓ 1 callersFunctionl1_loss
(pred, target)
basicsr/losses/losses.py:16
↓ 1 callersFunctionload_config
Loads the configuration file. Args: config_path (str): Path to the configuration file. Returns: dict: The configuration
scripts/train_stage1.py:765
↓ 1 callersFunctionload_config
Loads the configuration file. Args: config_path (str): Path to the configuration file. Returns: dict: The configuration
scripts/train_stage2_long.py:1025
↓ 1 callersFunctionlog_validation
Log validation generation image. Args: vae (nn.Module): Variational Autoencoder model. net (Net): Main model. schedu
scripts/train_stage1.py:181
↓ 1 callersFunctionlog_validation
Log validation video during the training process. Args: accelerator (Accelerator): The accelerator for distributed training.
scripts/train_stage2_long.py:268
↓ 1 callersFunctionmain
Main function to extract meta info for training.
scripts/extract_meta_info_stage1.py:68
↓ 1 callersFunctionmain
Main function to extract meta info for training.
scripts/extract_meta_info_stage2.py:155
↓ 1 callersFunctionmake_bbox_head
(fpn_num=3, inchannels=64, anchor_num=2)
facelib/detection/retinaface/retinaface_net.py:185
↓ 1 callersFunctionmake_class_head
(fpn_num=3, inchannels=64, anchor_num=2)
facelib/detection/retinaface/retinaface_net.py:178
↓ 1 callersFunctionmake_exp_dirs
Make dirs for experiments.
basicsr/utils/misc.py:62
↓ 1 callersFunctionmake_landmark_head
(fpn_num=3, inchannels=64, anchor_num=2)
facelib/detection/retinaface/retinaface_net.py:192
↓ 1 callersFunctionmake_layer
Make layers by stacking the same blocks. Args: basic_block (nn.module): nn.module class for basic block. num_basic_block (int): n
basicsr/archs/arch_util.py:48
↓ 1 callersFunctionmerge_videos
(input_directory, output_file)
hallo/utils/util.py:349
↓ 1 callersFunctionmod_crop
Mod crop images, used during testing. Args: img (ndarray): Input image. scale (int): Scale factor. Returns: ndarray:
basicsr/data/transforms.py:5
↓ 1 callersFunctionmse_loss
(pred, target)
basicsr/losses/losses.py:21
↓ 1 callersFunctionnon_max_suppression_face
Performs Non-Maximum Suppression (NMS) on inference results Returns: detections with shape: nx6 (x1, y1, x2, y2, conf, cls)
facelib/detection/yolov5face/utils/general.py:89
↓ 1 callersMethodnondist_validation
(self, dataloader, current_iter, tb_logger, save_img)
basicsr/models/codeformer_temporal_model.py:163
↓ 1 callersMethodnondist_validation
(self, dataloader, current_iter, tb_logger, save_img)
basicsr/models/vqgan_model.py:210
↓ 1 callersMethodoptimize_parameters
(self, current_iter)
basicsr/models/sr_model.py:91
↓ 1 callersFunctionordered_yaml
Support OrderedDict for yaml. Returns: yaml Loader and Dumper.
basicsr/utils/options.py:7
↓ 1 callersFunctionparse
Parse option file. Args: opt_path (str): Option file path. is_train (str): Indicate whether in training or not. Default: True.
basicsr/utils/options.py:32
↓ 1 callersFunctionparse_model
(d, ch)
facelib/detection/yolov5face/models/yolo.py:181
↓ 1 callersFunctionparse_options
(root_path, is_train=True)
basicsr/train.py:24
↓ 1 callersFunctionpaste_face_back
(img, face, inverse_affine)
facelib/utils/face_utils.py:190
↓ 1 callersFunctionpoint_form
Convert prior_boxes to (xmin, ymin, xmax, ymax) representation for comparison to point form ground truth data. Args: boxes: (tensor)
facelib/detection/retinaface/retinaface_utils.py:50
↓ 1 callersMethodprepare_extra_step_kwargs
Prepares extra keyword arguments for the scheduler step. Args: generator (Optional[torch.Generator]): Random number gene
hallo/animate/face_animate.py:190
↓ 1 callersMethodprepare_extra_step_kwargs
Prepare extra keyword arguments for the scheduler step. Since not all schedulers have the same signature, this function helps to cre
hallo/animate/face_animate_static.py:194
↓ 1 callersMethodprepare_latents
Prepares the initial latents for video generation. Args: batch_size (int): Number of videos to generate in parallel.
hallo/animate/face_animate.py:136
↓ 1 callersMethodprepare_latents
Prepares the initial latents for the diffusion pipeline. Args: batch_size (int): The number of images to generate in one
hallo/animate/face_animate_static.py:226
↓ 1 callersFunctionprocess_all_videos
Process all videos in the input list. Args: input_video_list (List[Path]): List of video paths to process. output_dir (Path)
scripts/data_preprocess.py:116
↓ 1 callersFunctionprocess_audio_emb
Process the audio embedding to concatenate with other tensors. Parameters: audio_emb (torch.Tensor): The audio embedding tensor to p
scripts/inference_long.py:104
↓ 1 callersFunctionprocess_audio_emb
Process the audio embedding to concatenate with other tensors. Parameters: audio_emb (torch.Tensor): The audio embedding tensor to p
scripts/train_stage2_long.py:232
↓ 1 callersFunctionprocess_single_video
Process a single video file. Args: video_path (Path): Path to the video file. output_dir (Path): Directory to save the outpu
scripts/data_preprocess.py:59
↓ 1 callersFunctionrandom_bivariate_anisotropic_Gaussian
Randomly generate bivariate anisotropic Gaussian kernels. Args: kernel_size (int): sigma_x_range (tuple): [0.6, 5] sigma_y
basicsr/data/gaussian_kernels.py:310
↓ 1 callersFunctionrandom_bivariate_generalized_Gaussian
Randomly generate bivariate generalized Gaussian kernels. Args: kernel_size (int): sigma_x_range (tuple): [0.6, 5] sigma_y
basicsr/data/gaussian_kernels.py:385
↓ 1 callersFunctionrandom_bivariate_isotropic_Gaussian
Randomly generate bivariate isotropic Gaussian kernels. Args: kernel_size (int): sigma_range (tuple): [0.6, 5] noise_range
basicsr/data/gaussian_kernels.py:354
↓ 1 callersFunctionrandom_bivariate_plateau_type1
Randomly generate bivariate plateau type1 kernels. Args: kernel_size (int): sigma_x_range (tuple): [0.6, 5] sigma_y_range
basicsr/data/gaussian_kernels.py:435
↓ 1 callersFunctionrandom_bivariate_plateau_type1_iso
Randomly generate bivariate plateau type1 kernels (iso). Args: kernel_size (int): sigma_range (tuple): [0.6, 5] beta_range
basicsr/data/gaussian_kernels.py:485
↓ 1 callersFunctionrandom_bivariate_skew_Gaussian_center
Randomly generate bivariate skew Gaussian kernels at center. Args: kernel_size (int): sigma_x_range (tuple): [0.6, 5] sigm
basicsr/data/gaussian_kernels.py:259
↓ 1 callersMethodread_image
img can be image path or cv2 loaded image.
facelib/utils/face_restoration_helper.py:131
↓ 1 callersFunctionread_img_worker
Read image worker. Args: path (str): Image path. key (str): Image key. compress_level (int): Compress level when encoding
basicsr/utils/lmdb_util.py:132
↓ 1 callersFunctionreadme
()
basicsr/setup.py:15
↓ 1 callersFunctionreduce_loss
Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are 'none', 'mean' and 'sum'.
basicsr/losses/loss_util.py:5
↓ 1 callersMethodregister_reference_hooks
Registers reference hooks for the model. This function is responsible for registering reference hooks in the model, which a
hallo/models/mutual_self_attention.py:115
↓ 1 callersFunctionresample_audio
(input_audio_file: str, output_audio_file: str, sample_rate: int)
hallo/utils/util.py:714
↓ 1 callersMethodreset
(self)
basicsr/data/prefetch_dataloader.py:123
↓ 1 callersMethodreset_parameters
(self)
basicsr/ops/dcn/deform_conv.py:223
↓ 1 callersMethodresume_training
Reload the optimizers and schedulers for resumed training. Args: resume_state (dict): Resume state.
basicsr/models/base_model.py:282
↓ 1 callersFunctionsave_response_content
(response, destination, file_size=None, chunk_size=32768)
basicsr/utils/download_util.py:48
↓ 1 callersFunctionsave_videos_from_pil
Save a sequence of images as a video using the Pillow library. Args: pil_images (List[PIL.Image]): A list of PIL.Image objects repre
hallo/utils/util.py:155
↓ 1 callersFunctionscale_coords_landmarks
(img1_shape, coords, img0_shape, ratio_pad=None)
facelib/detection/yolov5face/utils/general.py:249
↓ 1 callersMethodset_attention_slice
r""" Enable sliced attention computation. When this option is enabled, the attention module will split the input tensor in slices, to
hallo/models/unet_3d.py:395
↓ 1 callersMethodset_attention_slice
r""" Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor in slices to comp
hallo/models/unet_2d_condition.py:795
↓ 1 callersMethodset_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor` or o
hallo/models/unet_2d_condition.py:733
↓ 1 callersMethodset_epoch
(self, epoch)
basicsr/data/data_sampler.py:47
↓ 1 callersFunctionset_random_seed
Set random seeds.
basicsr/utils/misc.py:35
↓ 1 callersFunctionsetup_directories
Setup directories for storing processed files. Args: video_path (Path): Path to the video file. Returns: dict: A dictio
scripts/data_preprocess.py:33
↓ 1 callersMethodsetup_optimizers
(self)
basicsr/models/sr_model.py:72
↓ 1 callersMethodsetup_optimizers
(self)
basicsr/models/codeformer_temporal_model.py:82
↓ 1 callersMethodsetup_optimizers
(self)
basicsr/models/vqgan_model.py:98
↓ 1 callersFunctiontensor_to_video
Converts a Tensor with shape [c, f, h, w] into a video and adds an audio track from the specified audio file. Args: tensor (Tensor):
hallo/utils/util.py:298
↓ 1 callersFunctiontensor_to_video_batch
Converts a Tensor with shape [c, f, h, w] into a video and adds an audio track from the specified audio file. Args: tensor (Tensor):
hallo/utils/util.py:324
↓ 1 callersMethodtest
(self)
basicsr/models/sr_model.py:120
↓ 1 callersMethodtest
(self)
basicsr/models/codeformer_temporal_model.py:145
↓ 1 callersMethodtest
(self)
basicsr/models/vqgan_model.py:192
↓ 1 callersFunctiontforminv
Function: ---------- apply the inverse of affine transform 'trans' to uv Parameters: ---------- @trans: 3x3 np.array
facelib/detection/matlab_cp2tform.py:37
↓ 1 callersFunctiontrain_pipeline
(root_path)
basicsr/train.py:110
↓ 1 callersFunctiontrain_stage1_process
Trains the model using the given configuration (cfg). Args: cfg (dict): The configuration dictionary containing the parameters for t
scripts/train_stage1.py:289
↓ 1 callersFunctiontrain_stage2_process
Trains the model using the given configuration (cfg). Args: cfg (dict): The configuration dictionary containing the parameters for t
scripts/train_stage2_long.py:462
↓ 1 callersMethodtransform
(self, image, use_origin_size)
facelib/detection/retinaface/retinaface.py:167
↓ 1 callersMethodupdate_learning_rate
Update learning rate. Args: current_iter (int): Current iteration. warmup_iter (int): Warmup iter numbers. -1 for no
basicsr/models/base_model.py:144
↓ 1 callersFunctionupfirdn2d_native
(input, kernel, up_x, up_y, down_x, down_y, pad_x0, pad_x1, pad_y0, pad_y1)
basicsr/ops/upfirdn2d/upfirdn2d.py:156
↓ 1 callersFunctionwarp_and_crop_face
Function: ---------- apply affine transform 'trans' to uv Parameters: ---------- @src_img: 3x3 np.array i
facelib/detection/align_trans.py:145
↓ 1 callersFunctionweight_reduce_loss
Apply element-wise weight and reduce loss. Args: loss (Tensor): Element-wise loss. weight (Tensor): Element-wise weights. Default
basicsr/losses/loss_util.py:25
↓ 1 callersMethodwrite_frame
(self, frame)
basicsr/utils/video_util.py:113
↓ 1 callersFunctionwrite_version_py
()
basicsr/setup.py:61
↓ 1 callersFunctionxyxy2xywh
(x)
facelib/detection/yolov5face/utils/general.py:22
↓ 1 callersFunctionzero_module
Zero out the parameters of a module and return it. Args: - module: A PyTorch module to zero out its parameters. Returns: A
hallo/models/motion_module.py:68
FunctionDWConv
(c1, c2, k=1, s=1, act=True)
facelib/detection/yolov5face/models/common.py:37
Method__call__
(self, *args)
facelib/detection/yolov5face/face_detector.py:140
Method__call__
Format logging message. Args: log_vars (dict): It contains the following keys: epoch (int): Epoch number.
basicsr/utils/logger.py:33
Method__call__
( self, ref_image, face_emb, audio_tensor, face_mask, pixel_va
hallo/animate/face_animate.py:250
Method__call__
( self, ref_image, face_mask, width, height, num_inference_ste
hallo/animate/face_animate_static.py:313
Method__contains__
(self, name)
basicsr/utils/registry.py:68
Method__enter__
(self)
hallo/datasets/image_processor.py:208
Method__enter__
(self)
hallo/datasets/image_processor.py:342
Method__enter__
(self)
hallo/datasets/audio_processor.py:178
Method__exit__
(self, _exc_type, _exc_val, _exc_tb)
hallo/datasets/image_processor.py:211
Method__exit__
(self, _exc_type, _exc_val, _exc_tb)
hallo/datasets/image_processor.py:345
Method__exit__
(self, _exc_type, _exc_val, _exc_tb)
hallo/datasets/audio_processor.py:181
Method__getitem__
(self, index)
basicsr/data/vfhq_dataset.py:183
Method__getitem__
(self, index)
hallo/datasets/mask_image.py:94
← previousnext →301–400 of 805, ranked by callers