Vacuum machine packaging sealing detection system based on convolutional neural network

Through multi-spectral image fusion and thermodynamic model based on convolutional neural network, combined with multi-scale feature extraction and edge texture analysis, the accuracy and efficiency problems of micro leakage and complex structure detection in vacuum packaging seal detection are solved, and high-precision Online real-time detection and early warning reduce production costs.

CN118761014BActive Publication Date: 2024-12-31ZHEJIANG LIQIANG PACKAGING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411238193.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-31
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

The existing vacuum packaging sealing detection methods have limited accuracy and efficiency when detecting small leaks and complex packaging structures, and are difficult to achieve real-time online detection, especially in the face of temperature changes and external environmental disturbances.

Method used

The vacuum machine packaging sealing detection system based on convolutional neural network is adopted, and high-precision detection of packaging sealing is achieved through multi-spectral image fusion, thermodynamic model and gas diffusion model, combined with multi-scale feature extraction and edge texture analysis.

Benefits of technology

It significantly improves the accuracy and comprehensiveness of the inspection, can early warning of potential sealing problems, reduce production costs, and improve production line efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761014B_ABST
    Figure CN118761014B_ABST
Patent Text Reader

Abstract

The present invention discloses a vacuum packaging sealing detection system based on a convolutional neural network, which relates to the technical field of neural network. The system comprises: an image acquisition and fusion part, an image processing part and a sealing analysis part. The image acquisition and fusion part is used to acquire a multispectral image of a package using a multispectral camera, and acquire an infrared thermal image of the package using a thermal imaging camera. The image processing part is used to acquire the temperature distribution of the package through the infrared thermal image, and perform multi-scale feature extraction on the fused image using a convolutional neural network to obtain multi-scale features, and calculate the sealing abnormality of the package according to the multi-scale features. The sealing analysis part is used to calculate the estimated pressure distribution of the package using a thermodynamic model based on the temperature distribution, and use the estimated pressure distribution using the thermodynamic model to correct the sealing abnormality of the package to determine whether the sealing of the package is passed. The present invention improves the detection accuracy of the sealing of the package.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to but is not limited to the field of neural network technology, and in particular to a vacuum packaging sealing detection system based on a convolutional neural network. Background Art

[0002] In modern industrial production and logistics transportation, vacuum packaging technology has been widely used in food, medicine, electronic products and other fields. Vacuum packaging extracts the air inside the package and seals the package under low pressure to extend the shelf life of the product, maintain the quality of the product, and prevent oxidation and bacterial invasion. However, although vacuum packaging technology is quite mature, how to ensure that the package always maintains good sealing throughout the circulation process is still an important challenge. If there is a slight leak or poor sealing in the package, it will directly lead to a decrease in the vacuum inside the package, which will in turn affect the quality and safety of the product in the package. Existing vacuum packaging sealing detection methods mainly include physical detection and visual detection. Physical detection methods such as leak test and hermeticity test usually detect leaks by applying a pressure difference between the inside and outside of the package or introducing a detection gas. This type of method has high detection accuracy and is suitable for detecting large or obvious sealing defects, but for tiny leaks, especially in complex packaging structures, the sensitivity and efficiency of physical detection are limited. In addition, physical detection methods often require the integrity of the package to be destroyed, resulting in waste of packaging materials, and in some application scenarios, online real-time detection cannot be achieved.

[0003] Visual inspection methods are usually based on image processing technology, and judge the sealing of packaging by analyzing the optical features of the packaging surface, such as shape, color, texture, etc. The advantages of this type of method are non-contact and non-destructive testing, and can achieve online real-time monitoring. However, traditional visual inspection technology usually relies on simple image processing algorithms, such as edge detection and template matching. Limited by the complexity of the algorithm and image quality, the robustness and accuracy of traditional visual inspection for complex packaging forms and changing environmental conditions still need to be improved. In addition, since traditional methods are difficult to effectively integrate multiple image features (such as multispectral information, thermal imaging, etc.), their detection capabilities are obviously insufficient when facing complex packaging structures or hidden sealing defects. In recent years, with the rapid development of artificial intelligence technology, convolutional neural networks (CNN) have gradually been applied to the field of visual inspection, significantly improving the accuracy of image recognition and feature extraction. The packaging sealing detection method based on CNN can automatically learn and recognize complex image features, and has higher detection accuracy and adaptability. For example, some studies have tried to apply CNN to texture analysis and defect detection on packaging surfaces, extracting detailed features such as edges and textures on the packaging surface through multi-layer convolution operations, thereby identifying possible sealing defects. However, most of these methods only focus on the analysis of a single feature and have not yet formed a systematic multi-dimensional detection framework. Current research focuses on the extraction and analysis of a single feature, lacking a comprehensive consideration of the complex physical processes inside the package (such as heat conduction, gas diffusion, pressure changes, etc.). Especially under complex conditions such as temperature changes, volume fluctuations, and external environmental disturbances, existing detection methods often find it difficult to fully evaluate the sealing status of the package. For example, uneven temperature distribution may lead to abnormal changes in the pressure inside the package, which is usually difficult to capture with existing visual detection methods. On the other hand, existing detection technologies show obvious deficiencies in dealing with chronic sealing problems that may occur during long-term storage or transportation, making it difficult to identify and prevent these potential risks in advance. Summary of the invention

[0004] The present invention provides a vacuum packaging sealing detection system based on convolutional neural network, which can operate stably in complex and changeable industrial environments and meet high-standard quality control requirements. It not only improves the detection accuracy of packaging sealing, but also reduces production costs and improves the overall efficiency of the production line through multi-dimensional data analysis and intelligent decision support.

[0005] In order to solve the above problems, the technical solution of the present invention is achieved as follows:

[0006] A vacuum packaging sealing detection system based on a convolutional neural network, the system comprising: an image acquisition and fusion part, an image processing part and a sealing analysis part; the image acquisition and fusion part is used to use a multispectral camera to acquire a multispectral image of a package, use a thermal imaging camera to acquire an infrared thermal image of the package, and use adaptive weights to fuse the images of each channel of the acquired multispectral image to obtain a fused image; the image processing part is used to acquire the temperature distribution of the package through the infrared thermal image, use a convolutional neural network to perform multiscale feature extraction on the fused image to obtain multiscale features, perform edge detection based on the multiscale features to obtain a package edge detection result, and perform edge texture anomaly analysis based on the package edge detection result to calculate a package sealing anomaly value; the sealing analysis part is used to calculate a thermodynamic model estimated pressure distribution of the package based on the temperature distribution, use the thermodynamic model estimated pressure distribution to correct the package sealing anomaly value, and obtain a final package sealing determination value; the package sealing determination value is compared with a set threshold value to determine whether the package sealing passes.

[0007] Furthermore, when the image acquisition and fusion part uses adaptive weights to perform image fusion on the images of each channel of the acquired multispectral image, the adaptive weight of the image of each channel is calculated by the following formula:

[0008] ;

[0009] in, It is The image of the channel is at position Adaptive weights of is the X-axis coordinate, is the Y-axis coordinate; For the Channel images at position The gradient vector of For the The covariance matrix of the channels represents the noise characteristics; For the Channel images at position The local entropy of is the average local entropy of all channels; is the entropy normalization factor; is the total number of channels; is the transpose operation; For the Channel images at position The local entropy of For the Channel images at position The gradient vector of .

[0010] Furthermore, the image acquisition and fusion part uses the following formula to perform image fusion on the images of each channel of the acquired multispectral image using adaptive weights:

[0011] ;

[0012] in, represents the fused image; For the Channel images at position The pixel value of is the total variation operator; is the inverse operation of total variation; is the preset first weight factor; is the preset second weighting factor.

[0013] Furthermore, the image processing part uses the Canny edge detection operator to perform edge detection based on the multi-scale features to obtain a packaging edge detection result.

[0014] Furthermore, the image processing part performs edge texture anomaly analysis based on the package edge detection result to calculate the package sealing anomaly value. The specific process includes: applying Gabor filter group and local binary pattern to the detected edge area to fuse features of different scales and directions; and then calculating the package sealing anomaly value using the improved local anomaly factor algorithm through the following formula: :

[0015] ;

[0016] in, Indicates the marginal area; It is a marginal area The edge points in The local abnormal factor of is the threshold of the local anomaly factor; is the characteristic scale of the local anomaly factor; It is an edge point Fusion of multi-scale features; is the reference fused multi-scale feature of normal seal; is a preset texture sensitivity index related to packaging materials; is the edge point obtained based on the temperature distribution Temperature value; is the critical temperature gradient; is the actual sealing time; It is the standard sealing time.

[0017] Furthermore, the image processing part applies a Gabor filter bank and a local binary pattern to the detected edge region to fuse features of different scales and directions through the following formula:

[0018] ;

[0019] ;

[0020] ;

[0021] ;

