There might be something wrong with the version of pillow. Try this : border=(0, 0, padw, padh) -> border=20
Thank you very much, I solved it.
But I don't know why "img = ImageOps.expand(img, border=(0, 0, padw, padh), fill=0)" can run
but "mask = ImageOps.expand(mask, border=(0, 0, padw, padh), fill=0)" can not?
Thank you very much, I solved it. But I don't know why "img = ImageOps.expand(img, border=(0, 0, padw, padh), fill=0)" can run but "mask = ImageOps.expand(mask, border=(0, 0, padw, padh), fill=0)" can not?
Originally posted by @cy998412 in https://github.com/Tramac/awesome-semantic-segmentation-pytorch/issues/184#issuecomment-921523343