Rubber airbag defect detection method based on improved YOLOv8s

By improving the YOLOv8s network model, combining multi-scale depth-separable convolutional spatial attention and optimized bounding box regression loss function, the problems of low efficiency and insufficient accuracy in rubber airbag defect detection are solved, and efficient and accurate automated detection effects are achieved.

CN120707482APending Publication Date: 2025-09-26GUANGDONG YICONTON AIR SPRING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510758495.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing rubber airbag defect detection methods rely on manual inspection and traditional image processing technology, which are inefficient, prone to fatigue, highly subjective, and difficult to cope with complex and changing production environments. Traditional deep learning methods have limited ability to identify subtle defects when processing rubber airbags, especially in cases of uneven lighting and complex backgrounds, and are prone to missed detections and false detections.

Method used

An improved YOLOv8s network model is adopted, and the feature extraction capability is enhanced through the multi-scale depth-separable convolutional spatial attention mechanism (CPMS). The C2f module in the neck network is replaced with the C2f-LarK module, the detection head is optimized with the Faster Detect module, and the Shape-IoU loss function is used to optimize the bounding box regression to build an efficient airbag defect detection model.

Benefits of technology

It achieves efficient detection of rubber airbag defects, improves the degree of automation in the production process, reduces labor costs, and significantly improves detection accuracy and robustness in complex backgrounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707482A_ABST
    Figure CN120707482A_ABST
Patent Text Reader

Abstract

The invention relates to a rubber air bag defect detection method based on improved YOLOv8s, which comprises the following steps: step S1, building a machine vision detection platform, and collecting air bag sample image information from multiple angles inside and outside; s2, preprocessing the collected air bag image sample data to obtain an air bag defect image sample data set, and performing data enhancement on the air bag defect image sample data set; step S3, constructing a YOLOv8s airbag defect detection network model; step S4, constructing an improved YOLOv8s airbag defect detection network model; s5, training the improved YOLOv8s network model by using the airbag defect image sample data set to obtain an airbag defect detection model; and S6, performing defect detection on the image of the to-be-detected airbag through the airbag defect detection model to obtain an airbag defect detection result. According to the improved YOLOv8s-based air spring rubber air bag defect detection method and device, the defects of the rubber air bag can be efficiently detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of defect detection, and in particular to a rubber airbag defect detection method based on improved YOLOv8s. Background Art

[0002] Rubber airbags are widely used in the air spring industry due to their excellent mechanical properties, effectively mitigating vibrations caused by road excitation and ensuring passenger comfort. However, during production, due to the characteristics of rubber materials and the complexity of the production process, air springs often develop defects such as cracks, bubbles, dirt, spots, and foreign matter. These defects not only affect the appearance of air springs but can also lead to product safety issues, increasing production costs for companies and user risks for customers. Therefore, accurately and quickly detecting these defects is crucial for improving product quality and reducing potential risks.

[0003] Currently, rubber airbag defect detection primarily relies on manual inspection and traditional image processing techniques. While manual inspection offers high flexibility, it suffers from low efficiency, fatigue, and subjectivity. Traditional image processing techniques, while effective under specific circumstances, rely on pre-set rules and feature extraction methods, but struggle to cope with complex and changing production environments and have limited ability to identify subtle rubber defects. Furthermore, traditional methods often struggle with uneven lighting, light absorption by the rubber material, and background interference, leading to missed and false detections.

[0004] To address these issues, the industry has gradually introduced deep learning-based defect detection algorithms. These algorithms demonstrate significant advantages in detection efficiency and accuracy, particularly in handling complex scenarios and diverse data, demonstrating enhanced robustness. However, existing deep learning methods still face challenges when processing airbag images. For example, due to the dark color of rubber, subtle defects have low contrast in the image, making them difficult for traditional deep learning algorithms to accurately identify. Furthermore, surface cracks on air spring airbags often exhibit poor image quality and complex backgrounds, further complicating detection. Summary of the Invention

