Exemple #1
0
    def __getitem__(self, index):

        # print('\n', self.__im1[index].split('/')[-1], self.__im[index].split('/')[-1], self.__im3[index].split('/')[-1])

        img1 = getImg(self.__im1[index])
        img = getImg(self.__im[index])
        img3 = getImg(self.__im3[index])

        if self.transform is not None:
            img_tr1 = self.transform(img1)
            img_tr = self.transform(img)
            img_tr3 = self.transform(img3)

        return img_tr1, img_tr, img_tr3
Exemple #2
0
    def __getitem__(self, index):

        img = getImg(self.__im[index])
        mask = getImg(self.__mask[index])

        img = img.resize((self.im_ht, self.im_wd))
        mask = mask.resize((self.im_ht, self.im_wd))
        # mask.show()

        if self.transform is not None:
            # TODO: Not sure why not take full image
            img_tr = self.transform(img)
            mask_tr = self.transform(mask)
            # img_tr = self.transform(img[None, :, :])
            # mask_tr = self.transform(mask[None, :, :])

        return img_tr, mask_tr
Exemple #3
0
    def __getitem__(self, index):

        img1 = getImg(self.__im1[index])
        img = getImg(self.__im[index])
        img3 = getImg(self.__im3[index])
        mask = getImg(self.__mask[index])

        # img.show()
        # mask.show()

        if self.transform is not None:
            # TODO: Not sure why not take full image
            img_tr1 = self.transform(img1)
            img_tr = self.transform(img)
            img_tr3 = self.transform(img3)
            mask_tr = self.transform(mask)
            # img_tr = self.transform(img[None, :, :])
            # mask_tr = self.transform(mask[None, :, :])

        return img_tr1, img_tr, img_tr3, mask_tr
Exemple #4
0
    def __getitem__(self, index):
        # if not self.train:
        #     print(len(self.__im1), len(self.__im), len(self.__im3))
        #     print('\n', self.__im1[index].split('/')[-1], self.__im[index].split('/')[-1], self.__im3[index].split('/')[-1], self.__mask[index].split('/')[-1])

        img1 = getImg(self.__im1[index])
        img = getImg(self.__im[index])
        img3 = getImg(self.__im3[index])
        mask = getImg(self.__mask[index])

        # img.show()
        # mask.show()

        if self.transform is not None:
            # TODO: Not sure why not take full image
            img_tr1 = self.transform(img1)
            img_tr = self.transform(img)
            img_tr3 = self.transform(img3)
            mask_tr = self.transform(mask)
            # img_tr = self.transform(img[None, :, :])
            # mask_tr = self.transform(mask[None, :, :])

        return img_tr1, img_tr, img_tr3, mask_tr
Exemple #5
0
 def __getitem__(self, index):
     img = getImg(self.__im[index]).convert('L')
     img = img.resize((self.im_ht, self.im_wd))
     if self.transform is not None:
         img_tr = self.transform(img)
     return img_tr