CS 194 Project 4: Classification and Segmentation

Emily Hu


Part 1: Image Classification

Tuning the Parameters of the Neural Network

By splitting the data available in the Fashion MNIST's original training set into a smaller training subset and a validation subset, I was able to adjust the parameters of the neural network's layers to maximize accuracy of predicted labels while avoiding overfitting. First, the network was trained on some arbitrarily chosen initial parameters for the number of epochs, the learning rate of the optimizer, and the number of output channels in each convolution layer. Following this, the resultant neural network was used to predict labels for the images in the validation set, and the accuracy of these labels was used as a metric for how well the neural network was recognizing and categorizing data that it hadn't seen before in the training phase. The validation set essentially acted as a dry run to precede the actual testing set. Then, based on this output accuracy computed on the validation set, I went back and adjusted the parameters listed previously in the neural network. After this process of fine-tuning, I ended up with a neural network that ran 5 epochs, a learning rate of 0.01, and two convolution layers, the first with 12 outputs, and the second with 36 outputs.

Accuracy on Training Set and Validation Sets During Training

Horizontal Axis = epoch number, Vertical Axis = % accuracy (predicted label matched actual label)

Accuracy by Category

As the data above shows, the classes that are hardest for the neural network to accurately predict are "shirt" and "t-shirt/top", likely because both these categories contain items which are often extremely visually similar, sharing the same general structure and shape. To further illustrate this point, we see that the "trouser" category has the highest accuracy, since pants have a very distinctive shape that is more difficult to misconstrue for any item in the other categories.

Correctly & Incorrectly Categorized Examples

Category 1: T-shirt/top

Category 2: Trouser

Category 3: Pullover

Category 4: Dress

Category 5: Coat

Category 6: Sandal

Category 7: Shirt

Category 8: Sneaker

Category 9: Bag

Category 10: Ankle Boot

Learned Filters (at First Convolution Layer)

Part 2: Semantic Segmentation