Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeepFake Test Fail #3

Open
miracleyoo opened this issue Mar 9, 2020 · 3 comments
Open

DeepFake Test Fail #3

miracleyoo opened this issue Mar 9, 2020 · 3 comments

Comments

@miracleyoo
Copy link

Hello!

I noticed this great repo when I'm working on Kaggle deepfake competition. I tried to test this model, which is supposed to be generalizable, on some training set. But the model will output near 0% for both fake and real images.

I tried both whole frames and only cropped faces as input, the output keeps 0. In order to make sure I load and use the model properly, I tested on the example fake and real images in this repo. They work properly, the outputs are 1 and 0.

image

Here is an example of the deepfake video:

image

It is apparently a fake face, but the output keeps 0. I'm a little confused about this.

Thanks a lot!

@PeterWang512
Copy link
Owner

Would you mind checking that if the dimension of the detected face is less than 256 pixels? For the deepfake images, we noticed that most crops are less than 256 pixels, which are too small for our model's input, so we resized all detected face into 256 pixels then pass them into the model to get our results.

@yangcf10
Copy link

yangcf10 commented Apr 3, 2020

Hi, I am facing similar issues.
When dealing with deepfake video, I first crop the detected face region (a typical size is 110x110), and then use this transform:
trans = transforms.Compose([
transforms.Resize(256),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
])

However, the output probability is almost zero all the time. I am not sure which part I did wrong.

@PeterWang512
Copy link
Owner

This is interesting, thanks for letting us know! Would you mind testing the raw frames in the Faceforensics++ dataset and see if it works? We were testing on the validation set of Faceforensics++ (raw frames), and cropped the face using faced (https://github.com/iitzco/faced) to get our results in the paper. I'll test our model on the compressed version (c23, c40) and see if it works as well. If it doesn't, I'll suspect our model does not generalize to MPEG artifacts, which were not included in our data augmentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants