Skip to content

Update dataset.py#32

Open
pranav-gupta-7 wants to merge 1 commit intoxiaoyufenfei:masterfrom
pranav-gupta-7:master
Open

Update dataset.py#32
pranav-gupta-7 wants to merge 1 commit intoxiaoyufenfei:masterfrom
pranav-gupta-7:master

Conversation

@pranav-gupta-7
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant