(self, index)
| 113 | return len(self.datapath) |
| 114 | |
| 115 | def _get_item(self, index): |
| 116 | if self.process_data: |
| 117 | point_set, label = self.list_of_points[index], self.list_of_labels[index] |
| 118 | else: |
| 119 | fn = self.datapath[index] |
| 120 | cls = self.classes[self.datapath[index][0]] |
| 121 | label = np.array([cls]).astype(np.int32) |
| 122 | point_set = np.loadtxt(fn[1], delimiter=',').astype(np.float32) |
| 123 | |
| 124 | if self.uniform: |
| 125 | point_set = farthest_point_sample(point_set, self.npoints) |
| 126 | else: |
| 127 | point_set = point_set[0:self.npoints, :] |
| 128 | |
| 129 | point_set[:, 0:3] = pc_normalize(point_set[:, 0:3]) |
| 130 | if not self.use_normals: |
| 131 | point_set = point_set[:, 0:3] |
| 132 | |
| 133 | return point_set, label[0] |
| 134 | |
| 135 | def __getitem__(self, index): |
| 136 | return self._get_item(index) |
no test coverage detected