MCPcopy Create free account

hub / github.com/KlingAIResearch/LivePortrait / functions

Functions617 in github.com/KlingAIResearch/LivePortrait

↓ 81 callersMethodto
(self, device)
src/utils/dependencies/XPose/util/misc.py:404
↓ 69 callersMethodget
(self, img_bgr, **kwargs)
src/utils/face_analysis_diy.py:41
↓ 49 callersFunctionprint
(*args, **kwargs)
src/utils/dependencies/XPose/util/misc.py:519
↓ 29 callersMethodmax
(self)
src/utils/dependencies/XPose/util/misc.py:86
↓ 25 callersFunctionbasename
a/b/c.jpg -> c
src/utils/helper.py:60
↓ 23 callersMethodrun
(self, input_image, instance_text_prompt, keypoint_text_example, box_threshold, IoU_threshold)
src/utils/animal_landmark_runner.py:106
↓ 21 callersMethodupdate
(self, *args, **kwargs)
src/utils/dependencies/XPose/util/addict.py:103
↓ 20 callersFunctionmake_abs_path
(fn)
src/config/base_config.py:12
↓ 15 callersFunctionload_model
(ckpt_path, model_config, device, model_type)
src/utils/helper.py:131
↓ 13 callersMethod__init__
(self, dim)
src/modules/util.py:333
↓ 13 callersMethodget
(self, img, face)
src/utils/dependencies/insightface/model_zoo/landmark.py:80
↓ 12 callersMethodcopy
(self)
src/utils/dependencies/XPose/util/addict.py:90
↓ 12 callersFunctioninverse_sigmoid
(x, eps=1e-3)
src/utils/dependencies/XPose/util/misc.py:689
↓ 10 callersMethoddeepcopy
(self)
src/utils/dependencies/XPose/util/addict.py:93
↓ 9 callersFunctionget_rotation_matrix
the input is in degree
src/utils/camera.py:31
↓ 9 callersFunctionheadpose_pred_to_degree
pred: (bs, 66) or (bs, 1) or others
src/utils/camera.py:14
↓ 9 callersFunctionimages2video
(images, wfp, **kwargs)
src/utils/video.py:25
↓ 8 callersFunctionload_description
(fp)
src/utils/helper.py:175
↓ 7 callersFunction_get_activation_fn
Return an activation function given a string
src/utils/dependencies/XPose/models/UniPose/utils.py:177
↓ 7 callersMethodextract_feature_3d
get the appearance feature of the image by F x: Bx3xHxW, normalized to 0~1
src/live_portrait_wrapper.py:122
↓ 7 callersMethodget_kp_info
get the implicit keypoint information x: Bx3xHxW, normalized to 0~1 flag_refine_info: whether to trandform the pose to degrees and th
src/live_portrait_wrapper.py:131
↓ 7 callersMethodstitching
conduct the stitching kp_source: Bxnum_kpx3 kp_driving: Bxnum_kpx3
src/live_portrait_wrapper.py:253
↓ 7 callersMethodupdate_config
(self, user_args)
src/utils/cropper.py:88
↓ 6 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
src/utils/dependencies/XPose/models/UniPose/swin_transformer.py:17
↓ 6 callersFunctionadd_audio_to_video
(silent_video_path: str, audio_video_path: str, output_video_path: str)
src/utils/video.py:189
↓ 6 callersFunctionconcat_feat
kp_source: (bs, k, 3) kp_driving: (bs, k, 3) Return: (bs, 2k*3)
src/utils/helper.py:110
↓ 6 callersFunctionconcat_frames
(driving_image_lst, source_image_lst, I_p_lst)
src/utils/video.py:84
↓ 6 callersFunctioncontiguous
(obj)
src/utils/io.py:32
↓ 6 callersFunctionexec_cmd
(cmd)
src/utils/video.py:21
↓ 6 callersMethodget
(self, key)
src/utils/dependencies/XPose/models/registry.py:34
↓ 6 callersFunctionpaste_back
paste back the image
src/utils/crop.py:417
↓ 6 callersFunctionprepare_paste_back
prepare mask for later image paste back
src/utils/crop.py:410
↓ 6 callersFunctionresize_to_limit
ajust the size of the image so that the maximum dimension does not exceed max_dim, and the width and the height of the image are multiples of n.
src/utils/io.py:38
↓ 5 callersMethodcalc_combined_lip_ratio
(self, c_d_lip_i, source_lmk)
src/live_portrait_wrapper.py:328
↓ 5 callersFunctiondct2device
(dct: dict, device)
src/utils/helper.py:101
↓ 5 callersFunctionget_fps
(filepath, default_fps=25)
src/utils/video.py:138
↓ 5 callersFunctionload_video
(video_info, n_frames=-1)
src/utils/io.py:19
↓ 5 callersFunctionpad
(image, target, padding)
src/utils/dependencies/XPose/transforms.py:213
↓ 5 callersMethodparse_output
construct the output as standard return: 1xHxWx3, uint8
src/live_portrait_wrapper.py:300
↓ 5 callersMethodprepare_videos
construct the input as standard imgs: NxBxHxWx3, uint8
src/live_portrait_wrapper.py:104
↓ 5 callersMethodretarget_lip
kp_source: BxNx3 lip_close_ratio: Bx2 Return: Bx(3*num_kp)
src/live_portrait_wrapper.py:227
↓ 5 callersFunctionsmooth
(x_d_lst, shape, device, observation_variance=3e-7, process_variance=1e-5)
src/utils/filter.py:8
↓ 5 callersFunctionupdate_args
update the args according to user inputs
src/gradio_pipeline.py:28
↓ 5 callersMethodwarp_decode
get the image after the warping of the implicit keypoints feature_3d: Bx32x16x64x64, feature volume kp_source: BxNx3 kp_drivi
src/live_portrait_wrapper.py:276
↓ 5 callersMethodwrite
(self, image)
src/utils/video.py:122
↓ 4 callersMethod__init__
(self, d_model=256, nhead=8, num_encoder_layers=6, num_decoder_layers=6, dim_feedforward=1024
src/utils/dependencies/XPose/models/UniPose/transformer_deformable.py:26
↓ 4 callersMethod__init__
_summary_ Args: encoder_layer (_type_): _description_ num_layers (_type_): _description_ norm (_type_, op
src/utils/dependencies/XPose/models/UniPose/deformable_transformer.py:527
↓ 4 callersMethod__setattr__
(self, name, value)
src/utils/dependencies/XPose/util/config.py:332
↓ 4 callersMethod__setattr__
(self, name, value)
src/utils/dependencies/XPose/util/addict.py:25
↓ 4 callersFunction_get_clones
(module, N, layer_share=False)
src/utils/dependencies/XPose/models/UniPose/deformable_transformer.py:1135
↓ 4 callersMethod_hook
(cls, item)
src/utils/dependencies/XPose/util/addict.py:59
↓ 4 callersMethod_shape
(self, tensor: torch.Tensor, seq_len: int, bsz: int)
src/utils/dependencies/XPose/models/UniPose/fuse_modules.py:127
↓ 4 callersFunction_transform_img
conduct similarity or affine transformation to the image, do not do border operation! img: M: 2x3 matrix or 3x3 matrix dsize: target shap
src/utils/crop.py:19
↓ 4 callersMethodcalc_lmks_from_cropped_video
Tracking based landmarks/alignment
src/utils/cropper.py:285
↓ 4 callersMethodcalc_ratio
(self, lmk_lst)
src/live_portrait_wrapper.py:310
↓ 4 callersFunctioncheck_sha1
Check whether the sha1 hash of the file content matches the expected hash. Parameters ---------- filename : str Path to the file.
src/utils/dependencies/insightface/utils/download.py:10
↓ 4 callersMethodcrop_source_image
(self, img_rgb_: np.ndarray, crop_cfg: CropConfig)
src/utils/cropper.py:93
↓ 4 callersFunctionhas_audio_stream
Check if the video file contains an audio stream. :param video_path: Path to the video file :return: True if the video contains an audio
src/utils/video.py:151
↓ 4 callersMethodmake_motion_template
(self, I_lst, c_eyes_lst, c_lip_lst, **kwargs)
src/live_portrait_pipeline.py:41
↓ 4 callersFunctionmkdir
(d, log=False)
src/utils/helper.py:87
↓ 4 callersMethodprepare_source
construct the input as standard img: HxWx3, uint8, 256x256
src/live_portrait_wrapper.py:83
↓ 4 callersMethodtransform_keypoint
transform the implicit keypoints with the pose, shift, and expression deformation kp: BxNx3
src/live_portrait_wrapper.py:184
↓ 3 callersMethod__init__
(self, backbone, position_embedding)
src/utils/dependencies/XPose/models/UniPose/backbone.py:138
↓ 3 callersFunction_run
(command)
src/utils/dependencies/XPose/util/misc.py:349
↓ 3 callersFunction_transform_pts
conduct similarity or affine transformation to the pts pts: Nx2 ndarray M: 2x3 matrix or 3x3 matrix return: Nx2
src/utils/crop.py:36
↓ 3 callersMethodcalc_combined_eye_ratio
(self, c_d_eyes_i, source_lmk)
src/live_portrait_wrapper.py:320
↓ 3 callersFunctioncalc_eye_close_ratio
(lmk: np.ndarray, target_eye_ratio: np.ndarray = None)
src/utils/retargeting_utils.py:14
↓ 3 callersFunctioncalc_lip_close_ratio
(lmk: np.ndarray)
src/utils/retargeting_utils.py:23
↓ 3 callersFunctioncalculate_distance_ratio
(lmk: np.ndarray, idx1: int, idx2: int, idx3: int, idx4: int, eps: float = 1e-6)
src/utils/retargeting_utils.py:9
↓ 3 callersFunctioncrop
(image, target, region)
src/utils/dependencies/XPose/transforms.py:19
↓ 3 callersFunctioncrop_image
(img, pts: np.ndarray, **kwargs)
src/utils/crop.py:376
↓ 3 callersMethodcrop_source_video
Tracking based landmarks/alignment and cropping
src/utils/cropper.py:172
↓ 3 callersMethoddetect
(self, img, input_size = None, max_num=0, metric='default')
src/utils/dependencies/insightface/model_zoo/scrfd.py:220
↓ 3 callersFunctiondownload_file
Download an given URL Parameters ---------- url : str URL to download path : str, optional Destination path to store d
src/utils/dependencies/insightface/utils/download.py:36
↓ 3 callersMethodexecute
(self, args: ArgumentConfig)
src/live_portrait_pipeline.py:77
↓ 3 callersFunctionget_world_size
()
src/utils/dependencies/XPose/util/misc.py:535
↓ 3 callersMethodinference_ctx
(self)
src/live_portrait_wrapper.py:70
↓ 3 callersFunctionis_dist_avail_and_initialized
()
src/utils/dependencies/XPose/util/misc.py:527
↓ 3 callersFunctionis_image
(file_path)
src/utils/helper.py:70
↓ 3 callersFunctionis_square_video
(video_path)
src/utils/helper.py:181
↓ 3 callersFunctionis_video
(file_path)
src/utils/helper.py:75
↓ 3 callersFunctionl2norm
L2-normalize columns of X
src/utils/dependencies/XPose/models/UniPose/fuse_modules.py:40
↓ 3 callersFunctionload_image_rgb
(image_path: str)
src/utils/io.py:12
↓ 3 callersFunctionremove_ddp_dumplicate_key
(state_dict)
src/utils/helper.py:124
↓ 3 callersMethodretarget_eye
kp_source: BxNx3 eye_close_ratio: Bx3 Return: Bx(3*num_kp)
src/live_portrait_wrapper.py:214
↓ 3 callersMethodtic
(self)
src/utils/timer.py:18
↓ 3 callersMethodtoc
(self, average=True)
src/utils/timer.py:23
↓ 3 callersFunctiontrunc_normal_
(tensor, mean=0., std=1., a=-2., b=2.)
src/modules/util.py:441
↓ 3 callersFunctiontry_import
Try import specified package, with custom message support. Parameters ---------- package : str The name of the targeting package.
src/utils/dependencies/insightface/utils/filesystem.py:30
↓ 3 callersMethodwarmup
(self)
src/utils/face_analysis_diy.py:72
↓ 3 callersMethodwith_pos_embed
(tensor, pos)
src/utils/dependencies/XPose/models/UniPose/transformer_deformable.py:381
↓ 3 callersMethodwith_pos_embed
(tensor, pos)
src/utils/dependencies/XPose/models/UniPose/deformable_transformer.py:1047
↓ 2 callersMethod__delattr__
(self, name)
src/utils/dependencies/XPose/util/addict.py:74
↓ 2 callersMethod__init__
(self, input_feat_size, output_feat_size, dropout, do_ln=True)
src/utils/dependencies/XPose/models/UniPose/fuse_modules.py:14
↓ 2 callersMethod__init__
(self, num_pos_feats=64, temperature=10000, normalize=False, scale=None)
src/utils/dependencies/XPose/models/UniPose/position_encoding.py:29
↓ 2 callersMethod_freeze_stages
(self)
src/utils/dependencies/XPose/models/UniPose/swin_transformer.py:553
↓ 2 callersFunction_get_clones
(module, N)
src/utils/dependencies/XPose/models/UniPose/transformer_deformable.py:574
↓ 2 callersMethod_merge_a_into_b
merge dict `a` into dict `b` (non-inplace). values in `a` will overwrite `b`. copy first to avoid inplace modification
src/utils/dependencies/XPose/util/config.py:143
↓ 2 callersMethod_run
(self, inp)
src/utils/human_landmark_runner.py:56
↓ 2 callersMethodactvn
(self, x)
src/modules/util.py:316
next →1–100 of 617, ranked by callers