Skip to content

Commit a305455

Browse files
committed
MS-SSIM: Read image data as binary
1 parent b6866ca commit a305455

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

research/compression/image_encoder/msssim.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ def main(_):
199199
return
200200

201201
with tf.gfile.FastGFile(FLAGS.original_image) as image_file:
202-
img1_str = image_file.read()
202+
img1_str = image_file.read('rb')
203203
with tf.gfile.FastGFile(FLAGS.compared_image) as image_file:
204-
img2_str = image_file.read()
204+
img2_str = image_file.read('rb')
205205

206206
input_img = tf.placeholder(tf.string)
207207
decoded_image = tf.expand_dims(tf.image.decode_png(input_img, channels=3), 0)

0 commit comments

Comments
 (0)