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

Couldn't find any class folder in /content/drive/MyDrive/Person_reID_baseline_pytorch/Market-1501-v15.09.15/pytorch/query #375

Open
MetehanYasar11 opened this issue Jul 26, 2023 · 3 comments

Comments

@MetehanYasar11
Copy link

After I train the model with tutorial dataset, I tried to run this command below in colab;

!python test.py --gpu_ids 0 --name ft_ResNet50 --batchsize 32 --which_epoch 59 --test_dir /content/drive/MyDrive/Person_reID_baseline_pytorch/Market-1501-v15.09.15/pytorch

and I get this error;

This is not an error. If you want to use low precision, i.e., fp16, please install the apex with cuda support (https://github.com/NVIDIA/apex) and update pytorch to 1.0
We use the scale: 1
Traceback (most recent call last):
File "/content/drive/MyDrive/Person_reID_baseline_pytorch/test.py", line 146, in
image_datasets = {x: datasets.ImageFolder( os.path.join(data_dir,x) ,data_transforms) for x in ['gallery','query']}
File "/content/drive/MyDrive/Person_reID_baseline_pytorch/test.py", line 146, in
image_datasets = {x: datasets.ImageFolder( os.path.join(data_dir,x) ,data_transforms) for x in ['gallery','query']}
File "/usr/local/lib/python3.10/dist-packages/torchvision/datasets/folder.py", line 309, in init
super().init(
File "/usr/local/lib/python3.10/dist-packages/torchvision/datasets/folder.py", line 144, in init
classes, class_to_idx = self.find_classes(self.root)
File "/usr/local/lib/python3.10/dist-packages/torchvision/datasets/folder.py", line 218, in find_classes
return find_classes(directory)
File "/usr/local/lib/python3.10/dist-packages/torchvision/datasets/folder.py", line 42, in find_classes
raise FileNotFoundError(f"Couldn't find any class folder in {directory}.")
FileNotFoundError: Couldn't find any class folder in /content/drive/MyDrive/Person_reID_baseline_pytorch/Market-1501-v15.09.15/pytorch/query.

When I look into /content/drive/MyDrive/Person_reID_baseline_pytorch/Market-1501-v15.09.15/pytorch/query, there is nothing...

@layumi
Copy link
Owner

layumi commented Jul 26, 2023

Hi @MetehanYasar11
Do you download the dataset? and successfully use prepare.py to make sub-folders?

@MetehanYasar11
Copy link
Author

Hi @MetehanYasar11 Do you download the dataset? and successfully use prepare.py to make sub-folders?

Yes, I have downloaded dataset and and executed succesfully prepare.py and train.py

@layumi
Copy link
Owner

layumi commented Jul 31, 2023

Hi @MetehanYasar11
Ok. Is it good with Person_reID_baseline_pytorch/Market-1501-v15.09.15/pytorch/train and gallery?

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

2 participants