Skip to content

Commit

Permalink
feat: 🔧 make scandir_images sorted with full path
Browse files Browse the repository at this point in the history
  • Loading branch information
chaofengc committed May 1, 2024
1 parent da26e6d commit e73c719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyiqa/utils/img_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def scandir_images(dir, max_dataset_size=float("inf"), followlinks=True):
if is_image_file(fname):
path = os.path.join(root, fname)
images.append(path)
return images[:min(max_dataset_size, len(images))]
return sorted(images[:min(max_dataset_size, len(images))])


def imread2pil(img_source, rgb=False):
Expand Down

0 comments on commit e73c719

Please sign in to comment.