## 3 Results and Discussion
### Implementation, Optimization, Debugging, and Testing of the Algorithm Using the CNN YOLOv5s
The results obtained correspond to the needs of the problems of detection and classification of defects of various natures in the facing building material and are of practical value. Thus, the expansion of the training set through the use of the author's augmentation algorithm of the own empirical database of facing brick images based on simulating various shooting conditions, the selection of parameters, training, and optimization of the detector based on the YOLOv5s CNN, made it possible to obtain an algorithm that has a high accuracy in the tasks of building flaw detection. The values of the mAP0.50 and mAP0.50:0.95 metrics for the developed model were 87% and 72%, which is not inferior to the average accuracy (AP) of the model of a one-stage crack detection network consisting of the EfficientNetB0 backbone network and a detector (76.4%) [28], and AlexNet proposed in [52] (89.31%) outperforms the FPN model proposed for detecting and segmenting cracks on the surface of marble slabs (71.35%) [53], as well as the YOLACT model for detecting cracks in concrete with ResNet-50 main architectures and ResNet-10 (37.39% and 36.05%) [54]. Comparison of the obtained results with the results of other studies showed a rather high accuracy of the developed model aimed at detecting and classifying defects. The model can be improved by expanding the training data set and improving the augmentation algorithm by introducing additional lighting conditions and shooting angles, as well as a combination of various noises and effects. These transformations contribute to the expansion of variations of possible representations of the original image and, thus, have a positive effect on the training of the detector. Expanding the sample leads to more efficient training of the detector, improving its degree of recognition of new objects. The obtained results should also be discussed in terms of scientific novelty and practical significance. The scientific novelty of this study and, accordingly, its scientific result will be, primarily, the created empirical base, which will allow using the new methodology to determine defects in facing materials, namely in bricks. The novelty lies in the fact that, earlier in construction practice, this approach was based on a physical examination of the condition of facing materials and the detection of defects either with the help of magnifying glasses or with the naked eye. Our approach is methodologically new, as it is based on the  
Figure 8: Results of the detector operation: (**a,c,e**) original image; (**b,d,f**) result of the detector operation. introduction of the artificial intelligence method and its verification by laboratory studies of real brick samples. Pilot testing of this method is possible in two ways. These two ways are approach at the stage of brick production, that is, at construction industry enterprises, and approach at the stage of erection of buildings and structures in masonry. Thus, in view of the fact that the physical experiment under conditions of simulation of real operating conditions, on the samples selected in real conditions, showed good convergence with the proposed methods of artificial intelligence, the proposed method can be considered effective and accurate. At the same time, the practical significance of this study should be noted. Such a study makes it possible to detect defects in facing products at the production stage with greater efficiency, accuracy, and the least labor costs. At the stage of construction and operation, this method will allow monitoring of the technical condition and construction control over the construction of buildings and structures. Finally, a certain phenomenological base has been laid for future scientific research, based on an integrated approach that combines a physical experiment with the method of artificial intelligence.