cat-v-dog-classifier-pytorch icon indicating copy to clipboard operation
cat-v-dog-classifier-pytorch copied to clipboard

problem with "data_dir" at starts...

Open jdmelendez opened this issue 5 years ago • 2 comments

I have download all images, and the directory created is "PetImages" with two subdirectorys called "Cat" and "Dog".

When I run this command: ..." datasets.ImageFolder(data_dir + '/train',..." , appear an error because don't found the path.

Can you help me, please?

Thanks.

jdmelendez avatar Feb 20 '20 19:02 jdmelendez

The data has to be arranged this way root/train/cats/cat0.jpg and so on (all your cat images) root/train/dogs/ dog0.jpg and so on (all your dog images)

The same has to be done for test as well check the documentation for torchvision.datasets.ImageFolder

sshadr avatar Apr 19 '20 09:04 sshadr

Thanks for the answer @Adarshd19 Did that resolve your issue @Melendez95 ?

amitrajitbose avatar Jul 01 '20 21:07 amitrajitbose