HongguLiu / Deepfake-Detection

The Pytorch implemention of Deepfake Detection based on Faceforensics++
https://github.com/ondyari/FaceForensics
Apache License 2.0
293 stars 57 forks source link

How to download images for training? #31

Closed dawoodwasif closed 10 months ago

dawoodwasif commented 1 year ago

The text file you mentioned has a list of image paths and labels. However, the FaceForensics++ dataset only has videos. How do you obtain these images?

HongguLiu commented 1 year ago

We use two ways to obtain face from videos:

  1. python lib: dlib
  2. RetinaFace

Both can detect the faces from images.

dawoodwasif commented 1 year ago

Thanks for the reply. However, I am talking about the images that are sampled from the video. Do you extract images from each video and then extract the faces?

HongguLiu commented 1 year ago

yes. you can use cv2 to read the video, and extract the frames.

ucalyptus2 commented 1 year ago

@dawoodwasif u can use this file to split videos into images https://github.com/ondyari/FaceForensicsDataProcessing/blob/master/src/faceforensics_internal/scripts/extract_compressed_videos.py

and then to create crops of the faces, use any facial recognition network preferably dlib, retinaface, OpenFace etc