语义分割标签可视化_灰度图到RGB图
import matplotlib.pyplot as plt
import matplotlib.image as mp
def show_img(path):
"""
读取并展示图片
:param path: 图片路径
:return:
"""
img = mp.imread('./train/3514.png')
print('图片的shape:', img.shape)
plt.imshow(img)
plt.
plt.savefig('./save/3514.png', dpi=200, bbox_inches='tight')
plt.show()
show_img('./save/3514.png')