[0022] in, For the location Gabor filter response at ; is the direction of the Gabor filter; is the frequency of the Gabor filter; is the spatial aspect ratio; is the standard deviation of the Gaussian envelope; for The result after rotation; for The result after rotation; is the position coordinate of the center pixel; is the number of neighborhood pixels; is the neighborhood radius; For the Gray value of neighboring pixels; is the threshold function, is the independent variable; is the gray value of the center pixel; if the edge point The location is , then the multi-scale features are integrated Use the following formula to calculate:

[0023] ;

[0024] in, This is the packaging edge detection result.

[0025] Furthermore, the marginal area The edge points in The local anomaly factor Calculated using the following formula:

[0026] ;

[0027] in, Represents edge points of Neighbor set; Represents edge points To the edge point The reachable distance; Represents edge points The local reachable density of express The number of neighbors.

[0028] Furthermore, in the sealing analysis part, based on the temperature distribution, the thermodynamic model of the packaging is calculated to estimate the pressure distribution through the following formula:

[0029] ;

[0030] in, Indicates location In time pressure; is the initial pressure of the package; is the activation energy; is the Boltzmann constant; For location In time Temperature distribution; is the temperature gradient influence coefficient; is the initial volume of the package; For time Packing volume; is the adiabatic index; is the amplitude of periodic pressure fluctuation; is the pressure fluctuation period; is the gas diffusion coefficient; The longest side length of the package.

[0031] Furthermore, location In time Temperature distribution Use the following formula to calculate:

[0032] ;

[0033] ;

[0034] ;

[0035] in, is the air density; is the specific heat capacity; is the thermal conductivity coefficient; is the heat source term; is the latent heat of vaporization; is the vapor density; is the dynamic viscosity; is the viscous dissipation function; is the vapor diffusion coefficient; is the steam velocity field.

[0036] Furthermore, the final packaging sealing judgment value Calculated using the following formula:

[0037] ;

[0038] in, is the preset reference pressure value; This is the acceptable pressure deviation range.

[0039] The vacuum packaging sealing detection system based on convolutional neural network of the present invention has the following beneficial effects: the present invention organically combines image information from multiple spectra through multi-spectral image fusion technology, making up for the shortcomings of traditional single spectrum images in feature extraction. Multi-spectral image fusion utilizes the different reflection characteristics of materials under different spectra, and can capture more details of the packaging surface and internal structure, thereby more comprehensively reflecting the physical state of the packaging. For example, in the fusion process of infrared thermal imaging and visible light images, the system can not only identify surface defects, but also infer the temperature field changes inside the packaging through thermal distribution information. This deep fusion of multi-spectral information enables the system to identify more potential sealing problems in detection, especially those minor defects or hidden problems that are difficult to detect by traditional detection methods, thereby significantly improving the accuracy and comprehensiveness of detection. The present invention simulates and predicts the physical process inside the package through a thermodynamic model based on temperature distribution and a gas diffusion model, thereby achieving early warning of sealing problems. Temperature changes and gas diffusion inside the package are often precursors to sealing degradation, and these changes are usually difficult to capture through traditional physical detection or single image analysis methods. By introducing a thermodynamic model, the present invention can accurately calculate the temperature distribution of the package at different positions and time points, and conduct a comprehensive analysis in combination with vapor diffusion and pressure changes, thereby dynamically evaluating the sealing state of the package. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic diagram of the system structure of a vacuum packaging sealing detection system based on a convolutional neural network provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present disclosure clearer and more understandable, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.

[0042] Example 1: Reference Figure 1 A vacuum packaging sealing detection system based on a convolutional neural network, the system comprising: an image acquisition and fusion part, an image processing part and a sealing analysis part; the image acquisition and fusion part is used to use a multispectral camera to acquire a multispectral image of the package, use a thermal imaging camera to acquire an infrared thermal image of the package, and use adaptive weights to fuse the images of each channel of the acquired multispectral image to obtain a fused image; the image processing part is used to acquire the temperature distribution of the package through the infrared thermal image, use a convolutional neural network to perform multi-scale feature extraction on the fused image to obtain multi-scale features, perform edge detection based on the multi-scale features to obtain a package edge detection result, and perform edge texture anomaly analysis based on the package edge detection result to calculate the package sealing anomaly value; the sealing analysis part is used to calculate the estimated pressure distribution of the package by a thermodynamic model based on the temperature distribution, use the estimated pressure distribution of the thermodynamic model to correct the package sealing anomaly value, and obtain a final package sealing determination value; the package sealing determination value is compared with a set threshold value to determine whether the package sealing passes.

[0043] Specifically, through multispectral cameras, images of packaging in different wavelength ranges can be obtained. These images contain not only visible light information, but also invisible light information such as near-infrared light. Images in each band can reveal the characteristics of packaging materials in different spectra, which is particularly important for detecting sealing defects. The characteristics of packaging materials (such as absorption, reflection and transmittance) vary in different bands, and multispectral imaging can capture these differences, so as to better identify potential sealing problems in subsequent processing. Thermal imaging cameras provide key information on temperature distribution by capturing infrared images of packaging. In vacuum packaging, temperature distribution may be abnormal due to poor sealing, which is usually manifested as local temperature increase or decrease. Therefore, infrared images are not only an auxiliary means of sealing detection, but also a key basis for identifying and locating sealing problems. By obtaining thermal images of packaging, the system can detect slight changes in temperature inside or on the surface of the packaging, which may be caused by air leakage or other sealing problems. After acquiring multispectral images and infrared images, the system fuses these images through an adaptive weight fusion algorithm to generate a more informative fused image. The core of adaptive weight fusion is that it can automatically adjust the weight of each band image in the fused image according to its importance. Specifically, the adaptive weight algorithm dynamically adjusts the contribution of each band image in the fusion process by analyzing its features (such as clarity, contrast, noise level, etc.), so as to ensure that the final fused image can not only retain the important spectral information in the multispectral image, but also make full use of the temperature information contained in the infrared image. This fusion method not only improves the overall quality of the image, but also enhances the feature expression ability of the image, providing richer input data for subsequent convolutional neural network processing. The fused image contains both the spectral characteristics captured in multispectral imaging and the temperature distribution displayed in thermal imaging, which enables the convolutional neural network to more comprehensively analyze the sealing status of the package during processing. For example, in sealing detection, the convolutional neural network can use the information of different bands in the fused image to identify potential sealing defects, such as weak material areas or abnormal temperature areas. In addition, image fusion also has the effect of noise reduction, which reduces the noise impact in a single image by combining the advantages of images in different bands. This noise reduction effect is crucial to improving the detection accuracy of the system, especially in complex industrial environments where noise can seriously affect image quality and thus the accuracy of sealing detection. The adaptive weight fusion algorithm can effectively suppress noise and highlight the key features of the image by accurately calculating the weight of each band, providing high-quality input for subsequent processing of the convolutional neural network.

[0044] Temperature distribution is an important indicator for sealing detection. Sealing problems of packaging usually lead to abnormal changes in local temperature. These changes may be caused by temperature differences caused by gas exchange inside and outside the package. At this stage, the system determines the temperature change pattern on the surface or inside of the package by analyzing the temperature distribution map in the infrared image. This temperature information will serve as the basis for subsequent sealing analysis and be used to build and correct the thermodynamic model of the package. After obtaining the temperature distribution, the system further uses convolutional neural networks to perform multi-scale feature extraction on the fused image. Multi-scale feature extraction is a key step in image processing. Its purpose is to extract image features at different scales to ensure that the system can capture sealing problems of different sizes and locations. With the help of convolutional neural networks, the system gradually extracts multi-scale feature maps from simple features at low levels (such as edges and lines) to complex features at high levels (such as textures and shapes) through layer-by-layer convolution operations. These feature maps not only retain the local details of the image, but also describe the overall structural characteristics, enabling the system to conduct a comprehensive analysis of the package. Especially when detecting small or hidden sealing defects, multi-scale feature extraction has a unique advantage because it can amplify these tiny features and make them more obvious in the feature map. Next, the system uses the extracted multi-scale features to perform edge detection on the package. Edge detection is one of the basic tasks in image processing. Its role is to identify strongly changing parts of an image, which usually correspond to the boundaries of an object. In package sealing detection, edge detection helps to accurately identify the edge contour of the package and detect possible sealing problems. Through the edge detection module of the convolutional neural network, the system is able to identify the edge of the package in the fused image and generate the corresponding edge detection results. The accurate positioning of the edge not only helps the subsequent texture analysis, but also serves as a direct basis for judging the sealing of the package. Especially at the curling or sealing, edge detection can reveal potential defects in these key areas, such as incomplete sealing or insufficient sealing strength. After the edge detection is completed, the system further performs edge texture anomaly analysis. The edge texture of the package is usually smooth and consistent, but if there is a sealing problem with the package, the edge texture may be abnormal, such as increased roughness or decreased consistency. The system identifies and quantifies these anomalies by performing texture analysis on the edge detection results. Convolutional neural networks play an important role in this process. They can automatically learn and identify different texture patterns and classify or detect anomalies of these patterns. Based on the texture analysis, the system calculates the sealing anomaly value of the package. This outlier value reflects the degree of texture abnormality at the edge of the package. The higher the value, the more serious the sealing problem of the package. The final output of the image processing part is a sealing abnormality value, which will be further corrected and processed in the subsequent sealing analysis part. However, the work of the image processing part is not limited to this.Through the combination of temperature distribution, edge detection and texture analysis, the system can already make a preliminary judgment on the sealing status of the package at this stage. This multi-level, multi-angle image analysis method ensures that the system can capture and analyze the sealing problems of the package from multiple dimensions, thereby greatly improving the accuracy and reliability of the detection. In practical applications, the image processing part enables the system to cope with various complex packaging environments and sealing challenges through the powerful feature extraction and pattern recognition capabilities of the convolutional neural network. Whether it is a minor sealing defect or a more obvious temperature anomaly, the system can provide accurate detection results through sophisticated image processing and deep learning analysis. Through a comprehensive analysis of temperature, edges and textures, the image processing part provides a solid data foundation for sealing detection, ensuring the efficiency and accuracy of the system.