[0005] In view of the defects in the prior art, the purpose of the present invention is to provide an air spring rubber airbag defect detection method and device based on improved YOLOv8s, which can efficiently detect rubber airbag defects.

[0006] The technical solution adopted by the present invention to solve the technical problem is: a rubber airbag defect detection method based on improved YOLOv8s, comprising the following steps: Step S1: Building a machine vision inspection platform to collect image information of airbag samples from multiple angles inside and outside; Step S2, preprocessing the collected airbag image sample data to obtain an airbag defect image sample dataset, and performing data enhancement on the airbag defect image sample dataset; Step S3, building a YOLOv8s airbag defect detection network model; Step S4, constructing an improved YOLOv8s airbag defect detection network model; Step S5, using the airbag defect image sample dataset to train the improved YOLOv8s network model to obtain an airbag defect detection model; Step S6: performing defect detection on the image of the airbag to be inspected using the airbag defect detection model to obtain an airbag defect detection result.

[0007] Furthermore, the present invention also provides an airbag defect detection device based on improved YOLOv8s, including a detection system and an application interface for executable instructions for operating the detection system, wherein the detection system is configured to execute the above-mentioned airbag defect detection method based on improved YOLOv8s by executing the executable instructions.

[0008] Compared with the existing technology, the present invention develops an airbag defect detection method and device based on an improved YOLOv8s network, which can not only efficiently detect airbag defects, but also improve the degree of automation of the production process and reduce labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, several changes and improvements can be made without departing from the concept of the present invention.

[0010] Figure 1 A flowchart of an airbag defect detection method based on improved YOLOv8s provided by the present invention;

[0011] Figure 2 This is a diagram of the CLI-YOLO model architecture in the airbag defect detection method based on improved YOLOv8s provided by the present invention;

[0012] Figure 3 A schematic diagram of the CPMS structure in an airbag defect detection method based on improved YOLOv8s provided by the present invention;

[0013] Figure 4 A schematic diagram of the Lark Block structure in an airbag defect detection method based on improved YOLOv8s provided by the present invention;

[0014] Figure 5 A schematic diagram of the C2f-LarK structure that introduces the LarkBlock module into the airbag defect detection method based on improved YOLOv8s provided by the present invention;

[0015] Figure 6 A schematic diagram of the PConv module structure in an airbag defect detection method based on improved YOLOv8s provided by the present invention;

[0016] Figure 7 A schematic diagram of the FasterDetect module structure in an airbag defect detection method based on improved YOLOv8s provided by the present invention;

[0017] Figure 8 A heat map of CLI-YOLO during performance analysis in an airbag defect detection method based on improved YOLOv8s provided by the present invention;

[0018] Figure 9 The prediction results of the trained CLI-YOLO model under different working conditions in the airbag defect detection method based on improved YOLOv8s provided by the present invention. DETAILED DESCRIPTION

[0019] In order to explain in detail the possible application scenarios, technical principles, specific solutions that can be implemented, and the purpose and effects of this application, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of this application and are therefore only examples and are not intended to limit the scope of protection of this application.

[0020] The rubber airbag defect detection method based on improved YOLOv8s of the present invention is shown in Figure 1 , including the following steps: Step S1: Building a machine vision inspection platform to collect image information of airbag samples from multiple angles inside and outside; Step S2, preprocessing the collected airbag image sample data to obtain an airbag defect image sample dataset, and performing data enhancement on the airbag defect image sample dataset; Step S3, building a YOLOv8s airbag defect detection network model; Step S4, constructing an improved YOLOv8s airbag defect detection network model; Step S5, using the airbag defect image sample dataset to train the improved YOLOv8s network model to obtain an airbag defect detection model; Step S6: performing defect detection on the image of the airbag to be inspected using the airbag defect detection model to obtain an airbag defect detection result.

