LeeDoYup / AnoGAN-tf

Unofficial Tensorflow Implementation of AnoGAN (Anomaly GAN)
MIT License
270 stars 92 forks source link

Higher Resolution Images #9

Closed adimukewar closed 5 years ago

adimukewar commented 6 years ago

Hi, I'm trying to use my own dataset, where I can't compromise much with the resolution of the image. Original resolution of the image being 800 x 800, I have tried reducing it up to 256 x 256, this still gives "ResourceExhaustedError". I'm using google colab for training the model which gives 16GB Tesla K80 GPU. Can you suggest anything for this?

LeeDoYup commented 5 years ago

Sorry for late reply. How did you try to resize the 800 x 800 images into 256 x 256? If you share the way you try, i can help you more.

LeeDoYup commented 5 years ago

First of all, original model transform the 256 x 256 images into 64 x 64.

adimukewar commented 5 years ago

I tried resizing the images directly by bilinear interpolation. I guess GAN's are not designed for working with the images of higher resolution. It worked fine with 128x128 resolution images but reducing the image to that size kills most of the key details in an image along with the anomalies. Can you suggest something that can be used to make GAN work with higher resolution images?

LeeDoYup commented 5 years ago

https://github.com/LeeDoYup/AnoGAN/blob/5900e3735b6ea8289bd348eea8a37ed07779388e/model.py#L334-L362

When you see the code, the number of parameters is decided by the size of input image.
You can decrease the number of parameters (for example the number of output channel of each convolutional layer), according to your memory resources.

If there is any bug in the codes, please tell and share freely.

lzzlxxlsz commented 5 years ago

Hello,do you mean that your dataset size is 800800,and you resize it with 256256?dose the result fine?As you claimed that when the picture resize smaller,it has lost more details,and have you solved it?