LEDNet icon indicating copy to clipboard operation
LEDNet copied to clipboard

Update dataset.py

Open pranav-gupta-7 opened this issue 5 years ago • 0 comments

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.

pranav-gupta-7 avatar Dec 05 '20 19:12 pranav-gupta-7