Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TestCode/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def imread(path, is_grayscale=False):
if is_grayscale:
return scipy.misc.imread(path, flatten=True).astype(np.float)
else:
return scipy.misc.imread(path).astype(np.float)
return np.array(Image.fromarray(scipy.misc.imread(path)).resize((310,230))).astype(np.float)


def imsave(image, path):
Expand All @@ -61,4 +61,4 @@ def get_lable(image_path,is_grayscale=False):
image = imread(image_path, is_grayscale)
return image/255.
def imsave_lable(image, path):
return scipy.misc.imsave(path, image*255)
return scipy.misc.imsave(path, image*255)