71c559e66eaff89089fa447a3d7e04b6835356cf,dataset.py,ValDataset,__getitem__,#ValDataset#Any#,207

Before Change


            img_resized = torch.unsqueeze(img_resized, 0)
            img_resized_list.append(img_resized)

        segm = torch.from_numpy(segm.astype(np.int)).long()
        batch_segms = torch.unsqueeze(segm, 0)

        batch_segms = batch_segms - 1 // label from -1 to 149
        output = dict()
        output["img_ori"] = img.copy()
        output["img_data"] = [x.contiguous() for x in img_resized_list]

After Change


        // load image and label
        image_path = os.path.join(self.root_dataset, this_record["fpath_img"])
        segm_path = os.path.join(self.root_dataset, this_record["fpath_segm"])
        img = Image.open(image_path).convert("RGB")
        segm = Image.open(segm_path)
        assert(segm.mode == "L")
        assert(img.size[0] == segm.size[0])
        assert(img.size[1] == segm.size[1])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


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: eriklindernoren/PyTorch-YOLOv3
Commit Name: 9dcac66250b2d26d9b2505ad04841f3f4b8bc2a1
Time: 2019-04-30
Author: eriklindernoren@live.se
File Name: utils/datasets.py
Class Name: ImageFolder
Method Name: __getitem__


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: b591a7aecce5b8de42a0dd7bba62780675d34fce
Time: 2019-04-30
Author: eriklindernoren@live.se
File Name: utils/datasets.py
Class Name: ImageFolder
Method Name: __getitem__