fcdl94 / WILSON

Official implementation of "Incremental Learning in Semantic Segmentation from Image Labels"
https://arxiv.org/abs/2112.01882
MIT License
59 stars 9 forks source link

not return in transform.py #15

Closed wendyhuang2021 closed 8 months ago

wendyhuang2021 commented 8 months ago

Hi! I have little question about dataset > transform.py. In line 89:

class Resize(object):
    ...
    def __call__(self, img, lbl=None):
        if lbl is not None:
            if isinstance(lbl, torch.Tensor):
                F.resize(img, self.size, self.interpolation), F.resize(lbl, self.size, InterpolationMode.BILINEAR)# no return

Is there missing return?

fcdl94 commented 8 months ago

Yes you're right! Anyway, I'd suggest you to use the PIL Images instead of torch tensors as labels, since it wasn't tested during the experiments (we used PIL Images).

wendyhuang2021 commented 8 months ago

Thank you for your reply!