# Fashion Product Classification through Deep Learning and Computer Vision
## 6 Experimental Results
### DL Modules  
The very first experiment was the evaluation of a simple CNN architecture trained from scratch. The chosen architecture is a standard one where convolutional layers are followed by dense ones, as in a LeNet [42]. The dataset used for this first experiment is the one composed of 2616 images. The availability of a (manual) classification of those images allows us to divide the dataset in classes for logo detection. Only the type of logo was considered in this phase. In Table 1, accuracy results are reported, varying the number of dense and convolutional layers, as well as the learning rate. A _dropout_is applied at each training epoch, to prevent overfitting. The dataset was divided equally into a training and a test (or validation) sets, i.e., both sets contain the same number of images (1308). Accuracy is always measured on a validation set, consisting of different images from those in the training set. The table reported is related to the classification of type of logos. Similar results were obtained for other features. Experiments with CNNs trained from scratch were intentionally left simple, since training a large deep network requires a huge amount of images and high computational time. Unfortunately, an accuracy value of about 74% is not good enough for our scope. The fine-tuning process brought significant improvements in accuracy percentage in comparison with deep learning approaches from scratch. The main reason behind this major enhancement is the use of the pre-trained network ability to recognize low-level features, reducing the impact of the lack of images in the dataset. In these subsequent experiments, the dataset is the same as in the previous case. There are 2616 images, half in the training set and half in the validation one, labeled with the logo types classification. Although the very first attempts were accomplished adopting a VGG16 network topology, it turned out that VGG19 was eventually a more efficient starting model. In Tables 2 and 3, results of the fine-tuning with VGG16 and VGG19 architectures are shown, varying the number of frozen layers and the number of the fully-connected layers added at the end of the network. Moreover, the training time reduced substantially. All experiments were made on a Nvidia GTX 1070 GPU, and the average computational time per epoch is of 38.4 s for logo types classifier, which was run for 80 epochs. Other classifiers based on VGG19 have similar execution time. In Table 4, a further investigation on VGG19 fine-tuning was made, to choose the best value of the learning rate (i.e., the one that achieves better results in terms of accuracy, in an very low number of epochs). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**\# of Conv. Layers** & **\# of Dense Layers** & **Learning Rate** & **Dropout** & **Accuracy** \\ \hline
4 & 3 & 0.001 & 0.5 & 0.731 \\
4 & 4 & 0.001 & 0.5 & 0.733 \\
5 & 4 & 0.01 & 0.5 & 0.742 \\
5 & 5 & 0.01 & 0.5 & 0.738 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Training of a simple Convolutional Neural Network (CNN) from scratch. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**\# of Added Layers** & **\# of Frozen Layers** & **\# of First Layer Neurons** & **Accuracy** \\ \hline
1 & 10 & 256 & 0.853 \\
1 & 11 & 512 & 0.846 \\
2 & 10 & 128 & 0.850 \\
2 & 11 & 512 & 0.846 \\
**3** & **12** & **256** & **0.869** \\
3 & 12 & 512 & 0.848 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Some tests on fine-tuning with VGG16 topology and relative accuracy values. The best choice of parameters in terms of validation accuracy is highlighted in boldface font. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**\# of Added Layers** & **\# of Frozen Layers** & **\# of First Layer Neurons** & **Accuracy** \\ \hline
2 & 11 & 256 & 0.889 \\
2 & 12 & 512 & 0.890 \\
3 & 12 & 512 & 0.893 \\
**3** & **13** & **1024** & **0.908** \\
3 & 14 & 512 & 0.902 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Some tests on fine-tuning with VGG19 topology and relative accuracy values.