简体   繁体   中英

Adding noise to a PIL or numpy image with numpy/pytorch

I'm trying to reproduce this interesting paper: "Deep Image Prior". https://arxiv.org/abs/1711.10925

Now, I saw there is a colab version that I can run and it works pretty nice: DIP

The only think missing for me is this graph: 在此处输入图片说明

Now, I think I found the place in the code where this process is taking place: DIP restoration

Where is the noise addition?

Edit: The noise addition happens here:

Main loop

def closure(): global i, psrn_masked_last, last_net, net_input if reg_noise_std > 0: net_input = net_input_saved + (noise.normal_() * reg_noise_std)

Why, if I remark these lines I still see a noised image being plotted?

Thanks!

The noise addition happens here:

Main loop

def closure(): global i, psrn_masked_last, last_net, net_input if reg_noise_std > 0: net_input = net_input_saved + (noise.normal_() * reg_noise_std)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM