Open AN-ZE opened 1 year ago
In the code, the image is resized to 512, but the mask does not perform any operations. Their shapes are different https://github.com/zllrunning/face-parsing.PyTorch/blob/d2e684cf1588b46145635e8fe7bcc29544e5537e/face_dataset.py#L47 https://github.com/zllrunning/face-parsing.PyTorch/blob/d2e684cf1588b46145635e8fe7bcc29544e5537e/face_dataset.py#L48
The latter is changed through RandomScale. I think add a line of code label = label.resize((512, 512), Image.NEAREST)
label = label.resize((512, 512), Image.NEAREST)
In the code, the image is resized to 512, but the mask does not perform any operations. Their shapes are different https://github.com/zllrunning/face-parsing.PyTorch/blob/d2e684cf1588b46145635e8fe7bcc29544e5537e/face_dataset.py#L47 https://github.com/zllrunning/face-parsing.PyTorch/blob/d2e684cf1588b46145635e8fe7bcc29544e5537e/face_dataset.py#L48
The latter is changed through RandomScale. I think add a line of code
label = label.resize((512, 512), Image.NEAREST)