diff --git a/timm/data/dataset.py b/timm/data/dataset.py index 4feb1cc8..f4f370a9 100644 --- a/timm/data/dataset.py +++ b/timm/data/dataset.py @@ -22,7 +22,7 @@ def natural_key(string_): def find_images_and_targets(folder, types=IMG_EXTENSIONS, class_to_idx=None, leaf_name_only=True, sort=True): labels = [] filenames = [] - for root, subdirs, files in os.walk(folder, topdown=False): + for root, subdirs, files in os.walk(folder, topdown=False, followlinks=True): rel_path = os.path.relpath(root, folder) if (root != folder) else '' label = os.path.basename(rel_path) if leaf_name_only else rel_path.replace(os.path.sep, '_') for f in files: