How to match two ImageFolder?

Hi there,

Please consider the scenario:

We have the first ImageFolder for training set:

./train/<CLASSES>/*.jpg

We also have another ImageFolder:

./tr/<CLASSES>/*.jpg

The classes of these two ImageFolder should be identical. However, some folders in ./tr/<CLASSES>/*.jpg are empty. Then how to match the class index for these two ImageFolder.

Thanks~

If the class folder names of both ./train/ and /.tr/ are the same then the indices for each class should be identical by default. This is because the class names are sorted before the class to index map is built:

1 Like