A couple of points to make here:
- This is beyond the scope of the course, so whether we help you is optional. That said, we can probably offer some suggestions but may not want to go as far as to actually write the code for you.
- If you want help, you have to give us a little more to go on than “I need help”. What have you tried? What is the symptom that it doesn’t work?
Just to talk in general terms, you need to extend the code that Tom shows above in a couple of ways:
The classes list will have more possible values and you need to specify the string names for those and assign them numeric values which should correspond to the position of the name in the classes list.
You need to figure out how you are going to determine the label for a given one of the image files. Notice that Tom did that by making the first letter of the “leaf” name of the image file be “c” for cat and then looking at the file name as they are processed. There are lots of potential ways to do that. And perhaps if you are using a dataset that you got from someplace else, it may already have a scheme for the labels.