[0021] In step 1, the visual inspection platform includes a clamping and conveying mechanism, a multi-view imaging system and a signal processing unit. The clamping and conveying mechanism is used to stably fix the air spring on the conveyor belt and ensure that the air spring can rotate at a large angle during the conveying process, so that the air spring can be photographed by cameras at multiple internal and external angles during the movement; the internal and external multi-view imaging system cooperates with the clamping and conveying mechanism. When passing through the conveyor belt, multiple cameras photograph the inner and outer surfaces of the air spring to capture images of the airbag at various angles; the signal processing unit receives and processes the image data from the multi-view imaging system.

[0022] In step 2, when performing airbag defect detection, it is first necessary to collect airbag image sample data and preprocess these collected airbag image samples to construct an image sample dataset containing airbag defects. The airbag sample image data can be obtained from a large number of existing airbag images. However, since these collected images may contain some invalid data that does not meet the requirements, in order to ensure the reliability of the subsequent deep learning network model trained based on the airbag image sample data, it is necessary to preprocess these image sample data to remove invalid data. Step 2 includes the following steps: Step S21, cleaning the collected airbag image sample data, removing the airbag image sample data without defects, and retaining the image sample data with defects; Step S22, annotating the collected image data using Labelmg software to generate preliminary annotation results; In step S23, the annotation results are manually corrected to ensure the accuracy and completeness of the annotation data, and finally a high-quality annotation dataset for training is generated.

[0023] In step 3, YOLOv8s is used as the base network model, and target detection is treated as a regression problem. It can directly predict bounding boxes and category labels in the input image, avoiding the problems of the two-stage detection algorithm such as complex architecture, large computational workload, and slow detection speed.

[0024] The basic YOLOv8s network model includes a backbone network, a neck network, and a detection head. The backbone network and the neck network each include multiple C2f modules and multiple convolution modules Conv. The neck network also includes multiple tensor connection modules Concat.

[0025] The construction process of the improved YOLOv8s network model in step 4 includes the following steps: S41, optimizes the backbone network of the traditional YOLOv8s network and adds the CPMS attention mechanism to the backbone network of the YOLOv8s network; S42, optimizes the neck network of the traditional YOLOv8s network and uses the C2f-LarK module to replace the C2f module in the original neck network; S43, optimizes the detection head of the traditional YOLOv8s network and replaces the original Detect module with the Faster Detect module; S44, combining the optimized backbone network Backbone, neck network Neck and detection head Head to obtain the improved YOLOv8s network model.

[0026] In step S41, by adding the CPMS attention mechanism to the backbone network of the YOLOv8s network, a multi-scale structure is introduced to further enhance the ability of the convolution operation in capturing spatial relationships, so as to extract contextual information from the input features and enhance the ability of feature extraction.

[0027] Specifically, if Figure 2 As shown in the figure, the CPMS attention mechanism is introduced into the backbone network Backbone. CPMS is constructed by introducing the multi-scale channel attention mechanism and the multi-scale depthwise separable convolutional spatial attention into the CBAM attention mechanism. By aggregating local information through deep convolution and integrating the spatial information in the feature map using average pooling and maximum pooling operations, this process generates two independent spatial context descriptors for capturing different spatial features. Multi-branch deep strip convolution is used to capture multi-scale contextual information, enabling the module to extract richer contextual features at multiple scales. This multi-scale feature enables CPMS to extract features more accurately when dealing with defects such as irregular shapes and complex textures, significantly improving the model's ability to pay attention to channel information at different scales. The multi-scale depthwise separable convolutional spatial attention module captures the spatial relationship between features through deep convolution, effectively reducing computational complexity while maintaining channel information.

[0028] Figure 3 The CPMS attention mechanism is shown. First, by performing multi-scale convolution channel attention module calculation on the input feature map, convolution can be used to simulate the relationship between different channels, and its output is used as the attention weight to adjust the channel attention input. Then, the multi-scale depth-separable convolution spatial attention module captures the spatial relationship between features through deep convolution to form a more refined attention map. The CBAM and CPMS formulas are expressed as follows:

