解决办法: # misc.imsave(map_save_path + name, output) import cv2 cv2.imwrite(save_path+name+'.png', res*255)