MCPcopy Index your code
hub / github.com/MStypulkowski/diffused-heads

github.com/MStypulkowski/diffused-heads @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
28 symbols 81 edges 3 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Diffused Heads

Official repository for Diffused Heads: Diffusion Models Beat GANs on Talking-Face Generation (WACV 2024).

Project | Paper | Demo

Setup

Python 3.x environment with ffmpeg is needed. The rest of the requirements can be installed using:

pip install -r requirements.txt

Sampling

Due to LRW license agreement, we are only able to provide a checkpoint of our model trained on CREMA.

The entire test set generated by our method can be downloaded from here.

  1. Download and unpack checkpoints (our model and pretrained audio encoder).

  2. Download and unpack preprocessed CREMA video and audio files.

  3. Specify paths and options in config_crema.yaml (check comments in the file).

  4. Run the script

python sample.py

Using your own data

Audio

You can use audio recordings of your choosing freely. The only requirements are 16 kHz audio rate and a single audio channel. Please note our model is able to generate videos up to 9 seconds long depending on the audio.

Identity frame

It is highly recommended to use a frame from the provided CREMA videos. This instance of the model was trained on clips with green background only. If you want to use your identity frame anyway, please follow this repo for face alignment. Additionally, you may want to try segmenting the person and replacing background to green.

Training

The training code can be found in the branch train. We aplogize for the delay.

Citation

@inproceedings{stypulkowski2024diffused,
  title={Diffused heads: Diffusion models beat gans on talking-face generation},
  author={Stypu{\l}kowski, Micha{\l} and Vougioukas, Konstantinos and He, Sen and Zi{\k{e}}ba, Maciej and Petridis, Stavros and Pantic, Maja},
  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
  pages={5091--5100},
  year={2024}
}

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

Core symbols most depended-on inside this repo

expand
called by 8
diffusion.py
set_params
called by 2
diffusion.py
reset
called by 1
utils.py
get_audio_emb
called by 1
utils.py
get_id_frame
called by 1
utils.py
save_audio
called by 1
utils.py
save_video
called by 1
utils.py
load_image_to_torch
called by 1
utils.py

Shape

Method 14
Function 12
Class 2

Languages

Python100%

Modules by API surface

utils.py15 symbols
diffusion.py12 symbols
sample.py1 symbols

For agents

$ claude mcp add diffused-heads \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact