(self, split)
| 39 | self.colorjitter_transform = build_pipeline(config.TRANSFORM.color, PIPELINES) |
| 40 | |
| 41 | def _load_data(self, split): |
| 42 | from_file = self._cfg.FROM_FILE |
| 43 | |
| 44 | if not from_file: |
| 45 | image_paths, labels, mask_paths = self._load_from_path(split) |
| 46 | else: |
| 47 | image_paths, labels, mask_paths = self._load_from_file(split) |
| 48 | |
| 49 | assert len(image_paths) != 0, "Image paths have not been loaded! Please check image directory!" |
| 50 | assert len(labels) != 0, "Labels have not been loaded! Please check image folder path!" |
| 51 | return image_paths, labels, mask_paths |
| 52 | |
| 53 | def _load_img(self, img_path): |
| 54 | img = Image.open(img_path) |
no test coverage detected