MCPcopy Create free account
hub / github.com/ChunmingHe/WS-SAM / load_data

Method load_data

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

Source from the content-addressed store, hash-verified

98 self.index = 0
99
100 def load_data(self):
101 image = self.rgb_loader(self.images[self.index])
102 image = self.transform(image).unsqueeze(0)
103 gt = self.binary_loader(self.gts[self.index])
104 name = self.images[self.index].split('/')[-1]
105 if name.endswith('.jpg'):
106 name = name.split('.jpg')[0] + '.png'
107 self.index += 1
108 return image, gt, name
109
110 def rgb_loader(self, path):
111 with open(path, 'rb') as f:

Callers

nothing calls this directly

Calls 2

rgb_loaderMethod · 0.95
binary_loaderMethod · 0.95

Tested by

no test coverage detected