(self, idx)
| 133 | return len(self.img_labels) |
| 134 | |
| 135 | def __getitem__(self, idx): |
| 136 | img_path = os.path.join(self.img_dir, self.img_labels.iloc[idx, 0]) |
| 137 | image = decode_image(img_path) |
| 138 | label = self.img_labels.iloc[idx, 1] |
| 139 | if self.transform: |
| 140 | image = self.transform(image) |
| 141 | if self.target_transform: |
| 142 | label = self.target_transform(label) |
| 143 | return image, label |
| 144 | |
| 145 | |
| 146 | ################################################################# |
nothing calls this directly
no outgoing calls
no test coverage detected