aziz-ayed / denoising

Research to replace the Wavelet approach in the denoising task of the MCCD method by a Machine Learning solution
2 stars 0 forks source link

Padding and cropping the images - Sanity check #8

Open aziz-ayed opened 3 years ago

aziz-ayed commented 3 years ago

Description

When it came to integrating our denoising solution to the MCCD algorithm, we encountered an error. In fact, CFIS data are of size (51x51), whereas our networks' architectures could only work with some specific powers of two. Thus, we added a first zero-padding to (64x64) images layer at the entry of our network, and a cropping to (51x51) images layer before outputting the results of our denoising. We ran some tests to verify that this new network could achieve similar results than the previous ones.

Results

The results seem to be quite similar to the ones without the patch:

Model SNR Train RMSE Test RMSE e1 RMSE e2 RMSE R2 RMSE
U-Nets without patch 0-200 5.349e-05 6.086e-05 6.821e-03 4.510e-03 8.081e-03
U-Nets with patch 0-200 6.327e-05 7.214e-05 8.372e-03 3.855e-03 6.928e-03
Model e1 error e2 error R2 error
U-Nets without patch -5.588e-03 1.816e-03 4.804e-03
U-Nets with patch 7.522e-03 1.164e-03 1.168e-03

Visual results

Capture d’écran 2021-04-29 à 12 12 29 Capture d’écran 2021-04-29 à 12 11 00

Conclusion

Our quick patch doesn't seem to harm significantly the accuracy of our model!

tobias-liaudat commented 3 years ago

Thanks @aziz-ayed :)

This results are from the padding and cropping included in the network or done outside the network?

aziz-ayed commented 3 years ago

Hi @tobias-liaudat , they are done inside the network (first and last layer), but it's not the final version yet: this one isn't responsive to different input formats of images, it only works for 51x51 images

tobias-liaudat commented 3 years ago

@aziz-ayed cool, thanks :)

tobias-liaudat commented 3 years ago

You should push them to the repo and maybe edit the issue to add a reference to the new patch network.

tobias-liaudat commented 2 years ago

@aziz-ayed have you pushed this fix to the repo?

aziz-ayed commented 2 years ago

Yes! They are defined in the convert_and_pad and crop_and_convert functions that are applied in the op function of the class Learnlets here: Link