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

Easy to Use Request #7

Open
Konerusudhir opened this issue Sep 1, 2023 · 11 comments
Open

Easy to Use Request #7

Konerusudhir opened this issue Sep 1, 2023 · 11 comments

Comments

@Konerusudhir
Copy link

Konerusudhir commented Sep 1, 2023

Currently, the setup is divided into 2 steps.
Step 1: Copute_dire.sh to generate an DIRE image from Input image(Real or Fake) (Distributed computing on N GPUS)
Step 2: demo.py to generate probability from DIRE image.

This setup makes it very hard to test and use the model.

I think if we can simplify it to one batched function call to execute both steps will make the model more usable to other researchers or end users.

Example:
Create inference.py file which takes a directory as input and generates probabilities in a CSV file on a Single GPU or M2 Mac.

@RichardSunnyMeng
Copy link

Hi, have you already reproduced compute_dire.py on your dataset? I didn't see so significant reconstruction error...

@Konerusudhir
Copy link
Author

Hi, have you already reproduced compute_dire.py on your dataset? I didn't see so significant reconstruction error...

I tested it only for 4 images so far. I am planning on testing it with CIFAKE dataset in the coming days.
https://www.kaggle.com/datasets/birdy654/cifake-real-and-ai-generated-synthetic-images

@shanface33
Copy link

Hi, thanks for your comments. May I inquire about the time taken to generate DIRE for each image?

@Konerusudhir
Copy link
Author

It took 4.5 Seconds per image on T4 GPU. DIRE approach does not look practical for the production use case if it takes 4.5 seconds per image.

@shanface33
Copy link

Thank you so much for your quick response! I really appreciate it!

@happy-Moer
Copy link

Have you ever encountered this problem: ModuleNotFoundError: No module named 'mpi4py'
how can I slove this problem?
thanks in advance

@aditipanda
Copy link

aditipanda commented Jul 13, 2024

I used demo.py on raw (original, not DIRE-computed) fake and real images from my own dataset, and got strange results. The celebahq_sdv2 ckpt classifies everything as fake - even real images from FairFace dataset.

The lsun_adm and lsun_iddpm ckpts classify most real images as real, but also fake images as real. In fact, lsun_iddpm classifies all fake images as real images - 100%!

This compute_DIRE step seems compulsory to be done at our end to see the improvements with DIRE. But I shall follow what's suggested, and get back here.

@aditipanda
Copy link

aditipanda commented Jul 15, 2024

I used demo.py on raw (original, not DIRE-computed) fake and real images from my own dataset, and got strange results. The celebahq_sdv2 ckpt classifies everything as fake - even real images from FairFace dataset.

The lsun_adm and lsun_iddpm ckpts classify most real images as real, but also fake images as real. In fact, lsun_iddpm classifies all fake images as real images - 100%!

This compute_DIRE step seems compulsory to be done at our end to see the improvements with DIRE. But I shall follow what's suggested, and get back here.

So I ran compute_dire for CelebAHQ images - both Recons and DIRE, and strangely enough, the celebahqsdv2 ckpt classifies all these real images as fake! lsun-adm, lsun_iddpm and lsun_stylegan correctly classify real images but not the other three ckpts. Very strange as the celebahq checkpoint is trained on celebahq real dataset I presume?

@aditipanda
Copy link

aditipanda commented Jul 27, 2024

both R

I downloaded the celebAHQ dire images and ran test.py - got the same results as Table 3 of the paper.

But for computing dire for my own dataset, I am facing this problem #35 - someone pls help!

@XCQ001204
Copy link

在 T4 GPU 上,每张图像需要 4.5 秒。如果每张图像需要 4.5 秒,则 DIRE 方法对于生产用例来说似乎不切实际。

May I ask if you are using distributed training or training on a single GPU?anks very much!

@bGN5
Copy link

bGN5 commented Sep 14, 2024

It took 4.5 Seconds per image on T4 GPU. DIRE approach does not look practical for the production use case if it takes 4.5 seconds per image.

May I ask you :how you adjust the compute_dire.py to adapt one gpu . I could not be more appreciated if you are willing to send you changed code to my email 284204923@qq.com thanks very much

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

7 participants