예제 #1
0
 def __getitem__(self, idx):
     lbl = self.lbl_list[idx]
     pc = np.load(self.pc_list[idx])[:self.pc_input_num].astype(np.float32)
     pc = normal_pc(pc)
     if self.status == STATUS_TRAIN:
         pc = pc_aug_funs(pc)
     pc = np.expand_dims(pc.transpose(), axis=2)
     return torch.from_numpy(pc).float(), lbl
예제 #2
0
 def __getitem__(self, idx):
     views = [self.transform(Image.open(v)) for v in self.view_list[idx]]
     lbl = self.lbl_list[idx]
     pc = np.load(self.pc_list[idx])[:self.pc_input_num].astype(np.float32)
     pc = normal_pc(pc)
     if self.status == STATUS_TRAIN:
         pc = pc_aug_funs(pc)
     pc = np.expand_dims(pc.transpose(), axis=2)
     return torch.stack(views).float(), torch.from_numpy(pc).float(), lbl
예제 #3
0
 def __getitem__(self, idx):
     names = osp.split(self.pc_list[idx])[1].split('.')[0]
     views = [self.transform(Image.open(v)) for v in self.view_list[idx]]
     depth = [
         self.transform(Image.open(v).convert('RGB'))
         for v in self.dp_list[idx]
     ]
     lbl = self.lbl_list[idx]
     pc = np.load(self.pc_list[idx])[:self.pc_input_num].astype(np.float32)
     pc = normal_pc(pc)
     # if self.status == STATUS_TRAIN:
     pc = pc_aug_funs(pc)
     pc = np.expand_dims(pc.transpose(), axis=2)
     # return torch.stack(views).float(), torch.from_numpy(pc).float(), lbl, names
     return torch.stack(views).float(), torch.stack(
         depth).float(), torch.from_numpy(pc).float(), lbl