how ro padding the measurement whrn working with smaller sensors
As you mentioned in https://siddiquesalman.github.io/flatnet/, when using a smaller sensors, we always get a small measurement (eg. dataset in DiffuserCam), and only zero padding the measurement seems work badly in the inverse layer, and "replicate+smooth padding" can address this problem, but I don't find code of this part in the project, so how to do "replicate+smooth padding" ?
Hi,
replicate padding is done in the dataloader: https://github.com/siddiquesalman/flatnet/blob/flatnet-gen/dataloader.py#L130
smoothing is done here: https://github.com/siddiquesalman/flatnet/blob/flatnet-gen/models/fftlayer.py#L132
Thank you for your answer, and did you try this FFT layer on the dataset DiffuserCam (https://waller-lab.github.io/LenslessLearning/dataset.html)? I tried to use FFT layer on DiffuserCam's psf and measurement, but failed get a understandable image.
I'm soryy to bother, I found something wrong with the hyparameter, and and I have success on Diffusercam.
@zhangyingerjelly Could you please share how to try this FFT layer on the dataset DiffuserCam and how to set the hyparameter?Thank you!
@zhangyingerjelly Could you please share how to try this FFT layer on the dataset DiffuserCam and how to set the hyparameter?Thank you!
you should pay attention that both psf and input data need to be normalized(something like /np.max(). and I set fft_gamma=2000
Thank you for your reply.