## 2 Research Technique
### Neural Network for Defect Recognition  
A neural network with a U-net architecture [31; 32] (Figure 9) and the ResNet152-based encoder [33] were used to recognise defects on the surface of a metal strip. This allowed for the semantic segmentation of the image by marking the arrays of image pixels as belonging to damage. The ResNet152 encoder makes it possible to create a detailed map of features characteristic of damage, while the U-net decoder unit allows projecting the features recognised in the image back onto the original image, thus highlighting the areas with damage. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline Supply voltage, V & 13.0 & 12.5 & 12.0 & 11.5 & 11.0 & 10.5 & 10.0 & 9.5 & 9.0 & 8.5 & 8.0 \\ \hline Luminous flux, Lm & 106 & 102 & 90 & 81 & 72 & 64 & 52 & 43 & 32 & 21 & 12 \\ \hline Brightness, cd/m\({}^{2}\) & 1721 & 1656 & 1461 & 1315 & 1169 & 1039 & 844 & 698 & 520 & 341 & 195 \\ \hline Maximum illumination in the area of the image fragment, k & 470 & 453 & 399 & 359 & 320 & 284 & 231 & 191 & 142 & 93 & 53 \\ \hline Minimum illumination in the area of the image fragment, k & 195 & 188 & 166 & 149 & 133 & 118 & 96 & 79 & 59 & 39 & 22 \\ \hline Average illumination in the area of the image fragment, k & 324 & 312 & 275 & 248 & 220 & 196 & 159 & 131 & 98 & 64 & 37 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The results of calculating the illumination of the horizontal surface, which fell into the zone of the specimen image obtained when illuminated by the LED light source. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline Supply voltage, V & 170 & 164 & 155 & 147 & 135 & 122 & 105 & 88 \\ \hline Luminous flux, Lm & 382 & 330 & 261 & 211 & 153 & 99 & 51 & 29 \\ \hline Axial force of light, cd & 29.17 & 25.20 & 19.93 & 16.11 & 11.68 & 7.56 & 3.89 & 2.21 \\ \hline Maximum illumination in the area of the image fragment, k & 461 & 399 & 315 & 255 & 185 & 120 & 62 & 35 \\ \hline Minimum illumination in the area of the image fragment, k & 140 & 121 & 95 & 77 & 56 & 36 & 19 & 11 \\ \hline Average illumination in the area of the image fragment, k & 270 & 2 To train the neural network, we used: * images of rolled steel from the Severstad company (Russia) posted on the Kaggle platform in 2019 [34]; * images of defects from the research entitled \"Detecting Defects on Rolled Metal Surface\" (placed on the Kaggle platform in 2020 [35]). The training images were screened, checked, and marked by experts. A total of 11,000 images were compiled into a training sample (5800 images with defects of various shapes and orientations and 5200 defect-free images). The training sample was divided into the test part (10% of the total number of images), the validation part (15%), and the training part (75%). The training and validation samples were used to train the neural network, and the test sample was used to evaluate the trained model. The classical SGD (Stochastic gradient descent) optimiser with the Nesterov moment was used to train the neural network. In SGD, instead of using the entire dataset for each iteration, only a single random training example (or a small batch) is selected to calculate the gradient and update the model parameters. The advantage of using SGD is its computational efficiency, especially when dealing with large datasets. This made it possible to accelerate the optimiser in the right direction and smooth out the fluctuations of the loss function [36; 37]. The _DSC_ metric (Dice similarity coefficient or Sorensen-Dice coefficient) was used to evaluate the quality of segmentation: \[DSC=\frac{2\left|Y_{true}\cap Y_{pred}\right|}{\left|Y_{true}\right|+\left|Y_{ pred}\right|}\] (13) where \(Y_{true}\) is the array of pixels that belong to the valid object of damage in accordance with the markup, and \(Y_{pred}\) is the array of pixels that belong to the detected object of damage. _DSC_ measures the similarity between two datasets--pixels that belong to recognised and actual defects.