Soft package sealing performance detection device and method based on vibration and infrared image fusion

By fusing vibration signals with infrared images for multi-modal data, and using unsupervised learning methods to extract and fuse features, the problem of insufficient robustness and accuracy of existing detection methods in complex scenes is solved, and a more efficient software is achieved. Package sealing test is suitable for online monitoring and control on production lines.

CN118706336AActive Publication Date: 2024-09-27HOHAI UNIV

Patent Information

Application Number
CN202410883193.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-09-27
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

Existing soft package sealing detection methods are based on artificial feature engineering or rule methods, which are susceptible to environmental noise interference and perform poorly in complex scenarios. They lack effective multi-modal data fusion technology, resulting in detection robustness and accuracy. insufficient.

Method used

A multi-modal data fusion method based on vibration signals and infrared images is adopted. Unsupervised learning methods such as autoencoders and generative adversarial networks are used to extract and fuse the features of vibration signals and infrared images. One-dimensional convolutional neural networks and classic convolutional neural networks are used to extract and fuse the features of vibration signals and infrared images. The product neural network is used for feature extraction and fusion, and the attention mechanism is used for feature fusion to realize the detection of soft package sealing.

Benefits of technology

It improves the accuracy and robustness of soft package sealing detection, reduces the risk of missed detection and misdetection, provides more reliable production quality assurance, is suitable for online monitoring and control on the production line, and reduces the need for marking data and manual Dependence on feature extraction reduces system cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118706336A
    Figure CN118706336A
Patent Text Reader

Abstract

The invention relates to a soft package sealing performance detection method and device based on vibration and infrared image fusion. The detection method comprises the following steps: S1, acquiring a soft package vibration signal and infrared image data; s2, self-adaptive ROI region extraction is carried out on the soft package sealing infrared image; s3, preprocessing the soft package sealing vibration signal and the infrared image, wherein the preprocessing comprises noise filtering and signal enhancement; s4, inputting the extracted vibration signals and infrared image features into a multi-modal fusion model for training; step S5, performing conjoint analysis and defect detection on the vibration signal to be detected and the infrared image by using the trained multi-modal fusion model; and S6, carrying out evaluation and defect positioning on a detection result. According to the method, the information of the vibration signal and the infrared image is comprehensively utilized, and the accuracy and robustness of detection are improved; an unsupervised learning method is adopted, a large number of training samples do not need to be marked in advance, and the model training process is simplified; through multi-modal fusion, compared with a traditional algorithm, the method has higher detection precision and stronger adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of detection technology, and in particular relates to a soft package sealing detection device and method based on vibration and infrared image fusion. Background Art

[0002] Nowadays, the detection of soft package sealing is crucial to various industries, especially in the fields of food, medicine and chemical industry. Traditional sealing detection methods are often based on artificial feature engineering or rule-based methods. However, these methods may be disturbed by environmental noise, are sensitive to parameter settings, and perform poorly in complex scenarios. In order to solve these problems, in recent years, more and more studies have begun to introduce multimodal data fusion technology into soft package sealing detection, among which vibration signals and infrared images as two important sources of information have attracted widespread attention.

[0003] Vibration signals and infrared images are two commonly used non-contact detection methods, each with its own unique advantages. Vibration signals can reflect the integrity and internal state of the sealing structure, while infrared images can detect temperature changes at the seal, thereby revealing possible sealing problems. Therefore, fusing vibration signals and infrared images can provide more comprehensive and accurate information, thereby improving the robustness and performance of soft package sealing detection.

[0004] In terms of multimodal data fusion technology, unsupervised learning methods have been widely used in recent years. Unsupervised learning methods, such as autoencoders and generative adversarial networks (GANs), can automatically learn features from data and perform effective representation learning. These methods do not require labeled training data and are therefore more suitable for multimodal data fusion tasks. Through unsupervised learning methods, the features of vibration signals and infrared images can be effectively extracted and fused, thereby improving the accuracy and robustness of soft package sealing detection.

[0005] However, in the field of soft package sealing detection, there are still relatively few studies on methods based on the fusion of vibration signals and infrared images. Therefore, it is of great significance to propose a soft package sealing detection method based on the fusion of vibration signals and infrared images. This method can comprehensively utilize the information of vibration signals and infrared images to achieve accurate and rapid detection of soft package sealing, providing more reliable production quality assurance for related industries. Summary of the invention

[0006] In order to solve the above technical problems, the present invention provides a soft package sealing detection device based on vibration and infrared image fusion, including a camera bracket, an infrared thermal imager, a heat sealing fixture, a photoelectric sensor, a PLC, a switch, an industrial computer, a vibration sensor, a spring, a fixed bracket, an extrusion device, a conveyor belt and a display;

[0007] The infrared thermal imager is installed on the camera bracket, and the position of the infrared thermal imager is aligned with the heat sealing fixture to capture the sealing infrared image and transmit the data to the switch; the heat sealing fixture is also equipped with a photoelectric sensor, which is connected to the PLC and the switch in sequence, and the switch is connected to the industrial computer;

[0008] The conveyor belt is provided with an extrusion device, which is fixed on the conveyor belt through a fixed bracket. The extrusion device is elastically supported by a spring. A vibration sensor is also provided on the extrusion device, which transmits data to an industrial computer, and the industrial computer is connected to a display.

[0009] The present invention also provides a soft package sealing detection method based on the fusion of vibration signals and infrared images, using the above-mentioned device, comprising the following steps:

[0010] Step S1, obtaining soft bag vibration signal and infrared image data;

[0011] Step S2, performing adaptive ROI region extraction on the soft package sealing infrared image;

