MCPcopy Create free account

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

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

↓ 1 callersFunctionaugment
Augment: horizontal flips OR rotate (0, 90, 180, 270 degrees). We use vertical flip and transpose for rotation implementation. All the images
basicsr/data/transforms.py:80
↓ 1 callersFunctionautopad
(k, p=None)
facelib/detection/yolov5face/models/common.py:18
↓ 1 callersFunctionbatched_decode
Decode locations from predictions using priors to undo the encoding we did for offset regression at train time. Args: b_loc (tensor):
facelib/detection/retinaface/retinaface_utils.py:297
↓ 1 callersFunctionbatched_decode_landm
Decode landm from predictions using priors to undo the encoding we did for offset regression at train time. Args: pre (tensor): landm
facelib/detection/retinaface/retinaface_utils.py:320
↓ 1 callersMethodbatched_transform
Arguments: frames: a list of PIL.Image, or torch.Tensor(shape=[n, h, w, c], type=np.float32, BGR format).
facelib/detection/retinaface/retinaface.py:267
↓ 1 callersFunctionbgr2gray
(img, out_channel=3)
facelib/utils/misc.py:169
↓ 1 callersFunctionbgr2ycbcr
Convert a BGR image to YCbCr image. The bgr version of rgb2ycbcr. It implements the ITU-R BT.601 conversion for standard-definition telev
basicsr/utils/matlab_functions.py:202
↓ 1 callersFunctionbivariate_plateau_type1
Generate a plateau-like anisotropic kernel. 1 / (1+x^(beta)) Args: kernel_size (int): sig_x (float): sig_y (float):
basicsr/data/gaussian_kernels.py:213
↓ 1 callersFunctionbivariate_plateau_type1_iso
Generate a plateau-like isotropic kernel. 1 / (1+x^(beta)) Args: kernel_size (int): sig (float): beta (float): shape p
basicsr/data/gaussian_kernels.py:237
↓ 1 callersFunctionbivariate_skew_Gaussian
Generate a bivariate skew Gaussian kernel. Described in `A multivariate skew normal distribution`_ by Shi et. al (2004). Args: ker
basicsr/data/gaussian_kernels.py:70
↓ 1 callersFunctionbrush_stroke_mask
(img, color=(255,255,255))
basicsr/data/data_util.py:310
↓ 1 callersMethodcalculate_adaptive_weight
(self, recon_loss, g_loss, last_layer, disc_weight_max)
basicsr/models/vqgan_model.py:85
↓ 1 callersFunctioncdf2
Calculate the CDF of the standard bivariate Gaussian distribution. Used in skewed Gaussian distribution. Args: D (ndarrasy): skew
basicsr/data/gaussian_kernels.py:54
↓ 1 callersFunctionchannel_shuffle
(x, groups)
facelib/detection/yolov5face/models/common.py:25
↓ 1 callersFunctioncharbonnier_loss
(pred, target, eps=1e-12)
basicsr/losses/losses.py:26
↓ 1 callersFunctioncheck_anchor_order
(m)
facelib/detection/yolov5face/utils/autoanchor.py:4
↓ 1 callersFunctioncheck_img_size
(img_size, s=32)
facelib/detection/yolov5face/utils/general.py:9
↓ 1 callersFunctioncheck_resume
Check resume states and pretrain_network paths. Args: opt (dict): Options. resume_iter (int): Resume iteration.
basicsr/utils/misc.py:116
↓ 1 callersMethodclean_all
(self)
facelib/utils/face_restoration_helper.py:505
↓ 1 callersFunctionclip_coords
(boxes, img_shape)
facelib/detection/yolov5face/utils/general.py:58
↓ 1 callersMethodclose
(self)
basicsr/utils/video_util.py:84
↓ 1 callersMethodclose
Closes the ImageProcessor and releases any resources held by the FaceAnalysis instance. Args: self: The ImageProcessor i
hallo/datasets/image_processor.py:318
↓ 1 callersMethodclose
TODO: to be implemented
hallo/datasets/audio_processor.py:172
↓ 1 callersFunctioncollect_video_folder_paths
Collect all video folder paths from the root path. Args: root_path (Path): The root directory containing video folders. Returns
scripts/extract_meta_info_stage1.py:27
↓ 1 callersMethodcolor_jitter
jitter color: randomly jitter the RGB values, in numpy formats
basicsr/data/vfhq_dataset.py:121
↓ 1 callersMethodcolor_jitter_pt
jitter color: randomly jitter the brightness, contrast, saturation, and hue, in torch Tensor formats
basicsr/data/vfhq_dataset.py:129
↓ 1 callersFunctionconstruct_meta_info
Construct meta information for a given frames directory. Args: frames_dir_path (Path): The path to the frames directory. Return
scripts/extract_meta_info_stage1.py:40
↓ 1 callersFunctionconvert_video_to_images
Convert a video file into a sequence of images. This function uses ffmpeg to convert each frame of the given video file into an image. The i
hallo/utils/util.py:935
↓ 1 callersFunctioncopy_attr
(a, b, include=(), exclude=())
facelib/detection/yolov5face/utils/torch_utils.py:34
↓ 1 callersFunctioncreate_train_val_dataloader
(opt, logger)
basicsr/train.py:71
↓ 1 callersFunctioncut_audio
(audio_path, save_dir, length=60)
scripts/inference_long.py:141
↓ 1 callersFunctioncvt_tform_mat_for_cv2
Function: ---------- Convert Transform Matrix 'trans' into 'cv2_trans' which could be directly used by cv2.warpAffine():
facelib/detection/matlab_cp2tform.py:170
↓ 1 callersFunctiondecode
Decode locations from predictions using priors to undo the encoding we did for offset regression at train time. Args: loc (tensor): lo
facelib/detection/retinaface/retinaface_utils.py:254
↓ 1 callersFunctiondecode_landm
Decode landm from predictions using priors to undo the encoding we did for offset regression at train time. Args: pre (tensor): landm
facelib/detection/retinaface/retinaface_utils.py:274
↓ 1 callersMethoddecode_latents
Decode the latents to produce a video. Parameters: latents (torch.Tensor): The latents to be decoded. Returns:
hallo/animate/face_animate.py:222
↓ 1 callersMethoddecode_latents
Decode the given latents to video frames. Parameters: latents (torch.Tensor): The latents to be decoded. Shape: (batch_size,
hallo/animate/face_animate_static.py:169
↓ 1 callersFunctiondict2str
dict to string for printing options. Args: opt (dict): Option dict. indent_level (int): Indent level. Default: 1. Return:
basicsr/utils/options.py:90
↓ 1 callersMethoddist_validation
(self, dataloader, current_iter, tb_logger, save_img)
basicsr/models/sr_model.py:131
↓ 1 callersFunctionencode
Encode the variances from the priorbox layers into the ground truth boxes we have matched (based on jaccard overlap) with the prior boxes. Arg
facelib/detection/retinaface/retinaface_utils.py:200
↓ 1 callersFunctionencode_landm
Encode the variances from the priorbox layers into the ground truth boxes we have matched (based on jaccard overlap) with the prior boxes. Arg
facelib/detection/retinaface/retinaface_utils.py:224
↓ 1 callersFunctionextract_audio_from_videos
Extract audio from a video file and save it as a WAV file. This function uses ffmpeg to extract the audio stream from a given video file and
hallo/utils/util.py:900
↓ 1 callersFunctionextract_meta_info
Extract meta information for a given video file. Args: video_path (str): The path to the video file. Returns: dict: A d
scripts/extract_meta_info_stage2.py:80
↓ 1 callersMethodfeed_data
(self, data)
basicsr/models/codeformer_temporal_model.py:18
↓ 1 callersMethodfeed_data
(self, data)
basicsr/models/vqgan_model.py:17
↓ 1 callersFunctionfilter_non_none
Filters out key-value pairs from the given dictionary where the value is None. Args: dict_obj (Dict): The dictionary to be filtered.
hallo/utils/config.py:8
↓ 1 callersFunctionfindSimilarity
(uv, xy, options=None)
facelib/detection/matlab_cp2tform.py:94
↓ 1 callersMethodforward
(self)
facelib/detection/retinaface/retinaface_utils.py:19
↓ 1 callersMethodforward
(self, x)
facelib/detection/yolov5face/models/yolo.py:120
↓ 1 callersMethodforward_once
(self, x)
facelib/detection/yolov5face/models/yolo.py:123
↓ 1 callersMethodfuse
(self)
facelib/detection/yolov5face/models/yolo.py:149
↓ 1 callersFunctionfuse_conv_and_bn
(conv, bn)
facelib/detection/yolov5face/utils/torch_utils.py:5
↓ 1 callersFunctionfused_leaky_relu
(input, bias, negative_slope=0.2, scale=2**0.5)
basicsr/ops/fused_act/fused_act.py:88
↓ 1 callersFunctiongenerate_config
(network_name)
facelib/detection/retinaface/retinaface.py:19
↓ 1 callersFunctiongenerate_gaussian_kernel
Generate Gaussian kernel used in `duf_downsample`. Args: kernel_size (int): Kernel size. Default: 13. sigma (float): Sigma of the
basicsr/data/data_util.py:259
↓ 1 callersFunctiongenerate_mask
(H, W, img=None)
basicsr/data/data_util.py:321
↓ 1 callersMethodget
(self, filepath, client_key='default')
basicsr/utils/file_client.py:158
↓ 1 callersFunctionget_affine_transform_matrix
Function: ---------- get affine transform matrix 'tfm' from src_pts to dst_pts Parameters: ---------- @src_pts: Kx2 n
facelib/detection/align_trans.py:112
↓ 1 callersMethodget_audio
(self)
basicsr/utils/video_util.py:60
↓ 1 callersFunctionget_background_mask
Read an image, invert its values, and save the result. Parameters: file_path (str): Path to the input image file. output_dir (str):
hallo/utils/util.py:657
↓ 1 callersFunctionget_center_face
(det_faces, h=0, w=0, center=None)
facelib/utils/face_restoration_helper.py:41
↓ 1 callersFunctionget_confirm_token
(response)
basicsr/utils/download_util.py:41
↓ 1 callersMethodget_current_learning_rate
(self)
basicsr/models/base_model.py:167
↓ 1 callersMethodget_current_log
(self)
basicsr/models/base_model.py:60
↓ 1 callersMethodget_current_visuals
(self)
basicsr/models/sr_model.py:196
↓ 1 callersMethodget_current_visuals
(self)
basicsr/models/codeformer_temporal_model.py:226
↓ 1 callersMethodget_current_visuals
(self)
basicsr/models/vqgan_model.py:273
↓ 1 callersFunctionget_env_info
Get environment information. Currently, only log the software version.
basicsr/utils/logger.py:145
↓ 1 callersMethodget_face_landmarks_5
(self, only_keep_largest=False, only_center_face=Fal
facelib/utils/face_restoration_helper.py:197
↓ 1 callersMethodget_face_landmarks_5_dlib
(self, only_keep_largest=False, scale=1)
facelib/utils/face_restoration_helper.py:165
↓ 1 callersMethodget_fps
(self)
basicsr/utils/video_util.py:55
↓ 1 callersMethodget_frame_from_stream
(self)
basicsr/utils/video_util.py:66
↓ 1 callersFunctionget_git_hash
()
basicsr/setup.py:21
↓ 1 callersFunctionget_hash
()
basicsr/setup.py:46
↓ 1 callersMethodget_inverse_affine
Get inverse affine matrix.
facelib/utils/face_restoration_helper.py:354
↓ 1 callersFunctionget_landmark
This function takes a file as input and returns the facial landmarks detected in the file. Args: file (str): The path to the file co
hallo/utils/util.py:397
↓ 1 callersFunctionget_landmark_overframes
This function iterate frames and returns the facial landmarks detected in each frame. Args: landmark_model: mediapipe landmark model
hallo/utils/util.py:428
↓ 1 callersFunctionget_mask
Generate a face mask based on the given landmarks and save it to the specified cache directory. Args: file (str): The path to the fi
hallo/utils/util.py:543
↓ 1 callersFunctionget_noise_scheduler
Create noise scheduler for training Args: cfg (omegaconf.dictconfig.DictConfig): Configuration object. Returns: train n
scripts/train_stage1.py:157
↓ 1 callersFunctionget_noise_scheduler
Create noise scheduler for training. Args: cfg (argparse.Namespace): Configuration object. Returns: Tuple[DDIMScheduler
scripts/train_stage2_long.py:207
↓ 1 callersFunctionget_position_from_periods
Get the position from a period list. It will return the index of the right-closest number in the period list. For example, the cumulative_per
basicsr/models/lr_scheduler.py:36
↓ 1 callersFunctionget_requirements
(filename='requirements.txt')
basicsr/setup.py:111
↓ 1 callersFunctionget_sep_face_mask
Read two images, subtract the second one from the first, and save the result. Parameters: output_dir (str): Path to the output directory
hallo/utils/util.py:684
↓ 1 callersFunctionget_similarity_transform_for_cv2
Function: ---------- Find Similarity Transform Matrix 'cv2_trans' which could be directly used by cv2.warpAffine():
facelib/detection/matlab_cp2tform.py:198
↓ 1 callersMethodget_target_label
Get target label. Args: input (Tensor): Input tensor. target_is_real (bool): Whether the target is real or fake.
basicsr/losses/losses.py:347
↓ 1 callersFunctionget_union_face_mask
Generate a face mask based on the given landmarks. Args: landmarks (numpy.ndarray): The landmarks of the face. height (int):
hallo/utils/util.py:525
↓ 1 callersFunctionget_union_lip_mask
Extracts the lip region from the given landmarks and saves it as an image. Parameters: landmarks (numpy.ndarray): Array of facial la
hallo/utils/util.py:479
↓ 1 callersFunctionget_version
()
basicsr/setup.py:78
↓ 1 callersFunctionget_video_meta_info
(video_path)
basicsr/utils/video_util.py:17
↓ 1 callersFunctionget_video_paths
Get paths of videos to process, partitioned for parallel processing. Args: source_dir (Path): Source directory containing videos.
scripts/data_preprocess.py:148
↓ 1 callersFunctionget_video_paths
Get a list of video paths from the root path with the specified extensions. Args: root_path (Path): The root directory containing vi
scripts/extract_meta_info_stage2.py:37
↓ 1 callersFunctiongpu_is_available
()
basicsr/utils/misc.py:15
↓ 1 callersFunctionimfrombytes
Read an image from bytes. Args: content (bytes): Image bytes got from files or other streams. flag (str): Flags specifying the co
basicsr/utils/img_util.py:114
↓ 1 callersMethodinference
(self, x, w=0, detach_16=True, adain=False)
basicsr/archs/codeformer_arch.py:311
↓ 1 callersFunctioninference_process
Perform inference processing. Args: args (argparse.Namespace): Command-line arguments. This function initializes the configurat
scripts/inference_long.py:164
↓ 1 callersMethodinit_dlib
Initialize the dlib detectors and predictors.
facelib/utils/face_restoration_helper.py:153
↓ 1 callersFunctioninit_loggers
(opt)
basicsr/train.py:55
↓ 1 callersMethodinit_offset
(self)
basicsr/ops/dcn/deform_conv.py:277
↓ 1 callersFunctioninit_parsing_model
(model_name='bisenet', half=False, device='cuda')
facelib/parsing/__init__.py:8
↓ 1 callersFunctioninit_retinaface_model
(model_name, half=False, device='cuda')
facelib/detection/__init__.py:25
↓ 1 callersFunctioninit_tb_logger
(log_dir)
basicsr/utils/logger.py:78
← previousnext →201–300 of 805, ranked by callers