MCPcopy Create free account
hub / github.com/10Ring/LAA-Net / _load_data

Method _load_data

datasets/face_forensic_binary.py:41–51  ·  view source on GitHub ↗
(self, split)

Source from the content-addressed store, hash-verified

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)

Callers 1

__init__Method · 0.95

Calls 2

_load_from_fileMethod · 0.80
_load_from_pathMethod · 0.45

Tested by

no test coverage detected