[0012] Step S3, preprocessing the soft package sealing vibration signal and infrared image, including noise filtering and signal enhancement;

[0013] Step S4, inputting the extracted vibration signal and infrared image features into a multimodal fusion model for training;

[0014] Step S5, using the trained multimodal fusion model to perform joint analysis and defect detection on the vibration signal and infrared image to be tested;

[0015] Step S6, evaluating the detection results, judging whether there is a defect in the flexible packaging seal by the abnormality score, and locating the defective part if there is a defect.

[0016] The step of performing adaptive ROI region extraction on the soft package sealing infrared image in step S2 comprises:

[0017] Step S21, performing three-channel weighted averaging on the acquired infrared image to achieve grayscale processing;

[0018] Step S22, smoothing and denoising the grayscale image to remove fine textures and irregular noise points. The smoothing and denoising method is Gaussian filtering, and its expression is:

[0019]

[0020] Where (x, y) represents the pixel coordinates in the image, G(x, y) represents the Gaussian function value calculated at that position, σ represents the standard of the Gaussian kernel, and e is the constant base of the natural logarithm function;

[0021] Step S23, using Canny edge detection to extract the edge contour of the smoothed grayscale image, and obtain a binarized edge image;

[0022] Step S24, using the contour extraction algorithm, first traverse the binary image to find all completely closed edge contours. For each closed contour, calculate its circumscribed rectangle, that is, the smallest rectangle surrounding the contour. Then, select the one with the largest area from all the rectangles to ensure that the entire target area can be covered as much as possible. After selecting the largest rectangle, the corresponding area is cropped out in the original image according to its position and size. This area is considered to be the region of interest (ROI) of the aluminum foil seal infrared image.

[0023] The step of preprocessing the soft package sealing infrared image and the vibration signal in step S3 includes:

[0024] Step S31, performing image enhancement on the extracted ROI image. First, the contrast of the image is enhanced to improve the visibility of image details. Specifically, adaptive histogram equalization is used, and the formula is as follows:

[0025] Assume that the input image is I and the output image is I eq , the size of the image is M×N, and the size of the local region is p×q.

[0026] For each pixel (x, y), the corresponding local area is R xy , then the calculation formula of adaptive histogram equalization is:

[0027] I eq (x,y)=HE(R xy )(I(x,y))

[0028] Among them, HE(R xy ) represents the local area R xy Perform histogram equalization operation, I(x,y) is the grayscale value of the pixel in the input image.

[0029] Local area R xy The histogram equalization can be achieved by following the steps below:

[0030] First, calculate the local area R xy The cumulative distribution function (CDF) of is:

[0031]

[0032] Among them, n i represents the number of pixels with pixel value i, and pq is the total number of pixels in the local area.

[0033] Secondly, according to the cumulative distribution function, the pixel value after histogram equalization is calculated:

[0034] I eq (x,y)=(L-1)×CDF xy (I(x,y))

[0035] Where L is the number of gray levels of the image.

[0036] Through such processing, the histogram equalization of the local area of ​​the image can be achieved, thereby enhancing the contrast and details of the image.

[0037] Then, a Laplacian filter is used to sharpen the image and enhance the edges and details of the image;

[0038] Step S32, interpolation upsampling operation is performed on the enhanced sample to improve the resolution of the infrared image and provide more image information for subsequent deep learning model training. Specifically, biquadratic interpolation is used. Biquadratic interpolation is a simple interpolation method. At each pixel position in the image, the value of the new pixel is estimated by weighted average of the four surrounding pixels. These four pixels are usually the four pixels closest to the position to be interpolated. The interpolation formula is as follows:

[0039]

[0040] Where f(x,y) is the pixel value at position x and y, and a ij are the coefficients of the biquadratic interpolation.

[0041] Step S33, randomly rotating the image to expand the training data set and increase the robustness of the model;

[0042] Step S34, normalize the image pixel values ​​to between 0 and 1, and standardize the normalized image pixel values ​​to make their mean 0 and variance 1 to accelerate model convergence. The formula is:

[0043]

[0044] In the formula, x norm is the normalized result, x std is the standardized result, x org is the pixel value of the image, μ and σ are the mean and standard deviation of the pixel values ​​of a single channel;

[0045] Step S35, performing time domain analysis on the vibration signal s(t), calculating the mean μ and standard deviation σ of the vibration signal data, and then according to the 3σ principle, treating the data beyond the range of μ±3σ as outliers or noise and eliminating them.

[0046]

[0047] Where N is the total number of data points, s i represents the value of the i-th data point, μ represents the mean of the vibration signal data, and σ represents the standard deviation.

[0048] Step S36, perform frequency domain analysis on the vibration signal, use Fourier transform to convert the signal s(t) into the frequency domain, S(f), and calculate the energy distribution P of the signal at different frequencies in the frequency domain. norm .

[0049]

[0050] P(f)=|S(f) 2

[0051] Where S(f) is the Fourier transform of the vibration signal, which represents the complex representation of the signal in the frequency domain, and P(f) is the energy spectral density, which represents the signal energy distribution at frequency f.

[0052] Step S37, normalize the vibration signal s(t) to the range of [0,1], S norm Right now.

[0053]

[0054] In the formula, s norm represents the normalized vibration signal value, s represents a certain value of the original vibration signal, s min Represents the minimum value in the original vibration signal data, s max Indicates the maximum value in the original vibration signal data.

[0055] Step S38, dividing the preprocessed image data set and vibration signal data set into training and test sets, using normal sample data as the training set accounting for 75%, and the remaining 25% of normal samples and defective samples as the test set.

[0056] In step S4, the multimodal fusion network mainly includes a vibration signal feature extraction module, an infrared image feature extraction module, a feature fusion module and a discrimination module.

[0057] The vibration signal feature extraction module uses a one-dimensional convolutional neural network (CNN) as a feature extractor for vibration signals. First, the input layer receives data of shape (signal length, number of signal channels). Subsequently, three convolutional layers are used, each followed by a ReLU activation function, containing 64, 32 and 16 convolution kernels, sizes of 3, 5 and 7, respectively, and a step size of 1. This is followed by three maximum pooling layers with a pooling window size of 2 and a step size of 2 to reduce the feature dimension. Then comes the flattening layer, which flattens the output of the pooling layer into a one-dimensional vector. This is followed by a fully connected layer containing 128 neurons and a ReLU activation function. Finally, the output layer uses a sigmoid activation function for the probability output of a binary classification problem. This design can be adjusted according to actual conditions to adapt to different data and task requirements.

[0058] The infrared image feature extraction module uses the classic convolutional neural network (CNN) architecture ResNet50 as the feature extractor of infrared images. The ResNet-50 model consists of 4 residual blocks, each of which contains several convolutional layers and skip connections.

[0059] Specifically, there are 3 convolutional layers in each residual block, and each residual block except the first one is followed by a downsampling layer to ensure the dimension reduction of the feature map size. In ResNet-50, the number of these residual blocks is [3,4,6,3], where the first number represents the number of convolutional layers in the first residual block, and so on. In each residual block, the size of the convolutional layer is 3x3, the stride is 1, and the padding is "same" to keep the size of the feature map unchanged. The pooling layer uses a maximum pooling of 3x3 and a stride of 2 to reduce the size of the feature map. This design can fully extract the features of the image, and alleviate the gradient vanishing problem through jump connections, ensuring the training effect of the model.

[0060] The feature fusion module first normalizes and scales the feature vectors from the vibration signal and infrared image feature extractors to ensure that they have similar scales and ranges. Next, the attention mechanism is considered to be introduced to adjust the contribution of each modal feature to dynamically adjust the degree of feature fusion, so as to better capture the correlation and importance between different modalities. After determining the order and sorting of the features, the processed and adjusted feature vectors of the vibration signal and infrared image are spliced ​​along the feature dimension, that is, they are stacked together on the feature dimension. Finally, the feature information of the two modalities is fused together by weighted summation to form the final fused feature representation. Through this design, the feature fusion module can fully integrate the information of the vibration signal and the infrared image, and perform flexible feature fusion on this basis to produce a more comprehensive and rich feature representation.

[0061] The step of using the trained multimodal fusion model to perform joint analysis and defect detection on the vibration signal and infrared image to be measured in step S5 includes:

[0062] In step S51, the processed image and vibration signal are input into the model for parameter training, and the cross entropy loss function is used as the classification loss function. For two categories (qualified and unqualified), the cross entropy loss between the model output and the true label is calculated; the square loss function is introduced to compare the difference between the defect position output by the model and the true defect position as an auxiliary loss function for the defect location task.

[0063] Step S52, fix the trained network weights, and for a given number of clusters K, randomly initialize the feature vectors of K cluster centers. For each input feature vector P, calculate its distance from all cluster centers, and assign the feature vector to the cluster center with the closest distance. For each cluster, calculate the mean of all samples in the cluster, and use the mean as the new cluster center. Repeat the above two steps until the stopping condition is met (such as the cluster center no longer changes significantly or the maximum number of iterations is reached).

[0064] Among them, the distance C between the feature vector P and the cluster center is calculated i The Euclidean distance formula is usually used. For a given cluster center C i And the feature vector P, the Euclidean distance calculation formula is as follows:

[0065]

[0066] Where n is the dimension of the feature vector, P j represents the jth eigenvalue of the eigenvector P, C ij Represents the cluster center C i The j-th eigenvalue of .

[0067] In step S6, the test results are evaluated, and the abnormality score is used to determine whether there is a defect in the flexible packaging seal. If there is a defect, the step of locating the defective part includes:

[0068] Step S61, determining the abnormal score of the input data by calculating the distance between each sample and the cluster center to which it belongs;

[0069] Step S62, setting an appropriate abnormality score threshold based on the statistical information of the training data to distinguish normal samples from abnormal samples. ;

[0070] Step S63, judging each sample according to the set abnormality score threshold, marking the sample with an abnormality score higher than the threshold as an abnormal sample, which means there is a defect;

[0071] Step S64: for the samples determined as abnormal samples, further analyze their features to locate the defective parts. This is achieved by visualizing the feature representation of the abnormal samples and using auxiliary technology, namely, region-based networks.

[0072] Compared with the prior art, the beneficial effect of the present invention is that the present invention adopts an unsupervised learning method and utilizes the multimodal data of vibration signals and infrared images for fusion to realize soft package sealing detection. Compared with the traditional method, the present method can not only automatically learn the characteristics of vibration signals and infrared images, but also effectively fuse them, thereby improving the accuracy and robustness of detection. By integrating the information of vibration signals and infrared images, the present invention can more comprehensively capture the characteristics of sealing problems, thereby reducing the risk of missed detection and false detection, and improving the reliability of detection. In addition, since the unsupervised learning method does not require a large amount of labeled training data and does not require manual design of feature extractors, the cost of the system is reduced. By processing and analyzing vibration signals and infrared images in real time, the present invention is suitable for online monitoring and control on production lines, and is expected to provide more reliable production quality assurance for related industries.

[0073] Other features and advantages of the present invention will be described in detail in the following description, and some of them can be directly seen from the description or specific embodiments.

[0074] In order to make the above-mentioned objects, advantages and features of the invention clearer and more intuitive, the following is a detailed description of preferred implementation examples of the invention and related drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the specific implementation cases of the present invention or the existing technical solutions, the specific implementation plans of the present invention will be described with related drawings below.

[0076] Figure 1 It is a schematic flow chart of a specific embodiment of the method for detecting the sealing property of a soft package of the present invention;

[0077] Figure 2 It is a schematic diagram of the steps of the method for detecting the sealing property of a soft package of the present invention;

[0078] Figure 3 It is a schematic diagram of a soft package sealing leakproofness detection device of the present invention.

[0079] In the figure: 1. Camera bracket; 2. Infrared thermal imager; 3. Heat sealing fixture; 4. Photoelectric sensor; 5. PLC; 6. Flexible packaging bag; 7. Switch; 8. Industrial computer; 9. Vibration sensor; 10. Spring; 11. Fixed bracket; 12. Extrusion device; 13. Conveyor belt; 14. Display. DETAILED DESCRIPTION

[0080] In order to more clearly illustrate the purpose, technical solutions and advantages of each embodiment of the present invention, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the examples only represent some examples of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0081] Example:

[0082] Figure 2 is a schematic diagram of the steps of a soft package sealing detection method based on the fusion of vibration signals and infrared images provided by an embodiment of the present invention, with reference to Figure 1 The specific steps of the method are as follows:

[0083] Step S1, obtaining soft bag vibration signal and infrared image data;

[0084] Step S2, performing adaptive ROI region extraction on the soft package sealing infrared image;

[0085] Step S3, preprocessing the soft package sealing vibration signal and infrared image, including noise filtering and signal enhancement;

[0086] Step S4, inputting the extracted vibration signal and infrared image features into a multimodal fusion model for training;

[0087] Step S5, using the trained multimodal fusion model to perform joint analysis and defect detection on the vibration signal and infrared image to be tested;

[0088] Step S6, evaluating the detection results, judging whether there is a defect in the flexible packaging seal by the abnormality score, and locating the defective part if there is a defect.

[0089] In this embodiment, a soft package sealing detection device based on multimodal fusion of vibration and infrared image is used, including a camera bracket 1, an infrared thermal imager 2, a heat sealing fixture 3, a photoelectric sensor 4, a PLC 5, a switch 7, an industrial computer 8, a vibration sensor 9, a spring 10, a fixed bracket 11, an extrusion device 12, a conveyor belt 13 and a display 14;

[0090] The infrared thermal imager 2 is mounted on the camera bracket 1, and the position of the infrared thermal imager 2 is aligned with the heat sealing fixture 3, so as to capture the sealing infrared image and transmit the data to the switch 7; the heat sealing fixture 3 is also mounted with a photoelectric sensor 4, and the photoelectric sensor 4 is connected to the PLC 5 and the switch 7 in sequence, and the switch 7 is connected to the industrial computer 8;

[0091] The conveyor belt 13 is provided with an extrusion device 12, which is fixed on the conveyor belt 13 through a fixing bracket 11. The extrusion device 12 is elastically supported by a spring 10. A vibration sensor 9 is also provided on the extrusion device 12, which transmits data to the industrial computer 8, and the industrial computer 8 is connected to a display 14.

[0092] The infrared thermal imager 2 is used to capture the sealing infrared image, and the extrusion device 12 is used to extrude the soft package 6 on the conveyor belt 13. The vibration sensor 9 installed on the device obtains the vibration signal, and the acquired infrared image and vibration signal are used to perform non-destructive defect detection on the soft package seal. This method uses a neural network based on unsupervised learning, does not require defect samples and related manual annotations, and greatly saves preparation time and labor costs; in addition, the feature level fusion method is used to fuse the feature information of the vibration signal and the infrared image.

[0093] First, features are extracted from the vibration signal and infrared image respectively, and then these features are fused into a common feature space, and the two features are directly connected by splicing to form a larger feature vector. This method can make full use of the information of vibration signals and infrared images, and improve the detection system's perception of soft package sealing problems.

[0094] Through feature-level fusion, the system can more comprehensively describe the state and characteristics of the object, thereby enhancing the robustness and accuracy of the detection system. As two different information sources, vibration signals and infrared images are highly complementary. Through fusion, they can make up for each other's shortcomings and improve the performance of the soft package sealing detection system. This fusion method has strong applicability and practicality, and can be widely used in production fields such as bottling production lines, providing a reliable quality control method for the production process.

[0095] In the embodiment, the infrared image of the soft package seal in step S1 can be obtained by an infrared thermal imager 32mini with a resolution of 384×288 located on a camera bracket 1, as shown in Figure 2, installed 0.5m to 1m behind the heat sealing clamp 3, and the photoelectric signal transmitted by the photoelectric sensor 4 at the clamping position is used to obtain the infrared image of the seal on the front of the soft package. The process of obtaining the vibration signal is as follows: first, the conveyor belt 13 transports the soft package 6 to the extrusion device 12, and then the extrusion device squeezes the soft package by applying appropriate pressure, and the vibration sensor 9 near the extrusion device obtains the vibration signal. In the whole process, the infrared thermal imager 2 controls and receives the photoelectric signal of the photoelectric sensor. The PLC 5 realizes real-time communication between the upper computer and the lower computer through the switch 7, and the operation interface is composed of a display 14 and an industrial computer 8.

[0096] The step of performing adaptive ROI region extraction on the aluminum foil seal infrared image in step S2 comprises:

[0097] Step S21, performing three-channel weighted averaging on the acquired infrared image to achieve grayscale processing;

