LEDNet
LEDNet copied to clipboard
Update dataset.py
This is something that I encountered when I was executing the code on another dataset. So I modified the code in a way that it can support other datasets as well.
Problem and Solution:
PIL's 'P' mode which is used for reading images can change the spatial pixel information i.e. it alters the labels encoded as pixel values. The better way is to open the image in RBG mode and then simply take one channel as the label image.