First establish the environment and install the dependencies
conda create --prefix env/ python=3.8 -y
conda activate env/
pip install -r requirements.txt
Then download files from this link and put:
Obama2.zipandAPC_epoch_160.modelinsrc/face_generator/dataand extractObama2.zipthere.GPEN-BFR-512_trace.pt,RealESRGAN_x2plus_trace.pt, andRetinaFace-R50_trace.ptinsrc/face_res/models.wiki.zipinsrc/face_resand extract it there.00000189-checkpoint.pth.tarinsrc/face_reenactment/config.shape_predictor_68_face_landmarks.datinsrc/style_metrics.RAVDESS.zipin.and then extract it there.
Simply run
bash main.sh -i <image path> -a <audio path> -o <output path>The model only accepts audio with extension .wav or .mp3, and the image must be square.
For example with the given inputs folder, you run:
bash main.sh -i inputs/image.jpg -a inputs/sample.wav -o ./output- train (coming soon)