wkentaro / pytorch-fcn

PyTorch Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

what's this -1 meaning??

who1129 opened this issue · comments

commented

load label

    lbl_file = data_file['lbl']
    lbl = PIL.Image.open(lbl_file)
    lbl = np.array(lbl, dtype=np.int32)
    lbl[lbl == 255] = -1
    if self._transform:
        return self.transform(img, lbl)
    else:
        return img, lbl

I found this code on voc.py dataset class.
Can you tell me what this -1 value means??