Skip to content

Commit

Permalink
bugs: fixed numpy version and remove unnecessary files in video-retal…
Browse files Browse the repository at this point in the history
…king
  • Loading branch information
shadowcun committed Jun 27, 2023
1 parent e2c82e1 commit 943a5b8
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ cd video-retalking
conda create -n video_retalking python=3.8
conda activate video_retalking
conda install ffmpeg
# Please follow the instructions from https://pytorch.org/get-started/previous-versions/
# This installation command only works on CUDA 11.1
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html
Expand Down
5 changes: 4 additions & 1 deletion inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
from PIL import Image
from scipy.io import loadmat

sys.path.append('third_part')
sys.path.insert(0, 'third_part')
sys.path.insert(0, 'third_part/GPEN')
sys.path.insert(0, 'third_part/GFPGAN')

# 3dmm extraction
from third_part.face3d.util.preprocess import align_img
from third_part.face3d.util.load_mats import load_lm3d
Expand Down
4 changes: 4 additions & 0 deletions inference_videoretalking.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python3 inference.py \
--face ./examples/face/1.mp4 \
--audio ./examples/audio/1.wav \
--outfile results/1_1.mp4
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ einops==0.4.1
facexlib==0.2.5
librosa==0.9.2
dlib==19.24.0
gradio>=3.7.0
gradio>=3.7.0
numpy==1.21.6
2 changes: 0 additions & 2 deletions third_part/GFPGAN/gfpgan/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# flake8: noqa
import sys
sys.path.append('third_part/GFPGAN')

from .archs import *
from .data import *
Expand Down
3 changes: 0 additions & 3 deletions third_part/GPEN/gpen_face_enhancer.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import cv2
import numpy as np

import sys
sys.path.append('third_part/GPEN')

######### face enhancement
from face_parse.face_parsing import FaceParse
from face_detect.retinaface_detection import RetinaFaceDetection
Expand Down

0 comments on commit 943a5b8

Please sign in to comment.