Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError #1

Open
zenglingqi647 opened this issue Jan 24, 2023 · 0 comments
Open

FileNotFoundError #1

zenglingqi647 opened this issue Jan 24, 2023 · 0 comments

Comments

@zenglingqi647
Copy link

zenglingqi647 commented Jan 24, 2023

Hi!

I tried downloading the ImageNet-Video-Robust dataset from the repository. However, the data are organized in this way:
image
And when running the code, the following error would raise:

Test on the original test set
Preparing data...
Traceback (most recent call last):
File "main.py", line 37, in
_, trloader = prepare_train_data(args)
File "/scratch/PI/asd/asdfg/TTA/ttt_imagenet_release/utils/train_helpers.py", line 90, in prepare_train_data
rotation_transform=rotation_tr_transforms)
File "/scratch/PI/asd/asdfg/TTA/ttt_imagenet_release/utils/rotation.py", line 42, in init
super(RotateImageFolder, self).init(traindir, train_transform)
File "/scratch/PI/asd/asdfg/miniconda3/envs/ttt-icml20/lib/python3.7/site-packages/torchvision/datasets/folder.py", line 315, in init
is_valid_file=is_valid_file,
File "/scratch/PI/asd/asdfg/miniconda3/envs/ttt-icml20/lib/python3.7/site-packages/torchvision/datasets/folder.py", line 144, in init
classes, class_to_idx = self.find_classes(self.root)
File "/scratch/PI/asd/asdfg/miniconda3/envs/ttt-icml20/lib/python3.7/site-packages/torchvision/datasets/folder.py", line 218, in find_classes
return find_classes(directory)
File "/scratch/PI/asd/asdfg/miniconda3/envs/ttt-icml20/lib/python3.7/site-packages/torchvision/datasets/folder.py", line 40, in find_classes
classes = sorted(entry.name for entry in os.scandir(directory) if entry.is_dir())
FileNotFoundError: [Errno 2] No such file or directory: '/home/asdfg/scratch/asd/asdfg/TTA/data/imagenet/train'

The data directory, /home/asdfg/scratch/asd/asdfg/TTA/data/imagenet, has structure like this:
image

How should the data be organized, or where should the 'train' come from?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant