import tensorflow as tf
import matplotlib.pyplot as plt
import cv2
import numpy as np
sess = tf.Session()
jpg1 = cv2.imread("test2.jpg")
jpg2 = tf.read_file("test2.jpg")
jpg2 = tf.image.decode_jpeg(jpg2)
jpg2 = sess.run(jpg2)
cv2.imshow('jpg1', jpg1)
cv2.waitKey(0)
cv2.destroyAllWindows()
cv2.imshow('jpg2', jpg2)
cv2.waitKey(0)
cv2.destroyAllWindows()
original tensorflow's reconstruction
原始像素与重建像素之间的总像素差:12563624
我正在尝试将图像加载到张量流中,但是像素差异显然太大,并且重构图像上的颜色与原始图像不符。