RUB-SysSec / GANDCTAnalysis

Code for the ICML 2020 paper: Leveraging Frequency Analysis for Deep Fake Image Recognition.
MIT License
176 stars 24 forks source link

About DCT spectrum #24

Open legion-s opened 2 years ago

legion-s commented 2 years ago

Firstly,in the 'README.md' file, you note FFHQ is distributed in a cropped version, how to crop FFHQ image?Can you give me a code to process it. Secondly,when i use ‘compute_statistics.py’ file to generate DCT spectrum of a data set sampled from StyleGAN trained on FFHQ,i can not spot visible artifacts for the generated images. I don't know if there is something wrong with me,can you give me some advice?

zzzucf commented 1 year ago

"I can not spot visible artifacts for the generated images", me too. Please advise.

I download the pytorch version of stylegan and use Nvidia FFHQ pretrained model to generate 10,000 images. After running the 'compute_statistics.py', I observed a very smooth spectrum without any artifacts.

516396859 commented 1 year ago

Poor generalization, waste of time

Joool commented 1 year ago

I download the pytorch version of stylegan and use Nvidia FFHQ pretrained model to generate 10,000 images. After running the 'compute_statistics.py', I observed a very smooth spectrum without any artifacts.

The original plots where made using the tensorflow version of StyleGAN I1). PyTorch might implement the upsampling techniques differently (see https://openaccess.thecvf.com/content/CVPR2022/html/Parmar_On_Aliased_Resizing_and_Surprising_Subtleties_in_GAN_Evaluation_CVPR_2022_paper.html).

BTW just because humans cannot see differences anymore, this does not mean that classifiers do not find it useful. Several newer works still use similar techniques (https://ojs.aaai.org/index.php/AAAI/article/view/19954).

Joool commented 1 year ago

Poor generalization, waste of time

The paper is three years old at this stage. Obviously newer models have adapted. See for example StyleGAN3 which specifically addressed upsampling problems..