MCPcopy Create free account
hub / github.com/SLDGroup/EMCAD / filter_files

Method filter_files

utils/dataloader.py:71–82  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69 return image, gt
70
71 def filter_files(self):
72 assert len(self.images) == len(self.gts)
73 images = []
74 gts = []
75 for img_path, gt_path in zip(self.images, self.gts):
76 img = Image.open(img_path)
77 gt = Image.open(gt_path)
78 if img.size == gt.size:
79 images.append(img_path)
80 gts.append(gt_path)
81 self.images = images
82 self.gts = gts
83
84 def rgb_loader(self, path):
85 with open(path, 'rb') as f:

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected