Safety belt fabric detection calibration method and device and electronic equipment
By combining neural networks and small sample detection models to perform cross-detection and calibration of seat belt fabric images, the problem of low accuracy in seat belt fabric defect detection is solved, achieving high-precision defect detection and calibration, adapting to changes in the production environment, and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies cannot accurately detect and calibrate the diverse defects in seat belt fabrics, especially small targets and light-colored defects. Furthermore, the detection methods are out of touch with the actual production environment, resulting in low detection accuracy and a small sample size.
Two defect detection sub-models (neural network detection model and few-sample detection model) are used to detect images of seat belt fabrics. The detection results are cross-compared to update the preset defect detection model. Defects are also labeled by combining production line status information. The few-sample learning method is used to automatically collect accumulated defect samples to improve detection accuracy.
It improves the precision and accuracy of defect detection in seat belt fabrics, achieves adaptability to the production environment, maintains high accuracy in defect detection and calibration over a long period, and reduces production costs.
Smart Images

Figure CN115731197B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of computer vision and artificial intelligence technology, specifically to a method and apparatus for calibrating and detecting seat belt fabrics. Background Technology
[0002] Safety webbing is made of strong polyester fiber braid and is typically used to connect various hardware components, such as anchor brackets and securely sewn buckles. It is a critical component of safety equipment in many industries, including civilian, military, aviation, aerospace, land, and ocean shipping. If the safety webbing itself or the stitching is defective, it may cause the seatbelt to break in the event of an emergency, rendering it ineffective and endangering life and property. Therefore, ensuring that the safety belt fabric is free of defects is extremely important.
[0003] To ensure the quality of safety webbing, current safety webbing defect detection and calibration equipment utilizes image detection technology to monitor safety webbing production and automatically calibrate detected defects for subsequent processing. This equipment can improve the production efficiency and quality of safety webbing, helping companies increase efficiency and reduce costs. Furthermore, invention patent application number 2021110629128 discloses a method for judging differences in safety webbing defect detection, which can solve the problems of low efficiency and high susceptibility to subjective influence in manual inspection.
[0004] However, seat belt fabric defects are diverse in type and shape. Some defects are small and light in color. The high production speed of webbing and the scarcity and difficulty in collecting samples of some defects significantly affect the accuracy of defect detection and calibration. In addition, due to the large production volume, manual inspection is time-consuming and labor-intensive, and the error cannot be controlled. Therefore, manual inspection is not suitable for the current stage of industrial development. In summary, neither manual methods nor equipment are currently accurate enough for the detection and calibration of defects in seat belt fabrics. Many defects still cannot be detected, and existing detection methods cannot be well integrated with actual production conditions, resulting in the inability to guarantee the quality of seat belt fabrics. Therefore, the above problems are still urgent issues that need to be addressed in current equipment. Summary of the Invention
[0005] This application provides a method for testing and calibrating seat belt fabrics, which solves the problems that affect the accuracy of defect detection and calibration due to the diverse types and shapes of defects in seat belt fabrics, the small size and light color of some defects, the scarcity and difficulty in collecting some defect samples, and the fact that current defect detection and calibration methods are out of touch with actual production conditions.
[0006] The technical solution adopted by this application to solve its technical problem is: a method for testing and calibrating seat belt fabrics, comprising:
[0007] S1: Acquire real-time image of the seatbelt fabric;
[0008] S2: A preset defect detection model, which includes two defect detection sub-models, is used to perform defect detection on real-time seat belt fabric images to obtain detection results r1 and r2;
[0009] S3: Cross-compare the detection results r1 and r2 to obtain the second defect detection result r.
[0010] If the detection result r1 indicates a defect and the detection result r2 indicates no defect, then the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are the same as those in r1.
[0011] If the detection result r1 is no defect and the detection result r2 is defective, then the output detection result is the second defect detection result r, which is defective, and the defect coordinates and defect category in r are the same as those in r2.
[0012] If both detection results r1 and r2 are found to be without defects, the output detection result is that the second defect detection result r is without defects.
[0013] If both detection results r1 and r2 indicate defects, the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are the union of r1 and r2.
[0014] When the detection results r1 and r2 are inconsistent, the inconsistent parts are extracted and saved for updating the preset defect detection model.
[0015] S4: Obtain the status information of the production line, and input it along with the second defect detection result r into the preset calibration model to obtain the defect calibration result.
[0016] By acquiring real-time images of seatbelt fabric, and then using two defect detection sub-models to detect these images, the two detection results are cross-compared to obtain the final defect detection result. This solves the problem that single detection methods are affected by the diverse types and shapes of defects in seatbelt fabric, as well as the small size and light color of some defects, which impacts the accuracy of defect detection and calibration. In addition, when the two detection results are inconsistent, the inconsistent parts are extracted and saved to update the preset defect detection model. Newly discovered defects during the production process are automatically collected and accumulated, which can solve the problem of a small number of defect samples. At the same time, it has the ability to adapt to the production environment and can maintain the high accuracy of the defect detection model in the long-term production process. Then, the defect detection results are combined with the status information of the production line for defect calibration, overcoming the difficulty of inaccurate defect calibration caused by the current detection method being out of touch with actual production.
[0017] Preferably, the preset defect detection model includes: a neural network detection model and a small sample detection model.
[0018] Methods for establishing neural network detection models include:
[0019] M*N images of webbing defects are collected in advance, where M is the number of webbing defect categories and N is the number of defect images in each category of webbing defects;
[0020] After preprocessing the images of defective webbing, the defect areas and types are labeled to obtain defect labels for each image of defective webbing.
[0021] Each webbing defect image and its defect label are divided into training set samples and test set samples;
[0022] The pre-built YOLO deep neural network was trained using training set samples and test set samples to obtain a neural network detection model.
[0023] Methods for establishing small sample detection models include:
[0024] From the labeled miniImagenet dataset, 64 classes with 600 images per class are randomly selected as the training set, 16 classes with 600 images per class are randomly selected as the validation set, and 20 classes with 600 images per class are randomly selected as the test set.
[0025] During training, the process iterates for N rounds. In each round, K images from C categories in the training set are randomly selected to form the support set. Then, 1 image is randomly selected from the remaining images in the C categories as the query set. The training uses the mean squared error loss function and the Adam optimizer with a learning rate of 0.001.
[0026] After training, the support set is modified to include labeled fabric defect image data, which includes C-1 defect types and 1 defect-free type, for a total of C classes, with 5 images for each class, to obtain a small sample detection model.
[0027] Preferably, the preprocessing of the ribbon defect image uses a combination of one or more of the following methods: normalization, noise reduction, and data augmentation.
[0028] The identification of defect areas and types is carried out manually using labeling software. The training set samples and test set samples are randomly assigned, and the ratio between the two should not be less than 7:3.
[0029] The YOLO deep neural network training parameters are set to 10,000 iteration steps, an Adam learning rate optimizer, and 64 batch training samples.
[0030] Preferably, both the detection result r1 and the detection result r2 include the diagonal coordinates of the defect area and the defect category;
[0031] The detection result r1 is obtained by performing defect detection on the acquired real-time seat belt fabric image using a neural network detection model;
[0032] The detection result r2 is obtained by performing defect detection on the acquired real-time seat belt fabric image using a small sample detection model;
[0033] The detection results r1 and r2 are cross-compared to obtain the second defect detection result r;
[0034] When detection result r1 is flawless and detection result r2 is flawed, the flaw coordinates and flaw category of detection result r2 are extracted and used as new training set samples to update the neural network detection model; when both detection results r1 and r2 are flawed, and the flaw coordinates and flaw categories of detection results r1 and r2 are inconsistent, the flaw coordinates and flaw category of detection result r2 are extracted and used as new training set samples to update the neural network detection model.
[0035] Preferably, when the number of newly added training set samples reaches a set value, the detection result r1 and the detection result r2 are cross-compared, including:
[0036] If the detection result r1 indicates a defect and the detection result r2 indicates no defect, then the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are the same as those in r1.
[0037] If the detection result r1 is flawless and the detection result r2 is flawed, then the output detection result is the second flaw detection result r, which is flawless.
[0038] If both detection results r1 and r2 are found to be without defects, the output detection result is that the second defect detection result r is without defects.
[0039] If both detection results r1 and r2 indicate defects, the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are consistent with r1.
[0040] As a preferred method, when extracting the defect coordinates and defect categories from the detection result r2: the similarity score a between the real-time seatbelt fabric image and all classes in the support set is obtained based on the few-sample detection model. k (k = 1, 2, ..., K+1), take a kThe highest similarity score is used to classify the real-time seat belt fabric image into the corresponding category, and the defect location is marked using traditional image processing methods to obtain the defect coordinates and defect category of the detection result r2.
[0041] Preferably, the method for setting the preset calibration model includes:
[0042] Collect calibration parameters, namely the marking area range for each type of defect, which includes the distance x from the left boundary of the defect area. Lm and the distance x from the right boundary of the defect area Rm ;
[0043] Based on the production line information, a calibration parameter correspondence table is established. The input of the calibration parameter correspondence table includes defect detection information including defect type and defect area diagonal coordinates, and production line information including the distance d (m) from the camera to the marking machine, and the fabric production line speed v (m / min). The size of the fabric image detected by the camera exposure is 10cm*5cm. The output of the calibration parameter correspondence table includes the starting marking position x1, the starting marking time t1, the ending marking position x2, and the ending marking time t2.
[0044] Where x1 = xL - xLm, x2 = xR + xRm, t1 = 60d / v + 0.6 / v*x1, t2 = 60d / v + 0.6 / v*x2; where xL is the x-position of the upper left corner of the detected defect, and xR is the x-position of the lower right corner of the detected defect;
[0045] The above calibration parameters correspond to the output table to form a preset calibration model.
[0046] According to one embodiment of this application, a seat belt fabric testing and calibration device is also provided, comprising:
[0047] The image acquisition module is used to acquire real-time images of the seatbelt fabric.
[0048] The first defect detection module is used to perform defect detection on real-time seat belt fabric images using a preset defect detection model that includes two defect detection sub-models to obtain detection results r1 and r2.
[0049] The second defect detection module is used to cross-compare the detection results r1 and r2 to obtain the second defect detection result r.
[0050] If the detection result r1 indicates a defect and the detection result r2 indicates no defect, then the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are the same as those in r1.
[0051] If the detection result r1 is no defect and the detection result r2 is defective, then the output detection result is the second defect detection result r, which is defective, and the defect coordinates and defect category in r are the same as those in r2.
[0052] If both detection results r1 and r2 are found to be without defects, the output detection result is that the second defect detection result r is without defects.
[0053] If both detection results r1 and r2 indicate defects, the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are the union of r1 and r2.
[0054] When the detection results r1 and r2 are inconsistent, the inconsistent parts are extracted and saved for updating the preset defect detection model.
[0055] The defect labeling module is used to acquire the status information of the production line, and input it along with the second defect detection result r into the preset calibration model to obtain the defect labeling result.
[0056] Preferably, the first defect detection module includes:
[0057] Neural network module: used to perform defect detection on the acquired real-time seat belt fabric image according to the neural network detection model to obtain the detection result r1;
[0058] Small sample module: Used to perform defect detection on the acquired real-time seat belt fabric image according to the small sample detection model to obtain the detection result r2.
[0059] Preferably, the second defect detection module includes:
[0060] Cross-comparison module: used to cross-compare detection results r1 and r2 to obtain a second defect detection result r;
[0061] Extraction and saving module: When the detection results r1 and r2 are inconsistent, the inconsistent parts are extracted and saved for updating the preset defect detection model.
[0062] As a preferred option, the defect identification module includes:
[0063] The system information acquisition submodule is used to acquire the status information of the production line, including the speed of the webbing production conveyor belt, the type of webbing, the distance between the camera and the marking machine, and other information.
[0064] The calibration rule selection submodule is used to obtain calibration parameters from the preset calibration model based on the production line status information and the second defect detection result r;
[0065] The calibration control submodule is used to select the calibration parameters output by the submodule according to the defect calibration rules to control the marking machine to perform marking and obtain the defect calibration results.
[0066] A computer-readable storage medium storing a computer program that, when executed by a computer, implements the seatbelt fabric testing and calibration method described in any of the preceding claims.
[0067] A processor for running a program, wherein the program is configured to implement the seatbelt fabric detection and calibration method described in any of the preceding methods at runtime.
[0068] An electronic device includes a memory and a processor, the memory being used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the seat belt fabric testing and calibration method described above.
[0069] The substantial effect of this application is:
[0070] (1) This method for detecting and calibrating seat belt fabrics involves acquiring real-time images of seat belt fabrics, detecting them using two different defect detection sub-models, and then cross-comparing the two detection results to obtain the defect detection result. This solves the problem that single detection methods are affected by the diverse types and shapes of defects in seat belt fabrics, as well as the small size and light color of some defects, which affect the accuracy of defect detection and calibration. In addition, when the two detection results are inconsistent, the inconsistent parts are extracted and saved to update the preset defect detection model. Newly discovered defects during the production process are automatically collected and accumulated, which can solve the problem of the small number of defect samples. At the same time, it has the ability to adapt to the production environment and can maintain the high accuracy of the defect detection model in the long-term production process. Then, the defect detection results are combined with the status information of the production line to perform defect calibration, which overcomes the difficulty of inaccurate defect calibration caused by the current detection method being divorced from actual production.
[0071] (2) This seat belt fabric inspection and calibration method combines few-shot learning and traditional deep learning methods to improve the accuracy of seat belt fabric defect detection. On one hand, this method uses a deep learning network to establish a fabric defect detection model, demonstrating high frame rate and high accuracy in defect detection, especially for small-target defects. This enables real-time detection of fabric defects during seat belt production and ensures the accuracy of the detection results. On the other hand, the few-shot detection model can accurately identify newly emerging defects that are not trained on during production and differ from those in the existing training set, further improving the accuracy of detecting and identifying various types and morphologically diverse defects.
[0072] (3) Compared with other small sample learning methods or deep learning methods, this defect detection method also adopts the method of regularly updating the training set, automatically collecting and accumulating newly discovered defects in the production process, and expanding them into the training set. This can solve the problem of the scarcity of defect samples and has the ability to adapt to the production environment, thus maintaining the high accuracy of the defect detection model in the long-term production process.
[0073] (4) This defect marking method can automatically select different parameters for different defect types in combination with the actual working conditions of the production line. The marking range is wide for serious defects and narrow for minor defects, which helps to reduce the impact of defects on production, increase the range of qualified webbing to be retained, and reduce production costs. Attached Figure Description
[0074] Figure 1 This is a flowchart of the steps in Example 1. Detailed Implementation
[0075] The technical solution of this application will be further described in detail below through specific embodiments.
[0076] Example 1
[0077] like Figure 1 As shown, a method for testing and calibrating seat belt fabric includes:
[0078] S1: Acquire real-time image of the seatbelt fabric;
[0079] S2: A preset defect detection model, which includes two defect detection sub-models, is used to perform defect detection on real-time seat belt fabric images to obtain detection results r1 and r2;
[0080] S3: Cross-compare the detection results r1 and r2 to obtain the second defect detection result r.
[0081] If the detection result r1 indicates a defect and the detection result r2 indicates no defect, then the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are the same as those in r1.
[0082] If the detection result r1 is no defect and the detection result r2 is defective, then the output detection result is the second defect detection result r, which is defective, and the defect coordinates and defect category in r are the same as those in r2.
[0083] If both detection results r1 and r2 are found to be without defects, the output detection result is that the second defect detection result r is without defects.
[0084] If both detection results r1 and r2 indicate defects, the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are the union of r1 and r2.
[0085] When the detection results r1 and r2 are inconsistent, the inconsistent parts are extracted and saved for updating the preset defect detection model.
[0086] S4: Obtain the status information of the production line, and input it along with the second defect detection result r into the preset calibration model to obtain the defect calibration result.
[0087] The seatbelt fabric inspection and calibration method acquires real-time images of the seatbelt fabric, uses two defect detection sub-models for detection, and cross-compares the two detection results to obtain the defect detection result. This solves the problem that single detection methods are affected by the diverse types and shapes of defects in seatbelt fabrics, and the small size and light color of some defects, which affect the detection and calibration accuracy. In addition, when the detection results of the two defect detection sub-models are inconsistent, the inconsistent parts are extracted and saved to update the preset defect detection model. Newly discovered defects during the production process are automatically collected and accumulated, which can solve the problem of the small number of defect samples. At the same time, it has the ability to adapt to the production environment and can maintain the high accuracy of the defect detection model in the long-term production process. Then, the defect detection results are combined with the status information of the production line for defect calibration, overcoming the difficulty of inaccurate defect calibration caused by the current detection method being out of touch with actual production.
[0088] Example 2
[0089] A method for calibrating and detecting seat belt fabric includes: acquiring a real-time image of the seat belt fabric; performing defect detection on the real-time seat belt fabric image using a preset defect detection model including two defect detection sub-models to obtain detection results r1 and r2; the preset defect detection model includes a neural network detection model and a few-sample detection model; both detection results r1 and r2 include the diagonal coordinates of the defect area and the defect category; detection result r1 is obtained by performing defect detection on the acquired real-time seat belt fabric image using the neural network detection model. The detection result r2 is obtained by performing defect detection on the acquired real-time seat belt fabric image using a small sample detection model. If the detection result r1 indicates a defect and the detection result r2 indicates no defect, then the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are consistent with r1. If the detection result r1 indicates no defect and the detection result r2 indicates a defect, then the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are consistent with r2. If the detection result r1 indicates no defect and the detection result r2 indicates a defect, then the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are consistent with r2. If both detection results r1 and r2 show no defects, the output detection result r is a second defect detection result r that is defect-free. If both detection results r1 and r2 show defects, the output detection result r is a second defect detection result r that shows defects, and the defect coordinates and defect categories in r are the union of r1 and r2. When detection result r1 is defect-free and detection result r2 is defective, the defect coordinates and defect categories of detection result r2 are extracted and used as new training set samples to update the neural network detection model. When both detection results r1 and r2 show defects, and the defect coordinates and categories of detection results r1 and r2 are inconsistent, the defect coordinates and categories of detection results r2 are extracted and used as new training set samples to update the neural network detection model. Then, the production line status information is obtained and input along with the second defect detection result r into a preset calibration model to obtain the defect calibration result. The method for setting the preset calibration model includes: collecting calibration parameters, i.e., the marking area range for each type of defect, which includes the distance x from the left boundary of the defect area. Lm and the distance x from the right boundary of the defect area Rm Combined with production line information, a calibration parameter correspondence table is established. The input of the calibration parameter correspondence table includes defect detection information including defect type and defect area diagonal coordinates, and production line information including the distance d (m) from the camera to the marking machine, and the fabric production line speed v (m / min). The size of the fabric image detected by the camera exposure is 10cm*5cm. The output of the calibration parameter correspondence table includes the starting marking position x1, the starting marking time t1, the ending marking position x2, and the ending marking time t2.
[0090] Where x1 = xL - xLm, x2 = xR + xRm, t1 = 60d / v + 0.6 / v*x1, t2 = 60d / v + 0.6 / v*x2; where xL is the x-position of the upper left corner coordinate of the detected defect, and xR is the x-position of the lower right corner coordinate of the detected defect; the above calibration parameters correspond to the output table to form a preset calibration model. This seat belt fabric detection calibration method uses a combination of few-shot learning and traditional deep learning methods to improve the accuracy of seat belt fabric defect detection. On the one hand, this method uses a deep learning network to establish a fabric defect detection model, which shows high frame rate and high accuracy in defect detection, especially small target defects. It can realize real-time detection of fabric defects in the seat belt fabric production process and ensure the accuracy of the detection results. On the other hand, using a small-sample detection model can accurately identify newly emerging defects that are not trained on during the production process and differ to some extent from those in the existing training set, further improving the accuracy of detecting and identifying defects of various types and forms. Furthermore, compared to other small-sample learning methods or deep learning methods, this seatbelt fabric inspection and calibration method also employs a method of periodically updating the training set, automatically collecting and accumulating newly discovered defects during the production process and expanding them into the training set. This can solve the problem of a limited number of defect samples and also has adaptive capabilities to the production environment, maintaining a high accuracy rate for the defect detection model over long-term production processes.
[0091] Furthermore, this method for inspecting and calibrating seat belt fabrics combines defect detection results with production line status information to calibrate defects, thus solving the problem that current defect detection and calibration methods are disconnected from actual production conditions, which affects the accuracy of defect detection and calibration.
[0092] Example 3
[0093] The method for establishing a neural network detection model includes: pre-collecting M*N images of ribbon defects, where M is the number of ribbon defect categories and N is the number of defect images in each category. M and N should be as large as possible based on actual conditions, with M not less than 10 and N not less than 15, to comprehensively cover known defect types as comprehensively as possible; after preprocessing the ribbon defect images, labeling the defect regions and types. Preprocessing of the ribbon defect images can be done using one or more of the following methods: normalization, denoising, and data augmentation. Labeling of defect regions and types can be done manually using labeling software. Training set samples and test set samples are randomly assigned, and their ratio should not be less than 7:3, to obtain defect labels for each ribbon defect image; each ribbon defect image and its defect labels are divided into training set samples and test set samples; the pre-built YOLO deep neural network is trained using the training set samples and test set samples to obtain the neural network detection model. The YOLO deep neural network training parameters can be set to 10,000 iterations, an Adam learning rate optimizer, and 64 batch training samples. The method for building the few-shot detection model includes: using a relational network with an embedded module consisting of four convolutional blocks and a relevance module consisting of two convolutional blocks, followed by two fully connected layers, and using the Sigmoid function to obtain similarity scores. The training method involves randomly selecting 64 classes (600 images per class) from the labeled miniImagenet dataset as the training set, randomly selecting 16 classes (600 images per class) as the validation set, and randomly selecting 20 classes (600 images per class) as the test set. The training process iterates N times. In each round, K images from C classes are randomly selected from the training set to form the support set, and one image is randomly selected from the remaining images in the C classes as the query set. The training uses the mean squared error loss function, the Adam optimizer, and a learning rate of 0.001. After training, the support set is modified to include labeled fabric defect image data, which includes C-1 defect types and 1 defect-free type, for a total of C classes, with 5 images for each class, to obtain a small sample detection model.
[0094] Example 4
[0095] When using this method for defect detection, firstly, a real-time image of the seatbelt fabric is acquired; then, defects are detected in the real-time seatbelt fabric image using a neural network detection model and a few-sample detection model, resulting in detection results r1 and r2; these two results are compared. If r1 indicates no defects and r2 indicates defects, the defect coordinates and categories of r2 are extracted and used as new training samples to update the neural network detection model; if both r1 and r2 indicate defects, but the defect coordinates and categories are inconsistent, the defect coordinates and categories of r2 are extracted and used as new training samples to update the neural network detection model; when the number of newly added training samples reaches 2000, cross-comparison of r1 and r2 is performed, including:
[0096] If the detection result r1 indicates a defect and the detection result r2 indicates no defect, then the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are the same as those in r1.
[0097] If the detection result r1 is flawless and the detection result r2 is flawed, then the output detection result is the second flaw detection result r, which is flawless.
[0098] If both detection results r1 and r2 are found to be without defects, the output detection result is that the second defect detection result r is without defects.
[0099] If both detection results r1 and r2 indicate defects, the output detection result is the second defect detection result r, which indicates a defect, and the defect coordinates and defect category in r are consistent with r1.
[0100] Then, the status information of the production line is obtained, and it is input into the preset calibration model along with the second defect detection result r to obtain the defect calibration result.
[0101] Here, two defect sub-models are still used for defect detection and cross-comparison. In addition to obtaining the defect detection results, the results can also be reverse verified. When the number of newly added training set samples reaches 2000, the credibility of the neural network detection model is considered to be high. Therefore, the detection results of the neural network detection model are considered to be accurate enough. The credibility of the neural network detection model is verified by comparing the two results. If it is not enough, new defect samples are collected and the neural network detection model is trained until its accuracy meets the requirements.
[0102] Example 5
[0103] It is further worth noting that when using this seatbelt fabric detection and calibration method, if the detection results r1 and r2 are inconsistent, the inconsistent portion of detection result r2 is extracted and saved for updating the neural network detection model. During extraction, the similarity score 'a' between the real-time seatbelt fabric image and all classes in the support set can be obtained based on the small sample detection model. k (k = 1, 2, ..., K+1), take a k The highest similarity score is used to classify the real-time seatbelt fabric image into the corresponding category. Traditional image processing methods are then used to pinpoint the defect location, obtaining the defect coordinates and category of the detection result r2. These extracted defect coordinates and categories are saved as new training set samples. The neural network detection model is updated when a certain number of new training set samples are added or when the total production length of the webbing reaches a certain distance. The update time can be selected as adding 50 new training set samples or reaching a total production length of 5000m. This method achieves regular updates to the training set, continuously expanding the number of defect samples and solving the problem of inaccurate defect detection and labeling due to a small sample size.
[0104] Example 6
[0105] A fabric inspection point is set up on the safety belt fabric production line. High-definition cameras are used to photograph the fabric at these points. Industrial cameras are typically selected for this purpose, and a matching light source is required. Industrial cameras can be industrial CCDs or 8-megapixel color cameras, equipped with a custom-designed fan-shaped light source that can be adjusted via a light source controller, achieving a maximum brightness of 300 nits. The camera's shooting speed should ensure coverage of every section of the webbing on the production line. For example, if the production line speed is 30 m / min and the camera captures a 100mm x 50mm section of webbing per exposure, the camera's shooting speed should be no less than 5 frames per second to obtain real-time images of the safety belt fabric on the production line.
[0106] The acquired real-time seatbelt fabric image is used to perform defect detection using a neural network detection model, yielding a detection result r1. r1 includes the diagonal coordinates of the defect area and the defect category. The neural network detection model can be the YOLO neural network model. When building the YOLO neural network model, defect images are first pre-acquired, and then the real-time seatbelt fabric image is pre-processed. Pre-processing can include image normalization, scaling the real-time seatbelt fabric image to the appropriate size according to its original aspect ratio, filling it into a regularized 400*400 blank image, and filling all remaining pixels with gray. This process can reduce defects to a certain extent. The differences between defective samples are analyzed, and then the real-time safety belt fabric images are labeled using labeling software. Defect areas and types are manually marked with rectangular boxes. The diagonal coordinates of the rectangles (e.g., the coordinates of the top left and bottom right corners) and the defect type are saved together in a txt file. LabelImg software can be used for labeling, facilitating the acquisition of coordinate data from the image. Furthermore, if multiple defects exist in an image, multiple rectangles should be labeled. Then, the training parameters for the YOLO neural network model can be set to 10000 iteration steps, an Adam learning rate optimizer, and 64 batch training samples. After the parameters are set, the image samples from the training set, along with their corresponding defect types and defect areas, are input into the YOLO neural network model, and training begins. After each training session, the trained model is tested using test set sample data. If the defect detection rate exceeds 95% and the detection accuracy is not lower than 95%, the model obtained from the last training session is used as the final YOLO neural network detection model. Otherwise, the model obtained from the last training session is used as the current YOLO neural network to be trained, and training is repeated until the final YOLO neural network detection model is obtained.
[0107] Then, the real-time images of the seat belt fabric are captured and defect detection is performed using a small sample detection model to obtain a detection result r2. r2 includes the diagonal coordinates of the defect area and the defect category. Then, the detection result r1 and the detection result r2 are compared to obtain a second defect detection result r. During the comparison process, when the detection result r1 and the detection result r2 are inconsistent, the part of the detection result r2 that is inconsistent with the detection result r1 is extracted and saved for updating the neural network detection model.
[0108] At this point, the current production line status information is obtained. This information should include at least the speed of the webbing production conveyor belt, the webbing type, and the distance between the camera and the marking machine. The second defect detection result r and the current production line status information are then input into a preset calibration model to obtain calibration parameters. The establishment of the preset calibration model includes: collecting calibration parameters, i.e., the marking area range for each type of defect, which includes the distance x from the left boundary of the defect area. Lm and the distance x from the right boundary of the defect area Rm ;
[0109] Based on the production line information, a calibration parameter correspondence table is established. The input of the calibration parameter correspondence table includes defect detection information including defect type and defect area diagonal coordinates, and production line information including the distance d (m) from the camera to the marking machine, and the fabric production line speed v (m / min). The size of the fabric image detected by the camera exposure is 10cm*5cm. The output of the calibration parameter correspondence table includes the starting marking position x1, the starting marking time t1, the ending marking position x2, and the ending marking time t2.
[0110] Where x1 = xL - xLm, x2 = xR + xRm, t1 = 60d / v + 0.6 / v * x1, t2 = 60d / v + 0.6 / v * x2; where xL is the x-position of the upper left corner of the detected defect, and xR is the x-position of the lower right corner of the detected defect; the above calibration parameters correspond to the output table to form a preset calibration model. The pre-acquired defect images should cover as many known defect types as possible. Then, the marking range of the defects in the pre-acquired defect images is calibrated to obtain calibration parameters. The calibration parameters mainly include the starting point coordinates, ending point coordinates, starting marking time, and ending marking time. The calibration parameters should take into account the influence of the speed of the conveyor belt in the webbing production, the type of webbing, and the distance between the camera and the marking machine. Then, a rule relationship between the pre-acquired defect images and the calibration parameters is constructed. The input of this rule relationship can be the diagonal coordinate information of the defect and the defect type, and the output can be the calibration parameters. After obtaining the calibration parameters of the real-time images of the safety belt fabric on the production line, the printer is controlled to mark according to the generated calibration parameters.
[0111] Example 7
[0112] The preprocessing method for images of ribbon defects includes: performing grayscale operations on the image to obtain a grayscale image; performing normalization quantization on the grayscale image; setting the size of the Gaussian filter, performing Gaussian convolution operation using the Gaussian filter, and performing noise reduction on the normalized image; performing multiple binarization operations on the denoised images at different scales, and obtaining the image pixel corners when the pixel value is greater than the set threshold Threshold1 for obtaining image pixel corners, filtering out the pixel values of non-defect points in the image; calculating multiple connected components using the OpenCV library function findContours on the multiple processed binarized images, and calculating the center coordinates and radius of each connected component; determining whether pixels are superimposed or connected based on the obtained center coordinates and radius, if so, merging them all together to form a large connected component, otherwise treating them as separate connected components, and finally dividing multiple connected regions at the pixel level; determining the distance between the edge points of two connected regions, and determining whether the two connected regions belong to the same group, if so, treating them as a block and calculating its diagonal coordinates, otherwise treating them as separate connected regions and calculating their diagonal coordinates.
[0113] Example 8
[0114] A seatbelt fabric testing and calibration device, comprising:
[0115] The image acquisition module is used to acquire real-time images of the seatbelt fabric.
[0116] The first defect detection module is used to perform defect detection on the real-time seat belt fabric image according to a preset defect detection model that includes at least two defect detection sub-models to obtain a first defect detection result set r0;
[0117] The second defect detection module is used to perform several cross-comparisons on the first defect detection result set r0 to obtain the second defect detection result r. When the detection results of the two defect detection sub-models are inconsistent, the inconsistent parts are extracted and saved for updating the preset defect detection model.
[0118] The defect labeling module is used to acquire the status information of the production line, and input it along with the second defect detection result r into the preset calibration model to obtain the defect labeling result.
[0119] Example 9
[0120] In this embodiment, there are five types of defects: creases, holes, skipped stitches, broken warp, and misaligned weft. First, the calibration parameters currently used in production are collected. For example, marking is performed 2cm to the left and right of the crease area boundary, 1cm to the left and right of the hole area boundary, 1.5cm to the left and 3cm to the right of the skipped stitch area boundary, 2cm to the left and 3cm to the right of the broken warp area boundary, and 3cm to the left and 1cm to the right of the misaligned weft area boundary. If the production line speed is 30m / min, the camera distance to the marking equipment is 1m, and the size of the fabric image detected by the camera exposure is 10cm*5cm, then the calibration rule table is established as follows:
[0121]
[0122]
[0123] If a crease defect is detected, and its area coordinates are determined to be (4cm, 2cm) and (6cm, 3cm) during exposure detection, the marking parameters are (2cm, 8cm, 2.04s, 2.16s) by referring to the table. This means that the marking machine will make the first mark at 2cm in the exposure detection image after 2.04s (initial calibration), and make the second mark at 8cm in the exposure detection image after 2.16s (termination calibration).
[0124] The embodiments described above are merely preferred solutions of this application and are not intended to limit this application in any way. Other variations and modifications are possible without departing from the technical solutions described in the claims.
Claims
1. A method of calibrating a seat belt webbing inspection, characterized by, The method comprises: S1: acquiring a real-time safety belt fabric image; S2: performing flaw detection on the real-time safety belt fabric image by using a preset flaw detection model comprising two flaw detection sub-models to obtain a detection result r1 and a detection result r2; S3: cross-comparing the detection result r1 and the detection result r2 to obtain a second flaw detection result r, if the detection result r1 is flawed and the detection result r2 is not flawed, the output detection result is that the second flaw detection result r is flawed, and the flaw coordinates and flaw categories in r are consistent with r1; if the detection result r1 is not flawed and the detection result r2 is flawed, the output detection result is that the second flaw detection result r is flawed, and the flaw coordinates and flaw categories in r are consistent with r2; if the detection result r1 and the detection result r2 are both not flawed, the output detection result is that the second flaw detection result r is not flawed; if the detection result r1 and the detection result r2 are both flawed, the output detection result is that the second flaw detection result r is flawed, and the flaw coordinates and flaw categories in r are the union of r1 and r2; when the detection result r1 and the detection result r2 are inconsistent, the inconsistent part is extracted and saved for updating the preset flaw detection model; S4: acquiring state information of a production line and inputting the state information and the second flaw detection result r into a preset calibration model to obtain a flaw calibration result.
2. The method of claim 1, wherein: The preset flaw detection model comprises a neural network detection model and a small sample detection model, The method for establishing the neural network detection model comprises: previously collecting M*N belt flaw images, wherein M is the number of belt flaw categories, and N is the number of flaw images in each category of belt flaws; labeling the flaw regions and categories of the belt flaw images after pre-processing the belt flaw images to obtain flaw labels of the belt flaw images; dividing the belt flaw images and the flaw labels thereof into training set samples and test set samples; training a previously built YOLO deep neural network by using the training set samples and the test set samples to obtain the neural network detection model, The method for establishing the small sample detection model comprises: randomly selecting 64 classes from the labeled miniImagenet dataset, 600 picture samples of each class as a training set, randomly selecting 16 classes, 600 picture samples of each class as a validation set, and randomly selecting 20 classes, 600 picture samples of each class as a test set; in the training process, N rounds of iterative training are performed, K pictures of C categories are randomly selected in each round to form a support set, and then 1 picture is randomly selected from the remaining pictures of the C categories as a query set, the mean square error loss function is used for training, the Adam optimizer is used, and the learning rate is selected as 0.001; after the training is completed, the support set is modified to be the labeled fabric flaw picture data, which comprises C classes including C-1 flaw categories and 1 non-flaw category, and 5 pictures of each class, to obtain the small sample detection model.
3. The safety belt fabric detection and calibration method according to claim 2, wherein The pre-processing of the webbing defect image is selected from one or more of the following: normalization processing, denoising processing, and data enhancement processing; The labeling of the defect area and type is performed by a person using marking software, and the training set samples and test set samples are randomly allocated, and the proportion of the two should not be less than 7:3; The YOLO deep neural network training parameter is set to an iteration step number of 10000, an adam learning rate optimizer, and a batch training sample number of 64.
4. The safety belt fabric detection and labeling method according to claim 3, wherein, The detection result r1 and the detection result r2 each include diagonal coordinates of a defect area and a defect category; The detection result r1 is obtained by performing defect detection on the acquired real-time safety belt fabric image according to the neural network detection model; The detection result r2 is obtained by performing defect detection on the acquired real-time safety belt fabric image according to the small sample detection model; The detection result r1 and the detection result r2 are cross-compared to obtain a second defect detection result r; When the detection result r1 is no defect and the detection result r2 is a defect, the defect coordinates and the defect category of the detection result r2 are extracted as new training set samples for updating the neural network detection model; when the detection result r1 and the detection result r2 are both defects, and the defect coordinates and the defect category of the detection result r1 and the detection result r2 are inconsistent, the defect coordinates and the defect category of the detection result r2 are extracted as new training set samples for updating the neural network detection model.
5. The method of claim 4, wherein: When the number of new training set samples reaches a set value, the cross-comparison of the detection result r1 and the detection result r2 includes: If the detection result r1 is a defect and the detection result r2 is no defect, the output detection result is that the second defect detection result r is a defect, and the defect coordinates and the defect category in r are consistent with r1; If the detection result r1 is no defect and the detection result r2 is a defect, the output detection result is that the second defect detection result r is no defect; If the detection result r1 and the detection result r2 are both no defects, the output detection result is that the second defect detection result r is no defect; If the detection result r1 and the detection result r2 are both defects, the output detection result is that the second defect detection result r is a defect, and the defect coordinates and the defect category in r are consistent with r1.
6. The safety belt fabric detection and labeling method according to claim 4, wherein, When extracting the defect coordinates and defect categories of the detection result r2: obtaining the similarity scores a of the real-time safety belt fabric image and all categories in the support set according to the small sample detection model k , k = 1, 2, …, K + 1, taking the highest similarity score in a k , classifying the real-time safety belt fabric image into the corresponding category, and using the traditional image processing method to calibrate the defect position to obtain the defect coordinates and defect categories of the detection result r2.
7. The method of claim 1, wherein: The setting method of the preset labeling model includes: Collecting calibration parameters, i.e. marking area range of each type of defect, which includes distance x from left boundary of defect area Lm and distance x from right boundary of defect area Rm ; A labeling parameter corresponding table is established in combination with production line information, the input of the labeling parameter corresponding table includes defect detection information including defect categories and diagonal coordinates of defect areas, a distance d between a camera and a marking machine, and production line information including a fabric production line speed v, the size of a fabric picture detected by camera exposure is 10cm*5cm, and the output of the labeling parameter corresponding table includes a starting marking position x1, a starting marking time t1, an ending marking position x2, and an ending marking time t2. wherein x1=xL-xLm, x2=xR+xRm, t1=60d / v+0.6 / v*x1, t2=60d / v+0.6 / v*x2; wherein, xL is the x position in the upper left corner coordinate of the detected flaw, xR is the x position in the lower right corner coordinate of the detected flaw; The calibration parameter corresponding table output forms a preset calibration model.
8. A seat belt webbing inspection calibration apparatus, characterized by, Comprise: An image acquisition module, configured to acquire a real-time seatbelt fabric image; A first flaw detection module, configured to perform flaw detection on the real-time seatbelt fabric image by using a preset flaw detection model comprising two flaw detection sub-models to obtain a detection result r1 and a detection result r2; A second flaw detection module, configured to cross-compare the detection result r1 and the detection result r2 to obtain a second flaw detection result r; If the detection result r1 is flawed and the detection result r2 is not flawed, the output detection result is that the second flaw detection result r is flawed, and the flaw coordinates and flaw categories in r are consistent with r1; If the detection result r1 is not flawed and the detection result r2 is flawed, the output detection result is that the second flaw detection result r is flawed, and the flaw coordinates and flaw categories in r are consistent with r2; If the detection result r1 and the detection result r2 are both not flawed, the output detection result is that the second flaw detection result r is not flawed; If the detection result r1 and the detection result r2 are both flawed, the output detection result is that the second flaw detection result r is flawed, and the flaw coordinates and flaw categories in r are the union of r1 and r2; When the detection result r1 and the detection result r2 are inconsistent, the inconsistent part is extracted and saved for updating the preset flaw detection model; A flaw calibration module, configured to acquire state information of a production line, input the state information and the second flaw detection result r into a preset calibration model to obtain a flaw calibration result.
9. An electronic device, comprising: A memory and a processor, the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the safety belt fabric detection calibration method in any one of claims 1-7.
Citation Information
Patent Citations
Webbing thickness detection device
CN110605251A
Enterprise classification model generation method and device, computer equipment and storage medium
CN113901223A