[0045] In the initial stage of the sealing analysis, the system uses the temperature distribution information provided by the infrared thermal image to establish a thermodynamic model of the package. Temperature is an important indicator of the gas state inside the package. Especially in vacuum packaging, the uneven temperature distribution may mean gas leakage or sealing defects. Through the thermodynamic model, the system can infer the pressure distribution inside the package from the temperature distribution. There is a close relationship between pressure and temperature. According to the laws of thermodynamics, the change of temperature will directly affect the pressure distribution of the gas. In the sealing test, the uniformity of pressure is one of the important bases for judging the sealing of the package. If the pressure distribution inside the package is uneven, it may indicate that there is gas leakage in some areas, thus affecting the overall sealing of the package. Therefore, building an accurate thermodynamic model can provide the system with a scientific pressure distribution prediction, thereby enhancing the accuracy of the sealing analysis. After obtaining the pressure distribution through the thermodynamic model, the system enters the critical correction stage. Based on the sealing anomalies generated by the previous image processing part, the sealing analysis part corrects these anomalies according to the estimated pressure distribution. The core idea of ​​this step is that the combination of temperature distribution and pressure distribution can more accurately reflect the true sealing state of the package. The sealing abnormal values ​​of the package are obtained based on edge detection and texture analysis in the image processing process, but these abnormal values ​​may be interfered by some external factors, such as the physical properties of the material or changes in ambient temperature. By correcting the pressure distribution, the system can exclude these external interference factors, making the final sealing judgment more objective and accurate. In other words, the corrected sealing abnormal values ​​can more truly reflect the sealing problem of the package under vacuum state, which is a crucial part of the sealing analysis. After correcting the sealing abnormal values, the system generates the final sealing judgment value. This judgment value is obtained by the system after comprehensive analysis of temperature distribution, pressure distribution, edge detection results and texture analysis results, and is a quantitative description of the overall sealing state of the package. The system compares the judgment value with the preset threshold to determine whether the package passes the sealing test. If the judgment value is lower than the set threshold, it means that the sealing of the package meets the standard and can continue to enter the subsequent process or be sold out of the factory; on the contrary, if the judgment value is higher than the threshold, it means that the package has a sealing problem and needs to be reworked or repackaged. This judgment process is not only a strict control of packaging quality, but also an important guarantee to ensure the safety and reliability of products in the market. In actual applications, the sealing analysis part combines deep learning and physical modeling, allowing the system to comprehensively evaluate the sealing of packaging from multiple dimensions. This method not only improves the accuracy of detection, but also enhances the robustness of the system. Whether it is rapid batch detection on the production line or fine detection in a laboratory environment, the sealing analysis part based on convolutional neural networks can provide reliable detection results.In addition, with the accumulation of more data and the continuous optimization of the convolutional neural network model, the detection accuracy and efficiency of the system will be further improved, providing the packaging industry with more advanced quality control methods.

[0046] Embodiment 2: When the image acquisition and fusion part uses adaptive weights to perform image fusion on the images of each channel of the acquired multispectral image, the adaptive weight of the image of each channel is calculated by the following formula:

[0047] ;

[0048] in, It is The image of the channel is at position Adaptive weights of is the X-axis coordinate, is the Y-axis coordinate; For the Channel images at position The gradient vector of For the The covariance matrix of the channels represents the noise characteristics; For the Channel images at position The local entropy of is the average local entropy of all channels; is the entropy normalization factor; is the total number of channels; is the transpose operation; For the Channel images at position The local entropy of For the Channel images at position The gradient vector of .

[0049] Specifically, the formula analyzes each channel at a specific location Gradient information at , to determine the intensity and direction of image changes. The calculation of the gradient vector reflects the grayscale change of the image at that point. Generally, a larger gradient value means that there may be a significant edge or other important feature at that point. In the seal detection system, the edge is usually related to the physical boundary of the package or potential sealing defects. Therefore, the ability to accurately identify and amplify these edge features is crucial for detection accuracy. Gradient information, as an important indicator to measure image changes, is included in the weight calculation to ensure that in the final fused image, channels containing important edge information will be given higher weights, making these key features more obvious in subsequent image processing. At the same time, the formula also introduces the covariance matrix To describe the noise characteristics of each channel. Since multispectral images may be interfered by various noises, especially in industrial production environments, image quality is easily degraded by external factors. The inverse matrix of the covariance matrix is Its role in the formula is to reduce the impact of noise on gradient information. By multiplying the gradient vector with the inverse matrix of the covariance matrix, the formula effectively filters out the meaningless gradient changes caused by noise, so that the adaptive weights can more accurately reflect the important features actually existing in the image. The essence of this process is to identify and weaken the interference of noise on image quality through statistical means, ensuring that the image of each channel can truly show its due characteristics during the fusion process, and will not mislead the system's judgment due to the presence of noise. Local entropy As another important parameter, it is used to measure the complexity and information content of an image in a certain area. The higher the entropy, the more complex the information in the area or the higher the uncertainty. For the seal inspection of packaging, complex image areas usually contain more detailed information, which may be associated with potential sealing defects. Therefore, the formula is obtained by combining local entropy with global average entropy. The weight of each channel is adjusted dynamically by comparing the weights of the two channels. Specifically, the formula uses , and the influence of local entropy is smoothed by the hyperbolic tangent function to avoid extreme fluctuations in weights in high or low entropy areas. In this way, areas with high entropy will be given larger weights, so that these areas are more retained in the final fused image, while low entropy areas may be weakened, so that the system pays more attention to areas with rich information that may contain sealing defects. In the formula, the normalization process ensures that the sum of all channel weights at each pixel position is 1. The purpose of this processing method is to enable images of different channels to participate in the fusion process fairly, without ignoring the information of other channels because the features of a certain channel are too prominent. By normalizing the weights of all channels at each position, the system can combine the advantages of different spectral information in the fused image to generate a high-quality image that contains both edge details and rich texture information. In this way, the final generated fused image can provide more comprehensive and accurate input data for the convolutional neural network, thereby improving the overall accuracy of sealing detection.

[0050] Convolution is a commonly used mathematical operation in signal processing, image processing, and machine learning. In the field of image processing, convolution operations are used to extract local features of images, such as edges, textures, etc. The convolution operation slides a small matrix (called a convolution kernel or filter) on the input image, multiplies the corresponding elements of the image and the convolution kernel, and sums them to obtain the output feature map.

[0051] Mathematically, the convolution operation can be expressed as:

[0052] ;

[0053] in: is the pixel value of the input image. is the weight of the convolution kernel. is the location of the output feature map. is the radius of the convolution kernel (assuming the convolution kernel is square and its size is ). Multi-scale feature extraction: Multi-scale feature extraction is performed on the fused image through a convolutional neural network (CNN). Different sizes and depths of convolution kernels can capture features of different scales in the image, such as texture, edges, and shapes. Edge detection: Use convolution kernels to perform edge detection operations, identify the edges of the package, and detect edge texture anomalies to calculate the sealing anomaly value. In a convolutional neural network (CNN), the convolution layer performs convolution operations on the input image through multiple convolution kernels. Each convolution kernel can be regarded as a feature extractor that recognizes specific patterns in the image, such as edges, corners, or textures. The multi-scale feature extraction process is as follows: First, a multispectral image of the package is acquired using a multispectral camera, and an infrared thermal image of the package is acquired using a thermal imaging camera. Then, adaptive weights are used to fuse the images of each channel of the acquired multispectral image to obtain a fused image.

[0054] Adaptive Weight The calculation formula is as follows:

[0055] ;

