How to provide class names to a `dataset` object?

I have an Imagenet style structure of 29 classes in folders named 01, 02, … , 29. I also have a dictionary mapping from the folder name to a class name.

How do I provide class names to the dataset object?

The problem is that I am trying to deploy a model as per this guide. Even though the server.py asks for a list of class names, when I build the app it still makes a prediction based on the folder names described above.

1 Like