CN-115690029-B - Radial tire X-ray image defect automatic detection method based on improved YOLO-v5 model
Abstract
The invention discloses an automatic detection method for X-ray image defects of a radial tire based on an improved YOLO-v5 model, which belongs to the technical field of radial tire detection and comprises the following steps of 1, collecting X-ray images of the radial tire for segmentation processing, unifying resolution, manufacturing model training sample data, 2, aiming at the problem that the detection effect is affected due to the fact that an X-ray machine is unstable and image strips and blocks are missing, carrying out image restoration processing, 3, designing the improved YOLO-v5 model, comprising adding a fourth detection layer, adding an attention module and improving a loss function, 4, carrying out model training by adopting the data of the radial tire, and 5, carrying out tire defect detection of a practical application scene by utilizing the trained model. The automatic detection method provided by the invention can automatically identify various defects based on an improved model, and is used for detecting and classifying different defects, and the detection efficiency and the accuracy are higher.
Inventors
- ZHAO JIANLI
- YAO LUTONG
- ZHANG TIANHENG
- LI HAO
Assignees
- 山东科技大学
Dates
- Publication Date
- 20260508
- Application Date
- 20221026
Claims (4)
- 1. An automatic radial tire X-ray image defect detection method based on an improved YOLO-v5 model is characterized by comprising the following steps: Step 1, acquiring X-ray images of radial tires, performing segmentation processing, unifying resolution, and manufacturing model training sample data; step2, performing image restoration processing, which specifically comprises the following steps: Let the radial tire X-ray image be a third order tensor N 1 、n 2 、n 3 represents the dimension of each order, and the constructed restoration model is as follows: (1) Wherein, the For a clean image to be solved, N represents the tensor FCTN is a fully connected tensor network, Represents the N factor tensors resulting from the tensor full-join decomposition, Is an implicit regularization based on deep learning, In order to regularize the weight parameters, In order to implement the de-noising parameters, Representative of A set of pixel point indices observed in (c), Representative press Mapping is carried out; The model is subjected to alternate iterative update solution by the following algorithm: (2) Wherein, the Representing a two-dimensional de-noised convolutional neural network trained on a natural image dataset, Representing the number of iterations of the method, Each of the factor tensors is represented by a set of coefficients, Is a parameter of the proximal end of the device, Representing a collection Is a complement of (a); Step3, designing an improved YOLO-v5 model; The structure of the improved YOLO-v5 model comprises an input end, a main network, a bottleneck network and a prediction end, wherein the input end inputs an image, then performs image preprocessing, scales the input image to the input size of the network, and performs normalization operation; The YOLO-v5 model improvement process is as follows: Step 3.1, adding a fourth detection layer on the basis of an original YOLO-v5 model, performing up-sampling processing on the feature map with the largest output scale, continuously expanding the feature map, and performing cascade fusion on the obtained feature map with the largest scale and the feature map with the same size in a backbone network; and 3.2, adding an attention module in each detection layer characteristic processing stage, wherein the working process of the attention module is as follows: Performing MaxPool maximum pooling and AvePool average pooling on the intermediate feature map T in the space dimension to obtain two pooled vectors, inputting the two pooled vectors into a shared multi-layer mapping neural network MLP for nonlinear mapping, and obtaining two new vectors respectively as a result, performing bitwise addition operation on the two vectors, and performing nonlinear mapping on the two vectors through a Sigmoid activation function to finally obtain a channel attention module, wherein the conversion formula is as follows: (3) Wherein A 1 denotes a channel attention module, Representing a Sigmoid function; Performing MaxPool maximum pooling and AvePool average pooling operations on the middle characteristic spectrum T in the channel dimension respectively, then stacking, mapping the middle characteristic spectrum T onto a model with a single wave band and the same size through convolution operation, and then obtaining a spatial attention module A 2 ; (4) Wherein, the The characteristic transformation is performed by using a convolution neural network of 1 x 1, Representing a Sigmoid function, the function equation is: (5) Wherein x represents the input tensor; And 3.3, improving a loss function, adding an influence factor, measuring the aspect ratio data of the detection frame, and further using DIoU _P which is more in line with a regression mechanism, wherein the formula is as follows: (7) wherein IoU denotes the overlap ratio of the predicted frame and the real frame, b and Respectively representing the center points of the detection frame and the target frame; C represents the diagonal distance of the minimum closure area that can contain both the predicted and real frames; m is used for measuring the consistency of the proportion between the width and the height of the prediction frame and the real frame; Step4, performing model training by adopting radial tire defect data; And 5, detecting tire defects of the actual application scene by using the trained model.
- 2. The method for automatically detecting defects of X-ray images of radial tires based on an improved YOLO-v5 model according to claim 1, wherein the specific steps of the step 1 are as follows: Firstly, reducing the width of an original X-ray image of a radial tire to 1900 pixels, reducing the height in an equal ratio, and correspondingly reducing a real marking frame in a corresponding defect description file; Step 1.2, sliding a window 1900 x 1900 along the height direction in an original image, and setting the window to slide 10 times; and 1.3, if the window does not contain any defects during sliding, continuing to slide forwards, otherwise, correcting the position information of the defects, and generating a subgraph and a corresponding related defect description file.
- 3. The method for automatically detecting defects of X-ray images of radial tires based on an improved YOLO-v5 model according to claim 1, wherein the specific steps of the step 4 are as follows: step 4.1, processing the model training sample data manufactured in the step 1, establishing a data set comprising X-ray image defects of different radial tires, marking image information and classifying the image information to obtain a data set to be trained; Step 4.2, building a network model for improving the YOLO-v5, setting a training path and reading training parameters; step 4.3, loading a pre-training model to obtain initialized network model parameters; step 4.4, selecting a training optimizer; Step 4.5, loading a training set; And 4.6, starting training, updating network model parameters until iteration is finished, and finishing model training.
- 4. The method for automatically detecting defects of X-ray images of radial tires based on an improved YOLO-v5 model according to claim 1, wherein the specific steps of the step 5 are as follows: step 5.1, acquiring a current original radial tire X-ray image in real time, and performing image preprocessing, wherein the image preprocessing comprises image segmentation, unified resolution and image restoration; Step 5.2, after the preprocessed image is obtained, inputting the preprocessed image into a training improved YOLO-v5 model, and then carrying out image partitioning; Step 5.3, dividing the tire into local defects and global defects according to different positions of areas where the defects appear, further extracting detail features on different areas of the tire, detecting the corresponding defects, giving detection information by a model, including the position information of the defects in an image, and predicting various confidence degrees obtained; and 5.4, carrying out confidence screening, and only reserving candidate frames with confidence degrees larger than a preset threshold value according to the preset threshold value and displaying the candidate frames on the current detection image so as to obtain the current tire defect detection condition.
Description
Radial tire X-ray image defect automatic detection method based on improved YOLO-v5 model Technical Field The invention belongs to the technical field of radial tire detection, and particularly relates to an automatic radial tire X-ray image defect detection method based on an improved YOLO-v5 model. Background Radial tires are used as main parts of automobiles and are closely related to the life and industrial production of people. The radial tire has the advantages of larger crown thickness, compression resistance, wear resistance, high stretching resistance and high hardness of the belt layer, capability of playing a role in buffering and hooping the tire body, large unit grounding area, high adhesion capability, smaller grounding pressure, more uniform load and better prolongation of the driving mileage of the tire. Because of the good performance of radial tires, the radial tires have taken the leading position in the market, and the requirements on the production quality of the tires and the performance of the products delivered from the factory are gradually increased. Therefore, final detection of the finished product from the factory is an important link of the quality control of the product in the production process of the tire, and can ensure that the finished tire achieves good quality and performance. At present, the corresponding automatic detection algorithm of the tire defects in China is imperfect, and the X-ray images of the tires are observed by manpower to judge whether the tires have the defects or not, classify the types of the various defects and have low detection efficiency. Secondly, the tire X-ray image obtained by an X-ray machine has certain noise interference and low brightness, and the image forms of various defects are different, so that different defect characteristics are difficult to extract by a single method. Disclosure of Invention Aiming at the problems that various types of radial tires exist, various types of defects exist in tread pattern lines of the tires, and the X-ray images of the same defects on radial tires of different types can be different in shape, scale and gray scale, the invention provides an automatic detection method for the defects of the X-ray images of the radial tires based on an improved YOLO-v5 model, and various defects can be identified. The technical scheme of the invention is as follows: an automatic radial tire X-ray image defect detection method based on an improved YOLO-v5 model comprises the following steps: Step 1, acquiring X-ray images of radial tires, performing segmentation processing, unifying resolution, and manufacturing model training sample data; Step 2, performing image restoration processing; Step3, designing an improved YOLO-v5 model; Step4, performing model training by adopting radial tire defect data; And 5, detecting tire defects of the actual application scene by using the trained model. Further, the specific steps of the step 1 are as follows: Firstly, reducing the width of an original X-ray image of a radial tire to 1900 pixels, reducing the height in an equal ratio, and correspondingly reducing a real marking frame in a corresponding defect description file; Step 1.2, sliding a window 1900 x 1900 along the height direction in an original image, and setting the window to slide 10 times; and 1.3, if the window does not contain any defects during sliding, continuing to slide forwards, otherwise, correcting the position information of the defects, and generating a subgraph and a corresponding related defect description file. Further, the specific steps of the step 2 are as follows: Let the radial tire X-ray image be a third order tensor N 1、n2、n3 represents the dimension of each order, and the constructed restoration model is as follows: Wherein, the For a clean image to be solved, N represents the tensorFCTN is a fully connected tensor network,Represents the N factor tensors resulting from the tensor full-join decomposition,Is an implicit regularization device based on deep learning, lambda is regularized weight parameter, sigma is denoising parameter, omega representsA set of pixel point indices observed in (c),Representing mapping according to omega; The model is subjected to alternate iterative update solution by the following algorithm: Wherein, the Representing a two-dimensional de-noised convolutional neural network trained on a natural image dataset, q represents the number of iterations, i=1,..n represents each factor tensor, ρ is a near-end parameter, Ω C represents the complement of the set Ω. Further, in the step3, The structure of the improved YOLO-v5 model comprises an input end, a main network, a bottleneck network and a prediction end, wherein the input end represents an input picture, the input end performs image preprocessing at the stage, scales the input image to the input size of the network and performs normalization operation; The YOLO-v5 model improvement process is as follows: Step 3.1, adding