Cross-surface defect recognition
- Category: Computer vision
- Client: Industrial client
- Project date: 2021
- Source code: https://github.com/MLFreelib/cvflow
- Description: Development and implementation of algorithms for defect recognition and detection on various materials, including metal, wood, plastic, and liquid films.
Data set | Classes | Number of photos | Example |
---|---|---|---|
Wood | 6+1 (6 types of defects + non-defective samples) | 6652 | |
Steel | 4+1 | 21500 | |
Marble | 4+1 | 2937 |
Table 1 (Statistics of defect datasets)
Data | mAP | Image example |
---|---|---|
Tree | 0.89 | |
Steel | 0.79 | |
Marble | 0.77 | |
Bottle | 0.7 | |
Grid | 0.72 | |
Zipper | 0.73 | |
Cable | 0.72 |
Table 2 (Testing on various surfaces)
Liquid | Number of objects | Precision | Recall | mAP50 |
---|---|---|---|---|
Gasoline | 50 | 0,867 | 0,723 | 0,879 |
Paint | 50 | 0,795 | 0,832 | 0,844 |
Flotation | 100 | 0,762 | 0,641 | 0,773 |
Table 3 (The value of detection metrics for different surfaces and the size of the training set (number of objects)
Defects in Hard Materials
The objective is to create an algorithm capable of identifying defects on any type of material specified by the user. The goal is to develop a universal approach, eliminating the need for separate models for each material type. While this may result in slightly reduced accuracy compared to material-specific models, it offers the advantage of not requiring additional training for each specific task. However, the possibility of adding material-specific functionality is not excluded.
The architecture of the universal model is based on the classic SSD network, renowned for effectively capturing patterns in images. Instead of a classification layer, a layer of vectors, inspired by Siamese neural networks, is utilized, enabling training on multiple datasets simultaneously. Extensive analysis of defect detection methods was conducted, and appropriate datasets were selected for the task. Experiments were conducted using photographs of wood, metal, and marble, with statistics presented in Table 1
The network was trained on specific subsets of the wood and steel defect data and evaluated on their respective test sets, utilizing the mAP (mean Average Precision) metric to measure accuracy. Additionally, the network was tested on various types of surfaces, and the results are presented in Table 2.
The table shows that the accuracy of defect detection on wood and metal exceeds 0.7, as anticipated. Although the model was not trained on marble defect data and had never encountered marble surfaces, it successfully predicted the presence and class of defects with an accuracy of over 0.7. Moreover, an accuracy of 0.7-0.8 was achieved on a diverse set of images encompassing different objects and surfaces.
The expected mAP accuracy was achieved even on data that the algorithm had not encountered previously, thus accomplishing the project's objectives.
The algorithm was further tested on images with more complex conditions than the original dataset. Table 2 shows the algorithm's performance in such scenarios.
An example of the operation of the defect detection module
Defects in Liquids
The module for detecting defects in liquids focuses on three types: paintwork, gasoline, and flotation products. For paintwork and gasoline, the YOLOv8 detector was employed, as depicted in Figure 5.2. Additionally, the U-Net model was utilized to detect bubbles that occur during the flotation process, with results displayed in the figure.
Bubble detection on paintwork | Detection of gasoline spills on water |
---|
Detection of large bubbles during flotation
Table 3 presents the results obtained for the three types of liquids, along with the sizes of the training samples.