Skip to content
Snippets Groups Projects
Commit 54164bf1 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 984a1c54
No related branches found
No related tags found
No related merge requests found
......@@ -88,18 +88,6 @@ def preprocess_image(hr_image):
Args:
image_path: Path to the image file
"""
# hr_image = tf.image.decode_image(tf.io.read_file(image_path))
# If PNG, remove the alpha channel. The model only supports
# images with 3 color channels.
if hr_image.shape[-1] == 4:
hr_image = hr_image[..., :-1]
elif len(hr_image.shape) == 2:
tmp_image = np.zeros([hr_image.shape[0], hr_image.shape[1], 3])
tmp_image[:, :, 0] = hr_image
tmp_image[:, :, 1] = hr_image
tmp_image[:, :, 2] = hr_image
hr_image = tmp_image
hr_image *= 255.0
hr_image *= 255.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment