MCPcopy
hub / github.com/richzhang/PerceptualSimilarity / is_image_file

Function is_image_file

data/image_folder.py:21–25  ·  view source on GitHub ↗
(filename, mode='img')

Source from the content-addressed store, hash-verified

19NP_EXTENSIONS = ['.npy',]
20
21def is_image_file(filename, mode='img'):
22 if(mode=='img'):
23 return any(filename.endswith(extension) for extension in IMG_EXTENSIONS)
24 elif(mode=='np'):
25 return any(filename.endswith(extension) for extension in NP_EXTENSIONS)
26
27def make_dataset(dirs, mode='img'):
28 if(not isinstance(dirs,list)):

Callers 1

make_datasetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected