# Approach to Automated Visual Inspection of Objects Based on Artificial Intelligence
## 4 Results and Discussion  
Testing of pre-trained object detector performance was determined for each type of chosen defect on several selected images, while the graph in Figure 15 shows the best achieved results for each type. Defects were detected on the test images using the pre-trained AlexNet classification network and the R-CNN detector with modified SGDM optimizer. When training for a specific tire defect detection task, a combined dataset of 60 images was used for each type of defect with boundary boxes indicating the area where the defect occurred. During network training on these images, the confidence of defect detection and localization on the default \"mini-batch\" sample was achieved at the level of 90.63-100% and network training lasted on average from 4-25 min depending on the type of defect and the quality of input given. In subsequent testing of the network's success on selected test images of types CH01 to CH06, the highest values of successful defect detection certainty were achieved from 85.15% for CH04 to 99.34% for CH03 samples (Figure 15).  
Figure 14: Samples of successful defect detection.  
Figure 13: Architecture of used modified network AlexNet for our task.  
Although high detection confidence was achieved in most test samples, in some cases the elements were either detected incorrectly or not found by the system at all. Problems related to these results could be solved by designing a specific deep neural network for a given task. However, as already mentioned, in order to train such a network, it would be necessary to have a minimum number of 1000 marked images for each detected class, therefore such a solution will not be possible in experiments performed with the limited amount of training samples in the workplace outside an actual production line.  
Based on the results displayed in Figure 15, it can be concluded following statements. The first statement is based on the different values of the individual defects CH01 and CH02, which represents a similar type of defect but with a different material. A better result is obtained for defect CH01 due to impurities of the same material as the tire. The defect CH01 is categorized as the defect from the same material as a tire and displaying these defects in the data can be presented as homogeneous. The highlighted parts of defects depend on the shape, topology, relative position of the defect to the light source, and type of light system. The CH02 includes other impurities with different types of material than rubber, so the defects are captured and visualized by a colour spectrum. This issue is suitable for future work as well, for exploring more possibilities, and for conditions aimed at improving defect detection of variable types of material. The lowest confident value of defect detection is for CH04. The cracks or tears (CH04) can be classified as very difficult objects to capture in the data due to their topology and edge occurrence which can be highlighted under the light only to a limited extent. A very similar issue is with defects of the type CH05 as mechanical integrity damages. The highest values of detection are CH03, CH01 and CH06 generalizable to defects with the same material as the inspected object (tire) with a difference in shape and surface topology. Based on the aforementioned, it can be concluded that for successful implementation of a visual inspection system in tire production (detection and correct classification of all defects) there are key dependencies, both in terms of software and hardware design that provide data with sufficient quality and a well-known set of properties.