[0056] in, It is Channel images at position The gradient vector of It is The covariance matrix of the channels represents the noise characteristics; It is Channel images at position The local entropy of is the entropy normalization factor. After the fused image is obtained, multi-scale feature extraction is performed on it through a convolutional neural network. The operation steps of the convolution layer are as follows: Select convolution kernel: The convolutional neural network uses multiple convolution kernels, and the sizes of these convolution kernels (such as , The size of the convolution kernel is determined by the network design. Smaller convolution kernels are used to extract subtle features (such as edges), while larger convolution kernels are used to extract global features of larger areas. Perform convolution operations: Each convolution kernel slides on the fused image and performs convolution operations. Suppose we use a convolution kernel of size The convolution kernel of , then at each position, the local area of ​​the fused image is multiplied element by element with the elements of the convolution kernel and summed:

[0057] ;

[0058] in, is the output feature map at position The value of is the input fused image at position The pixel value of is the weight of the convolution kernel. Multi-scale feature extraction: In the multi-scale feature extraction process, the convolution layer uses convolution kernels of different sizes or multi-level convolution operations to extract multi-scale features. For example, smaller convolution kernels are used to extract local edge and texture features, while larger convolution kernels can capture the global structural features of the image. In convolutional neural networks, edge detection is usually performed using specific convolution kernels (such as the Sobel operator, Prewitt operator, or a custom edge detection convolution kernel). The Canny edge detection operator is used for edge detection, and the process involves the following steps:

[0059] In order to reduce the influence of noise, the image is first Gaussian smoothed. This step usually uses a Gaussian convolution kernel to convolve with the image:

[0060] ;

[0061] in, is the standard deviation of the Gaussian function. This convolution operation can blur the image and reduce the impact of high-frequency noise.

[0062] Use the Sobel operator to convolve the smoothed image and calculate the gradient magnitude and direction of each pixel. The Sobel operator calculates the gradient in the horizontal direction (Gx) and vertical direction (Gy) respectively:

[0063] ;

[0064] By convolving the image with these two convolution kernels respectively, we can get the gradient images in the horizontal and vertical directions. Then, the gradient magnitude and direction can be calculated as:

[0065] ;

[0066] In order to accurately locate the edge position, non-maximum suppression is performed, that is, searching for the local maximum in the gradient direction and suppressing the non-maximum to zero. This process helps to remove pixels that are not true edges.

[0067] Applying dual threshold detection technology, the gradient amplitude image is divided into strong edges, weak edges, and non-edges. Then, through edge connection, the weak edges connected to the strong edges are also retained as edges. Multi-scale feature extraction and edge detection through convolution operation are important steps in analyzing the sealing performance of packaging. These steps can effectively identify subtle changes in the packaging surface and sealing defects, and improve the accuracy and robustness of detection. Convolution operation is particularly suitable for processing local features in the image, such as the edge and texture of the sealing strip, which are directly related to the sealing performance of the package.

[0068] Embodiment 3: The image acquisition and fusion part uses the following formula to perform image fusion on the images of each channel of the acquired multispectral image using adaptive weights:

[0069] ;

[0070] in, represents the fused image; For the Channel images at position The pixel value of is the total variation operator; is the inverse operation of total variation; is the preset first weight factor; is the preset second weighting factor.

[0071] Specifically, the weight of each channel is determined by an adaptive weight, and the size of the weight reflects the importance of the channel at a specific pixel position. Through this weight combination, the image information of different spectral channels is reasonably distributed during the fusion process, so that those features that are more critical to the seal detection can be enhanced in the fused image. This weighted combination method enables the fused image to not only have the advantages of different spectral information, but also to integrate the advantages of different channels, so that in a complex detection environment, the system can better identify potential seal problems. However, a simple linear weighted combination may not be sufficient to handle complex seal detection scenarios, especially when the noise interference is large or some important edge and structural features are relatively weak. Therefore, the formula introduces a gradient correction term to enhance the edge information in the image through an inverse gradient operation. The gradient information of an image is usually used to represent the most drastic part of the image, that is, the edge area. In seal detection, the edge of the package is often an important indicator of the sealing state. If these edge features are weakened or blurred during the fusion process, the accuracy of the detection results will be seriously affected. By adding a gradient correction term to the fusion formula, the system can highlight these edge features in the fused image, making the final generated image clearer in structural details. This processing method ensures the clarity and integrity of the package edge, thereby improving the ability to identify tiny sealing defects during the inspection process. In addition, the formula also uses the total variation correction term to further deal with the noise problem and structural feature retention problem in the image. Total variation is a technology commonly used in image denoising. It suppresses noise while retaining the main structural features of the image by analyzing the change trend in the image. Especially in the sealing detection, the overall shape and general outline of the package are important bases for judging the sealing, and the presence of noise may interfere with these structural features. Through the total variation correction term, the system can maintain or even enhance the global structure of the image while removing noise, so that the fused image can still accurately reflect the actual state of the package at the macro level. The introduction of the total variation correction term, especially after the inverse total variation operation, reintegrates the structural information of the image into the fused image, thereby improving the overall smoothness and visual quality of the image. This process enables the system to more robustly handle the noise and inconsistency problems caused by different spectral channels during the detection process, thereby improving the reliability and accuracy of the final detection results. The formula not only achieves efficient fusion of multispectral images, but also makes full considerations in terms of image information retention, edge enhancement and noise suppression. The final fused image has a high signal-to-noise ratio, clear structural features and rich detail information, which can provide the best input for the convolutional neural network.This image fusion method based on multiple operators and correction terms enables the vacuum packaging sealing detection system based on convolutional neural networks to maintain a high level of detection performance in various complex application scenarios. Especially when faced with complex packaging materials and changing external environments, it can still accurately and quickly identify potential sealing defects, thereby ensuring product quality and safety.

[0072] Embodiment 4: The image processing part uses the Canny edge detection operator to perform edge detection based on multi-scale features to obtain a packaging edge detection result.

[0073] Specifically, the purpose of multi-scale feature extraction is to analyze image features at different scales so that structural information at all levels in the image can be captured. In package sealing detection, features at different scales may correspond to different packaging characteristics and potential sealing problems. Through multi-scale feature extraction, the system is able to generate a set of feature maps that cover a variety of information from coarse structures to subtle textures. This provides rich feature input for subsequent edge detection, allowing the system to analyze the packaging image more comprehensively. After obtaining multi-scale features, the system uses the Canny edge detection operator to identify edges in the image. Canny edge detection is a classic and effective edge detection method that accurately locates edges in an image through a series of steps. First, the Canny operator performs a Gaussian filter on the image to remove noise and smooth the image, which is very important for reducing the interference of noise on edge detection. Next, the Canny operator calculates the gradient magnitude and direction of the image to determine where edges may exist in the image. Through non-maximum suppression, the Canny operator can accurately locate these edges and remove unnecessary non-edge points. Next, the Canny operator further screens edge points through double threshold detection to separate strong edges, weak edges, and non-edge parts. In this process, strong edges are directly retained, while weak edges are retained based on their connection with strong edges. This mechanism enables Canny edge detection to effectively deal with noise and other interference factors in the image, ensuring that the edge detection results output in the final output not only contain the key structures in the image, but also avoid the interference of noise and weak signals. The key to combining multi-scale features with the Canny edge detection operator is that multi-scale features can provide rich image details, and the Canny operator can efficiently convert these details into accurate edge information. In package sealing detection, edges usually correspond to changes in the physical boundaries or sealing areas of the package, and the edge information of these areas is crucial to determine whether the package is well sealed. With the support of multi-scale features, Canny edge detection can accurately extract these key edge information in complex image backgrounds, ensuring that the system can accurately locate and analyze the sealing status of the package. Finally, through this processing flow, the system generates edge detection results for the package, which are directly used for subsequent sealing anomaly analysis and judgment. Through accurate edge detection, the system can identify tiny defects or irregular edges on the package, which are often early signs of sealing problems. The precision and accuracy of edge detection results directly affect the overall effect of sealing detection. Therefore, the combination of multi-scale features and Canny edge detection operators ensures that the system can still maintain a high level of detection capabilities in complex industrial environments, thereby effectively improving the reliability of packaging quality control.

[0074] Embodiment 5: The image processing part performs edge texture anomaly analysis based on the package edge detection result to calculate the package sealing anomaly value. The specific process includes: applying Gabor filter group and local binary pattern to the detected edge area to fuse the features of different scales and directions; and then using the improved local anomaly factor algorithm to calculate the sealing anomaly value of the package through the following formula: :

[0075] ;

[0076] in, Indicates the marginal area; It is a marginal area The edge points in The local abnormal factor of is the threshold of the local anomaly factor; is the characteristic scale of the local anomaly factor; It is an edge point Fusion of multi-scale features; is the reference fused multi-scale feature of normal seal; is a preset texture sensitivity index related to packaging materials; is the edge point obtained based on the temperature distribution Temperature value; is the critical temperature gradient; is the actual sealing time; It is the standard sealing time.

[0077] Specifically, in this embodiment, the preliminary stage of image processing has obtained the edge detection result of the package by applying the Canny edge detection and other technologies. The edge refers to the area where the gray value changes significantly in the image, which usually corresponds to the physical boundary or sealing position of the package. In the package sealing detection, these edge areas are often the places where sealing problems are most likely to occur. Therefore, it is very important to conduct in-depth analysis of these areas. In order to more accurately analyze the characteristics of these edges, the system further uses Gabor filter groups and local binary patterns (LBP) to extract multi-scale and multi-directional features of the edges. The Gabor filter group is a very effective image processing tool that can analyze the local structural features of the image at different scales and directions. The response of the Gabor filter is similar to the receptive field in the human visual system, and is particularly sensitive to the detection of textures and edges. In the present invention, the application of the Gabor filter group enables the system to capture the detailed information of the package edge at different scales, which is crucial for identifying sealing anomalies. For example, in some high-frequency texture areas, the Gabor filter can effectively extract small texture changes, thereby identifying possible sealing defects. In addition, the Gabor filter group can also extract the directional information of the edge. Edges in different directions may represent different sealing states or defect types. By comprehensively analyzing these directional information, the system can more comprehensively evaluate the sealing of the package. Local binary pattern (LBP) is a commonly used texture descriptor. By binarizing the local area of ​​the image, LBP can effectively capture the local texture pattern. In the present invention, LBP is combined with the Gabor filter group to further enrich the system's feature extraction capability for edge areas. LBP describes texture features by encoding the relative relationship between pixels. This encoding method is particularly effective for capturing subtle texture changes on the surface of the package. Through LBP, the system can convert these subtle texture information into binary patterns that are easy to process and analyze, thereby providing strong support for subsequent anomaly detection.

[0078] After extracting these multi-scale and multi-directional edge features, the system enters the critical anomaly detection stage. At this point, the system needs to determine whether these edge features are significantly different from the normal sealing state, so as to determine whether there is a problem with the sealing of the package. To this end, the system uses an improved local outlier factor (LOF) algorithm. The LOF algorithm is a density-based anomaly detection method that identifies abnormal points whose density is significantly lower than the surrounding environment by comparing the local density of the data point with its surrounding neighborhood. In packaging sealing detection, the LOF algorithm is used to analyze the degree of local anomaly of each point in the edge area. Specifically, each edge point in the edge area A local anomaly factor will be calculated This factor determines the degree of abnormality by measuring the density difference of the point relative to its surrounding neighborhood. If the local density of an edge point is significantly lower than other points in its neighborhood, this usually means that the point may be an abnormal point. This abnormality may indicate that the package has air leakage, poor sealing or other problems in the sealing test. The calculation of the local anomaly factor involves the adjustment of multiple parameters to ensure that it can sensitively capture those small but important anomalies. In the present invention, the use of the LOF algorithm is achieved by setting an appropriate feature scale. To control the sensitivity of the algorithm, the system can adapt to sealing defects of different sizes and complexities. In addition, a threshold is introduced in the formula ,This threshold is used to convert the local anomaly factor into a probability value, which can more intuitively represent the degree of abnormality of the edge point.

[0079] Through a Sigmoid function, the system maps the discrete LOF value to a range between 0 and 1. This process effectively smooths the changes in the anomaly factor, allowing the system to perform anomaly detection more stably. This probability value represents the possibility that the edge point is considered anomaly. The larger the value, the higher the degree of abnormality of the point in terms of sealing. In order to further enhance the detection capability of sealing anomalies, the formula also considers the multi-scale characteristics of edge points. Compared with the reference characteristics in the normal sealing state This ratio is used to quantify the degree of deviation of the edge point from the normal state in the current sealing state. By exponentially processing this ratio, the system can adjust the sensitivity to texture anomalies according to the characteristics of different materials. For example, for some special materials, even a small texture change may mean a serious sealing problem, while for other materials, a larger texture change may be required to indicate a problem. By adjusting the power exponent The system can flexibly adapt to the characteristics of different materials to ensure accurate evaluation of sealing anomalies in various application scenarios. In sealing detection, temperature is often an important indicator. Since poor sealing of the package may lead to internal gas leakage or external gas infiltration, these will cause the temperature inside the package to change. Therefore, the temperature gradient in the formula With critical temperature gradient The comparison helps the system identify sealing problems that may be caused by temperature changes. If the temperature change at the edge point exceeds the set critical value, this may mean that there is a potential sealing problem at that point. By incorporating the temperature gradient into the calculation of the sealing anomaly value, the system can more comprehensively evaluate the sealing status, thereby greatly improving the accuracy and reliability of the detection. Finally, the formula also takes into account the time factor, that is, the actual sealing time Standard sealing time The relationship between the sealing time and the sealing time is a key factor affecting the sealing quality of the package. A sealing time that is too short may lead to insufficient sealing, while a sealing time that is too long may lead to damage to the material or excessive sealing. Therefore, the time factor in the formula introduces the time factor into the calculation of the sealing abnormality value through an exponential decay function. This processing method enables the system to dynamically adjust the evaluation of the sealing abnormality according to the change of the actual sealing time. For example, if the sealing time is too short, the system will automatically increase the sensitivity to the sealing abnormality, making it easier to detect possible sealing problems. On the contrary, if the sealing time is too long, the system will reduce the sensitivity to avoid excessive detection and false alarms. In general, the formula of Example 5 constructs a multi-dimensional and comprehensive sealing evaluation method by combining the multi-scale characteristics of the edge area, local abnormal factors, temperature gradients and time factors. This method can not only identify significant sealing defects, but also detect those small but may have a significant impact on the sealing performance. Anomalies. This refined calculation method greatly improves the reliability and accuracy of the sealing detection system, so that the system can still maintain efficient detection performance in practical applications, especially in the face of complex packaging structures and changing production environments.

[0080] The following table is an experimental comparison table of Example 5:

[0081] ;

[0082] Method A (Example 5) showed the highest detection accuracy (98.5%), which was significantly higher than the other methods. This shows that the detection method based on the improved local anomaly factor algorithm and multi-scale feature fusion is more effective in accurately identifying sealing defects. The accuracy of method B is 85.2%. Since the traditional visual detection method is limited by image resolution and simple image processing algorithms, the detection effect is not as good as method A. Method C uses thermal imaging to detect sealing defects with an accuracy of 92.0%. Although thermal imaging can effectively detect sealing problems caused by temperature changes, the effect is reduced when dealing with complex packaging materials (such as multi-layer materials or thermal insulation materials). Method D has the lowest accuracy, only 78.5%. The detection method based on simple thresholds cannot effectively deal with complex sealing defect situations, especially the detection effect of minor defects is poor. Method A has the highest sensitivity (97.8%), indicating that this method can effectively detect most defective packages. Method B has a sensitivity of 80.0%, which has a certain detection ability for obvious defects, but has a weak recognition ability for minor defects. Method C has a sensitivity of 88.5%. Although thermal imaging has good detection capabilities for some defects, it is less effective on multi-layer materials and packaging with uniform heat distribution. Method D has a sensitivity of 75.0%. It has a fair detection effect on large defects, but has limited detection capabilities for subtle and complex defects. Method A has the highest specificity (99.0%), indicating that this method is extremely accurate in detecting defect-free packaging. Method B has a specificity of 90.0%. Traditional visual inspection methods have a good recognition effect on defect-free packaging, but have a high false alarm rate under some complex lighting conditions. Method C has a specificity of 95.0%. Thermal imaging methods are relatively good in avoiding false alarms. Method D has a specificity of 82.0%, with a high false alarm rate, indicating that this method is prone to false alarms when detecting defect-free packaging. Method A has the lowest false alarm rate (1.0%), indicating that it is extremely accurate in excluding defect-free packaging. Method B has a false alarm rate of 10.0%. The high false alarm rate may be caused by complex lighting conditions and reflections on the packaging surface. The false alarm rate of method C is 5.0%, and thermal imaging detection may lead to false alarms under certain conditions (such as when the background thermal noise is large). The false alarm rate of method D is the highest (18.0%). The simple threshold method cannot accurately distinguish between subtle defects and normal conditions, and is prone to false alarms. The detection method based on the improved local anomaly factor algorithm (method A) proposed in Example 5 shows obvious advantages over the prior art. Its high detection accuracy, sensitivity and specificity indicate that this method has stronger robustness and reliability when dealing with complex sealing defect detection. Although traditional visual inspection methods (method B) and thermal imaging inspection methods (method C) perform well in some aspects, they are limited in effect when dealing with complex packaging materials or multi-layer materials. Especially for the detection of minor defects, neither methods B nor C can achieve the accuracy of method A.The simple threshold-based detection method (method D) shows significant deficiencies, and its low detection accuracy and high false alarm rate limit its effectiveness in practical applications. By comparing the experimental data, it can be concluded that the method in Example 5 shows higher accuracy and reliability in package sealing detection. This method utilizes multi-scale feature fusion and an improved anomaly detection algorithm, which makes it have significant advantages in identifying complex defects, especially in high-precision detection of package sealing. It is recommended to give priority to this method in industrial applications that require high reliability and high accuracy.

[0083] Embodiment 6: The image processing part applies a Gabor filter bank and a local binary pattern to the detected edge region to fuse features of different scales and directions through the following formula:

[0084] ;

[0085] ;

[0086] ;

[0087] ;

[0088] in, For the location Gabor filter response at ; is the direction of the Gabor filter; is the frequency of the Gabor filter; is the spatial aspect ratio; is the standard deviation of the Gaussian envelope; for The result after rotation; for The result after rotation; is the position coordinate of the center pixel; is the number of neighborhood pixels; is the neighborhood radius; For the Gray value of neighboring pixels; is the threshold function, is the independent variable; is the gray value of the center pixel; if the edge point The location is , then the multi-scale features are integrated Use the following formula to calculate:

[0089] ;

[0090] in, This is the packaging edge detection result.

[0091] The introduction of a specific Gabor filter group enables the system to extract local features of the image at different scales and directions. Formula Describes the response of the Gabor filter in an image by and frequency The Gabor filter combines the Gaussian function in the spatial domain and the sine wave in the frequency domain. It can locate features (such as edges or textures) in space and capture detailed information of different scales in frequency. This dual characteristic makes the Gabor filter particularly suitable for extracting edge information and texture patterns in image processing. Specifically, the response of the Gabor filter is It is a function determined by parameters such as position, direction, and frequency. This response function exhibits different characteristics at different scales and directions. By adjusting the direction of the filter and frequency , the system is able to analyze the edges of the package at multiple angles and scales. For example, at high frequencies, the Gabor filter can detect small edges and texture changes, while at low frequencies it can capture larger structural features and global trends. Directional parameters Allows the filter to respond to edges at different angles, which is particularly important for capturing edge features in different directions, because the sealing problem of the package may appear in any direction. In practical applications, the Gabor filter group transforms the image's rotation coordinate system and calculates the rotated coordinates. and , thereby achieving feature extraction in different directions of the image. By rotating the pixel coordinates in the image, the system can analyze the structural features of the edge at multiple angles and identify edge anomalies that may affect the seal. For example, when there is a slight warp or irregularity in the seal of the package, these subtle changes may be more obvious in a specific direction. The multi-directional analysis capability of the Gabor filter enables the system to effectively capture these anomalies and ensure the comprehensiveness and accuracy of the seal detection.

[0092] In addition to the directional and frequency characteristics of the Gabor filter, the local binary pattern (LBP) is used to capture the local texture characteristics of the edge area. LBP generates a binary code by binarizing the neighboring pixels around the pixel to represent the local texture pattern of the area. Formula This process is described in represents the number of neighborhood pixels, Represents the radius of the neighborhood. In practical applications, LBP is able to capture subtle changes in edge areas, such as slight depressions or protrusions, which may be early signs of sealing problems. The advantage of LBP is that it is insensitive to lighting changes and can stably extract texture features under different lighting conditions, which is particularly important for sealing detection in production environments. The working principle of LBP is to generate a binary sequence by comparing the grayscale value of each neighborhood pixel with the central pixel. This sequence is then converted to a decimal number as the texture feature encoding of the area. This code can not only describe local texture information, but also be fused with features of other scales and directions to form a comprehensive feature description of the entire edge area. In the feature calculation of the edge point, the output of LBP is multiplied by the response of the Gabor filter to achieve an organic combination of multi-scale and multi-directional features. Fusion of multi-scale features The calculation formula combines the Gabor filter response, LBP output and edge detection results This formula performs weighted summation of Gabor filter responses of different directions and frequencies and multiplies them with the corresponding LBP output to form a multi-scale fusion feature of the edge point. The edge detection result here is is an important weighting factor, which ensures that only the areas identified as important in edge detection will have a significant impact on the final feature fusion. The purpose of this process is to strengthen those edge areas that perform abnormally in the multi-scale feature analysis, thereby improving the detection sensitivity of sealing problems. Through this multi-scale feature fusion method, the system can comprehensively analyze the edge areas of the package at different scales and directions. The Gabor filter provides sensitivity to different frequencies and directions, while the LBP captures local texture details. The combination of the two enables the system to not only detect large structural defects, but also identify minor sealing problems that may be caused by local texture changes. The final output of the fused multi-scale features provides a rich and reliable feature description for subsequent sealing evaluation, which ensures that the system can always maintain a high level of detection performance in a complex industrial environment.

[0093] Example 7: Edge Area The edge points in The local anomaly factor Calculated using the following formula:

[0094] ;

[0095] in, Represents edge points of Neighbor set; Represents edge points To the edge point The reachable distance; Represents edge points The local reachable density of express The number of neighbors.

[0096] Specifically, the core idea of ​​the local outlier factor (LOF) is to determine whether the point exhibits abnormal behavior by comparing the density difference between the edge point and its surrounding neighborhood points. In the seal detection, the edge area of ​​the package is often where the sealing problem is most likely to occur, so it is very important to perform anomaly analysis on these edge points. LOF quantifies this abnormality by calculating the local density and reachable distance of the edge points, thus providing the system with a sensitive and accurate detection method. First, the calculation of LOF starts from determining the edge points. of Neighbor Set Start. This set includes the edge points The nearest neighbor points, usually determined by calculating the Euclidean distance between these points. The value is crucial because it directly affects the LOF calculation result. The value can ensure that the algorithm can capture the anomalies in the local area without introducing errors due to noise or other factors. If the value is too small, LOF may be too sensitive to noise; If the distance is too large, the algorithm may lose its sensitivity to local anomalies, causing some important anomalies to be ignored. Next, the formula introduces the concept of "reachability distance", which is used to describe the distance between edge points. Its neighbor points The distance between the neighboring points is not just a simple Euclidean distance, but also combines the The local density characteristics of . Specifically, Calculate the edge points To the neighbor point The actual distance, taking into account the point In its The distance to the farthest neighbor point in the neighbor set. The purpose of this design is that if the neighbor point Located in a less dense area, the system will relax its The distance requirement between the edge points is set to prevent the normal points with low density from being misjudged as abnormal points. In the packaging sealing inspection, this processing method can effectively distinguish the edge density changes caused by the normal sealing process from the real sealing defects. The degree of abnormality, the formula calculates the local reachable density , which refers to the neighbor point The density of the point It is measured by the inverse of the reachable distance to its neighboring points. Low local reachability density means that the neighboring points In a sparse area, this may indicate a potential sealing problem near this point during the seal test. The local reachability density of and its neighboring points, the LOF formula can reveal Is there any abnormal behavior? If the density of the edge point is significantly lower than that of its neighboring points, the LOF value will be higher, indicating that the point may have a sealing anomaly. The LOF value is obtained by normalizing the local reachability density of the edge point and its neighbor points. Specifically, the LOF value represents the edge point The ratio of the local density of to the density of its neighboring points. If this ratio is significantly higher than 1, it means The density of is lower than that of the surrounding neighborhood, suggesting that is an outlier; on the contrary, if the ratio is close to 1 or less than 1, it indicates The density of is equivalent to that of its neighboring points, and it is a normal point. This ratio not only reflects the density of edge points, but also takes into account its relative abnormality in the entire local area.

[0097] In the actual application of packaging sealing detection, the size of the LOF value directly determines the abnormality judgment of the edge point. By detecting points with higher LOF values, the system can effectively identify those edge anomalies that may be caused by poor sealing or material defects. For example, if a certain edge area of ​​the package has a local density drop due to material inhomogeneity, this situation will be reflected by the high LOF value, and the system will identify that there is a potential sealing problem in this area. On the other hand, if the LOF value of a certain edge point is low, it can be inferred that the sealing state of the area is normal and no further attention is required. The vacuum machine packaging sealing detection system based on convolutional neural network can accurately identify the sealing problem of the package under various complex edge conditions. The introduction of the LOF algorithm enables the system to detect not only significant sealing defects, but also potential and early sealing problems, thereby providing higher protection for packaging quality control. This high-precision anomaly detection method is particularly important in actual production environments because it can identify and deal with problems as soon as they occur, thereby avoiding more serious sealing failures. This not only improves the quality and reliability of the product, but also effectively reduces rework and losses, bringing significant economic benefits and market competitiveness to the company.

[0098] Example 8: In the sealing analysis part, based on the temperature distribution, the thermodynamic model of the package is used to estimate the pressure distribution by the following formula:

[0099] ;

[0100] in, Indicates location In time pressure; is the initial pressure of the package; is the activation energy; is the Boltzmann constant; For location In time Temperature distribution; is the temperature gradient influence coefficient; is the initial volume of the package; For time Packing volume; is the adiabatic index; is the amplitude of periodic pressure fluctuation; is the pressure fluctuation period; is the gas diffusion coefficient; The longest side length of the package.

[0101] Specifically, the first part of the formula reflects the effect of temperature on the internal pressure of the package. Temperature is an important factor regulating the physical state of the package. In vacuum packaging, temperature changes will directly affect the movement of gas molecules, thereby changing the internal pressure. Specifically, the formula The term is based on the Arrhenius formula, which expresses the exponential effect of temperature on pressure. The activation energy here is and the Boltzmann constant The former represents the energy required to drive the gas molecules to move, while the latter quantifies the relationship between temperature and energy. As the temperature rises, the molecular motion becomes more intense and the internal pressure rises. Conversely, a decrease in temperature leads to a decrease in pressure. This dependence is crucial in package seal testing, because any abnormal pressure change caused by temperature may be an early warning sign of a seal problem. The influence of temperature gradients is shown by This term is corrected. The temperature gradient describes the temperature difference between different areas inside the package, and its second-order derivative (i.e., the Laplace operator) represents the rate of temperature change. For a well-sealed package, the internal temperature should be evenly distributed, but in actual applications, temperature gradients will inevitably occur due to fluctuations in the external environment or uneven distribution of heat sources inside the package. The existence of a temperature gradient may cause significant changes in pressure in local areas of the package, especially at the edges or seams. Rapid changes in temperature often indicate poor sealing or material defects. By introducing the temperature gradient term, the formula can more accurately simulate the effect of uneven temperature on pressure distribution, thereby improving the accuracy of the assessment of the sealing status of the package. The change in package volume is also an important factor affecting the internal pressure. The term "temperature gradient" in the formula The term quantifies this effect. According to the gas state equation, pressure is inversely proportional to volume, that is, when the package volume decreases, the internal pressure will increase, and vice versa. In actual operation, the package volume may change due to many reasons, such as thermal expansion and contraction of the material, gas penetration, or mechanical pressure. This volume change not only affects the internal pressure, but may also cause stress concentration in the sealing material, thereby accelerating the degradation of the sealing performance. Adiabatic Index The pressure fluctuation determines the sensitivity of volume change to pressure, which is closely related to the type of gas and the physical properties of the packaging material. For vacuum packaging, maintaining volume stability is the key to ensuring constant internal pressure. Therefore, by accurately describing the impact of volume change on pressure, the system can better predict and prevent packaging failures caused by sealing problems. The periodic fluctuation of pressure is The term is used to describe this part, which reflects the periodic changes in pressure in the time dimension. Periodic fluctuations may come from multiple factors, including external mechanical vibrations, periodic temperature changes, or periodic fluctuations in ambient pressure. For package sealing testing, it is crucial to understand and simulate these periodic pressure changes, especially when the package is in a dynamic environment, such as during transportation or storage. These fluctuations may aggravate the aging of the sealing material or cause the expansion of micro-cracks. By introducing this term, the formula can not only predict the pressure distribution in static conditions, but also simulate the pressure response of the package in a dynamic environment, thus providing a more comprehensive analysis tool for sealing testing. Finally, the formula is passed through The term introduces the effect of gas diffusion on pressure. Gas diffusion is the process by which gas molecules move from areas of high concentration to areas of low concentration, which in a sealed package usually results in a gradual equalization of the internal pressure. However, if there are tiny leaks or material defects in the package, the gas diffusion rate can be significantly accelerated, causing the internal pressure to drop rapidly or to change locally. The gas diffusion coefficient and the longest side of the package Determines the speed and range of diffusion. Under long-term storage or complex transportation conditions, the impact of gas diffusion on packaging pressure will gradually become apparent, especially under high temperature or high humidity environments, where this impact may be more obvious. By considering the time dependence of gas diffusion, the formula can better simulate the long-term changes in pressure inside the package, thereby helping to identify sealing problems caused by the diffusion process. Through the combined effect of the above-mentioned parts, the formula of Example 8 ultimately obtains the pressure distribution inside the package at different locations and times This result provides an important physical basis for sealing analysis. Abnormal changes in the internal pressure of the package are often early signs of sealing problems. By monitoring these changes, the system can promptly identify potential problems with the package. Especially when the temperature, volume or other environmental factors change, the formula can dynamically adjust the pressure estimate to ensure the real-time and accuracy of the test results.

[0102] Consider the relationship between activation energy and temperature. According to the Arrhenius formula, the reaction rate constant With temperature The relationship between them is:

[0103] ;

[0104] To apply this to the pressure model, we take the temperature Substituting in, we get the exponential decay form of pressure:

[0105] ;

[0106] This means that when the temperature As it rises, the value of the exponential function decreases, resulting in an increase in pressure, which is consistent with the kinetic theory of gases.

[0107] (2) Derivation of the correction factor of temperature gradient:

[0108] Changes in the temperature field affect the movement of gas molecules and thus affect the pressure distribution. To describe this effect, we introduce a correction factor:

[0109] ;

[0110] in, Indicates the curvature of the temperature field. According to Fourier's law of heat conduction, temperature gradient will cause local heat flow changes, thereby affecting the pressure distribution. This correction factor numerically reflects the direct effect of temperature gradient on pressure.

[0111] (3) Derivation of the impact of volume change:

[0112] In thermodynamics, volume change is an important factor affecting pressure. For an adiabatic process, the following relationship is satisfied between pressure and volume:

[0113] ;

[0114] Therefore, the relationship between pressure and volume can be expressed as:

[0115] ;

[0116] Combined with the initial conditions, we get the effect of volume change on pressure:

[0117] ;

[0118] This part shows the relationship of increasing pressure when the volume decreases.

[0119] (4) Derivation of periodic pressure fluctuations:

[0120] External or internal periodic disturbances will cause pressure fluctuations inside the package. We use a sine function to represent this periodic fluctuation:

[0121] ;

[0122] This part expresses the periodic variation characteristics of pressure and is suitable for describing pressure fluctuations caused by periodic external forces (such as vibration or mechanical stress).

[0123] (5) Derivation of the influence of gas diffusion:

[0124] The diffusion of gases through packaging materials is a time-dependent process, usually described by Fick's laws. For simplicity, we use an exponential decay function to represent the effect of diffusion on pressure:

[0125] ;

[0126] This pattern reflects the temporal cumulative effect of diffusion, which results in a gradual decrease in pressure over time.

[0127] Example 9: Location In time Temperature distribution Use the following formula to calculate:

[0128] ;

[0129] ;

[0130] ;

[0131] in, is the air density; is the specific heat capacity; is the thermal conductivity coefficient; is the heat source term; is the latent heat of vaporization; is the vapor density; is the dynamic viscosity; is the viscous dissipation function; is the vapor diffusion coefficient; is the steam velocity field.

[0132] Specifically, the time evolution of the temperature distribution is described by the basic relationship in the heat conduction equation. In this equation, the rate of change of temperature is Due to air density Specific heat capacity And the thermal conductivity Air density and specific heat capacity Describes the physical properties of the air inside a package that determine its ability to absorb or release heat during temperature changes. It reflects the efficiency of heat conduction in the packaging material. The thermal conductivity of different materials varies greatly, which will lead to uneven temperature distribution. For example, at the sealing edge of the package, due to the difference in material thickness or material, the heat conduction may show obvious spatial variation, which in turn affects the local temperature distribution. This temperature difference is often an important indicator of sealing problems, so an accurate description of the heat conduction process is crucial for the detection system. In the formula, the heat source term Directly describes the effect of external or internal heat sources on the temperature of the package. Heat sources may come from many aspects, such as changes in external ambient temperature, heat generated by equipment operation, or heat release caused by chemical reactions or self-heating materials inside the package. In a vacuum packaging system, these heat sources will significantly affect the temperature distribution inside the package, especially during long-term storage or transportation. The continuous action of the heat source may cause the temperature inside the package to gradually rise, thereby affecting the sealing performance. Therefore, incorporating the heat source term into the calculation of the temperature distribution can more accurately predict temperature changes and evaluate its potential impact on sealing. Latent heat of vaporization Its effect on vapor density The effect of time change is another key part of the formula. Inside a sealed package, especially under vacuum conditions, any residual moisture or volatile substances will undergo a phase change as the temperature changes, that is, from liquid to gas, and this process is accompanied by a large amount of heat exchange. Latent heat of vaporization is the energy required for this phase change process, which is expressed in the formula Reflects the rate of change of vapor density over time. When the temperature inside the package increases, more liquid may vaporize, causing the vapor density to increase, while absorbing a large amount of heat, causing the local temperature to decrease. Conversely, when the temperature drops, the vapor may condense and release heat, causing the local temperature to rise. This dynamic change in phase change heat will affect the overall temperature distribution and may cause more obvious temperature anomalies in areas with poor sealing performance. Therefore, the effect of latent heat of vaporization on temperature plays an important role in sealing detection and can help the system identify potential sealing problems caused by phase change. Viscous dissipation term describes the temperature change due to the internal vapor flow. Here, the dynamic viscosity represents the internal friction resistance encountered by the steam during the flow process, while the viscous dissipation function The velocity gradient term in fluid mechanics is used to express how kinetic energy is converted into thermal energy. Inside a closed package, especially when the package is subjected to external mechanical stress or temperature fluctuations, the internal vapor may flow. This flow generates heat due to viscous effects, resulting in local temperature increases. This temperature change caused by vapor flow may be concentrated in specific areas, such as sealing edges or material interfaces, which are usually also the areas where sealing problems are most likely to occur. By accounting for viscous dissipation, the system is able to more accurately predict temperature changes due to vapor flow, thereby detecting potential defects in sealing performance at an early stage. In addition, the spatial distribution of vapor density is governed by the diffusion equation, which is expressed by Here, the vapor diffusion coefficient describes the speed at which the vapor diffuses inside the package, while the velocity field It indicates the flow direction and speed of the vapor. In practical applications, the diffusion process of vapor will have a significant impact on the temperature and pressure balance inside the package. Especially in an environment with high humidity, the migration and diffusion of vapor not only affects the temperature distribution, but also directly affects the sealing of the package. The dynamic change of vapor density reflects the change of the internal gas state. Any abnormal diffusion process may mean that there is a sealing problem in the package. Therefore, accurately calculating the spatiotemporal distribution of vapor density is crucial for sealing detection.

[0133] Example 10: Final packaging sealability determination value Calculated using the following formula:

[0134] ;

[0135] in, is the preset reference pressure value; This is the acceptable pressure deviation range.

[0136] Specifically, the core idea of ​​the formula is to package the sealing outliers Combined with the deviation of the internal pressure of the package, the final sealing value is corrected and adjusted. It is obtained through comprehensive analysis of edge features, temperature distribution, local abnormal factors and other aspects in the early stage of analysis. It has reflected the possible sealing problems of the packaging during the inspection process. It cannot fully capture the sealing risk caused by pressure changes. Therefore, in practical applications, the changes in the internal pressure of the package need to be considered. In order to more accurately evaluate the sealing status of the package, a correction factor, namely the pressure deviation term, is introduced into the formula. , which is the actual pressure of the package With the preset reference pressure value The difference between the reference pressure value It is usually set based on the internal pressure of the package under ideal conditions, representing the pressure value that the package should maintain under normal sealing conditions. The greater the deviation between the actual pressure inside the package and the reference pressure, the more serious the problem of the sealing of the package may be. On the contrary, the smaller the pressure deviation, the more reliable the sealing of the package. Therefore, by considering the pressure deviation, the formula can be used to Reasonable correction is made so that the final sealing judgment value can more truly reflect the overall sealing status of the package. Pressure deviation item Normalized, i.e. divided by the acceptable pressure deviation range The purpose of this normalization process is to unify pressure deviations of different magnitudes into a comparable scale so that the system can maintain consistent judgment criteria in different application scenarios. Acceptable pressure deviation range It represents the allowable fluctuation range of pressure under normal operation and storage conditions. This value is usually set based on actual application requirements and the characteristics of the packaging material. In some application scenarios with high precision requirements, It may be set very strictly, while in some loose scenarios, this range may be larger. By normalizing the pressure deviation, the correction factor in the formula In the form of an amplification factor If the deviation between the actual pressure of the package and the reference pressure is small, the correction factor is close to 1 and the final judgment value is Mainly by However, if the pressure deviation is large, the correction factor will be significantly greater than 1, thereby amplifying This design ensures that when evaluating the sealing of the package, the system not only takes into account the structural abnormalities of the package (such as changes in the edge texture), but also comprehensively considers the actual changes in pressure, thus providing a more comprehensive judgment result. The final package sealing judgment value The calculation result is directly used to determine the sealing status of the package. If the value exceeds a certain preset threshold, it usually means that there is a major problem with the sealing of the package, which requires immediate treatment or further testing; on the contrary, if Within the threshold range, it means that the sealing of the package is acceptable and meets safety standards. In practical applications, this judgment value is of great significance for quality control of production lines, monitoring of storage conditions, and safety assessment during transportation. Through the application of this formula, the vacuum packaging sealing detection system based on convolutional neural networks can more accurately identify and evaluate the sealing problems of packaging. It not only relies on the analysis of structural characteristics, but also provides a more comprehensive evaluation system for packaging sealing through comprehensive consideration of pressure changes. The advantage of this method is that it can adapt to various complex operating and environmental conditions, ensuring that the packaging can maintain its sealing performance throughout its life cycle, thereby effectively ensuring the quality and safety of the product.

[0137] The preferred embodiments of the present disclosure are described above with reference to the accompanying drawings, but the scope of the present disclosure is not limited thereby. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the present disclosure shall be within the scope of the present disclosure.

Claims

1. A vacuum packaging sealing detection system based on convolutional neural network, characterized in that: The system comprises: an image acquisition and fusion part, an image processing part and a sealing analysis part; the image acquisition and fusion part is used to acquire a multispectral image of a package using a multispectral camera, acquire an infrared thermal image of the package using a thermal imaging camera, and fuse the images of each channel of the acquired multispectral image using adaptive weights to obtain a fused image; the image processing part is used to acquire the temperature distribution of the package through the infrared thermal image, extract multiscale features from the fused image using a convolutional neural network to obtain multiscale features, perform edge detection based on the multiscale features to obtain a package edge detection result, and perform edge texture anomaly analysis based on the package edge detection result to calculate a package sealing anomaly value; the sealing analysis part is used to calculate a thermodynamic model estimated pressure distribution of the package based on the temperature distribution, correct the package sealing anomaly value using the thermodynamic model estimated pressure distribution, and obtain a final package sealing determination value; the package sealing determination value is compared with a set threshold value to determine whether the package sealing passes; the sealing analysis part calculates the thermodynamic model estimated pressure distribution of the package based on the temperature distribution by the following formula: ; in, Indicates location In time pressure; is the initial pressure of the package; is the activation energy; is the Boltzmann constant; For location In time Temperature distribution; is the temperature gradient influence coefficient; is the initial volume of the package; For time Packing volume; is the adiabatic index; is the amplitude of periodic pressure fluctuation; is the pressure fluctuation period; is the gas diffusion coefficient; is the longest side length of the package; Location In time Temperature distribution Use the following formula to calculate: ; ; ; in, is the air density; is the specific heat capacity; is the thermal conductivity coefficient; is the heat source term; is the latent heat of vaporization; is the vapor density; is the dynamic viscosity; is the viscous dissipation function; is the vapor diffusion coefficient; is the steam velocity field; Final packaging sealing judgment value Calculated using the following formula: ; in, is the preset reference pressure value; This is the acceptable pressure deviation range.

2. The vacuum packaging sealing detection system based on convolutional neural network according to claim 1, characterized in that: When the image acquisition and fusion part uses adaptive weights to fuse the images of each channel of the acquired multispectral image, the adaptive weight of the image of each channel is calculated by the following formula: ; in, It is The image of the channel is at position Adaptive weights of is the X-axis coordinate, is the Y-axis coordinate; For the Channel images at position The gradient vector of For the The covariance matrix of the channels represents the noise characteristics; For the Channel images at position The local entropy of is the average local entropy of all channels; is the entropy normalization factor; is the total number of channels; is the transpose operation; For the Channel images at position The local entropy of For the Channel images at position The gradient vector of .

3. The vacuum packaging sealing detection system based on convolutional neural network according to claim 2, characterized in that: The image acquisition and fusion part uses the following formula to fuse the images of each channel of the acquired multispectral image using adaptive weights: ; in, represents the fused image; For the Channel images at position The pixel value of is the total variation operator; is the inverse operation of total variation; is the preset first weight factor; is the preset second weighting factor.

4. The vacuum packaging sealing detection system based on convolutional neural network according to claim 3, characterized in that: The image processing part uses the Canny edge detection operator to perform edge detection according to the multi-scale features to obtain the packaging edge detection result.

5. The vacuum packaging sealing detection system based on convolutional neural network according to claim 4, characterized in that: The image processing part performs edge texture anomaly analysis based on the package edge detection result to calculate the package sealing anomaly value. The specific process includes: applying Gabor filter group and local binary pattern to the detected edge area to fuse the features of different scales and directions; and then using the improved local anomaly factor algorithm to calculate the sealing anomaly value of the package through the following formula: : ; in, Indicates the marginal area; It is a marginal area The edge points in The local abnormal factor of is the threshold of the local anomaly factor; is the characteristic scale of the local anomaly factor; It is an edge point Fusion of multi-scale features; is the reference fused multi-scale feature of normal seal; is a preset texture sensitivity index related to packaging materials; is the edge point obtained based on the temperature distribution Temperature value; is the critical temperature gradient; is the actual sealing time; It is the standard sealing time.

6. The vacuum packaging sealing detection system based on convolutional neural network according to claim 5, characterized in that: The image processing part applies Gabor filter banks and local binary patterns to the detected edge regions to fuse features of different scales and directions through the following formula: ; ; ; ; in, For the location Gabor filter response at ; is the direction of the Gabor filter; is the frequency of the Gabor filter; is the spatial aspect ratio; is the standard deviation of the Gaussian envelope; for The result after rotation; for The result after rotation; is the position coordinate of the center pixel; is the number of neighborhood pixels; is the neighborhood radius; For the Gray value of neighboring pixels; is the threshold function, is the independent variable; is the gray value of the center pixel; if the edge point The location is , then the multi-scale features are integrated Use the following formula to calculate: ; in, This is the packaging edge detection result.

7. The vacuum packaging sealing detection system based on convolutional neural network according to claim 6, characterized in that: Edge Area The edge points in The local anomaly factor Calculated using the following formula: ; in, Represents edge points of Neighbor set; Represents edge points To the edge point The reachable distance; Represents edge points The local reachable density of express The number of neighbors.