# Stochastic Detection of Interior Design Styles Using a Deep-Learning Model for Reference Images
## 4 Training and Evaluation of Interior Design Style Detection
### Results of Training and Evaluation  
A dataset consisting of 120 images for each of the four target styles was used for training and evaluation. The test dataset has 80 images with 20 images per style class that were randomly selected  
Figure 5: Conceptual structure of the interior design style recognition model based on a pre-trained model. from the dataset. The remaining 400 images were augmented twice by flipping left and right and then used to construct a training dataset. Finally, 80% of the resulting 800 images were used as training data, and 20% were used as validation data during the training. A VGG16 model with Place365-trained weights was used as a backbone network. The batch size of the training dataset was set to 32, and the batch size of the validation dataset was set to 160, which is the total size of the validation dataset. In addition, the learning rate was set to 0.00001. The Adam optimization algorithm was applied to update the network weights during training, and cross entropy was used as the loss function. The maximal number of training epochs was 500; however, the training was halted at 145 epochs to prevent overfitting. Subsequently, the accuracy, precision, recall, and F1-scores were measured to evaluate the trained model. The F1-score, which is the harmonic average of precision and recall, is one of the most popular measures for evaluating the performance of machine learning models when the datasets are imbalanced [35]. A true positive outcome indicates that the model correctly predicted the class of an input data sample. A false positive outcome indicates that the model predicted the class of an input data sample as A; however, the actual class was B or C. A false negative outcome indicates that the real class of an input data sample was B or C; however, the model predicted the class of the input data sample as A. Precision, recall, and F1-Score are defined as follows:  
\[Precision=\frac{True\ Positive}{True\ Positive+False\ Positive}, \tag{2}\]  
\[Recall=\frac{True\ Positive}{True\ Positive+False\ Negative}, \tag{3}\]  
\[F1\text{-}Score=\frac{2\times(Precision\times Recall)}{Precision+Recall}. \tag{4}\]  
Figure 6 shows the results for the recognition test as confusion matrices. of results of. The X axis represents the style predicted by the trained model and the Y axis represents the true style of given test images. Figure 6a describe the numbers of correct and incorrect predictions with count values by each style. Figure 6b describes the normalized value of correct predictions. The true positive, false positive, and false negative of prediction results per style class can be calculated using the confusion matrix. A true positive value of the casual style class is calculated as 18, a false positive is calculated as 8, and a false negative is calculated as 2. A true positive value of the classic style class is calculated as 13, a false positive is calculated as 3, and a false negative is calculated as 7. A true positive value of the modern style class is calculated as 17, a false positive is calculated as 10, and a false negative is calculated as 3. Using their calculated values, precision, recall, F1-score, and accuracy are calculated to measure the performance of the style recognition model. Table 4 presents the precision, recall, F1-score, and accuracy per class and their macro average values to measure the trained model performance. The precision value of classic style prediction is the highest at 0.812. This means that the model and the recall value for the casual style is the highest (0.900). In addition, the casual style yields the highest F1-score. The F1-scores of the casual, classic, and modern styles are all 0.7 or higher; that of the natural style is 0.452. The mean values for precision, recall, and F1-score are 0.693, 0.688, and 0.670, respectively. There was a difference in the recognition performance for each class. The model predicted more frequencies of the modern and casual style then classic and natural.