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

.jpg files not find #59

Closed
xiaoweihappy123 opened this issue Aug 13, 2018 · 15 comments
Closed

.jpg files not find #59

xiaoweihappy123 opened this issue Aug 13, 2018 · 15 comments

Comments

@xiaoweihappy123
Copy link

net output size:
torch.Size([8, 751])
[Resize(size=(288, 144), interpolation=PIL.Image.BICUBIC), RandomCrop(size=(256, 128), padding=0), RandomHorizontalFlip(p=0.5), ToTensor(), Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])]
Traceback (most recent call last):
File "train.py", line 114, in
data_transforms['train'])
File "/home/xiaowei/anaconda3/lib/python3.6/site-packages/torchvision/datasets/folder.py", line 178, in init
target_transform=target_transform)
File "/home/xiaowei/anaconda3/lib/python3.6/site-packages/torchvision/datasets/folder.py", line 79, in init
"Supported extensions are: " + ",".join(extensions)))
RuntimeError: Found 0 files in subfolders of: /home/xiaowei/Person_reID_baseline_pytorch/market/pytorch/train
Supported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif

I do have images in my directory, the python version is 3.6, and the pytorch is 0.3.0.What's causing this?

@layumi
Copy link
Owner

layumi commented Aug 13, 2018

Hi @xiaoweihappy123
Could you check again your folder /home/xiaowei/Person_reID_baseline_pytorch/market/pytorch/train? Are there 751 folders (each folder contains image files)?

@xiaoweihappy123
Copy link
Author

The market1501 dataset file I downloaded listed all the pictures and did not store them according to the ID.Do I need to do this by hand?

@layumi
Copy link
Owner

layumi commented Aug 14, 2018

Hi @xiaoweihappy123
You may check the readme.md and run prepare.py

@xiaoweihappy123
Copy link
Author

I But I've already run it

@layumi
Copy link
Owner

layumi commented Aug 14, 2018

Is any error when you run prepare.py?
Could you check the output path in prepare.py? Do training images store in /home/xiaowei/Person_reID_baseline_pytorch/market/pytorch/train?

@xiaoweihappy123
Copy link
Author

No any error. Is only creates several empty folders under the specified directory.

trian.py:default='/home/xiaowei/Person_reID_baseline_pytorch/market/pytorch'
prepare.py:download_path = '/home/xiaowei/Person_reID_baseline_pytorch/market'

What's the problem?

@layumi
Copy link
Owner

layumi commented Aug 15, 2018

Have you unzipped the market1501 into this download_path?
Under download_path, there should be bounding_box_train, bounding_box_test, bounding_box_query ...

@xiaoweihappy123
Copy link
Author

Yes, I've unzipped it. My classmate is also very helpless to this mistake.

@layumi
Copy link
Owner

layumi commented Aug 15, 2018

Could you try sudo chmod -R 777 /home/xiaowei/Person_reID_baseline_pytorch/market?

@xiaoweihappy123
Copy link
Author

I just tried it but it didn't work

@layumi
Copy link
Owner

layumi commented Aug 15, 2018

Is there any image under the bounding_box_train?
There are no folders under the download_path/pytorch/train ?

@xiaoweihappy123
Copy link
Author

Both folders have images under them, and below "train" I added manually.

@layumi
Copy link
Owner

layumi commented Aug 15, 2018

You do not need to add the data manually.
@dyh127 Do you have any idea?

@Small93
Copy link

Small93 commented Sep 4, 2018

@xiaoweihappy123 i have the same problem, I have solved it. your path is wrong. /home/xiaowei/Person_reID_baseline_pytorch/market。
1、You must first download dataset(Market1501 Dataset),and change the name of the database to
market。
2、prepare.py: download_path = '/home/xiaowei/Person_reID_baseline_pytorch/market'
3、1 and 2 keep the name is the same(the name is market). use:
python prepare.py
you will find many folder in the pytorch/train. and the other folders.

@xiaoweihappy123
Copy link
Author

3q, I have solved it.

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

3 participants