Giter VIP home page Giter VIP logo

pcl-i2g's Introduction

Hi, I'm Jhao-Ting (Jack) Chen

Specialized in C/C++, Python, Cloud Infrastructure, Parallel Programming
  • 🌱 I’m currently a master's student at Carnegie Mellon University
  • πŸ‘― Worked at AWS, Microsoft and Logitech as Software Intern
  • πŸ“« How to reach me [email protected]

Β jtchen0528

pcl-i2g's People

Contributors

jtchen0528 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pcl-i2g's Issues

Mask size error

Thanks for your work! I'm trying to conduct experiments on the settings of
----------------- Options ---------------
batch_size: 32
beta1: 0.9
checkpoints_dir: ./checkpoints
display_freq: 1000
fake_class_id: 0
fake_im_path: ./dataset\DF
fineSize: 224
gpu_ids: [0] [default: 0]
help: None [default: ==SUPPRESS==]
init_type: xavier
isTrain: True [default: None]
lbda: 10
loadSize: 256
load_model: False
lr: 0.001
lr_policy: constant
max_dataset_size: inf
max_epochs: None
model: patch_inconsistency_discriminator
nThreads: 0
name: patch_inconsistency_discriminator_resnet34_layer4_extra3_size224 [default: ]
overwrite_config: True [default: False]
patience: 10
prefix:
print_freq: 100
real_im_path: ./dataset\original
results_dir: ./results/
save_epoch_freq: 100
save_latest_freq: 1000
seed: 0
suffix:
which_epoch: latest
which_model_netD: resnet34_layer4_extra3
----------------- End -------------------
However, during the training process, i run into this issuse:
File "D:\pythonProject\PCL-I2G\models\patch_inconsistency_discriminator_model.py", line 85, in compute_losses_D
masks = self.mask_down_sampling(masks).reshape(n, h, w)
RuntimeError: shape '[32, 14, 14]' is invalid for input of size 8192

Could you please give me some advice on how to solve this? Thank!

How can I find the original real images?

Excuse me,could you please tell me how I can find the original real images?how can I use the FaceForensics++?And I don't know why I need extract frames from videos (with ffmpeg) at the first step of preprocessing. Thank you!

Are the results the same as those in the original paper?

Hello, thanks for your code implementation. I believe the results of in-domain (train and test data from the same dataset) in the original paper are correct, while the out-of-domain (train and test data from different datasets) results are too suprising to me. Previous works, which uses temporal information, can achieve about 0.7-0.8 AUC in CDF (up to ICCV 2021). I really hope that you can answer my question after some experiment.

By the way, few researchers can afford the raw version of FF++ videos : ).

Missing code for generating FF++dataset mask

I trained a model using the I2G dataset, but the AUC was very low. The paper states that it is necessary to mix the FF++dataset with the I2G dataset for training.
The paper states that”The first type is the deepfake video frame from the existing deepfake datasets, for which we find the corresponding real video frame and compute the structural dissimilarity (DSSIM) [60] between them. The mask M is then generated by taking a Gaussian blur of DSSIM followed by thresholding.β€œ
However, it seems that this part of the code is not provided in the paper, resulting in the FF+dataset not having a mask. Can you provide guidance.

Would you give me an advice of 'masks' of input images?

I have trained a model, named 'PCL-I2G-FF256-32frames-Modified-5e-5'. When I run the test.py with this setting below:

/public/user/anaconda3/envs/PCL-I2G/bin/python3.7 test.py --which_epoch bestval --gpu_ids 0 --partition test --average_mode after_softmax --topn 100 --force_redo --dataset_name FF-DF --real_im_path /data-x/g16/user/outputdir/original/test/ --fake_im_path /data-x/g16/user/outputdir/F2F/test/ --train_config /public/user/PCL-I2G/checkpoints_back/PCL-I2G-FF256-32frames-Modified-5e-5/opt.yml --checkpoints_dir /public/user/PCL-I2G/checkpoints_back/

an error is reported. It looks like I need a mask as an input for testing images.

Traceback (most recent call last):
  File "test.py", line 257, in <module>
    run_eval(opt, output_dir)
  File "test.py", line 62, in run_eval
    model.set_input(inputs)
  File "/public/user/PCL-I2G/models/patch_inconsistency_discriminator_model.py", line 66, in set_input
    self.masks = input['masks'].to(self.device)
KeyError: 'masks'

Would you tell me how to get the mask of testing images? Thanks.

I2G DATA

Hi, can you share I2G dataset from FF++, because I meet some errors, but I only want the dataset to train my model, thanks. email is [email protected]

Low AUC in FF-DF

Hi! I re-train a new PCL model by following your codes. The training data is only I2G data. However, the AUC of FF-DF is only 0.5. It seems like that the trained model has no ability of generalization. I have checked the log file, which shows that loss_D is 1.1+ and acc_D is 1.0 in the training phase, but loss_D and acc_D in the validation phase are 17+ and 0.5, respectively. I have no idea about the reason of that. Would you like to give me some suggestions about this problem? Maybe the generated I2G data or some possible errors? And would you like to provide your trained weight of PCL? My email is [email protected]. Thanks you a lot~

About Pre-process

100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 70/70 [00:00<00:00, 69955.03it/s]

after this ,my out file has only empty folder ,no image or mask

Generation of I2G data error

Excuse me, when I try to generate I2G data with
python3 generate_I2G.py --real_im_pa dataset --batch_size 512 --out_size 256 --output_dir out
with FF++ dataset, the following error occurs The following error occurs.
The data used is a frame of a real image extracted from the FF++ dataset.
Do you know what the cause is?

-----error-----
ValueError: Sample larger than population or is negative

Could you please give me some advice on how to solve this? Thank!

About Pre-processing

Dear ,
I want to ask about Pre-processing part
the second step:
Download dlib landmark predictor
How to use this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.