xinntao / ESRGAN

ECCV18 Workshops - Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution. The training codes are in BasicSR.
https://github.com/xinntao/BasicSR
Apache License 2.0
5.95k stars 1.06k forks source link

Updated test.py filename saving scheme to 'Filename_Modelused_Iteration' #23

Open Dilapidated opened 5 years ago

Dilapidated commented 5 years ago

Noticed some issues with overwriting images by mistake and getting results mixed up from running tests on lots of models. This should assist with these small issues.

Stopped test.py from overwriting images when saving if using the same image file name, iteration support if the same file name is used given at the end of the file name, the model used for the upscale is now included within the file name to avoid confusion and ease of use.

It will now save as 'Filename_Modelused_Iteration'

If you decide to add this don't forget to change device = torch.device('cpu') back to device = torch.device('cuda') as the standard preset option. (I'm using AMD)