wkentaro / pytorch-fcn

PyTorch Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)
MIT License
1.74k stars 480 forks source link

what's this -1 meaning?? #156

Closed who1129 closed 4 years ago

who1129 commented 4 years ago

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??