In this section, we are going to classify clothing items based on their images. We are going to use a dataset release by Zalando. Zalando is an e-commerce website based in Berlin. They released a dataset of 70,000 pictures of clothing items, along with their labels. Each item belongs to one of the following 10 labels:
{ 0: 'T-shirt/top ', 1: 'Trouser ', 2: 'Pullover ', 3: 'Dress ', 4: 'Coat ', 5: 'Sandal ', 6: 'Shirt ', 7: 'Sneaker ', 8: 'Bag ', 9: 'Ankle boot' }
The data is published on the OpenML platform, so we can easily download it using the built-in downloader in scikit-learn.
Downloading the Fashion-MNIST dataset
Each dataset on the OpenML platform has a specific ID. We can give this ID tofetch_openml()to download the required dataset, as follows:
from sklearn.datasets import fetch_openml
fashion_mnist...