MCPcopy Create free account

hub / github.com/TMElyralab/MuseTalk / functions

Functions394 in github.com/TMElyralab/MuseTalk

↓ 1 callersFunctioncompression_ratio
(text)
musetalk/whisper/whisper/utils.py:26
↓ 1 callersFunctionconvert_video
Convert video files to a specified format and save them to the destination path. Parameters: org_path (str): The directory containing th
scripts/preprocess.py:78
↓ 1 callersFunctioncosine_loss
(a, v, y)
musetalk/loss/syncnet.py:8
↓ 1 callersMethodcrop_audio_window
Crop audio window Args: spec: Spectrogram start_frame_num: Starting frame number fps: Frames per
musetalk/data/dataset.py:230
↓ 1 callersFunctiondecode
Decode locations from predictions using priors to undo the encoding we did for offset regression at train time. Args: loc (tensor): lo
musetalk/utils/face_detection/detection/sfd/bbox.py:91
↓ 1 callersFunctiondelete_additional_ckpt
(base_path, num_keep)
musetalk/utils/utils.py:245
↓ 1 callersMethoddetect_from_batch
(self, images)
musetalk/utils/face_detection/detection/sfd/sfd_detector.py:41
↓ 1 callersMethoddetect_from_image
Detects faces in a given image. This function detects the faces present in a provided BGR(usually) image. The input can be either the
musetalk/utils/face_detection/detection/core.py:32
↓ 1 callersMethoddistance2bbox
(self, points, distance, max_shape=None)
musetalk/utils/face_detection/api.py:217
↓ 1 callersFunctiondownload_model
()
app.py:131
↓ 1 callersMethoddynamic_margin_crop
Dynamically crop image with dynamic margin Args: img: Input image original_bbox: Original bounding box
musetalk/data/dataset.py:113
↓ 1 callersFunctionexact_div
(x, y)
musetalk/whisper/whisper/utils.py:5
↓ 1 callersFunctionextract_audio
Extract audio from video files and save as WAV format. Parameters: org_path (str): The directory containing the original video files.
scripts/preprocess.py:134
↓ 1 callersMethodfinalize
Finalize search and return the final candidate sequences Parameters ---------- tokens : Tensor, shape = (n_audio, n_group, cu
musetalk/whisper/whisper/decoding.py:228
↓ 1 callersMethodforward
(self, x)
musetalk/utils/face_detection/models.py:174
↓ 1 callersFunctiongenerate_train_list
(cfg)
scripts/preprocess.py:192
↓ 1 callersMethodget_audio_embed
(self, audio_sequences)
musetalk/models/syncnet.py:62
↓ 1 callersMethodget_audio_file
Get audio file features Args: wav_path: Audio file path start_index: Starting index Retu
musetalk/data/dataset.py:163
↓ 1 callersMethodget_audio_file_mel
Get mel spectrogram of audio file Args: wav_path: Audio file path start_index: Starting index
musetalk/data/dataset.py:198
↓ 1 callersFunctionget_bbox_range
(img_list,upperbondrange =0)
musetalk/utils/preprocessing.py:43
↓ 1 callersFunctionget_closed_mouth
(landmarks_list,ascending=True,top_k=50)
musetalk/data/sample_method.py:33
↓ 1 callersFunctionget_image_blending
(image, face, face_box, mask_array, crop_box)
musetalk/utils/blending.py:96
↓ 1 callersMethodget_image_embed
(self, image_sequences)
musetalk/models/syncnet.py:52
↓ 1 callersFunctionget_image_prepare_material
(image, face_box, upper_boundary_ratio=0.5, expand=1.5, fp=None, mode="raw")
musetalk/utils/blending.py:112
↓ 1 callersMethodget_mask_tensor
Creates a mask tensor for image processing. :return: A mask tensor.
musetalk/models/vae.py:40
↓ 1 callersFunctionget_mouth_region
(frames, image_pred, pixel_values_face_mask)
musetalk/utils/utils.py:102
↓ 1 callersMethodget_params
(self)
musetalk/utils/face_parsing/model.py:262
↓ 1 callersMethodget_params
(self)
musetalk/utils/face_parsing/resnet.py:90
↓ 1 callersMethodget_resized_mouth_mask
( self, img_resized, landmark_array, face_shape, padding_pixel_mou
musetalk/data/dataset.py:258
↓ 1 callersFunctionget_src_idx
Calculate the source index (src_idx) based on the given drive index, T, s, e, and sampling method. Parameters: - drive_idx (
musetalk/data/sample_method.py:147
↓ 1 callersFunctionget_sync_loss
( audio_embed, gt_frames, pred_frames, syncnet, adapted_weight, frames_left_index=
musetalk/loss/syncnet.py:15
↓ 1 callersMethodget_syncnet_input
Get SyncNet input features Args: video_path: Video file path Returns: ndarray: SyncNet i
musetalk/data/dataset.py:245
↓ 1 callersMethodimage_preprocess
(self)
musetalk/utils/face_parsing/__init__.py:71
↓ 1 callersMethodinference
(self, audio_path, out_vid_name, fps, skip_save_images)
scripts/realtime_inference.py:239
↓ 1 callersMethodinit
(self)
scripts/realtime_inference.py:87
↓ 1 callersMethodinit_weight
(self)
musetalk/utils/face_parsing/model.py:31
↓ 1 callersMethodinit_weight
(self)
musetalk/utils/face_parsing/model.py:49
↓ 1 callersMethodinit_weight
(self)
musetalk/utils/face_parsing/model.py:85
↓ 1 callersMethodinit_weight
(self)
musetalk/utils/face_parsing/model.py:127
↓ 1 callersMethodinit_weight
(self)
musetalk/utils/face_parsing/model.py:162
↓ 1 callersMethodinit_weight
(self)
musetalk/utils/face_parsing/model.py:212
↓ 1 callersMethodinit_weight
(self)
musetalk/utils/face_parsing/model.py:256
↓ 1 callersMethodinit_weight
(self, model_path)
musetalk/utils/face_parsing/resnet.py:82
↓ 1 callersFunctioninitialize_dataloaders
Initialize training and validation dataloaders
musetalk/utils/training_utils.py:144
↓ 1 callersFunctioninitialize_loss_functions
Initialize loss functions and discriminators
musetalk/utils/training_utils.py:201
↓ 1 callersFunctioninitialize_models_and_optimizers
Initialize models and optimizers
musetalk/utils/training_utils.py:48
↓ 1 callersFunctioninitialize_syncnet
Initialize SyncNet model
musetalk/utils/training_utils.py:251
↓ 1 callersFunctioninitialize_vgg
Initialize VGG model
musetalk/utils/training_utils.py:272
↓ 1 callersMethodinstall_kv_cache_hooks
The `MultiHeadAttention` module optionally accepts `kv_cache` which stores the key and value tensors calculated for the previous posi
musetalk/whisper/whisper/model.py:256
↓ 1 callersFunctionis_valid_image
(file)
app.py:339
↓ 1 callersFunctionload_audio
Open an audio file and read as mono waveform, resampling as necessary Parameters ---------- file: str The audio file to open
musetalk/whisper/whisper/audio.py:22
↓ 1 callersFunctionload_state_dict
Set parameters converted from Caffe models authors of VGGFace2 provide. See https://www.robots.ox.ac.uk/~vgg/data/vgg_face2/. Arguments:
musetalk/loss/vgg_face.py:21
↓ 1 callersFunctionlog_mel_spectrogram
Compute the log-Mel spectrogram of Parameters ---------- audio: Union[str, np.ndarray, torch.Tensor], shape = (*) The path t
musetalk/whisper/whisper/audio.py:92
↓ 1 callersFunctionmain
(cfg)
train.py:50
↓ 1 callersFunctionmain
(cfg)
scripts/preprocess.py:293
↓ 1 callersFunctionmain
(args)
scripts/inference.py:31
↓ 1 callersMethodmake_anchors
Generate anchors from features.
musetalk/utils/face_detection/api.py:106
↓ 1 callersMethodmel_feature_extractor
Extract mel spectrogram features Args: audio_input: Input audio Returns: ndarray: Mel sp
musetalk/data/dataset.py:218
↓ 1 callersFunctionmel_filters
load the mel filterbank matrix for projecting STFT into a Mel spectrogram. Allows decoupling librosa dependency; saved using: np.sav
musetalk/whisper/whisper/audio.py:77
↓ 1 callersMethodmodel_init
(self, resnet_path='./models/face-parse-bisent/resnet18-5c106cde.pth',
musetalk/utils/face_parsing/__init__.py:59
↓ 1 callersFunctionnum_frames
Compute number of time frames of spectrogram
musetalk/data/audio.py:97
↓ 1 callersMethodoutput
(result: Union[str, int])
musetalk/whisper/whisper/normalizers/english.py:171
↓ 1 callersFunctionpad_or_trim
Pad or trim the audio array to N_SAMPLES, as expected by the encoder.
musetalk/whisper/whisper/audio.py:52
↓ 1 callersMethodpost_process
(self, preds, scale_h, scale_w, padh, padw)
musetalk/utils/face_detection/api.py:161
↓ 1 callersMethodpostprocess
(self, s: str)
musetalk/whisper/whisper/normalizers/english.py:410
↓ 1 callersFunctionprocess_and_save_images
( batch, image_pred, image_pred_infer, save_dir, global_step, accelerator, num_im
musetalk/utils/utils.py:270
↓ 1 callersFunctionprocess_bbox_musetalk
(face_array, landmark_array)
musetalk/data/sample_method.py:95
↓ 1 callersMethodprocess_words
(self, words: List[str])
musetalk/whisper/whisper/normalizers/english.py:160
↓ 1 callersMethodqkv_attention
(self, q: Tensor, k: Tensor, v: Tensor, mask: Optional[Tensor] = None)
musetalk/whisper/whisper/model.py:88
↓ 1 callersMethodrank
Given a list of groups of samples and their cumulative log probabilities, return the indices of the samples in each group to select a
musetalk/whisper/whisper/decoding.py:165
↓ 1 callersMethodrearrange_kv_cache
Update the key-value cache according to the updated beams
musetalk/whisper/whisper/decoding.py:123
↓ 1 callersFunctionremove_symbols_and_diacritics
Replace any other markers, symbols, and punctuations with a space, and drop any diacritics (category 'Mn' and some manual mappings)
musetalk/whisper/whisper/normalizers/basic.py:27
↓ 1 callersMethodreset
Initialize any stateful variables for decoding a new sequence
musetalk/whisper/whisper/decoding.py:200
↓ 1 callersMethodresize_image
(self, srcimg, keep_ratio=True)
musetalk/utils/face_detection/api.py:125
↓ 1 callersFunctionsave_checkpoint
(model, save_dir, ckpt_num, name="appearance_net", total_limit=None, logger=None)
musetalk/utils/utils.py:206
↓ 1 callersFunctionseed_everything
(seed)
musetalk/utils/utils.py:260
↓ 1 callersFunctionsegment_video
Segment video files into smaller clips of specified duration. Parameters: org_path (str): The directory containing the original video fi
scripts/preprocess.py:107
↓ 1 callersFunctionshift_landmarks_to_face_coordinates
Translates the data in landmark_list to the coordinates of the cropped larger face. Parameters: landmark_list (list): A list
musetalk/data/sample_method.py:111
↓ 1 callersFunctionshuffle_lr
Shuffle the points left-right according to the axis of symmetry of the object. Arguments: parts {torch.tensor} -- a 3D or 4D object c
musetalk/utils/face_detection/utils.py:212
↓ 1 callersFunctionsinusoids
Returns sinusoids for positional embedding
musetalk/whisper/whisper/model.py:48
↓ 1 callersFunctionsplit_data
Split video files into training and validation sets based on val_list_hdtf. Parameters: video_files (List[str]): A list of video file na
scripts/preprocess.py:162
↓ 1 callersMethodtensor_or_path_to_ndarray
Convert path (represented as a string) or torch.tensor to a numpy.ndarray Arguments: tensor_or_path {numpy.ndarray, torch.tensor
musetalk/utils/face_detection/detection/core.py:116
↓ 1 callersFunctiontest_ffmpeg
(ffmpeg_path)
test_ffmpeg.py:5
↓ 1 callersFunctiontranscribe
Transcribe an audio file using Whisper Parameters ---------- model: Whisper The Whisper model instance audio: Union[str
musetalk/whisper/whisper/transcribe.py:19
↓ 1 callersFunctionvalidation
Validation function for model evaluation
musetalk/utils/training_utils.py:284
↓ 1 callersFunctionvideo2imgs
(vid_path, save_path, ext='.png', cut_frame=10000000)
scripts/realtime_inference.py:37
↓ 1 callersFunctionwrite_srt
Write a transcript to a file in SRT format. Example usage: from pathlib import Path from whisper.utils import write_srt
musetalk/whisper/whisper/utils.py:63
↓ 1 callersFunctionwrite_txt
(transcript: Iterator[dict], file: TextIO)
musetalk/whisper/whisper/utils.py:47
↓ 1 callersFunctionwrite_vtt
(transcript: Iterator[dict], file: TextIO)
musetalk/whisper/whisper/utils.py:52
FunctionIOU
(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2)
musetalk/utils/face_detection/detection/sfd/bbox.py:17
Method__call__
(self, image, size=(512, 512), mode="raw")
musetalk/utils/face_parsing/__init__.py:77
Method__call__
(self, s: str)
musetalk/whisper/whisper/normalizers/english.py:435
Method__call__
(self, s: str)
musetalk/whisper/whisper/normalizers/english.py:454
Method__call__
(self, s: str)
musetalk/whisper/whisper/normalizers/english.py:519
Method__call__
(self, s: str)
musetalk/whisper/whisper/normalizers/basic.py:60
Method__call__
Detect faces and keypoints in the given image. Parameters: im (np.ndarray): The input image. maxface (bool): Whether
scripts/preprocess.py:47
Method__getitem__
(self, idx)
musetalk/data/dataset.py:304
Method__init__
( self, unet: UNet2DConditionModel, )
musetalk/utils/training_utils.py:26
Method__init__
(self, feature_extractor_path="openai/whisper-tiny/")
musetalk/utils/audio_processor.py:12
Method__init__
(self, landmarks_type, network_size=NetworkSize.LARGE, device='cuda', flip_input=False, face_
musetalk/utils/face_detection/api.py:47
← previousnext →101–200 of 394, ranked by callers