# Neural Network System for Recognizing Images Affected by Random-Valued Impulse Noise
## 3 Proposed Method and Results
### Experiment  
Each RGB channel of the noise-exposed image was denoised separately from the other two at a fixed intensity 1%, 10%, 25%, or 50%. The 1, 10, 25, and 50 percent mean that the number of pixels in each image were randomly distributed. The experiment included recognition using a pretrained network of both individual noisy and clean images, and the entire test database. Table 2 shows the accuracies of pretrained architects to justify the choice of the basis of the image recognition program. A total of 20 epochs of each architectural network was trained and the highest value was chosen. The table shows that the best learning outcome was the VGG16 architecture. For 13 training epochs, the network recognized 8799 out of 10,000 test images, and thus the network reached a maximum accuracy of 87.99%, and the error at this epoch was 0.5190 (Figure 3). The learning rate was chosen as 0.01, the training batch had 64 images, and the test batch had 1000 images. The convolution filter 3 \(\times\) 3 was used. To solve the recognition problem, a program modeled in the Jupiter Notebook environment on the Conda core was used. First, the necessary libraries and the databases on which the network will be tested, noisy or cleared, must be downloaded. When the VGG16 architecture was loaded, the last line layer was changed to match the 10 classification classes, and the weights of the architecture network trained on CIFAR10 were imported. The network was trained on an HP Laptop 15s-fq1 xxx with an Intel(R) Core(TM) i5-1035G1 CPU @ 1.00 GHz 1.20 GHz, 8.00 GB RAM and a 64-bit operating system. Full-color images 32 \(\times\) 32 are fed to the input of the first convolutional layer. The next step involved image processing with several convolution layers with 3 \(\times\) 3 receptive fields. This choice was due \begin{table}
\begin{tabular}{c c} \hline \hline
**Architecture** & **Accuracy** \\ \hline GoogLeNet & 82.03 \\ ResNeXt50 & 84.42 \\ Densenet201 & 85.38 \\ Densenet161 & 86.52 \\ VGG16 & 87.99 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Best learning outcomes for architectures on CIFAR10 database. to the fact that this is the smallest filter size for determining orientations in the image. Next in the architecture are three fully connected layers, two with 4096 channels each and one with 10 channels by the number of dataset output classes. Accordingly, the soft-max layer performed the classification. All hidden layers were equipped with ReLU. The network did not contain a normalization layer to reduce memory consumption and training time. Also, when testing an actual assembled base, it is necessary to load a file with classes in order to display names instead of class numbers. Then, the testing process takes place on the loaded image database and the result is given as a percentage, by using the confusion matrix. Table 3 shows the recognition results of the CIFAR10 test bases. The proposed method showed good results in image cleaning. It should be noted that at 1% noise, images during recognition show an accuracy higher than known methods, which is explained by a greater degree of image blur when cleaning noise with these methods. Various criteria and metrics were used to assess the recognition accuracy of the image database:  
Figure 3: Training plots and losses plots for the VGG16 network over 13 epochs, the maximum accuracy reached is 87.99%. 1. \(F1_{\text{score}}\) is calculated as: \[F1_{\text{score}}=\frac{2\;TP}{2\;TP+FP+FN}\] (16) where \(TP\)--true positive result, \(FP\)--false positive result and \(FN\)--false-negative recognition result. The range of \(F1\) is in [0, 1] where 1 is the ideal classification. 2. The Matthews Correlation Coefficient (\(MCC\)) belongs to the range [\(-1\), 1] and has the form: \[MCC=\frac{TP\cdot TN-FP\cdot FN}{\sqrt{(TP+FP)(TP+FN)(TN+FP)(TN+FN)}}\] (17) where \(TN\)--true-negative recognition result.