# Approach to Automated Visual Inspection of Objects Based on Artificial Intelligence
## 5 Conclusions  
Visual inspection of finished products is one of the steps to achieve the high quality of products offered on the market and manage the reliability of services. In mass production inspection systems, machine vision has long been used, which can in some way process the visual data obtained by the camera and thus ensure the control of the presence of certain elements on products or products themselves. Further classification of these objects can then be based on reading barcodes and other types of codes, or inspect their shape and presence in the prescribed area. In industry, however, there are cases where the products need to be visually inspected, but the use of conventional systems for visual inspection is  
Figure 15: Comparison of the highest achieved values of different defects’ detection. not sufficient. The reason may, for example, be the complexity of the product, the quality of its surface, the inability to ensure sufficiently constant conditions for sensing the surface, frequent changes in the shape and dimensions of the sought defects and others. At a time when artificial intelligence is experiencing the greatest development so far, such an approach allows the use of machine vision in the field of visual control even in conditions where classical approaches to machine vision are no longer sufficient. The use of convolutional neural networks has proven to be a suitable method for image processing. Their subsequent training on the required type of data allows them to be used for example, to detect objects in the images, and such an approach to the problem of detecting selected types of defect on car tires was used in this particular paper. In order to obtain data from the surface of car tires, the method tested uses an industrial camera in combination with a suitable lens and lighting. As part of the preparatory phase of the experiment, several combinations of camera types, lenses and lighting methods were tested. The analysis of the obtained results shows that for the purpose of obtaining test images, a suitable choice is a monochrome 12 Mpc camera BVS CA-M4112Z00-35-000 with a Tamron BAM LS-VS-007-C1/1-5018-C lens and two 200 mm-long bar red LED lights. The data from the equipment used were subsequently processed using a common personal computer with the necessary software. Due to the results of previous research, the primary method of obtaining visual data from the tire surface was chosen to scan the surface using the industrial camera and their subsequent processing in MATLAB 2020a software. As a solution to the problems described above, the use of deep convolutional neural networks and the R-CNN element detector seems to be right. As part of the experimental part of the paper, a method of detecting defects on tires in this way was proposed. Due to the insufficient amount of input data, the principle of Transfer Learning was used, where no special deep neural network is created, but an already pre-trained network (AlexNet) is employed, modified (last three layers) and trained again on a smaller sample of our own data. By applying the Transfer Learning approach, we were able to accelerate the development of our own system for optical defect detection even on a relatively small sample of data. Implementation and verification of such an approach together with the designed methodology of a tire visual inspection process (flowchart shown in Figure 11) to obtain improved classification results for six different defects can be considered as the main novelty of the presented research. It was possible to design and train an object detector by using such an approach, which with a success rate in the range of 70-99% can detect certain types of defect in the training samples of the examined objects. However, in some cases, the proposed approach encountered problems, probably due to a lack of unique input data. The solution to this situation would be to build a specified deep neural network, layer by layer and then train it on a huge amount of data.