diegovalsesia / gcdn

Deep Graph-Convolutional Image Denoising
MIT License
93 stars 27 forks source link

Lighter/faster version ? #4

Open titsitits opened 4 years ago

titsitits commented 4 years ago

Hi,

I am testing your model, and I am trying to reduce the computational time. I already used your first recommendation (use only 1 thread). I am now struggling to reduce window size. How can I easily reduce the patch_size and/or increase the stride of your method ? Can it be done without retraining the whole model ? (If so, how much time did it take with your hardware configuration (2x Nvidia Quadro P6000 (24 GB) ) ?

Many thanks, Mickaël

diegovalsesia commented 4 years ago

Hi, we are aware that complexity is one of the main bottleneck of our model and we will try to address it in future works. Meanwhile, without retraining you can only try to reduce the minisize and search window parameters (minisize is related to how much of the input image is processed at a given time and changing it shouldn't affect PSNR much, while the search window size has some impact on PSNR). With the 1 thread modification and some reduction on those paramters I think you can get testing to work on 16GB GPUs but I think it will be very hard to reach 11-12 GB.

The number of non-local neighbors also affects memory quite a bit. You can try to use 8 instead of 16 with some degradation in PSNR (not too much though). But you need a model trained or at least finetuned for 8-NN. This folder should (please check) have the 8-NN models from the ablation study in the paper: https://www.dropbox.com/sh/u4uqctx3iok8axo/AAA4qiAE0ARLRTXZXzNSJR64a?dl=0

titsitits commented 4 years ago

Thank you for your prompt answer. I could use your model on a 16GB GPU (Tesla P100) indeed, with the 1-thread modification only (I tested it in Google Colab).

Thank you for the 8-NN models. I could download them. Which config parameters should I use with it ?

Concerning search window and minisize, I see that they are used in net_conv2.py, so I guess I must retrain a network if I change these parameters ?

diegovalsesia commented 4 years ago

You can use the same parameters as in the 16-NN models, except for self.min_nn = 8 +8.

You don't need to retrain the model if you change minisize and search window. The search window size is somewhat related to the patch size used in training but not very strongly so it's fine to adjust it without retraining.