[0098] Exemplarily, the weighted average formula for the three channels may be:

[0099] Gray=0.1140B+0.5870G+0.2989R

[0100] Wherein, B, G, and R are the pixel values ​​of the three channels of blue, green, and red, and the weights before the channels are calculated from the infrared image data set in this embodiment;

[0101] Step S22, smoothing and denoising the grayscale image to remove fine textures and irregular noise points. The smoothing and denoising method is Gaussian filtering, and its expression is:

[0102]

[0103] Where (x, y) represents the pixel coordinates in the image, G(x, y) represents the Gaussian function value calculated at that position, σ represents the standard of the Gaussian kernel, and e is the constant base of the natural logarithm function;

[0104] Step S23, using Canny edge detection to extract the edge contour of the smoothed grayscale image, and obtain a binarized edge image;

[0105] In step S24, a contour extraction algorithm is used to traverse the pixel values ​​of the binary image, extract all completely closed edge contours in the edge image, and use a bounding box with a maximum width, that is, a circumscribed regular rectangle to mark the target area. According to the position and size of the circumscribed rectangle, the corresponding area is cropped out in the original image, and the corresponding area obtained is the ROI area of ​​the aluminum foil seal infrared image.

[0106] The step of preprocessing the extracted infrared image and vibration signal and preparing the normal samples into a data set in step S3 includes:

[0107] Step S31, performing image enhancement on the extracted ROI image. First, the contrast of the image is enhanced to improve the visibility of image details. Specifically, adaptive histogram equalization is used, and the formula is as follows:

[0108] Assume that the input image is I and the output image is I eq , the size of the image is M×N, and the size of the local region is p×q.

[0109] For each pixel (x, y), the corresponding local area is R xy , then the calculation formula of adaptive histogram equalization is:

[0110] I eq (x,y)=HE(R xy )(I(x,y))

[0111] Among them, HE(R xy ) represents the local area R xy Perform histogram equalization operation, I(x,y) is the grayscale value of the pixel in the input image.

[0112] Local area R xy The histogram equalization can be achieved by following the steps below:

[0113] First, calculate the local area R xy The cumulative distribution function (CDF) of is:

[0114]

[0115] Among them, n i represents the number of pixels with pixel value i, and pq is the total number of pixels in the local area.

[0116] Secondly, according to the cumulative distribution function, the pixel value after histogram equalization is calculated:

[0117] I eq (x,y)=(L-1)×CDF xy (I(x,y))

[0118] Where L is the number of gray levels of the image.

[0119] Through such processing, the histogram equalization of the local area of ​​the image can be achieved, thereby enhancing the contrast and details of the image.

[0120] Then, a Laplace filter is used to sharpen the image and enhance the edges and details of the image;

[0121] Step S32, interpolation upsampling operation is performed on the enhanced sample to improve the resolution of the infrared image and provide more image information for subsequent deep learning model training. Specifically, biquadratic interpolation is used. Biquadratic interpolation is a simple interpolation method. At each pixel position in the image, the value of the new pixel is estimated by weighted average of the four surrounding pixels. These four pixels are usually the four pixels closest to the position to be interpolated. The interpolation formula is as follows:

[0122]

[0123] Where f(x,y) is the pixel value at position x and y, and a ij are the coefficients of the biquadratic interpolation.

[0124] In the example, the upsampled image size is 224×224;

[0125] Step S33, randomly rotating the image to expand the training data set and increase the robustness of the model;

[0126] In the example, to ensure the integrity of the image edge after rotation, the background pixel values ​​are filled on the four sides of the image to the image size of 256×256 before rotation. After randomly rotating it clockwise or counterclockwise by 10 degrees, it is cropped along the center to a size of 224×224 to complete the data set expansion.

[0127] Step S34, normalize the image pixel values ​​to between 0 and 1, and standardize the normalized image pixel values ​​to make their mean 0 and variance 1 to accelerate model convergence. The formula is:

[0128]

[0129] In the formula, x norm is the normalized result, x std is the standardized result, x org is the pixel value of the original image, μ and σ are the mean and standard deviation of the pixel values ​​of a single channel;

[0130] Step S35, performing time domain analysis on the vibration signal s(t), calculating the mean μ and standard deviation σ of the vibration signal data, and then according to the 3σ principle, treating the data beyond the range of μ±3σ as outliers or noise and eliminating them.

[0131]

[0132] Where N is the total number of data points, s irepresents the value of the i-th data point, μ represents the mean of the vibration signal data, and σ represents the standard deviation.

[0133] Step S36, perform frequency domain analysis on the vibration signal, use Fourier transform to convert the signal s(t) into the frequency domain, S(f), and calculate the energy distribution P of the signal at different frequencies in the frequency domain. norm .

[0134]

[0135] P(f)=|S(f) 2

[0136] Where S(f) is the Fourier transform of the vibration signal, which represents the complex representation of the signal in the frequency domain, and P(f) is the energy spectral density, which represents the signal energy distribution at frequency f.

[0137] Step S37, normalize the vibration signal s(t) to the range of [0,1], S norm Right now.

[0138]

[0139] In the formula, s norm represents the normalized vibration signal value, s represents a certain value of the original vibration signal, s min Represents the minimum value in the original vibration signal data, s max Indicates the maximum value in the original vibration signal data.

[0140] Step S38, dividing the preprocessed image data set and vibration signal data set into training and test sets, using normal sample data as the training set accounting for 75%, and the remaining 25% of normal samples and defective samples as the test set.

[0141] In step S4, the multimodal fusion network mainly includes a vibration signal feature extraction module, an infrared image feature extraction module, a feature fusion module and a discrimination module.

