facebookresearch / deepcluster

Deep Clustering for Unsupervised Learning of Visual Features
Other
1.66k stars 324 forks source link

train dataset that is not sorted in different folders #78

Closed daniiki closed 3 years ago

daniiki commented 3 years ago

Hi, I have a question about the following line of code: dataset = datasets.ImageFolder(args.data, transform=transforms.Compose(tra))

In the documentation of datasets.ImageFolder you can read:

A generic data loader where the images are arranged in this way: root/dog/xxx.png root/dog/xxy.png root/dog/xxz.png root/cat/123.png root/cat/nsdf3.png root/cat/asd932_.png

So the images are sorted in different folders depending on their label. I want to train with a dataset that has no labels, i.e the images are not sorted in different folders. Is it still possible to put all images in one folder and train like this?

mathildecaron31 commented 3 years ago

Hi, yes I think that should work.