3.1.3. 2nd Preprocessing

In the 2nd preprocessing, there was a limit to collecting more diverse image data through Google Image Search, so data sets were built through data augmentation to increase their accuracy.

For AI learning models, large amounts of data are essential for high accuracy and prevention of overfitting [44]. In particular, black ice, which is intended to be detected in this study, is characterized by seasonal characteristics and unusual forming conditions that do not occur in many places. As a result, the data collection process did not collect a large amount of data compared to the other data. Accordingly, to improve the accuracy of CNN proposed in this study, the ImageDataGenerator function provided by the Keras library [45] was used to augmen<sup>t</sup> the data under the conditions in (Table 6).


**Table 6.** Setting Data Augmentation Value.

The process of building a data set through data augmentation is as follows. From the previously obtained 17,600 sheets of data, 1000 were randomly extracted per class and set as test data. Since then, the data have been augmented using the ImageDataGenerator function for the rest data, which has built 10,000 data per class. The train data and validation data were then set at 8:2. Accordingly, the final data set was set to 8:2:1 in all classes to proceed with the learning (Figure 3 and Table 7).

**Figure 3.** (**a**) Numbers of 1000 data are randomly selected and set as test data; (**b**) data augmentation with ImageDataGenerator functions; (**c**) train data and validation data set at 8:2 ratio.



### *3.2. CNN Design and Learning*

The structure of the CNN model used in this study consists of the Feature Extraction and Classification as shown in Figure 4. In the feature extraction, two convolutional layers, two max-pooling layers, and one dropout layer were arranged to conduct two iterations (Figure 4a). Each layer was then arranged once and repeated twice (Figure 4b). In addition, we used ReLU (Rectified Linear Unit), which has a fast learning speed and prevents gradient vanishing [46], as the activation function. In the case of kernel size of the convolutional layer, (3,3) was applied because the repetition of (3,3) has a fast learning speed and extracts features well [47]. The Stride of the max pooling layer was (2,2), and the Dropout rate of the dropout layer was experimentally applied 0.2. In the classification, the Fully-Connected layer and the Dropout layer were alternately placed, Softmax was applied to the output layer (Figure 4c), and the SGD (Stochastic Gradient Descent) Optimizer was used for high experimental accuracy. In addition, we applied 200 epochs, 32 batch size and the earlystopping function for optimizing the model and preventing overfitting. The earlystopping function terminates learning when there is no room for improvement in the model. Therefore, we designed this study to stop learning if the validation loss does not update the minimum value within 20 times (see Table 8)

**Figure 4.** CNN model structure; (**a**) after placing the convolutional layer and the max-pooling layer twice, place the dropout layer once and repeat training twice; (**b**) place the convolutional layer, the max-pooling layer and dropout layer once and repeat training twice; (**c**) fully-connected and dropout layers are alternately placed and softmax is applied to the output layer.

**Table 8.** CNN Model Setup Value.

