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

Method binary_loader

utils/dataloader.py:53–57  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

51 return img.convert('RGB')
52
53 def binary_loader(self, path):
54 with open(path, 'rb') as f:
55 img = Image.open(f)
56 # return img.convert('1')
57 return img.convert('L')
58
59 def resize(self, img, gt):
60 assert img.size == gt.size

Callers 1

__getitem__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected