Skip to content

Inconsistent Visualisation? #219

Answered by idkwid2022
idkwid2022 asked this question in Q&A
Discussion options

You must be logged in to vote

Nvm, could you please forget this. It's my mistake.

I added .quantize(256, method=Image.Quantize.FASTOCTREE) on loading the mask on data.py.

I think it was because I want to show the image while debugging the code, and forgot to remove it.

    def __getitem__(self, index):
        img_from_file = Image.open(self.images[index]).convert("RGB")
        img = np.asarray(img_from_file)
        assert img is not None, f"Image at '{self.images[index]}' has a problem"
        mask_from_file = Image.open(self.masks[index]).quantize(256, method=Image.Quantize.FASTOCTREE)
        mask = np.asarray(mask_from_file)
        assert mask is not None, f"Mask at '{self.masks[index]}' has a problem"

I'm so…

Replies: 3 comments 11 replies

Comment options

You must be logged in to vote
9 replies
@idkwid2022
Comment options

@vfdev-5
Comment options

@idkwid2022
Comment options

@vfdev-5
Comment options

@idkwid2022
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@vfdev-5
Comment options

@idkwid2022
Comment options

Answer selected by idkwid2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants