MCPcopy Create free account
hub / github.com/ActiveVisionLab/DFNet / load_image

Function load_image

dataset_loaders/cambridge_scenes.py:48–57  ·  view source on GitHub ↗
(filename, loader=default_loader)

Source from the content-addressed store, hash-verified

46
47from torchvision.datasets.folder import default_loader
48def load_image(filename, loader=default_loader):
49 try:
50 img = loader(filename)
51 except IOError as e:
52 print('Could not load image {:s}, IOError: {:s}'.format(filename, e))
53 return None
54 except:
55 print('Could not load image {:s}, unexpected error'.format(filename))
56 return None
57 return img
58
59def load_depth_image(filename):
60 try:

Callers 2

__init__Method · 0.70
__getitem__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected