f0f56c2e15da58d1d191d936ee85a61021ab2c9d,pytorch/ade20k_dataset.py,ADE20KSegmentation,__getitem__,#ADE20KSegmentation#Any#,53

Before Change


        img_path = self.files[self.split][index].rstrip()
        lbl_path = img_path[:-4] + "_seg.png"

        img = m.imread(img_path)
        img = np.array(img, dtype=np.uint8)

        lbl = m.imread(lbl_path)
        lbl = np.array(lbl, dtype=np.int32)

After Change


        assert (len(self.images) == len(self.masks))

    def __getitem__(self, index):
        img = Image.open(self.images[index]).convert("RGB")
        mask = Image.open(self.masks[index])

        if self.mode == "train":
            img, mask = self._sync_transform(img, mask)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: osmr/imgclsmob
Commit Name: f0f56c2e15da58d1d191d936ee85a61021ab2c9d
Time: 2019-03-21
Author: osemery@gmail.com
File Name: pytorch/ade20k_dataset.py
Class Name: ADE20KSegmentation
Method Name: __getitem__


Project Name: CSAILVision/semantic-segmentation-pytorch
Commit Name: 71c559e66eaff89089fa447a3d7e04b6835356cf
Time: 2019-08-02
Author: zhaohang0124@gmail.com
File Name: dataset.py
Class Name: ValDataset
Method Name: __getitem__


Project Name: CSAILVision/semantic-segmentation-pytorch
Commit Name: 71c559e66eaff89089fa447a3d7e04b6835356cf
Time: 2019-08-02
Author: zhaohang0124@gmail.com
File Name: dataset.py
Class Name: TestDataset
Method Name: __getitem__