[0142] Step S41, extract the characteristics of the vibration signal, and select a one-dimensional convolutional neural network (CNN) as the feature extractor of the vibration signal. First, the input layer receives data of shape (signal length, number of signal channels). Subsequently, three convolutional layers are used, each followed by a ReLU activation function, containing 64, 32 and 16 convolution kernels, respectively, with sizes of 3, 5 and 7, respectively, and a step size of 1. This is followed by three maximum pooling layers with a pooling window size of 2 and a step size of 2, which are used to reduce the feature dimension. Then there is a flattening layer, which flattens the output of the pooling layer into a one-dimensional vector. This is followed by a fully connected layer containing 128 neurons and a ReLU activation function. Finally, the output layer uses a sigmoid activation function for the probability output of the binary classification problem.

[0143] The overall calculation of vibration signal feature extraction can be divided into the following three stages:

[0144] The first is the convolution and activation function stage:

[0145] Z (1) =Conv(X,W (1) ,b (1) )

[0146] A (1) =ReLU(Z (1) )

[0147] Next is the pooling stage:

[0148] P (1) =MaxPooling(A (1) ,pool_size=2,strides=2)

[0149] Finally, there is the full connection and output stage:

[0150] Y = Sigmoid(ReLU(Flatten(P (1) )·W (FC) +b (FC) ))

[0151] Step S42, extracting infrared image features, this step uses the classic convolutional neural network (CNN) architecture ResNet50 network model as the feature extractor of infrared images. The ResNet-50 model consists of 4 residual blocks, each of which contains several convolutional layers and jump connections. Specifically, there are 3 convolutional layers in each residual block, and each residual block is followed by a downsampling layer except the first residual block to ensure the dimension reduction of the feature map size. In ResNet-50, the number of these residual blocks is [3,4,6,3], where the first number represents the number of convolutional layers in the first residual block, and so on. In each residual block, the size of the convolutional layer is 3x3, the stride is 1, and the padding is "same" to keep the size of the feature map unchanged. The pooling layer uses the maximum pooling with a size of 3x3 and a stride of 2 to reduce the size of the feature map. This level of feature extraction helps to capture important information in the image and provides rich semantic expression capabilities for subsequent feature fusion.

[0152] In step S43, when fusing features, the feature vectors of the vibration signal and the infrared image are spliced ​​into a longer feature vector to form a common feature space. In this way, the information of the vibration signal and the infrared image can be fused together to obtain a more comprehensive and rich feature representation. This feature fusion method can enhance the model's ability to understand data of different modalities and improve the performance and robustness of subsequent classification tasks.

[0153] Step S44, classify and discriminate the fused data input into the network model. In the discrimination module, the K-means clustering algorithm is first used to divide the spliced ​​feature vectors into two clusters, representing two different categories or states. K-means clustering is an unsupervised learning algorithm that can effectively assign data points to K different clusters so that each data point belongs to the cluster closest to it. Then, for each cluster, it is judged whether it belongs to category 1 or category 2 based on the characteristic distribution or other attributes of the samples in the cluster, which is achieved by analyzing the true labels of the samples near the cluster center or the characteristic distribution of the cluster center. Thereby, the clustering results are matched with the true labels, which provides an important basis for subsequent model evaluation and performance improvement. The discrimination module designed in this way can effectively classify and judge the sealing problems of soft packages, and improve the accuracy and robustness of detection.

[0154] In the embodiment, the step of using the trained multimodal fusion model to perform joint analysis and defect detection on the vibration signal and infrared image to be measured in step S5 includes:

[0155] Step S51, fix the trained network weights, and for a given number of clusters K, randomly initialize the feature vectors of K cluster centers.

[0156] Step S52: for each input feature vector P, calculate its distance from all cluster centers, and assign the feature vector to the cluster center with the closest distance.

[0157] Among them, the distance C between the feature vector P and the cluster center is calculated i The Euclidean distance formula is usually used. For a given cluster center C i And the feature vector P, the Euclidean distance calculation formula is as follows:

[0158]

[0159] Where n is the dimension of the feature vector, P j represents the jth eigenvalue of the eigenvector P, C ij Represents the cluster center C i The j-th eigenvalue of .

[0160] Step S53: For each cluster, calculate the mean of all samples in the cluster, and use the mean as the new cluster center.

[0161] Repeat the above two steps until the stopping condition is met (such as the cluster center no longer changes significantly or the maximum number of iterations is reached).

[0162] In the embodiment, the test results are evaluated in step S6, and it is determined whether there is a defect in the flexible package seal by the abnormal score. If there is a defect, the step of locating the defective part includes:

[0163] Step S61, determining the abnormal score of the input data by calculating the distance between each sample and the cluster center to which it belongs;

[0164] Step S62, setting an appropriate abnormality score threshold based on the statistical information of the training data to distinguish normal samples from abnormal samples. ;

[0165] Step S63, judging each sample according to the set abnormality score threshold, marking the sample with an abnormality score higher than the threshold as an abnormal sample, which means there is a defect;

[0166] Step S64: for the samples determined as abnormal samples, further analyze their features to locate the defective parts. This is achieved by visualizing the feature representation of the abnormal samples and using auxiliary technology, namely, region-based networks.

[0167] In the embodiments provided in the present application, it is obvious that the disclosed method can also be implemented in other ways, and is not limited to the method described above. For example, in the steps described in the detection method flow chart in the accompanying drawings, some processes can be performed simultaneously, and the order of the steps can be changed, which can be determined according to different functional conditions. At the same time, each box shown in the flow chart can be implemented by a dedicated hardware system that performs related functions or actions, or by a combination of a computer program and hardware.

