MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / _get_paths_from_images

Function _get_paths_from_images

ldm/modules/image_degradation/utils_image.py:74–83  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

72
73
74def _get_paths_from_images(path):
75 assert os.path.isdir(path), '{:s} is not a valid directory'.format(path)
76 images = []
77 for dirpath, _, fnames in sorted(os.walk(path)):
78 for fname in sorted(fnames):
79 if is_image_file(fname):
80 img_path = os.path.join(dirpath, fname)
81 images.append(img_path)
82 assert images, '{:s} has no valid image file'.format(path)
83 return images
84
85
86'''

Callers 1

get_image_pathsFunction · 0.85

Calls 1

is_image_fileFunction · 0.85

Tested by

no test coverage detected