A soft bag welding seal detection method based on deep learning
By using deep learning methods to perform 3D scanning and data processing on soft bag welding, the core load-bearing area and main axis direction of the weld are accurately located, solving the problem of inaccurate weld identification in traditional detection methods and realizing intelligent and accurate soft bag welding seal detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANGZIJIANG PHARMA GROUP SHANGHAI HAINI PHARMA
- Filing Date
- 2026-01-07
- Publication Date
- 2026-06-05
AI Technical Summary
Existing methods for inspecting the sealing quality of multi-layer heat-sealed welds in soft bags rely on manual visual inspection or two-dimensional imaging, which makes it difficult to guarantee the stability and consistency of the inspection. They cannot accurately identify weld defects with complex spatial distributions, and traditional inspection systems are prone to misjudgment or missed detection when dealing with overlapping, intersecting, and spacing geometric parameters of multiple welds.
A deep learning-based approach is used to acquire point cloud data through 3D scanning. After filtering, the main area and principal axis of the weld are extracted by voxel mesh division and principal component analysis. Combined with spatial mapping and geometric optimization algorithms, the core load-bearing area and principal axis of the weld are accurately located, the degree of overlap and intersection angle are calculated, high-risk areas are identified, and the dense state of the weld is simulated to generate a weld quality assessment report.
It enables precise structural segmentation and intelligent evaluation of multi-layer welds, improves the accuracy of identifying weld overlaps, intersections, and uneven spacing, avoids false detections and missed detections, can automatically identify local thermal degradation risks, and achieves global and quantitative quality assessment.
Smart Images

