Skip to content

This is Unofficial Repo. Lips Don't Lie: A Generalisable and Robust Approach to Face Forgery Detection (CVPR 2021)

Notifications You must be signed in to change notification settings

alsgkals2/Lip-Extract

Repository files navigation

Lip-Extraction

This Repo contains the codes for extraction the landmark and lip

This is a PyTorch implementation by referreing LipForensics paper.

This is an Unofficially implemented codes with some Official code. I made this repo to use more conveniently.

If you want to see the Original code, You can cite this link

You should try the preprocessing, which steps are firstly getting landmarks and then cropping mouth.

Setup

Install packages

pip install -r requirements.txt

Note: we used Python version 3.8 to test this code.

Prepare data

  1. Follow the links below to download the datasets (you will be asked to fill out some forms before downloading):
  2. Extract the frames (e.g. using code in the FaceForensics++ repo.) The filenames of the frames should be as follows: 0000.png, 0001.png, ....
  3. Detect the faces and compute 68 face landmarks. From this step, see 4.1 section.

4. Running

4.1 Landmark Extraction

For extraction the landmark of faces, I referred RetinaFace and FAN for good results. The results are .json files

You can use easy_start_lip_extract.ipynb

4.2 Lip Extraction and Crop

This will write the mouth images into the corresponding cropped_mouths directory.

python preprocessing/crop_mouths.py --dataset all

About

This is Unofficial Repo. Lips Don't Lie: A Generalisable and Robust Approach to Face Forgery Detection (CVPR 2021)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published