(filename, mode='img')
| 19 | NP_EXTENSIONS = ['.npy',] |
| 20 | |
| 21 | def 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 | |
| 27 | def make_dataset(dirs, mode='img'): |
| 28 | if(not isinstance(dirs,list)): |