def read_img(self, filename):
imgtmp = scipy.misc.imread(filename)
ds = imgtmp.shape
if self.is_crop:
img = scipy.misc.imresize(imgtmp,(self.output_height,self.output_width,3))
img = np.array(img).astype(np.float32)
return img
评论列表
文章目录