[0168] If the functions are implemented in the form of software function modules and sold or used as separate products, the system can be stored in a readable storage medium. Based on this, the technical solution of the present invention or a part of the technical solution can be used as a software product, which contains several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to implement all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, RAM, ROM, CD and other media that can store programs.

[0169] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.

Claims

1. A soft package sealing detection device based on vibration and infrared image fusion, characterized in that It includes camera bracket, infrared thermal imager, heat sealing fixture, photoelectric sensor, PLC, switch, industrial computer, vibration sensor, spring, fixing bracket, extrusion device, conveyor belt and display; The infrared thermal imager is installed on the camera bracket, and the position of the infrared thermal imager is aligned with the heat sealing fixture to capture the sealing infrared image and transmit the data to the switch; the heat sealing fixture is also equipped with a photoelectric sensor, which is connected to the PLC and the switch in sequence, and the switch is connected to the industrial computer; The conveyor belt is provided with an extrusion device, which is fixed on the conveyor belt through a fixed bracket. The extrusion device is elastically supported by a spring. A vibration sensor is also provided on the extrusion device, which transmits data to an industrial computer, and the industrial computer is connected to a display.

2. A soft package sealing detection method based on the fusion of vibration signal and infrared image, characterized in that Using the detection device described in claim 1, comprising the following steps: Step S1, obtaining soft bag vibration signal and infrared image data; Step S2, performing adaptive ROI region extraction on the soft package sealing infrared image; Step S3, preprocessing the soft package sealing vibration signal and infrared image, including noise filtering and signal enhancement; Step S4, inputting the extracted vibration signal and infrared image features into a multimodal fusion model for training; Step S5, using the trained multimodal fusion model to perform joint analysis and defect detection on the vibration signal and infrared image to be tested; Step S6, evaluating the detection results, judging whether there is a defect in the flexible packaging seal by the abnormality score, and locating the defective part if there is a defect.

3. The soft package sealing detection method based on the fusion of vibration signal and infrared image according to claim 2 is characterized in that: The step of performing adaptive ROI region extraction on the soft package sealing infrared image in step S2 comprises: Step S21, performing three-channel weighted averaging on the acquired infrared image to achieve grayscale processing; Step S22, smoothing and denoising the grayscale image to remove fine textures and irregular noise points. The smoothing and denoising method is Gaussian filtering, and its expression is: Where (x, y) represents the pixel coordinates in the image, G(x, y) represents the Gaussian function value calculated at that position, σ represents the standard of the Gaussian kernel, and e is the constant base of the natural logarithm function; Step S23, using Canny edge detection to extract the edge contour of the smoothed grayscale image, and obtain a binarized edge image; Step S24, using a contour extraction algorithm, first traverse the binary image to find all completely closed edge contours, and for each closed contour, calculate its circumscribed regular rectangle, that is, the minimum regular rectangle enclosing the contour; then, select the one with the largest area from all the regular rectangles to ensure that the entire target area can be covered as much as possible; after selecting the largest regular rectangle, crop the corresponding area in the original image according to its position and size, and this area is considered to be the region of interest, i.e., ROI, of the aluminum foil seal infrared image.

4. The soft package sealing detection method based on the fusion of vibration signal and infrared image according to claim 2 is characterized in that: The step of preprocessing the soft package sealing infrared image and the vibration signal in step S3 includes: Step S31, image enhancement is performed on the extracted ROI image. First, the contrast of the image is enhanced to improve the visibility of image details. Specifically, adaptive histogram equalization is used, and the formula is as follows: Assume that the input image is I and the output image is I eq , the size of the image is M×N, and the size of the local area is p×q; For each pixel (x, y), the corresponding local area is R xy , then the calculation formula of adaptive histogram equalization is: I eq (x,y)=HE(R xy )(I(x,y)) Among them, HE(R xy ) represents the local area R xy Perform histogram equalization operation, I(x,y) is the grayscale value of the pixel in the input image; Local area R xy The histogram equalization can be achieved by following the steps below: First, calculate the local area R xy The cumulative distribution function (CDF) of is: Among them, n i represents the number of pixels with pixel value i, and pq is the total number of pixels in the local area; Secondly, according to the cumulative distribution function, the pixel value after histogram equalization is calculated: I eq (x,y)=(L-1)×CDF xy (I(x,y)) Where L is the grayscale level of the image; Through such processing, the histogram equalization of the local area of ​​the image is achieved, thereby enhancing the contrast and details of the image; Then, a Laplace filter is used to sharpen the image and enhance the edges and details of the image; Step S32, interpolation upsampling operation is performed on the enhanced sample to improve the resolution of the infrared image and provide more image information for subsequent deep learning model training. Specifically, the biquadratic interpolation method is used. At each pixel position in the image, the value of the new pixel is estimated by weighted average of the four surrounding pixels; the four pixels are the four pixels closest to the position to be interpolated, and the interpolation formula is as follows: Where f(x,y) is the pixel value at position x and y, and a ij are the coefficients of biquadratic interpolation; Step S33, randomly rotating the image to expand the training data set and increase the robustness of the model; Step S34, normalize the image pixel values ​​to between 0 and 1, and standardize the normalized image pixel values ​​to make their mean 0 and variance 1 to accelerate model convergence. The formula is: In the formula, x norm is the normalized result, x std is the standardized result, x org is the pixel value of the image, μ and σ are the mean and standard deviation of the pixel values ​​of a single channel; Step S35, performing time domain analysis on the vibration signal s(t), calculating the mean μ and standard deviation σ of the vibration signal data, and then according to the 3σ principle, treating the data beyond the range of μ±3σ as outliers or noise and eliminating them; Where N is the total number of data points, s i represents the value of the i-th data point, μ represents the mean of the vibration signal data, and σ represents the standard deviation; Step S36, perform frequency domain analysis on the vibration signal, use Fourier transform to convert the signal s(t) into the frequency domain, S(f), and calculate the energy distribution P of the signal at different frequencies in the frequency domain. norm ; P(f)=|S(f)| 2 Where S(f) is the Fourier transform of the vibration signal, which represents the complex representation of the signal in the frequency domain, and P(f) is the energy spectrum density, which represents the signal energy distribution at frequency f. Step S37, normalize the vibration signal s(t) to the range of [0,1], S norm Right now In the formula, s norm represents the normalized vibration signal value, s represents a certain value of the original vibration signal, s min Represents the minimum value in the original vibration signal data, s max Indicates the maximum value in the original vibration signal data; Step S38, dividing the preprocessed image data set and vibration signal data set into training and test sets, using normal sample data as the training set accounting for 75%, and the remaining 25% of normal samples and defective samples as the test set.

