Open MiriamFarber opened 6 years ago
In the function getSegmentationArr in LoadBatches.py, I think that you need to use
getSegmentationArr
cv2.resize(img, ( width , height ), cv2.INTER_NEAREST)
instead of the default one that you are currently using, which is equivalent to:
cv2.resize(img, ( width , height ), cv2.INTER_LINEAR)
The latter one is used to image resizing, but if you want to resize a segmentation with fixed number of labels, you probably don't want to use a bilinear interpolation. This may introduce labels that do not exist in the original image.
Thanks for pointing out. Could you send a pull request for this?
In the function
getSegmentationArr
in LoadBatches.py, I think that you need to usecv2.resize(img, ( width , height ), cv2.INTER_NEAREST)
instead of the default one that you are currently using, which is equivalent to:
cv2.resize(img, ( width , height ), cv2.INTER_LINEAR)
The latter one is used to image resizing, but if you want to resize a segmentation with fixed number of labels, you probably don't want to use a bilinear interpolation. This may introduce labels that do not exist in the original image.