Traceback (most recent call last):
File "/root/PycharmProjects/ADSFN/test.py", line 21, in <module>
img = Image.blend(img1, label, 0.7)
File "/root/anaconda3/lib/python3.7/site-packages/PIL/Image.py", line 2939, in blend
return im1._new(core.blend(im1.im, im2.im, alpha))
ValueError: images do not match
原因:
label是单通道图,img1是RGB图,因此通道维度不匹配