Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zsdonghao committed Oct 13, 2018
1 parent f10fbbd commit 34ebf0f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions utils.py
Expand Up @@ -15,15 +15,15 @@ def get_imgs_fn(file_name, path):

def crop_sub_imgs_fn(x, is_random=True):
x = crop(x, wrg=384, hrg=384, is_random=is_random)
# x = x / (255. / 2.)
# x = x - 1.
x = x -0.5
x = x / (255. / 2.)
x = x - 1.
# x = (x - 0.5)*2
return x

def downsample_fn(x):
# We obtained the LR images by downsampling the HR images using bicubic kernel with downsampling factor r = 4.
x = imresize(x, size=[96, 96], interp='bicubic', mode=None)
# x = x / (255. / 2.)
# x = x - 1.
x = x -0.5
x = x / (255. / 2.)
x = x - 1.
# x = (x - 0.5)*2
return x

0 comments on commit 34ebf0f

Please sign in to comment.