MCPcopy Create free account
hub / github.com/SwinTransformer/Transformer-SSL / default_img_loader

Function default_img_loader

data/cached_image_folder.py:201–206  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

199
200
201def default_img_loader(path):
202 from torchvision import get_image_backend
203 if get_image_backend() == 'accimage':
204 return accimage_loader(path)
205 else:
206 return pil_loader(path)
207
208
209class CachedImageFolder(DatasetFolder):

Callers

nothing calls this directly

Calls 2

accimage_loaderFunction · 0.85
pil_loaderFunction · 0.85

Tested by

no test coverage detected