[0029] CA(F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F)))

[0030] SA(F)=σ(f 7×7 ([AvgPool(F);MLP(MaxPool(F)])

[0031] Where σ is the sigmoid activation function, f 7×7 represents a convolution operation with a filter size of 7×7, MLP is a multi-layer perceptron, AvgPool is average pooling, MaxPool is maximum pooling, and F is the input feature value.

[0032]

[0033]

[0034] Where DWConv represents depthwise convolution, Conv is a 1×1 convolution, Inputii∈{0,1,2,3} represents the i-th branch, Input0 represents the feature map of the input image, Branchi,i∈{0,1,2,3} represents the i-th branch, Branch0 represents the feature map after the output of the channel attention mechanism, CAM(F) and SAM(F) represent the multi-scale channel and multi-spatial attention modules respectively.

[0035] The input feature results are calculated by CAM to adjust the input weights of each channel, and then SAM captures the spatial relationship of each feature to obtain a more refined feature attention map.

[0036] In step S42: the C2f-LarK module replaces the Cf2 module in the original neck network; specifically, Figure 4 The LarK Block module is shown. Large kernel convolution is primarily used for feature extraction in the model. While using large kernel convolution, the SE Block further enhances model depth and feature representation. Next, after passing through a fully connected layer and a sigmoid activation function, the vector is activated and restored to match the number of channels in the input feature map. Finally, the activated vector is element-wise multiplied with the original feature map, thereby enhancing or suppressing the response of certain channels in the feature map.

[0037] Assume x in Represents the input feature map, with a shape of (B, C, H, W), where B is the batch size, C is the number of channels, and H×W is the spatial dimension.

[0038] Perform a depth-separable large convolution kernel operation on the input feature map. The formula is as follows:

[0039] x depth=DilatedDepthwiseConv(x in )

[0040] Through parallel large kernel convolution and dilated convolution branches, they are calculated separately during training and merged into a single equivalent large kernel convolution (Dilated Reparam Block) during inference.

[0041] SE Block compresses all channels of the feature map into a single vector through a global compression operation.

[0042] SE(x)=σ(W2·ReLU(W1·GAP(x)))

[0043] Where σ is the sigmoid activation function, W1 and W2 are weight moments, ReLU is the activation function, GAP is the global average pooling, and the generated weights are multiplied by the feature map channel by channel to enhance the key features.

[0044] In the feedforward network (FFN), point-by-point convolution and activation functions are used to balance computational efficiency and nonlinearity. The module output is added to the original input using residual connections. Finally, the output formula of LarK Block can be written as follows:

[0045] x out =x in +FFN(SE(x depth ))

[0046] In the neck network Neck, a large kernel convolution is introduced to replace the Bottleneck module in the C2f module. The C2f-LarK module is constructed by replacing the original Bottleneck module with the LarK Block module, such as Figure 5 As shown in the figure, non-sparse large kernel convolution and multiple sparse small kernel convolutions improve feature extraction efficiency by adjusting the sparsity rate. The parallel use of large convolution kernels and dilated convolutions effectively captures both local and global features. With the introduction of the LarK Block module, C2f-LarK significantly improves the model's spatial perception capabilities. By expanding the receptive field, the model captures details related to airbag defects. Furthermore, the network demonstrates significant improvements in feature extraction and task generalization.

[0047] In step S43: the construction of the Faster Detect module is to replace the original convolutional layer by some convolutional layers, and by introducing PConv into the Head detection module, the computational complexity of subsequent convolution operations is greatly reduced, effectively reducing the number of model parameters and computational complexity; Figure 6 shows the PConv module schematic.

[0048] Specifically, the traditional detection head is a key component of the target detection model, and the amount of calculation accounts for about 1 / 5 of the entire model. Although this module is simple to calculate, it will generate a lot of computational redundancy when performing defect detection, which seriously affects the computational efficiency. To solve this problem, the present invention proposes a Faster Detect module with faster detection speed. By using some channels of the input feature map as representatives of the feature map, the universality of the feature map is ensured and the consistency of the number of input and output channels is maintained. This operation effectively integrates the information of all channels, avoids a significant decline in performance, and further optimizes the network performance, such as Figure 7 shown.

[0049] In step S5, the improved YOLOv8s network model is trained using the airbag defect image sample dataset, including steps S51-S54, as follows:

[0050] Step S51: Divide the airbag defect image sample dataset into a training set, a validation set, and a test set in a ratio of 7:2:1.

[0051] Step S52: Input the training set into the improved YOLOv8s network model for training to obtain the optimal parameters of the model.

[0052] Specifically, when training the improved YOLOv8s network model, Shape-IoU based on the focus on bounding box shape and scale features is used as the bounding box regression loss function.

[0053] In this embodiment, a loss function is used to obtain the error between the predicted box and the true value to evaluate the performance of the target detection model. The loss function Loss consists of three parts, including the boundary loss function, the confidence loss function, and the classification loss function. The overall loss function is as follows: Loss = λ box loss box +λ obj loss box +λ cls loss cls Where λ box ,λ obj and λ cls They represent the positioning loss weight, confidence loss weight, and classification loss weight respectively.

[0054] The boundary loss function uses Shape-IoU based on the shape and scale features of the focused bounding box as the bounding box regression loss function to calculate the loss more accurately, thereby optimizing the accuracy of the bounding box regression. The Shape-IoU loss function is calculated as follows: L Shape-IoU =1-IoU+distance shape +0.5×Ω shape

[0055] Among them, distance shape Quantify the shape difference between the predicted bounding box center point and the actual bounding box center point, x c 、y c They are the horizontal and vertical coordinates of the center point of the prediction box, are the horizontal and vertical coordinates of the center point of the real frame, ww and hh are the weight coefficients in the horizontal and vertical directions, c is the diagonal distance of the minimum bounding box, Ω shape represents the regularization term related to the shape, θ is the shape cost, w and h represent the width and height of the anchor box respectively, w gt and h gt is the width and height of the actual box, and IoU represents the loss of the original bounding box.

[0056] Step S53: Input the optimal parameters and validation set data into the improved YOLOv8s network model, calculate the prediction accuracy of the model, and adjust the hyperparameters of the model based on this, and finally select the model with the highest prediction accuracy in the validation set as the optimal improved YOLOv8s model;

[0057] Step S54: Input the test set data into the optimized YOLOv8s model, calculate its prediction accuracy, evaluate the model performance, and determine the final airbag defect detection model based on the results of the test set.

[0058] Specifically, to demonstrate the performance of the proposed CLI-YOLO in detecting airbag defects, we conducted comparative experiments with several classic object detection models, including Faster R-CNN, YOLOv5s, YOLOv8s, and YOLOv9s. All models were trained and tested on the same dataset. Training was terminated when the models reached convergence. The experimental results are shown in Table 1. Table 1

[0059] Among the evaluation metrics, P stands for precision, R for recall, mAP stands for average mean average precision, ModelSize represents the storage size of the model file, and GFLOPs refers to the number of floating-point operations per second performed by the model. As shown in the table, CLI-YOLO outperforms other models in P, R, mAP@0.5-0.95, and GFLOPs, reaching 93.1%, 92.9%, 58.3%, and 21.2%, respectively. Furthermore, its Weight size and GFLOPs are significantly smaller than those of Faster R-CNN. Although mAP@0.5 and Model size are slightly lower than the best performance of 96.8% and 15.2MB, respectively, this difference is acceptable in experiments. The CPMS introduced in the CLI-YOLO model improves the model's sensitivity to multi-scale features, C2f-LarK expands the model's receptive field, FasterDetect reduces the model's computational redundancy, and Shape-IoU optimizes bounding box shape, scale matching, and multi-scale feature detection. Comparison shows that CLI-YOLO achieves lightweight while also demonstrating excellent detection capabilities.

[0060] After training and testing on a specific dataset, CLI-YOLO achieved a mAP@0.5 score of 93.1%, achieving high-precision airbag defect detection. Furthermore, the reduced number of parameters and computational complexity significantly lowered the hardware requirements for model deployment, reducing latency when running the model on edge devices and improving real-time performance.

[0061] Figure 8 Heatmaps of CLI-YOLO under various backgrounds in the validation set are shown. Heatmaps enhance the transparency and explainability of model decisions by highlighting image regions deemed important by the algorithm. They also reveal areas that the model may have overlooked or mislabeled, helping to optimize algorithm performance. In the heatmap, red indicates key areas of focus for the model, while blue indicates areas of lesser concern. In comparison, the CLI-YOLO model performs better in detection, paying greater attention to defects, with clearer outlines and a more concentrated red area in the heatmap. This demonstrates that, after four optimization steps, CLI-YOLO demonstrates outstanding defect recognition capabilities.

[0062] Step S6: Perform defect detection on the image of the airbag to be inspected using the airbag defect detection model to obtain an airbag defect detection result. Figure 9, showing the prediction results of the trained CLI-YOLO model under different backgrounds. Some images in the dataset may have defects partially obscured. Notably, the model demonstrates significant effectiveness in predicting small, multi-scale mixed, and impurity-influenced airbag defects. This demonstrates that the work presented in this paper not only improves the model's detection performance but also advances the generalization of the visual inspection model across a wide range of operating conditions.

[0063] Furthermore, the present invention also provides an airbag defect detection device based on improved YOLOv8s, including a detection system and an application interface for operating executable instructions of the detection system, wherein the detection system is configured to execute the above-mentioned airbag defect detection method based on improved YOLOv8s by executing the executable instructions.

[0064] In one embodiment, an airbag defect detection device based on improved YOLOv8s is provided, including a detection system and an application interface of executable instructions for operating the detection system, wherein the detection system is configured to execute the above-mentioned airbag defect detection method based on improved YOLOv8s by executing the executable instructions.

[0065] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.

Claims

1. A rubber airbag defect detection method based on improved YOLOv8s, characterized in that: The following steps are involved: Step S1: Building a machine vision inspection platform to collect image information of airbag samples from multiple angles inside and outside; Step S2, preprocessing the collected airbag image sample data to obtain an airbag defect image sample dataset, and performing data enhancement on the airbag defect image sample dataset; Step S3, building a YOLOv8s airbag defect detection network model; Step S4, constructing an improved YOLOv8s airbag defect detection network model; Step S5, using the airbag defect image sample dataset to train the improved YOLOv8s network model to obtain an airbag defect detection model; Step S6: performing defect detection on the image of the airbag to be inspected using the airbag defect detection model to obtain an airbag defect detection result.

2. The rubber airbag defect detection method based on improved YOLOv8s according to claim 1 is characterized in that: In step 1, a machine vision inspection platform with a multi-view imaging system and a signal processing unit is built. Multiple cameras are used to photograph the inner and outer surfaces of the rubber airbag to capture images of the airbag at various angles. The signal processing unit receives and processes image data from the multi-view imaging system.

3. The rubber airbag defect detection method based on improved YOLOv8s according to claim 1 is characterized in that: The step 2 comprises the following steps: Step S21, cleaning the collected airbag image sample data, removing the airbag image sample data without defects, and retaining the image sample data with defects; Step S22, annotating the collected image data using Labelmg software to generate preliminary annotation results; In step S23, the annotation results are manually corrected to ensure the accuracy and completeness of the annotation data, and finally a high-quality annotation dataset for training is generated.

4. The rubber airbag defect detection method based on improved YOLOv8s according to claim 1 is characterized in that: In step 3, a traditional YOLOv8s network model is constructed. The traditional YOLOv8s network model includes a backbone network Backbone, a neck network Neck and a detection head Head. The backbone network Backbone and the neck network Neck both include multiple C2f modules and multiple convolution modules Conv.

5. The rubber airbag defect detection method based on improved YOLOv8s according to claim 1 is characterized in that: The step 4 comprises the following steps: Step S41, optimizing the backbone network Backbone of the traditional YOLOv8s network, and adding the CPMS attention mechanism to the backbone network of the YOLOv8s network; Step S42, the neck network Neck of the traditional YOLOv8s network is optimized, and the C2f module in the original neck network Neck is replaced with the C2f-LarK module; the C2f-LarK module is constructed by replacing the original Bottleneck module with the large kernel convolutional layer module Step S43: Optimize the detection head of the traditional YOLOv8s network and replace the original Detect module with the Faster Detect module. Step S44: Combine the optimized backbone network Backbone, neck network Neck, and detection head Head to obtain the improved YOLOv8s network model.

6. The rubber airbag defect detection method based on improved YOLOv8s according to claim 5 is characterized in that: In step S41, by adding the CPMS attention mechanism to the backbone network of the YOLOv8s network, a multi-scale structure is introduced to further enhance the ability of the convolution operation in capturing spatial relationships.

7. The rubber airbag defect detection method based on improved YOLOv8s according to claim 5 is characterized in that: In step S43, the Faster Detect module is constructed by replacing the original convolutional layer with some convolutional layers and introducing PConv into the Head detection module.

8. The rubber airbag defect detection method based on improved YOLOv8s according to claim 1 is characterized in that: The S5 step includes the following steps: Step S51: Divide the airbag defect image sample dataset into a training set, a validation set, and a test set in a ratio of 7:2:1; Step S52: Input the training set into the improved YOLOv8s network model for training to obtain the optimal parameters of the model; Step S53: Input the optimal parameters and validation set data into the improved YOLOv8s network model, calculate the prediction accuracy of the model, and adjust the hyperparameters of the model based on this, and finally select the model with the highest prediction accuracy in the validation set as the optimal improved YOLOv8s model; Step S54: Input the test set data into the optimized YOLOv8s model, calculate its prediction accuracy, evaluate the model performance, and determine the final airbag defect detection model based on the results of the test set.

9. The rubber airbag defect detection method based on improved YOLOv8s according to claim 8, characterized in that: In step S52, when training the improved YOLOv8s network model, Shape-IoU based on the focus on the bounding box shape and scale features is used as the bounding box regression loss function. The loss function is used to obtain the error between the predicted box and the true value to evaluate the performance of the target detection model. The loss function Loss consists of three parts, including the boundary loss function loss box , confidence loss function loss obj And classification loss function loss cls ; The overall loss function is as follows: Loss=λ box loss box +λ obj loss box +λ cls loss cls Where λ box ,λ obj and λ cls They represent the positioning loss weight, confidence loss weight, and classification loss weight respectively.

10. The rubber airbag defect detection method based on improved YOLOv8s according to claim 9 is characterized in that: The boundary loss function uses Shape-IoU based on the shape and scale features of the focused bounding box as the bounding box regression loss function. The Shape-IoU loss function is calculated as follows: L Shape-IoU =1-IoU+distance shape +0.5×Ω shape Among them, distance shape Quantify the shape difference between the predicted bounding box center point and the actual bounding box center point, x c 、y c They are the horizontal and vertical coordinates of the center point of the prediction box, are the horizontal and vertical coordinates of the center point of the real frame, ww and hh are the weight coefficients in the horizontal and vertical directions, c is the diagonal distance of the minimum bounding box, Ω shape represents the regularization term related to the shape, θ is the shape cost, w and h represent the width and height of the anchor box respectively, w gt and h gt is the width and height of the actual box, and IoU represents the loss of the original bounding box.