jmiller656 / EDSR-Tensorflow

Tensorflow implementation of Enhanced Deep Residual Networks for Single Image Super-Resolution
MIT License
330 stars 107 forks source link

The results of the network have black blocks in the lower right corner of the image #14

Closed Ivan-Zhao closed 6 years ago

Ivan-Zhao commented 6 years ago

The results of the network have black blocks in the lower right corner of the image

PrathamSoni commented 6 years ago

This is due to an error in the model.py under the predict method. When the dimensions of the original image do not line up with the "img_size" the bottom right corner is not calculated. add this code to the predict method to fix the issue if (x.shape[0]%self.img_size != 0 and x.shape[1]%self.img_size != 0): tmp = self.sess.run(self.out,feed_dict={self.input:[x[-1*self.img_size:,-1*self.img_size:]]})[0] tmp_image[-1*tmp.shape[0]:,-1*tmp.shape[1]:] = tmp

Ivan-Zhao commented 6 years ago

Another problem,how to set learning rate?

jmiller656 commented 6 years ago

@PrathamSoni Thanks again, please view my comment on your pull request.

@Ivan-Zhao learning rate can be set in the code where AdamOptimizer is initialized. If you'd like, I can create a command line argument for it instead

matt-dong commented 6 years ago

I am also having this issue but I fixed it with the above code. This is an example of the issue. outoutput

PrathamSoni commented 6 years ago

Fix was merged.