Figure CN122156042A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flexible bag technology, and in particular to a method for detecting the welded seal of flexible bags based on deep learning. Background Technology
[0002] With the widespread use of flexible packaging in the food and pharmaceutical industries, higher requirements have been placed on the sealing performance of flexible bag packaging. Existing methods for inspecting the sealing quality of multi-layer heat-sealed flexible bags mostly rely on manual visual inspection or traditional two-dimensional imaging techniques.
[0003] Manual inspection methods are limited by the operator's experience and subjective judgment, making it difficult to guarantee the stability and consistency of the inspection; while automatic inspection methods based on two-dimensional images lack the ability to perceive the three-dimensional spatial structure of the weld, making it difficult to accurately identify the complex spatial distribution and minute defects in multi-layered welding areas.
[0004] Traditional inspection systems often only provide a rough surface assessment when dealing with the spatial overlap, intersection, and spacing geometry of multiple welds. They are unable to effectively identify the risk of overlap between welds and weak points in the seal. In areas with dense welds or complex spatial structures, existing technologies have limited ability to distinguish weld connection continuity, local heat-affected zones, and potential thermal degradation risks, which can easily lead to missed detections and misjudgments. Summary of the Invention
[0005] One objective of this invention is to propose a deep learning-based method for detecting the welded seal of soft bags. This invention can effectively suppress background interference and accurately locate the core load-bearing area and main axis direction of the weld when the weld distribution is complex and the point cloud data is noisy.
[0006] A deep learning-based method for detecting welded seals in soft bags according to an embodiment of the present invention includes: By performing a three-dimensional scan of the multi-layer heat-sealing welding area of the soft bag, the original point cloud data was obtained and preprocessed to obtain the first filtered point cloud dataset. Based on the first point cloud dataset, the weld area is structured by using voxel mesh generation technology, the main body of each weld is extracted, and the core load-bearing area and corresponding principal axis direction data of the weld body are determined. Based on the data in the main axis direction, the effective width range of each weld is calculated, and combined with the spatial coordinates of the main area, the preliminary spacing distribution information between adjacent welds is obtained; By analyzing the preliminary spacing distribution information, the degree of overlap and intersection angle between the two welds are calculated. If the degree of overlap exceeds the preset threshold range, it is marked as a potential high-risk area, and the high-risk area location data is output. Based on the location data of high-risk areas, the connection status of the weld edge transition area is analyzed. If the continuity of the edge transition area is lower than the preset standard, it is determined to be a weak link in the seal, and a distribution map of the weak links is generated. Based on the distribution map of weak links and the location data of high-risk areas, a spatial geometric optimization algorithm is used to simulate the distribution of dense weld areas, determine whether there is a possibility of local thermal degradation, and output the final weld quality assessment report.
[0007] Optionally, the denoising process for the raw point cloud data obtained from the scan includes: Data is collected from the heat-sealing welding area of the multi-layer soft bag using a 3D scanning device to obtain complete spatial geometric information of the weld and generate original point cloud data. For the original point cloud data, the mean filtering method is used to remove noise, outliers and noise interference, and the first filtered point cloud dataset is obtained.
[0008] Optionally, determining the core load-bearing area and corresponding spindle direction data of the weld body includes: The first point cloud dataset is divided into multiple three-dimensional mesh units using the voxel mesh partitioning method, resulting in a preliminary meshed point cloud structure. For the initial gridded point cloud structure, a density analysis method is used to determine the point cloud density in each grid cell. If the density is higher than a preset threshold, it is marked as a candidate cell for the weld area, thus obtaining the initial range of the weld area. Based on the preliminary extent of the weld area, adjacent candidate units are merged through neighborhood connection analysis to determine the complete weld area and output structured weld area data. For structured weld area data, principal component analysis is used to extract the point cloud distribution features of each weld area, determine the main body of the weld, and output the point cloud set of the main body of the weld. Based on the point cloud set of the weld body, the location of the core bearing area is determined by geometric center calculation. If the point cloud distribution of the core bearing area deviates from the geometric center, the calculation range is adjusted to obtain the location data of the core bearing area. Based on the location data of the core bearing area, the vector analysis method is used to calculate the principal axis direction of the point cloud distribution, and thus obtain the principal axis direction data of the weld body.
[0009] Optionally, calculating the effective width range of each weld for the spindle direction data includes: Data is extracted for each weld seam, and the effective width range of each weld seam is calculated using a geometric model to obtain a weld seam width dataset. Based on the weld width dataset and combined with the spatial coordinate information of the main area, a spatial mapping method is used to associate the weld position with the spatial coordinates to determine the specific distribution of the weld in the main area. Based on the distribution of welds, the positional relationship between adjacent welds is analyzed. If the spatial coordinate difference between adjacent welds is less than a preset threshold, they are marked as closely distributed, and a preliminary classification result of the adjacent relationship is obtained. Based on the preliminary classification results of the adjacency relationship, the preliminary spacing data between adjacent welds is calculated. Statistical methods are used to organize the spacing data and determine the uniformity information of the spacing distribution. Based on the uniformity information of the spacing distribution, local data is extracted for areas with uneven distribution. If the local spacing data exceeds the preset range, it is marked to determine the key areas that need to be analyzed. Obtain the annotation information of key areas, combine the principal axis direction data and spatial coordinate data, and optimize the spacing distribution through regression analysis to obtain preliminary spacing distribution information.
[0010] Optionally, the step of calculating the overlap and intersection angle between the two welds by analyzing the preliminary spacing distribution information includes: Based on the preliminary spacing distribution information, determine the overlap length of adjacent welds; The vector method is used to calculate the intersection angle of adjacent welds in the overlapping segment. If the overlap length is greater than a preset threshold, the subsequent judgment is continued. The intersection angle that meets the overlap length condition is compared with the preset angle range. When the intersection angle is outside the preset angle range, the start and end coordinates of the corresponding overlapping segment are extracted. Calculate the center coordinates of the overlapping area based on the start and end coordinates, and output the center coordinates as the location data of the risk area.
[0011] Optionally, the step of analyzing the connection status of the weld edge transition area based on the high-risk area location data includes: Based on the location data of the risk area, analyze the location of the transition area corresponding to the weld edge, use spatial mapping technology to identify the specific range of the transition area, and determine the boundary data of the transition area. Based on the boundary data of the transition area, the continuity value of the connection status is calculated. By comparing the continuity value with a preset threshold, if the continuity value is lower than the preset threshold, it is determined that there is a weak sealing problem, and a judgment result set is obtained. For the judgment result set, the location information of the weak links corresponding to the weak seal is extracted, and the weak links are classified by data filtering method to obtain the classified weak link dataset; Based on the classified weak link dataset, an initial framework for the distribution map is constructed. Visualization techniques are used to map the location information of the weak links onto the map to obtain preliminary distribution map data. Based on the preliminary distribution map data, detailed optimization processing is performed. By adjusting the map display parameters, the distribution characteristics of weak links are highlighted, and a distribution map of weak links is obtained.
[0012] Optionally, the step of simulating the distribution of densely welded areas using a spatial geometry optimization algorithm to determine the possibility of local thermal degradation includes: Based on the distribution map of weak links and the location data of high-risk areas, a spatial geometric optimization algorithm is used to simulate the distribution status of densely welded areas; The numerical values of weld density in each region are calculated based on the simulation results of the distribution status. Determine whether the weld density value exceeds a preset threshold. If the weld density value exceeds the preset threshold, mark it as a high-risk dense area. Based on the location of high-risk densely populated areas, the nearest distance between them and the weak points is analyzed. If the nearest distance is less than the preset safety distance, it is determined that there is a possibility of local thermal degradation. All areas with the potential for localized thermal degradation are summarized and sorted, and the output is a weld quality assessment conclusion that includes the location of high-risk areas and the degree of thermal degradation potential.
[0013] The beneficial effects of this invention are: This invention introduces a structured segmentation and principal axis direction analysis algorithm for three-dimensional point clouds in multi-layer heat-sealing welding, enabling precise extraction of the core load-bearing area of the weld and intelligent determination of geometric features. By employing voxel mesh generation combined with density analysis and principal component analysis algorithms, the point cloud data obtained from three-dimensional scanning is structured, automatically identifying the main area and principal axis direction of each weld. Even in cases of complex weld distribution and high noise in the point cloud data, it can effectively suppress background interference and accurately locate the core load-bearing area and principal axis direction of the weld, significantly improving the extraction accuracy and robustness of the main spatial features of multi-layer welds.
[0014] This invention accurately obtains the effective width and spatial distribution data of welds through orthogonal slicing along the main axis, extreme width statistics, spatial mapping, and regression analysis of adjacent weld spacing. Utilizing vector angle and overlap length calculation algorithms, it quantitatively assesses the spatial relationships of multiple welds, such as overlap and intersection angles, automatically locating potential high-risk overlap areas between welds. Simultaneously, through transition region continuity criteria and cluster analysis, it classifies, labels, and visualizes the distribution of sealing weaknesses, enhancing the intelligent identification capability of sealing risks. This effectively avoids the false detection and missed detection problems caused by overlap, intersection, and uneven spacing in traditional methods.
[0015] This invention introduces a spatial geometry optimization algorithm for areas with dense welds and complex structures. It dynamically simulates the distribution of welds and their spatial distance from weak points, comprehensively analyzes the relationship between weld density, weak point distribution and safety distance, and automatically identifies high-risk areas with local thermal degradation risks. This enables a global, intelligent and quantitative quality assessment of complex multi-layer, multi-pass, and spatially interwoven weld systems. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a deep learning-based method for detecting the welded seal of a soft bag, as proposed in this invention. Detailed Implementation
[0017] Example 1: Reference Figure 1 A deep learning-based method for detecting welded seals on soft bags includes: By performing a three-dimensional scan of the multi-layer heat-sealing welding area of the soft bag, the original point cloud data was obtained and preprocessed to obtain the first filtered point cloud dataset. Based on the first point cloud dataset, the weld area is structured by using voxel mesh generation technology, the main body of each weld is extracted, and the core load-bearing area and corresponding principal axis direction data of the weld body are determined. Based on the data in the main axis direction, the effective width range of each weld is calculated, and combined with the spatial coordinates of the main area, the preliminary spacing distribution information between adjacent welds is obtained; By analyzing the preliminary spacing distribution information, the degree of overlap and intersection angle between the two welds are calculated. If the degree of overlap exceeds the preset threshold range, it is marked as a potential high-risk area, and the high-risk area location data is output. Based on the location data of high-risk areas, the connection status of the weld edge transition area is analyzed. If the continuity of the edge transition area is lower than the preset standard, it is determined to be a weak link in the seal, and a distribution map of the weak links is generated. Based on the distribution map of weak links and the location data of high-risk areas, a spatial geometric optimization algorithm is used to simulate the distribution of dense weld areas, determine whether there is a possibility of local thermal degradation, and output the final weld quality assessment report.
[0018] In this embodiment, denoising processing is performed on the raw point cloud data obtained from the scan, including: Data is collected from the heat-sealing welding area of the multi-layer soft bag using a 3D scanning device to obtain complete spatial geometric information of the weld and generate original point cloud data. For the original point cloud data, the mean filtering method is used to remove noise, outliers and noise interference, and the first filtered point cloud dataset is obtained.
[0019] In this embodiment, determining the core load-bearing area of the weld body and the corresponding spindle direction data includes: The first point cloud dataset is divided into multiple three-dimensional mesh units using the voxel mesh partitioning method, resulting in a preliminary meshed point cloud structure. In Example 1, the first point cloud dataset is divided into several three-dimensional grid cells along the X, Y, and Z directions according to the set grid cell side length L using a voxel grid partitioning method. Based on the spatial coordinates of each point, each point in the first point cloud dataset is assigned to the corresponding three-dimensional grid cell, and the number of point clouds in each grid cell is counted to obtain a preliminary gridded point cloud structure.
[0020] For the initial gridded point cloud structure, a density analysis method is used to determine the point cloud density in each grid cell. If the density is higher than a preset threshold, it is marked as a candidate cell for the weld area, thus obtaining the initial range of the weld area. In Example 1, for the preliminary meshed point cloud structure, the number of point clouds contained in each three-dimensional mesh unit is counted, and the point cloud density of each mesh unit is calculated. The point cloud density is the ratio of the number of points in the mesh unit to the mesh volume. A density threshold T is set. If the point cloud density of a certain mesh unit is higher than the density threshold T, the mesh unit is marked as a candidate unit for the weld area, and the preliminary range of the weld area is obtained.
[0021] Based on the preliminary extent of the weld area, adjacent candidate units are merged through neighborhood connection analysis to determine the complete weld area and output structured weld area data. In Example 1, based on the preliminary range of the weld region, a 26-neighborhood is defined for each candidate 3D mesh unit. For each candidate unit, other candidate units within its 26-neighborhood are traversed. If two units are adjacent, they are grouped into the same weld region. The connectivity clustering method is used to continuously expand and merge the units until all adjacent candidate units are merged to form a complete weld region. The spatial boundary coordinates of each complete weld region and the set of point clouds it contains are output as a data structure to obtain structured weld region data.
[0022] For structured weld area data, principal component analysis is used to extract the point cloud distribution features of each weld area, determine the main body of the weld, and output the point cloud set of the main body of the weld. Based on the point cloud set of the weld body, the location of the core bearing area is determined by geometric center calculation. If the point cloud distribution of the core bearing area deviates from the geometric center, the calculation range is adjusted to obtain the location data of the core bearing area. Based on the location data of the core bearing area, the vector analysis method is used to calculate the principal axis direction of the point cloud distribution, and thus obtain the principal axis direction data of the weld body.
[0023] In Example 1, based on the location data of the core bearing area, a point cloud set is extracted from the corresponding area. The covariance matrix of the point cloud set is calculated using the principal component analysis method. The first eigenvector of the covariance matrix is solved, and the first eigenvector is used as the principal axis direction of the weld body. The principal axis direction data of the weld body is then output.
[0024] In this embodiment, the effective width range of each weld is calculated based on the spindle direction data, including: Data is extracted for each weld seam, and the effective width range of each weld seam is calculated using a geometric model to obtain a weld seam width dataset. In Example 1, for each weld seam main point cloud set, the point cloud set is projected according to the principal axis direction. The point cloud is divided into several equidistant slices according to the plane orthogonal to the principal axis direction. For each equidistant slice, the maximum and minimum coordinate difference of the point cloud in the orthogonal direction is calculated as the local width value of the equidistant slice. The local width values of all equidistant slices are statistically analyzed, and the effective width range of the weld is determined by weighted average. The result is recorded in the weld width dataset.
[0025] Based on the weld width dataset and combined with the spatial coordinate information of the main area, a spatial mapping method is used to associate the weld position with the spatial coordinates to determine the specific distribution of the weld in the main area. In Example 1, the following steps are used to establish the association between the weld and spatial coordinates: Based on the principal axis centerline and effective width range of each weld, the spatial envelope area of the weld in the three-dimensional coordinate system of the main area is determined; The point cloud coordinates within the spatial envelope are mapped to the weld numbers, and the point cloud set is labeled according to the weld numbers to establish a point cloud-weld spatial mapping table. The point cloud within the main area is traversed, and each point cloud is classified according to its corresponding weld number to form a set of specific distribution coordinates of the weld within the main area. Output the spatial distribution data of each weld, including the start and end coordinates, spatial envelope range, and weld distribution point set.
[0026] Based on the distribution of welds, the positional relationship between adjacent welds is analyzed. If the spatial coordinate difference between adjacent welds is less than a preset threshold, they are marked as closely distributed, and a preliminary classification result of the adjacent relationship is obtained. Based on the preliminary classification results of the adjacency relationship, the preliminary spacing data between adjacent welds is calculated. Statistical methods are used to organize the spacing data and determine the uniformity information of the spacing distribution. Based on the uniformity information of the spacing distribution, local data is extracted for areas with uneven distribution. If the local spacing data exceeds the preset range, it is marked to determine the key areas that need to be analyzed. By acquiring the annotation information of key areas and combining it with the principal axis direction data and spatial coordinate data, the spacing distribution is optimized through regression analysis to obtain preliminary spacing distribution information.
[0027] In Example 1, after obtaining the annotation information of the key area, the spatial spacing between adjacent welds in the key area is fitted by linear regression analysis, combined with the main axis direction data and spatial coordinate data of each weld. Abnormal spacing data is eliminated, and the spacing distribution is smoothed to obtain preliminary spacing distribution information that reflects the distribution law of welds.
[0028] In this embodiment, the degree of overlap and intersection angle between the two welds are calculated by analyzing the preliminary spacing distribution information, including: Based on the preliminary spacing distribution information, determine the overlap length of adjacent welds; The vector method is used to calculate the intersection angle of adjacent welds in the overlapping segment. If the overlap length is greater than a preset threshold, the subsequent judgment is continued. The intersection angle that meets the overlap length condition is compared with the preset angle range. When the intersection angle is outside the preset angle range, the start and end coordinates of the corresponding overlapping segment are extracted. Calculate the center coordinates of the overlapping area based on the start and end coordinates, and output the center coordinates as the location data of the risk area.
[0029] In this embodiment, based on the location data of high-risk areas, the connection status of the transition area at the weld edge is analyzed, including: Based on the location data of the risk area, analyze the location of the transition area corresponding to the weld edge, use spatial mapping technology to identify the specific range of the transition area, and determine the boundary data of the transition area. In Example 1, for the location data of the risk area, along the main axis of the weld body and its perpendicular direction, a set of point clouds around the risk area is extracted by extending a set distance outside the risk area. Based on the point cloud set, according to the characteristics of point cloud density change, spatial coordinate continuity or normal change, the spatial neighborhood analysis method is used to determine the points with abrupt changes in point cloud density or significant changes in normal direction as the boundary points of the transition area. The spatial coordinates of the identified boundary points, the corresponding weld number and regional attributes are output to form the boundary data of the transition area.
[0030] Based on the boundary data of the transition area, the continuity value of the connection status is calculated. By comparing the continuity value with a preset threshold, if the continuity value is lower than the preset threshold, it is determined that there is a weak sealing problem, and a judgment result set is obtained. For the judgment result set, the location information of the weak links corresponding to the weak seal is extracted, and the weak links are classified by data filtering method to obtain the classified weak link dataset; In Example 1, for the judgment result set, the spatial location information of all point cloud or grid units judged as weak in sealing is extracted. According to the spatial coordinates, continuity parameters and risk level of each weak link, classification rules are set, and cluster analysis is used to classify all weak links to obtain a classified weak link dataset containing weak link type, spatial location and risk level.
[0031] Based on the classified weak link dataset, an initial framework for the distribution map is constructed. Visualization techniques are used to map the location information of the weak links onto the map to obtain preliminary distribution map data. Based on the preliminary distribution map data, detailed optimization processing is performed. By adjusting the map display parameters, the distribution characteristics of weak links are highlighted, and a distribution map of weak links is obtained.
[0032] In this embodiment, a spatial geometry optimization algorithm is used to simulate the distribution of dense weld areas and determine whether there is a possibility of local thermal degradation, including: Based on the distribution map of weak links and the location data of high-risk areas, a spatial geometric optimization algorithm is used to simulate the distribution status of densely welded areas; The numerical values of weld density in each region are calculated based on the simulation results of the distribution status. Determine whether the weld density value exceeds a preset threshold. If the weld density value exceeds the preset threshold, mark it as a high-risk dense area. Based on the location of high-risk densely populated areas, the nearest distance between them and the weak points is analyzed. If the nearest distance is less than the preset safety distance, it is determined that there is a possibility of local thermal degradation. All areas with the potential for localized thermal degradation are summarized and sorted, and the output is a weld quality assessment conclusion that includes the location of high-risk areas and the degree of thermal degradation potential.
[0033] Example 2: During an actual inspection of a flexible bag packaging production line, the system automatically picked up a flexible bag containing multiple layers of heat-sealed welding.
[0034] The 3D scanning equipment completed the point cloud acquisition of the welding area, obtaining 467,521 raw point clouds. The system detected that 3,284 points had a Z-axis floating point greater than 3 times the average value and were marked as noise points. After mean filtering, the actual point cloud used for subsequent analysis was 464,237 points.
[0035] The system uses a voxel mesh method to divide the 464,237 points into voxel units with a size of 0.4 mm, resulting in a total of 10,212 voxel units. The distribution of points within each unit is automatically summarized, and 1,432 units with a point count greater than the local density threshold of 32 are identified as high-density units. Using a spatial connectivity clustering algorithm, the system automatically merges these high-density units, ultimately identifying 7 independent weld seam regions.
[0036] For each weld region, the system automatically locates its principal axis direction. Taking weld No. 3 as an example, the system extracts 41,350 point clouds within this weld region and uses the PCA method to find the direction of the largest eigenvalue as the principal axis vector [0.88, 0.04, 0.47]. After analyzing all seven weld regions, the system records that the angle difference between each principal axis direction is within 1.2°, indicating that multiple welds tend to be parallel.
[0037] The system performs width statistics for each weld. Weld No. 3 is equidistantly sliced 70 times along the orthogonal slicing direction of the main axis. The maximum-minimum lateral coordinate difference in each slice represents the width at that point. The narrowest width of weld No. 3 is 4.16 mm, the widest width is 5.03 mm, and the average width is 4.67 mm. The standard deviation of the width of all slices is 0.21 mm. The system automatically generates a weld width distribution map and records abnormal width sections. It indicates that the widths of slices No. 11, 12, and 13 of weld No. 3 are 4.18 mm, 4.16 mm, and 4.22 mm, respectively, all below the internal warning line of 4.25 mm, and are marked as narrow-edge warning areas.
[0038] The main axis direction and width data are synchronously written into the spatial distribution mapping module. Using the global coordinates of the main area as a reference, the system marks the spatial positions of the seven weld seams within a three-dimensional coordinate frame. In Example 2, the starting point of weld seam number 3 is (45.2, 102.5, 0.6), the ending point is (67.3, 106.0, 0.7), and the spatial length is 22.4 mm. All weld seam spatial position data are synthesized into a distribution heatmap.
[0039] Analysis of the spatial relationship between adjacent welds revealed that welds No. 3 and No. 4 overlapped by 7.8 mm in the projection direction along the main axis. Angle analysis within the overlap area showed an angle of 6.2° between the main axes. The system determined that an overlap length exceeding 7 mm and an angle less than 10° constituted a high-risk overlap, automatically generating an alarm for the overlap risk area and marking the start and end points of the overlap interval as (54.9, 104.1, 0.6) and (62.7, 105.2, 0.6), respectively.
[0040] Upon entering the weld edge transition area inspection, the system performs connectivity analysis on the edge slices of the overlapping area of welds 3 and 4. The continuity score of the overlapping area is 0.39 (out of 1.0, below the threshold of 0.6), and the system automatically marks this area as a weak point in the seal. The spatial coordinates of all identified weak points are written into the weak link database and clustered according to spatial location.
[0041] Based on the distribution data of weak points, the system used a clustering algorithm to identify two high-risk clusters: the overlapping area of weld No. 3 and the end of weld No. 6. The cluster of the overlapping area of weld No. 3 contained three sealing weak points, all with a spatial distance of less than 2.0 mm. The classified weak point dataset automatically generated a distribution map and pushed it to the production monitoring center.
[0042] In the weld density and local thermal degradation risk assessment stage, the system performed geometric optimization simulation on the spatial aggregation of all welds. Taking the overlapping area of welds 3 and 4 as an example, the system counted 3 welds per unit volume in this area, with a density value of 3.6 (far exceeding the density threshold of 2.0). The system further analyzed that the shortest distance from all weak points in this area to the center of the high-density area was 1.3 mm, lower than the set safety distance of 3.0 mm. Based on these two indicators, the system automatically determined that there was a risk of local thermal degradation in this area, classifying the risk level as "medium-high," and marked it in detail in the final quality report. The entire detection data was automatically archived by the system, and the comparison with the traditional 2D image detection method on 20 soft bag samples in the same batch is shown in Table 1 below: Table 1 compares the results of this invention with traditional 2D image detection methods on 20 soft bag samples from the same batch. Sample number Total number of welds The system identifies high-risk overlapping areas. System identifies weak points The system determines the risk of thermal degradation. 2D detection identifies high-risk overlapping areas 2D inspection detects weak points 2D detection detects the risk of thermal degradation S001 5 1 1 1 0 0 0 S002 7 2 2 1 1 1 0 S003 4 0 0 0 0 0 0 S004 6 1 1 1 0 0 0 In all 20 samples, the system automatically generated a test report with 100% accuracy and 0% false detection rate in 14 high-risk overlapping areas and 6 thermal degradation risk areas, while the two-dimensional detection only detected 6 high-risk overlapping areas, with a false detection rate as high as 16.7%.
[0043] For training sample display, the system selected 40,000 previously labeled weld area point clouds as the algorithm training set, including 11,000 normal welds, 8,500 width anomalous samples, 7,200 overlapping areas, 6,400 weak link samples, and 6,900 high-density thermal degradation areas. Each type of sample was assigned different weights in system training and discrimination, ensuring the model's sensitivity and robustness in detecting real anomalies.
[0044] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for detecting welded seals on soft bags based on deep learning, characterized in that, include: By performing a three-dimensional scan of the multi-layer heat-sealing welding area of the soft bag, the original point cloud data was obtained and preprocessed to obtain the first filtered point cloud dataset. Based on the first point cloud dataset, the weld area is structured by using voxel mesh generation technology, the main body of each weld is extracted, and the core load-bearing area and corresponding principal axis direction data of the weld body are determined. Based on the data in the main axis direction, the effective width range of each weld is calculated, and combined with the spatial coordinates of the main area, the preliminary spacing distribution information between adjacent welds is obtained; By analyzing the preliminary spacing distribution information, the degree of overlap and intersection angle between the two welds are calculated. If the degree of overlap exceeds the preset threshold range, it is marked as a potential high-risk area, and the high-risk area location data is output. Based on the location data of high-risk areas, the connection status of the weld edge transition area is analyzed. If the continuity of the edge transition area is lower than the preset standard, it is determined to be a weak link in the seal, and a distribution map of the weak links is generated. Based on the distribution map of weak links and the location data of high-risk areas, a spatial geometric optimization algorithm is used to simulate the distribution of dense weld areas, determine whether there is a possibility of local thermal degradation, and output the final weld quality assessment report.
2. The method for detecting the welded seal of a soft bag based on deep learning according to claim 1, characterized in that, The denoising process for the raw point cloud data obtained from the scan includes: Data is collected from the heat-sealing welding area of the multi-layer soft bag using a 3D scanning device to obtain complete spatial geometric information of the weld and generate original point cloud data. For the original point cloud data, the mean filtering method is used to remove noise, outliers and noise interference, and the first filtered point cloud dataset is obtained.
3. The method for detecting the welded seal of a soft bag based on deep learning according to claim 1, characterized in that, The data for determining the core load-bearing area and corresponding main axis direction of the weld body includes: The first point cloud dataset is divided into multiple three-dimensional mesh units using the voxel mesh partitioning method, resulting in a preliminary meshed point cloud structure. For the initial gridded point cloud structure, a density analysis method is used to determine the point cloud density in each grid cell. If the density is higher than a preset threshold, it is marked as a candidate cell for the weld area, thus obtaining the initial range of the weld area. Based on the preliminary extent of the weld area, adjacent candidate units are merged through neighborhood connection analysis to determine the complete weld area and output structured weld area data. For structured weld area data, principal component analysis is used to extract the point cloud distribution features of each weld area, determine the main body of the weld, and output the point cloud set of the main body of the weld. Based on the point cloud set of the weld body, the location of the core bearing area is determined by geometric center calculation. If the point cloud distribution of the core bearing area deviates from the geometric center, the calculation range is adjusted to obtain the location data of the core bearing area. Based on the location data of the core bearing area, the vector analysis method is used to calculate the principal axis direction of the point cloud distribution, and thus obtain the principal axis direction data of the weld body.
4. The method for detecting the welded seal of a soft bag based on deep learning according to claim 1, characterized in that, The calculation of the effective width range of each weld seam based on the spindle direction data includes: Data is extracted for each weld seam, and the effective width range of each weld seam is calculated using a geometric model to obtain a weld seam width dataset. Based on the weld width dataset and combined with the spatial coordinate information of the main area, a spatial mapping method is used to associate the weld position with the spatial coordinates to determine the specific distribution of the weld in the main area. Based on the distribution of welds, the positional relationship between adjacent welds is analyzed. If the spatial coordinate difference between adjacent welds is less than a preset threshold, they are marked as closely distributed, and a preliminary classification result of the adjacent relationship is obtained. Based on the preliminary classification results of the adjacency relationship, the preliminary spacing data between adjacent welds is calculated. Statistical methods are used to organize the spacing data and determine the uniformity information of the spacing distribution. Based on the uniformity information of the spacing distribution, local data is extracted for areas with uneven distribution. If the local spacing data exceeds the preset range, it is marked to determine the key areas that need to be analyzed. Obtain the annotation information of key areas, combine the principal axis direction data and spatial coordinate data, and optimize the spacing distribution through regression analysis to obtain preliminary spacing distribution information.
5. The method for detecting the welded seal of a soft bag based on deep learning according to claim 1, characterized in that, The process of analyzing preliminary spacing distribution information to calculate the overlap and intersection angle between two weld seams includes: Based on the preliminary spacing distribution information, determine the overlap length of adjacent welds; The vector method is used to calculate the intersection angle of adjacent welds in the overlapping segment. If the overlap length is greater than a preset threshold, the subsequent judgment is continued. The intersection angle that meets the overlap length condition is compared with the preset angle range. When the intersection angle is outside the preset angle range, the start and end coordinates of the corresponding overlapping segment are extracted. Calculate the center coordinates of the overlapping area based on the start and end coordinates, and output the center coordinates as the location data of the risk area.
6. The method for detecting the welded seal of a soft bag based on deep learning according to claim 1, characterized in that, The step of analyzing the connection status of the weld edge transition area based on high-risk area location data includes: Based on the location data of the risk area, analyze the location of the transition area corresponding to the weld edge, use spatial mapping technology to identify the specific range of the transition area, and determine the boundary data of the transition area. Based on the boundary data of the transition area, the continuity value of the connection status is calculated. By comparing the continuity value with a preset threshold, if the continuity value is lower than the preset threshold, it is determined that there is a weak sealing problem, and a judgment result set is obtained. For the judgment result set, the location information of the weak links corresponding to the weak seal is extracted, and the weak links are classified by data filtering method to obtain the classified weak link dataset; Based on the classified weak link dataset, an initial framework for the distribution map is constructed. Visualization techniques are used to map the location information of the weak links onto the map to obtain preliminary distribution map data. Based on the preliminary distribution map data, detailed optimization processing is performed. By adjusting the map display parameters, the distribution characteristics of weak links are highlighted, and a distribution map of weak links is obtained.
7. The method for detecting the welded seal of a soft bag based on deep learning according to claim 1, characterized in that, The method employs a spatial geometry optimization algorithm to simulate the distribution of densely packed weld areas and determine the possibility of localized thermal degradation, including: Based on the distribution map of weak links and the location data of high-risk areas, a spatial geometric optimization algorithm is used to simulate the distribution status of densely welded areas; The numerical values of weld density in each region are calculated based on the simulation results of the distribution status. Determine whether the weld density value exceeds a preset threshold. If the weld density value exceeds the preset threshold, mark it as a high-risk dense area. Based on the location of high-risk densely populated areas, the nearest distance between them and the weak points is analyzed. If the nearest distance is less than the preset safety distance, it is determined that there is a possibility of local thermal degradation. All areas with the potential for localized thermal degradation are summarized and sorted, and the output is a weld quality assessment conclusion that includes the location of high-risk areas and the degree of thermal degradation potential.