deeplabv3+ pytorch代码:
mask = ImageOps.expand(mask, border=(0, 0, padw, padh), fill=self.fill)
出现问题:TypeError: an integer is required (got type tuple)
参考链接:[transforms] Troubles with padding for PIL image in mode P #4934
更新pillow版本>=8.4.0
方法:pip install pillow==8.4.0
成功!!