leftthomas / ImageDeblurring

A Keras implementation of image deblurring based on ICCV 2017 paper "Deep Generative Filter for motion deblurring"
82 stars 30 forks source link

OOM Error #3

Closed KUNPENG-LI closed 6 years ago

KUNPENG-LI commented 6 years ago

@leftthomas Hello, first thanks for this paper and code. I'm reading your paper and trying your code for my school project purpose. I have a quick question regarding the OOM Error, below is the trace file. Thank you for your help to look into it. trace file.txt

leftthomas commented 6 years ago

@ALONSOlkp89 set channel_rate < 64, for example channel_rate = 16

KUNPENG-LI commented 6 years ago

@leftthomas Thanks for your reply. I did see your reply to "tsing90" about this modification, and I did this previously which helps avoid OOM when calling train() function. But now I stuck again at test_picture() function with this OOM error. Currently, the channel_rate is indeed 16.

leftthomas commented 6 years ago

@ALONSOlkp89 because the train image size is (256,256,3), it's lager for train, and require many memory, so you could resize it before train, if you resize it to (128,128,3), it basically will need 1/2 less memory.

KUNPENG-LI commented 6 years ago

@leftthomas Finally I run through the code, thanks for your instructions.

  1. But in the test results, which there are three images(full, blur, generated) concentrated into one picture. I noticed that the generated image is not clear enough. Just curious, in your testing, did you get clear and sharp image? How could I improve this?

  2. I noticed that there are two test functions: 1. test(4); 2. test_pictures(2), what is the difference for the two?

  3. In test_picture(2), the input image is really big image, don't you need resize to a smaller image? It doesn't work in my side for such a big image, after I crop the image manually to a small one, it works.

Sorry for so many questions, just try to better understand. Thank you so much and appreciate it.

leftthomas commented 6 years ago

@ALONSOlkp89 I just reimplement that paper, so I only train on small dataset to see it did or did not work. If you want perfect result, you should sample from ImageNet, about 50M images to train the network, and didn't change the channel_rate,make sure the batch size >=32, finally you need a powerful GPU(for example, P40) to train.