5. The soft package sealing detection method based on the fusion of vibration signal and infrared image according to claim 2 is characterized in that: In step S4, the multimodal fusion network includes a vibration signal feature extraction module, an infrared image feature extraction module, a feature fusion module and a discrimination module; The vibration signal feature extraction module uses a one-dimensional convolutional neural network as a feature extractor for vibration signals. First, the input layer receives data in the shape of signal length and number of signal channels; then, three convolutional layers are used, each followed by a ReLU activation function, containing 64, 32 and 16 convolution kernels, sizes of 3, 5 and 7, respectively, and step sizes of 1; followed by three maximum pooling layers, with a pooling window size of 2 and a step size of 2, for reducing feature dimensions; then a flattening layer, flattening the output of the pooling layer into a one-dimensional vector; followed by a fully connected layer, containing 128 neurons, and connected to a ReLU activation function; finally, the output layer uses a sigmoid activation function for the probability output of a binary classification problem; The infrared image feature extraction module adopts the classic convolutional neural network architecture ResNet50 as the feature extractor of the infrared image; the ResNet-50 model consists of 4 residual blocks, each of which contains several convolutional layers and jump connections; The feature fusion module first normalizes and scales the feature vectors from the vibration signal and infrared image feature extractors to ensure that they have similar scales and ranges; then, considers introducing an attention mechanism to regulate the contribution of each modal feature to dynamically adjust the degree of feature fusion, so as to better capture the correlation and importance between different modalities; after determining the order and sorting of the features, the processed and adjusted feature vectors of the vibration signal and infrared image are spliced ​​along the feature dimension, that is, they are stacked together on the feature dimension; finally, the feature information of the two modalities is fused together by weighted summation to form a final fused feature representation.

6. The soft package sealing detection method based on the fusion of vibration signal and infrared image according to claim 2 is characterized in that: The specific steps of step S5 include: Step S51, input the processed image and vibration signal into the model for parameter training, use the cross entropy loss function as the classification loss function, and calculate the cross entropy loss between the model output and the real label for two categories: qualified and unqualified; introduce the square loss function to compare the difference between the defect position output by the model and the real defect position as an auxiliary loss function for the defect location task; Step S52, fix the trained network weights, for a given number of clusters K, randomly initialize the feature vectors of K cluster centers; for each input feature vector P, calculate its distance from all cluster centers, and assign the feature vector to the cluster center with the nearest distance; for each cluster, calculate the mean of all samples in the cluster, and use the mean as the new cluster center; repeat the above two steps until the stopping condition is met. Among them, the distance C between the feature vector P and the cluster center is calculated i The Euclidean distance formula is usually used; for a given cluster center C i And the feature vector P, the Euclidean distance calculation formula is as follows: Where n is the dimension of the feature vector, P j represents the jth eigenvalue of the eigenvector P, C ij Represents the cluster center C i The j-th eigenvalue of .

7. The soft package sealing detection method based on the fusion of vibration signal and infrared image according to claim 1 is characterized in that: The specific steps of step S6 include: Step S61, determining the abnormal score of the input data by calculating the distance between each sample and the cluster center to which it belongs; Step S62, setting an appropriate abnormality score threshold based on the statistical information of the training data to distinguish normal samples from abnormal samples; Step S63, judging each sample according to the set abnormality score threshold, marking the sample with an abnormality score higher than the threshold as an abnormal sample, which means there is a defect; Step S64: for the samples determined as abnormal samples, further analyze their features to locate the defective parts. This is achieved by visualizing the feature representation of the abnormal samples and using auxiliary technology, namely, the region localization network.

Citation Information

Patent Citations

  • Equipment gas leakage monitoring system and method based on artificial intelligence sense

    CN111141460A

  • Health state estimation system and method of high pressure diaphragm pump based on ELM

    CN112196784A

  • Multi-source information fusion fault diagnosis method for industrial gearbox

    CN113469281A

  • Pipeline leakage detection method, system and equipment based on deep learning and medium

    CN115482236A

  • Valve cooling system main circulating pump bearing fault identification method based on multistage decision fusion

    CN115931354A

Cited By

  • Belt foreign matter dynamic analysis method and device fusing time-frequency characteristics

    CN118916796A

  • Intelligent monitoring system for broken belt capturing device

    CN119218668A

  • An intelligent monitoring system for a broken belt capture device

    CN119218668B

  • Method and system for detecting and positioning foaming defects of sandwich foaming board

    CN119413846A

  • A method and system for detecting and locating foaming defects of a sandwich foam board

    CN119413846B