(path)
| 80 | |
| 81 | |
| 82 | def get_img_list(path): |
| 83 | is_image_file = lambda x : any(x.endswith(extension) |
| 84 | for extension in ['.jpg', 'png', 'gif', 'bmp']) |
| 85 | return [os.path.join(r, i) for r, _, f in os.walk(path) for i in f if is_image_file(i)] |
| 86 | |
| 87 | |
| 88 | def load_seg_module(cfg): |