Method for removing surface flaws of vacuum cup based on visual detection

By combining spatial registration of two-dimensional images and three-dimensional depth data with a stress concentration prediction model, the problem of distinguishing between reflective textures and real defects and assessing structural failure risk in the detection of surface defects of thermos cups was solved, achieving accurate defect classification decisions and closed-loop manufacturing control.

CN122434874APending Publication Date: 2026-07-21ZHEJIANG ENO HOUSEWARES
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG ENO HOUSEWARES
Filing Date
2026-04-28
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies struggle to distinguish between reflective textures and true morphological defects on highly reflective metal surfaces in the detection of surface defects in thermos cups. Furthermore, they are unable to assess the structural failure risk of defects under thermal cycling and vacuum negative pressure conditions. This leads to the missed detection of high-risk functional defects or the wrong rejection of obvious visual defects, resulting in low utilization of detection results and insufficient manufacturing closed-loop control capabilities.

Method used

By acquiring two-dimensional image data and three-dimensional depth data of the surface of the thermos cup, spatial registration and combination are performed. The image segmentation network is used to extract the defect contour, calculate the geometric sharpness, depth gradient and physical distance, and combine the stress concentration prediction surrogate model to output the local maximum stress multiple, generate functional failure probability score and appearance degradation score, and realize classification and elimination decision.

Benefits of technology

It enables accurate quantification of structural failure risk of defects under thermal cycling and vacuum environments, distinguishes between reflective artifacts and real defects, and accurately executes forced rejection, downgrade processing and release decisions, thereby improving detection accuracy and manufacturing closed-loop control capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122434874A_ABST
    Figure CN122434874A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of vacuum cup production detection and intelligent manufacturing, in particular to a vacuum cup surface flaw rejection method based on visual detection, comprising: obtaining two-dimensional image data and three-dimensional depth data of the vacuum cup surface and performing spatial registration combination; extracting the surface flaw contour based on an image segmentation network, calculating the geometric sharpness, depth gradient and physical distance of the relative key stress area; inputting a stress concentration prediction proxy model and outputting the predicted local maximum stress multiple under simulated thermal cycling and vacuum negative pressure environment; comparing with the fatigue limit multiple threshold to generate a functional failure probability score, and combining with the appearance evaluation benchmark to generate an appearance degradation score; executing classification rejection decision according to the two types of scores and outputting the judgment result; the present application can distinguish between appearance flaws with less functional impact and surface flaws with weak visual representation but may lead to structural failure, and both detection accuracy and long-term reliability of the vacuum cup are taken into account.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of thermos cup production inspection and intelligent manufacturing technology, specifically a method for removing surface defects of thermos cups based on visual inspection. Background Technology

[0002] In the final inspection process of automated production of thermos cups, surface defect recognition technology based on visual inspection has gradually become a common method for quality sorting of finished cups due to its high detection efficiency and ease of online deployment. Currently, the detection methods for surface defects of thermos cups generally focus on identifying anomalies such as scratches, indentations, cracks, and uneven welding based on two-dimensional images. If further rejection is required, the method usually combines defect area, grayscale contrast, shape and size, or simple classification results to release, rework, or scrap the product. However, when detecting and sorting surface defects of thermos cups using the above methods, the judgment is often based mainly on visual salience. This makes it difficult to effectively distinguish reflective textures and shallow scratches on highly reflective metal surfaces from true morphological defects. Furthermore, it is difficult to combine the sharpness, depth variation, and positional relationship of defects relative to key stress areas such as the bottom weld area and the rim tension area to accurately assess their structural failure risk under thermal cycling and vacuum negative pressure conditions. This results in the problem that high-risk functional defects are easily missed, while defects that are visually obvious but have little functional impact are easily mistakenly rejected. At the same time, this approach often confuses functional reliability judgment with appearance grade judgment, making it difficult to make classification decisions for mandatory rejection, downgrading, and release. Moreover, it is difficult to further feed back the characteristics of fatal defects to the preceding manufacturing processes for process compensation and adjustment, resulting in low utilization of detection results and insufficient manufacturing closed-loop control capabilities. Summary of the Invention

[0003] The purpose of this invention is to provide a visual inspection-based method for removing surface defects in thermos cups, which solves the following technical problems: to distinguish between surface defects that are obvious in appearance but have little impact on function and surface defects that have weak visual representation but may cause structural failure, while taking into account both the accuracy of detection and judgment and the long-term reliability of thermos cups.

[0004] The objective of this invention can be achieved through the following technical solutions: A vision-based method for removing surface defects from insulated cups includes the following steps: Acquire two-dimensional image data and three-dimensional depth data of the surface of the thermos cup, and perform spatial registration and combination of the two-dimensional image data and the three-dimensional depth data; The two-dimensional image data and the three-dimensional depth data after spatial registration and combination are processed based on a preset image segmentation network to extract the surface defect contour. The geometric sharpness, depth gradient and physical distance of the surface defect contour relative to the pre-marked key stress area are calculated based on the surface defect contour. The pre-marked key stress area includes the bottom weld area and the cup mouth tension area. The geometric sharpness, the depth gradient, and the physical distance are input into a preset stress concentration prediction proxy model, and the predicted local maximum stress multiple of the surface defect contour under a preset simulated thermal cycle and vacuum negative pressure environment is output. The predicted local maximum stress multiple is compared with the preset fatigue limit multiple threshold to generate a functional failure probability score, and the two-dimensional image data is compared with the preset appearance evaluation benchmark to generate an appearance degradation score. Based on the functional failure probability score and the appearance degradation score, a classification and elimination decision is made for the thermos cup, and the judgment result is output.

[0005] In one possible implementation, the steps of acquiring two-dimensional image data and three-dimensional depth data of the surface of the thermos cup specifically include: Send control commands to the multimodal vision acquisition device to enable it to scan the surface of the inner liner and the outer shell of the thermos cup; Acquire grayscale and color images, and use the grayscale and color images as the two-dimensional image data; Local depth maps are obtained based on photometric stereo method and line laser scanning technology, and these local depth maps are used as the three-dimensional depth data.

[0006] In one possible implementation, the steps of calculating the geometrical sharpness, depth gradient, and physical distance of the surface defect contour relative to a pre-defined critical stress zone based on the surface defect contour specifically include: Edge detection and morphological analysis are performed on the surface defect contour to extract the aspect ratio and edge curvature radius. The aspect ratio and edge curvature radius are mapped to a comprehensive sharpness value according to a preset segmented mapping rule, and the comprehensive sharpness value is used as the geometric sharpness. Based on the three-dimensional depth data, the depth change rate of each pixel within the surface defect contour is calculated, and the depth change rate is used as the depth gradient. Extract the center coordinates of the surface defect contour and calculate the absolute distance from the center coordinates to the boundary of the pre-calibrated critical stress area, and use the absolute distance as the physical distance.

[0007] In one possible implementation, before inputting the geometric sharpness, the depth gradient, and the physical distance into the preset stress concentration prediction proxy model step, the method further includes: Obtain a finite element analysis dataset, which includes historical geometric sharpness, historical depth gradient, historical physical distance, and the corresponding true local maximum stress multiple. Construct the initial neural network model; The historical geometric sharpness, the historical depth gradient, and the historical physical distance are input into the initial neural network model, and the predicted local maximum stress multiple is output. The loss value is calculated based on the predicted local maximum stress multiple and the actual local maximum stress multiple, and the network parameters of the initial neural network model are updated according to the loss value until the preset convergence condition is met, thereby obtaining the stress concentration prediction proxy model.

[0008] In one possible implementation, the step of comparing the predicted local maximum stress multiple with a preset fatigue limit multiple threshold to generate a functional failure probability score specifically includes: Calculate the difference between the predicted local maximum stress multiple and the fatigue limit multiple threshold; The difference is input into a preset probability mapping function configured with a target value range of 0 to 1 for normalization processing to obtain the probability value mapped to the target value range. The probability value is used as the probability score of the function failure.

[0009] In one possible implementation, the step of performing a classification and rejection decision on the thermos cup based on the functional failure probability score and the appearance degradation score, and outputting the judgment result, specifically includes: When the failure probability score of the function is greater than or equal to the preset failure threshold, it is judged as a fatal defect, a forced rejection command is output and a mold maintenance alarm is triggered. When the functional failure probability score is less than the failure threshold and the appearance degradation score is greater than or equal to the preset appearance threshold, it is determined that there is a defective product and a degradation processing instruction is output. When the functional failure probability score is less than the failure threshold and the appearance degradation score is less than the appearance threshold, the product is judged as good and a release command is output.

[0010] In one possible implementation, the step of performing feature comparison on the two-dimensional image data in conjunction with a preset appearance evaluation benchmark to generate an appearance downgrade score specifically includes: Based on the mapping of the surface defect contour in the two-dimensional image data, the pixel area and grayscale contrast of the surface defect contour are extracted; The pixel area is compared with a preset area reference value to calculate the area difference, and an area deduction value is generated based on the area difference using a preset area deduction mapping function. The grayscale contrast is compared with a preset contrast benchmark value to calculate the contrast difference, and a contrast subtraction value is generated based on the contrast difference using a preset contrast subtraction mapping function. Based on preset area weight and contrast weight, the area deduction value and the contrast deduction value are weighted and summed to obtain the appearance degradation score.

[0011] In one possible implementation, before the steps of extracting the center coordinates of the surface defect contour and calculating the absolute distance from the center coordinates to the pre-calibrated critical stress zone boundary, the method further includes: Obtain the three-dimensional structural model of the thermos cup; The three-dimensional structural model is meshed, and preset simulated thermal stress boundary conditions are applied to obtain stress distribution results; Extract the regions in the stress distribution results whose stress values ​​are greater than or equal to a preset stress threshold, and mark these regions as the pre-calibrated key stress areas.

[0012] In one possible implementation, after outputting the forced rejection command and triggering the mold maintenance alarm step, the following steps are also included: Record the geometric sharpness and physical distance of the surface defect contours that trigger the forced rejection command to generate a critical defect feature library; The critical defect feature library is fed back to the control terminal of the preceding manufacturing process; Based on the aforementioned critical defect feature library, the process parameters of the preceding manufacturing process are adaptively compensated and adjusted.

[0013] The beneficial effects of this invention are: 1. This invention extracts the defect contour by registering two-dimensional and three-dimensional depth data and calculates the geometric sharpness, depth gradient and physical distance from the key stress area. Combined with the surrogate model, it outputs the predicted local maximum stress multiple, which realizes the accurate quantification of the structural failure risk of defects under thermal cycling and vacuum environment, and avoids false rejection or omission caused by relying solely on visual salience. 2. This invention utilizes multimodal visual acquisition equipment to simultaneously acquire grayscale and color images, and combines photometric stereo method and line laser scanning technology to obtain local depth maps, thereby enhancing the adaptability of the detection system to highly reflective metal surfaces, effectively distinguishing between purely visual reflection artifacts and real microscopic morphological defects, and improving the authenticity and accuracy of the underlying detection data. 3. This invention maps the predicted stress multiple to a functional failure probability score, and combines the area and contrast difference to generate an independent appearance degradation score, thus achieving separate evaluation of functional reliability and appearance level; by comparing the bidirectional scores with thresholds, it accurately executes classification decisions for forced rejection, downgrading, and release, solving the problem of handling fatal functional defects and defective products together. 4. This invention pre-calibrates key stress areas such as the weld area at the bottom of the cup based on the thermal stress simulation results of the three-dimensional structural model of the thermos cup, and trains a neural network surrogate model using an offline finite element analysis dataset; this mechanism replaces manual experience with physical simulation, transforms offline high-precision calculation into online fast reasoning, and meets the requirements of automated production line cycle time for real-time prediction. 5. After outputting the forced rejection command, this invention extracts the geometric sharpness and physical distance of fatal defects to generate a feature library, and feeds it back to the control terminal of the preceding manufacturing process for adaptive compensation and adjustment of process parameters. This mechanism transforms the final inspection judgment result into the basis for the optimization of the preceding process, effectively making up for the lack of manufacturing closed-loop control capability, and realizing an effective closed loop from defect detection to defect reduction. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating the method for removing surface defects of a thermos cup based on visual inspection, as provided in an embodiment of this application. Detailed Implementation

[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0016] Please see Figure 1 A method for removing surface defects of a thermos cup based on visual inspection includes the following steps: acquiring two-dimensional image data and three-dimensional depth data of the surface of the thermos cup, and spatially registering and combining the two-dimensional image data and the three-dimensional depth data; processing the spatially registered and combined two-dimensional image data and three-dimensional depth data based on a preset image segmentation network, extracting the surface defect contour, and calculating the geometric sharpness, depth gradient, and physical distance of the surface defect contour relative to the pre-marked key stress area based on the surface defect contour, wherein the pre-marked key stress area includes the bottom weld area and the cup mouth tension area; Input the geometric sharpness, depth gradient and physical distance into the preset stress concentration prediction proxy model, and output the predicted local maximum stress multiple of the surface defect contour under the preset simulated thermal cycle and vacuum negative pressure environment. The predicted local maximum stress multiple is compared with the preset fatigue limit multiple threshold to generate a functional failure probability score. The two-dimensional image data is then compared with the preset appearance evaluation benchmark to generate an appearance degradation score. Based on the functional failure probability score and the appearance degradation score, a classification and elimination decision is made for the thermos cup, and the judgment result is output.

[0017] This embodiment provides a visual inspection-based mechanism for removing surface defects in thermos cups. Specifically, this mechanism is deployed at the final inspection station of the automated thermos cup production line. The final inspection station is located after the vacuum sealing process and before the packaging process. It is used to jointly determine the functional risk and appearance level of the inner liner and outer shell of a single thermos cup. The main scenario is set as follows: A thermos cup production line continuously outputs finished cups numbered T001, T002, and T003. The detection system needs to determine within the cycle time which cups should be directly rejected, which cups are allowed to be downgraded, and which cups can be released into the packaging section. Acquire two-dimensional image data and three-dimensional depth data of the surface of the thermos cup; the two-dimensional image data may include grayscale and color images to reflect the differences in texture, reflection, and scratch color; the three-dimensional depth data can reflect the micro-morphology such as pits, cracks, and uneven welding. After acquisition, spatial registration is performed on the two types of data; spatial registration can be understood as binding each two-dimensional pixel to its corresponding depth value in the same coordinate system. Suppose that a defective area in a 2D image is cropped into a 4×4 local patch, and the pixel value of coordinate point 2,3 in the grayscale image is 180, and the relative concavity value in the depth image is 0.08mm. After registration, this point is recorded as a set of joint features for subsequent unified analysis. For the entire local patch, a multi-channel input segment composed of a 2D texture layer and a depth layer can be formed. The registered data is processed based on a pre-defined image segmentation network to extract the contours of surface defects. The network can adopt an encoder-decoder structure to output a binary segmentation mask for local regions. Before deployment, the image segmentation network is iteratively trained using a 2D image of a thermos cup with pre-labeled true boundaries of surface defects and a joint 3D depth sample set until the network loss function converges to a set range. Taking the 4×4 patch as an example again, if the mask output by the network is: row 1: 0000; row 2: 0110; row 3: 0110; row 4: 0000; then it indicates that the middle 2×2 area is identified as a suspected defect contour. Based on this profile, further calculations are made of core parameters such as geometric sharpness (used to describe whether the defect is thin and long and whether the edges are sharp), depth gradient (used to describe the degree of drastic change in depth within the defect), and physical distance (used to characterize the proximity of the defect to the critical stress area). If the major axis of a certain profile is about 1.2mm and the minor axis is about 0.2mm, then the aspect ratio can be 6; if the radius of curvature of the edge is small, it means that the edge is sharper; if the depth changes rapidly from 0 to 0.12mm, then the depth gradient is large; if its center point is only 0.5mm away from the boundary of the weld area at the bottom of the cup, then this position has a high risk sensitivity. After obtaining the above parameters, the geometric sharpness, depth gradient and physical distance are input into the preset stress concentration prediction proxy model; the output of the model is not the defect area or contrast score commonly found in traditional vision systems, but the predicted local maximum stress multiple that the defect may induce under simulated thermal cycling and vacuum negative pressure environment. Assuming the input features of a defect in a cup are: geometric sharpness 6, depth gradient 0.11, and physical distance 0.5mm, the model outputs a local maximum stress multiple of 1.85. The other cup body defect, although larger in area, has a gentler shape and is farther from the stress area. Its input features are: geometric sharpness 1.4, depth gradient 0.02, and physical distance 8mm. Therefore, the output local maximum stress multiple may only be 0.92. It can be seen that this scheme does not simply eliminate defects based on whether the visual size of the defect is significant, but rather evaluates them based on whether they are likely to evolve into a failure source in the target usage environment. Furthermore, the predicted local maximum stress multiple is compared with the preset fatigue limit multiple threshold to generate a functional failure probability score; the preset fatigue limit multiple threshold is determined by the ratio of the fatigue limit stress of the inner and outer materials of the thermos cup to the nominal stress under standard working conditions. Optionally, if the threshold is set to 1.20, the aforementioned defect of 1.85 significantly exceeds the threshold, and the functional failure probability score is close to the high value range; the aforementioned defect of 0.92 is below the threshold, and the functional failure probability score is in the low value range. At the same time, the system combines the appearance evaluation benchmark to perform feature comparison on the two-dimensional image data and generate an appearance degradation score; in this way, the system obtains two independent but jointly decision-making quantities: one reflects whether it will affect the thermal insulation function and structural life, and the other reflects whether it will affect the surface appearance and appearance qualification criteria. Based on the functional failure probability score and the appearance degradation score, the thermos cup is classified and rejected, and the judgment result is output. In one embodiment, if the functional failure probability score is high, it is directly judged as a forced rejection; if the functional risk is low but the appearance degradation score is high, it is judged as a defective product and can be transferred to the rework and polishing or defective product classification station; if both scores are low, it is judged as a good product and a release instruction is output. As an anomaly handling mechanism, during the acquisition phase, if there is a field of view offset, excessive local reflection, or missing depth between the 2D image and depth data, reacquisition is triggered first; if reacquisition still cannot obtain complete data, the cup is marked as awaiting manual review to avoid being mistakenly released due to incomplete data. During the segmentation stage, if the network outputs multiple small outlines that are separate from each other, then the features of each outline are calculated separately, and the one with the highest risk is taken as the main criterion for judging the cup body; if multiple defects are in the middle risk range, then the risks can be weighted and superimposed to reflect the cumulative effect of multiple defects. During the decision-making stage, if the functional failure probability score and the appearance degradation score are close to the threshold boundary, the system can output a temporary release status, and the review camera will perform a second sampling before making a decision. In the same batch of testing, there was a scratch on the shell of T001 that was longer than the preset length benchmark value and less than the preset depth judgment threshold. Its grayscale contrast reached the visual significance judgment condition. The model output function failure probability score was 0.12 and the appearance degradation score was 0.68. Therefore, it entered the degradation process. T002 has a tiny crack of only 0.3mm near the weld area at the bottom of the cup. Although the visual area is small, its geometric sharpness and depth gradient are both high. The model outputs a functional failure probability score of 0.93, and the system performs forced rejection. T003 only has slight scratches. Both scores are low, and the system outputs a release instruction. To further explain, in order to make the decision chain in this embodiment clearer, the two-dimensional image data and the three-dimensional depth data are preferably cached according to the same local region number after spatial registration, and the contour number output by the image segmentation network corresponds one-to-one with the subsequent parameter calculation results. Geometric sharpness, depth gradient, and physical distance form a structured input record of a single defect, which is then input into a stress concentration prediction surrogate model. The predicted local maximum stress multiple output by the surrogate model is only used for the functional risk branch and is not mixed with the appearance assessment branch. The appearance downgrade score is generated independently based on the two-dimensional image mapping region; thus, the functional risk branch and the appearance evaluation branch share the same defect contour at the front end, and output evaluation results of different dimensions at the back end, and finally enter the classification and elimination decision module. The purpose of this step is to link the visual detection results with the actual functional failure risk, so as to distinguish between surface defects that are more obvious in appearance but have little impact on function and surface defects that have weak visual representation but may lead to structural failure, thereby balancing the accuracy of detection and judgment with the long-term reliability of the thermos cup. To clarify the consistency of terminology, in the various embodiments of this specification, for the convenience of describing the scenario, when referring to the abnormality of the cup surface obtained by visual inspection, the terms "defect", "surface defect", "flaw", and "flaw" are used, the surface defect in the embodiments shall be taken as the standard. Among them, fatal defects and fatal flaws only refer to surface defects whose functional failure probability scores reach the mandatory rejection conditions, while defective products only refer to surface defects whose appearance downgrade scores reach the downgrade processing conditions but do not reach the mandatory rejection conditions. In this article, grayscale image, color image, and depth image are explanatory abbreviations for grayscale image, color image, and local depth image, respectively; stress multiple and local maximum stress multiple, unless otherwise specified, refer to the local maximum stress multiple corresponding to the output of the stress concentration prediction proxy model or the finite element label, and their source is specified by prediction or reality. Thresholds in a specific paragraph are determined by their preceding qualifiers, such as fatigue limit multiple threshold, failure threshold, appearance threshold, area reference value, contrast reference value, or stress threshold, and they are not used interchangeably.

[0018] In a preferred embodiment of the present invention, the steps of acquiring two-dimensional image data and three-dimensional depth data of the surface of the thermos cup specifically include: sending control commands to a multimodal vision acquisition device to scan the surface of the inner liner and the outer shell of the thermos cup; acquiring grayscale images and color images, and using the grayscale images and color images as two-dimensional image data; acquiring a local depth map based on photometric stereo method and line laser scanning technology, and using the local depth map as three-dimensional depth data.

[0019] This embodiment provides a data acquisition refinement mechanism for the final inspection station; specifically, on the aforementioned main production line, when relying solely on a single two-dimensional camera, it is easy to encounter defects such as unstable imaging of shallow scratches and indentations on highly reflective stainless steel surfaces, and misjudgment of functional defects due to the lack of obvious grayscale differences, making it difficult to determine their true depth based solely on color or brightness. Therefore, this embodiment introduces a multimodal vision acquisition device to simultaneously acquire grayscale images, color images, and local depth images from both the inner liner surface and the outer shell surface. The control unit sends control commands to the multimodal vision acquisition device, causing the turntable to drive the thermos cup to rotate at a predetermined angular velocity. The ring light source, color camera, grayscale camera, and line laser module work sequentially according to the time sequence. For the outer shell of the cup, multiple frames of images can be acquired during one rotation and stitched into an unfolded image. For the inner liner surface, an image of the inner wall can be obtained through a top-view lens and a coaxial supplementary lighting structure; grayscale images are used to highlight subtle texture changes, while color images are used to identify color anomalies such as oil stains, discoloration, and burn marks. Furthermore, the three-dimensional depth data is obtained by combining photometric stereo method and line laser scanning technology; photometric stereo method is suitable for estimating minute surface normal changes and can calculate local concavity and convexity trends under multi-angle illumination; line laser scanning technology is suitable for obtaining stable contour height information; In a certain local area, the photometric stereo method can infer that the normal deflection of the area is large, indicating the presence of small depressions; the line laser cross section can measure the maximum depth of about 0.06 mm; the system fuses the two to generate a local depth map, which can distinguish texture artifacts from real morphological defects. To facilitate understanding, consider this specific calculation example: Suppose a thin line with alternating bright and dark areas appears in the grayscale image of a certain part of the shell unfolded diagram, while the color of the same location is basically uniform in the color image; if only looking at the two-dimensional data, it may be misjudged as a scratch; if we look at the local depth map and find that the depth fluctuation at this location is less than 0.005mm, it is more likely just a surface reflective texture; Conversely, if the two-dimensional image shows almost no abnormality, but the line laser cross-section shows a narrow groove with a width of 0.15mm and a depth of 0.08mm, then although the area is not obvious, it is more worthy of subsequent functional risk analysis. As an anomaly handling mechanism, if a color image exhibits saturated reflection, the system can automatically reduce the exposure and resample a frame; if a grayscale image has motion blur, the turntable speed is reduced and the image is resampled. If the line laser is blocked by the cup opening or the local curvature is too large, causing the depth data to be broken, then neighborhood interpolation is used to fill in the local points only, but large missing areas are not forcibly filled in to avoid introducing reconstruction bias; if the depth missing area exceeds the preset proportion, for example, more than 30% of the local area, then the area is marked as a low confidence area and a second scan is initiated. During the T002 cup body inspection, there was no obvious color abnormality on the outer shell surface, and the color image was almost normal; however, a weak dark line appeared near the bottom of the cup in the grayscale image. Line laser scanning further confirmed that it was a sharp and narrow crack with a depth of about 0.07mm, so the system included this location in the key analysis. Conversely, on the T001 cup, a seemingly obvious scratch is visible in both the color and grayscale images, but the depth map shows almost no indentation. Therefore, subsequent models tend to determine that it only affects the appearance. The purpose of this step is to enhance the adaptability to reflective metal surfaces through multimodal acquisition, thereby enabling effective differentiation between real morphological defects and purely visual pseudo-defects.

[0020] In a preferred embodiment of the present invention, the steps of calculating the geometric sharpness, depth gradient, and physical distance of the surface defect contour relative to the pre-marked key stress area based on the surface defect contour specifically include: performing edge detection and morphological analysis on the surface defect contour, extracting the aspect ratio and edge curvature radius, mapping the aspect ratio and edge curvature radius to a comprehensive sharpness value according to a preset segmented mapping rule, and using the comprehensive sharpness value as the geometric sharpness; The depth change rate of each pixel within the surface defect contour is calculated based on 3D depth data, and the depth change rate is used as the depth gradient. The center coordinates of the surface defect contour are extracted, and the absolute distance from the center coordinates to the pre-calibrated boundary of the key stress area is calculated, and the absolute distance is used as the physical distance.

[0021] This embodiment provides a parameterized calculation mechanism for defect morphology. Specifically, in the aforementioned process, if only the segmented defect area is used as input, factors that determine the likelihood of subsequent cracking, such as edge sharpness, drastic depth changes, and proximity to high-risk areas, will be overlooked. Therefore, this embodiment further calculates three parameters—geometric sharpness, depth gradient, and physical distance—after obtaining the defect outline. Geometric sharpness can be obtained through edge detection and morphological analysis. The system first extracts the contour boundary points and then fits the major and minor axes. The minimum circumscribed rectangle of a certain crack contour has a length of 1.5 mm and a width of 0.2 mm, so the aspect ratio is 7.5. Another shallow pit has a length of 0.8 mm and a width of 0.6 mm, so the aspect ratio is 1.33. Obviously, the former is more slender. At the same time, the system selects several sampling points on the contour edge to estimate the local radius of curvature. If the radius of the edge corner is only 0.03mm, it indicates that the edge is sharper; if the radius reaches 0.20mm, it indicates that the outline is more rounded. In practical applications, the aspect ratio and the edge curvature radius can be mapped to a comprehensive sharpness value. For example, a high aspect ratio and a small curvature radius can be mapped to the high sharpness range. Furthermore, the depth gradient is obtained from three-dimensional depth data; The local depth change rate can be obtained by dividing the depth difference between each pixel within the contour and its neighboring pixels by the pixel spacing. Microscopically, assuming the depth values ​​of a 2×2 defect region are 0.00, 0.03, 0.07, and 0.11 mm, the average change rate between adjacent points is significantly higher than that of another group of regions with depths of 0.00, 0.01, 0.01, and 0.02 mm. The former corresponds to a steeper defect slope. A larger depth gradient often means that stress is more likely to concentrate at that location. Furthermore, the physical distance is obtained through the absolute distance between the defect center coordinates and the boundary of the critical stress area. The system first calculates the center point of the contour, for example, if the center of a certain contour is located at 105,38 in the unfolded coordinates, then looks up the coordinates of the point on the nearest critical stress area boundary, for example, 100,38, thus obtaining the absolute distance between the defect and the boundary as 5 pixels. If the calibration ratio is 0.1mm per pixel, then the physical distance is 0.5mm. The smaller the distance, the closer it is to the structurally sensitive area. To further explain, in order to avoid distortion of a single index when the aspect ratio exceeds the preset range but the edge curvature does not meet the sharpness condition, or when the edge radius is small but the overall shape is not slender, the system can first retain the two original values ​​of aspect ratio and edge curvature radius, and then form a geometric sharpness representation according to a unified rule before entering the subsequent proxy model. A segmentation rule can be adopted: when the aspect ratio is greater than the preset thin length threshold and the edge curvature radius is less than the preset sharp corner threshold, the defect is mapped to a high sharpness value; when only one of the two conditions is met, it is mapped to a medium sharpness value; when neither condition is met, it is mapped to a low sharpness value. When neither of these conditions is met, the model is classified as low-sharpness. This process is consistent with the example of extracting aspect ratio and edge curvature radius, mapping aspect ratio and edge curvature radius to comprehensive sharpness value according to preset segmentation mapping rules, and using comprehensive sharpness value as a representation of geometric sharpness. It also enables subsequent models to receive stable and interpretable sharpness input. To further explain, the depth gradient is preferably calculated separately inside the contour and in the neighborhood of the contour edge, and then the representative value is taken as the depth gradient of the defect to reduce the abnormal amplification caused by a single noise point; the system can first calculate all local depth change rates inside the contour, and then take the average value, the upper quantile value or the representative value with higher risk as the final input. If there is an isolated spike near the edge, and the surrounding continuous pixels do not show the same change, it is judged as noise and not directly used as the principal value of the depth gradient; this can avoid local geometric inconsistencies caused by reflection, patching errors or laser breakage being misjudged as functional cracks. As an anomaly handling mechanism, if the rate of change of the boundary curvature of a defect contour is greater than the preset threshold for irregular shapes, simply using the major axis and minor axis fitting may be unstable. In this case, the system can simultaneously calculate the equivalent perimeter, area, and roundness, and add a correction term to the sharpness composite value. If the depth map has scattered noise points that cause abnormal jumps in local gradients, median filtering is performed first, and then the rate of change is calculated. If the difference before and after filtering is too large, the region is marked as low confidence and submitted for re-inspection; if the defect center happens to fall inside the critical stress area, the physical distance can be recorded as 0 instead of taking a negative value, so as to avoid ambiguity in subsequent model inputs; On the T002 cup body, after a fine crack was extracted in the area adjacent to the weld, the system calculated that the aspect ratio was about 8.2, the minimum edge curvature radius was about 0.02 mm, the average depth gradient was about 0.10, and it was only 0.3 mm away from the weld boundary. Although the crack area was very small, all three parameters pointed to high risk. In contrast, the shallow scratches in the middle section of the T001 casing have an aspect ratio of about 2.1, a large edge curvature radius, and a depth gradient of only 0.01. They are more than 10mm away from the critical stress area, so they are more likely to only cause cosmetic problems. The purpose of this step is to further transform the segmented defect profiles into calculable parameters related to structural failure, thereby realizing the transformation from seeing defects to understanding the degree of danger posed by defects.

[0022] In a preferred embodiment of the present invention, before inputting geometric sharpness, depth gradient and physical distance into a preset stress concentration prediction proxy model, the method further includes: obtaining a finite element analysis dataset, which includes historical geometric sharpness, historical depth gradient, historical physical distance and the corresponding true local maximum stress multiple; Construct an initial neural network model; input historical geometric sharpness, historical depth gradient, and historical physical distance into the initial neural network model to output the predicted local maximum stress multiple; calculate the loss value based on the predicted local maximum stress multiple and the actual local maximum stress multiple, and update the network parameters of the initial neural network model according to the loss value until the preset convergence condition is met to obtain the stress concentration prediction surrogate model.

[0023] This embodiment provides a mechanism for constructing a surrogate model for stress concentration prediction. Specifically, in the aforementioned process, if finite element simulation is performed directly on each cup defect each time, although theoretically more accurate local stress results can be obtained, the production line cycle time is usually only a few seconds, which cannot withstand high computational load. Therefore, this embodiment uses offline finite element sample generation and online neural network fast prediction to establish a surrogate model. Obtain the finite element analysis dataset; each sample record in the dataset contains input features such as historical geometric sharpness, historical depth gradient, and historical physical distance, as well as the real local maximum stress multiple obtained under simulated thermal cycling and vacuum negative pressure conditions as supervision labels; The following simplified samples can be compiled from historical simulations: Sample A has an input parameter combination of 7.0, 0.10, and 0.5, corresponding to a true stress multiple of 1.90; Sample B has an input parameter combination of 1.5, 0.02, and 8.0, corresponding to a true stress multiple of 0.95; Sample C has an input parameter combination of 4.2, 0.06, and 2.0, corresponding to a true stress multiple of 1.35. Thus, the model training objective becomes learning the mapping relationship between three topographic and positional parameters and stress multiples. Construct an initial neural network model; this model can be a multilayer perceptron, with the input layer receiving feature vectors, the intermediate layers performing nonlinear fitting, and the output layer outputting a stress multiple value; the initial model predicts 1.60 for sample A, 1.10 for sample B, and 1.28 for sample C, which are 0.30, 0.15, and 0.07 errors from the true values, respectively. The loss value is calculated based on these errors, and the error is reduced round by round by updating the parameters in reverse. When the predictions for samples A, B, and C converge to 1.87, 0.97, and 1.34 after multiple rounds of training, it means that the model can approximate the finite element results well. It should be noted that the surrogate model used here does not replace the material mechanics mechanism, but rather compresses the complex simulation results into an inference module suitable for online deployment; in this way, after inputting three parameters at the production line end, it can output the predicted local maximum stress multiple within the millisecond to hundreds of milliseconds range. As an anomaly handling mechanism, if the finite element samples are too sparsely distributed in a certain input interval, for example, the number of samples with high sharpness and very close to the weld is significantly less, then such simulation samples can be added first to avoid the model from being distorted in the high-risk interval. If the loss value does not decrease for a long time during training, methods such as learning rate decay, sample resampling, or input normalization can be used to improve convergence stability. If the model's prediction error for certain novel cup structures is significantly higher than the preset value, a separate sub-model can be maintained for that structure, or the structure number can be added as an additional input to the unified model. If the input features exceed the range of the training data during online operation, for example, if the physical distance is much smaller than the historical minimum, the system can trigger a conservative strategy, correct the output risk upwards, and mark it for verification. After introducing a new type of thin-walled cup into the production line, the engineers first built a training set containing a large number of finite element samples during the R&D phase to train a surrogate model. After going online, the crack features of the T002 cup were input into the model, and the system gave a prediction of the local maximum stress multiple of 1.88 almost in real time, thus meeting the production line cycle requirements without having to perform complete finite element mesh generation and solution on site. The purpose of this mechanism is to transform offline high-precision simulation capabilities into online rapid decision-making capabilities, thereby enabling deployable functional risk assessments in industrial settings.

[0024] In a preferred embodiment of the present invention, the step of comparing the predicted local maximum stress multiple with a preset fatigue limit multiple threshold to generate a functional failure probability score specifically includes: calculating the difference between the predicted local maximum stress multiple and the fatigue limit multiple threshold; inputting the difference into a preset probability mapping function configured with a target value range of 0 to 1 for normalization processing to obtain a probability value mapped to the target value range; and using the probability value as the functional failure probability score.

[0025] This embodiment provides a functional failure probability score generation mechanism. Specifically, in the aforementioned process, if the predicted local maximum stress multiple is directly used as the decision-making basis, although it can roughly distinguish between high risk and low risk, the interpretation of the threshold is not uniform between different materials and different process batches, and it is difficult for operators to directly understand the risk difference between 1.32 and 1.78. Therefore, this embodiment further maps the degree of deviation of the stress multiple from the threshold to a probability value in the range of 0 to 1. The system first calculates the difference between the predicted local maximum stress multiple and the fatigue limit multiple threshold; if the threshold is 1.20, and the predicted value of a certain defect is 1.85, then the difference is 0.65; if the predicted value of another defect is 1.05, then the difference is -0.15. Then, the difference is input into a preset probability mapping function; this function can be monotonically increasing, so that the larger the difference, the closer the functional failure probability score is to 1; the smaller the difference or even negative, the closer the functional failure probability score is to 0; for example, if a difference of 0 corresponds to a probability of 0.5, then 0.65 can be mapped to above 0.90, and -0.15 can be mapped to below 0.30. For ease of understanding, as a concrete calculation example, let's assume the mapping function outputs 0.12, 0.50, and 0.88 when the difference is -0.4, 0, and 0.4, respectively. Then, when the difference for crack T002 is 0.65, the functional failure probability score is approximately 0.94; when the difference for scratch T001 is -0.28, the score is approximately 0.19. In this way, the production line decision-making level no longer needs to directly deal with the dimensions of material mechanics, but can instead handle a unified risk score. Furthermore, using probability mapping is also beneficial for the design of subsequent stratification strategies; for example, 0 to 0.3 can be regarded as a low-risk area, 0.3 to 0.7 as an observation area, and above 0.7 as a high-risk area; this not only facilitates automatic elimination, but also makes it easier to statistically analyze the risk distribution of different shifts and different molds. To further explain, the preset probability mapping function can be a pre-calibrated sigmoid monotonic function or a piecewise linear function, as long as it satisfies the condition that the larger the input difference, the higher the output, and the output is always limited to the interval between 0 and 1. In one embodiment, to facilitate production line adjustment and cross-batch reuse, a piecewise linear mapping can be adopted: when the difference is less than or equal to the lower limit difference, output 0 directly; when the difference is greater than or equal to the upper limit difference, output 1 directly; when the difference is between the upper and lower limit differences, interpolate according to the interval ratio to obtain the probability value. This allows us to distinguish between small fluctuations near the threshold and high-risk states that significantly exceed the threshold, while avoiding overly abstract descriptions of the mapping function. If the lower limit difference is set to -0.30 and the upper limit difference is set to 0.50, then defects with a difference of -0.30 or less are uniformly mapped to 0, defects with a difference of 0.50 or more are uniformly mapped to 1, and the difference in the middle range is mapped linearly. Taking a difference of 0.10 as an example, it is between -0.30 and 0.50, which means that although the defect exceeds the low-risk zone, it has not yet reached the highest-risk zone. At this time, the obtained probability value will be in the middle to high range. With this approach, on-site engineers only need to adjust the difference between the upper and lower limits and the fatigue limit multiple threshold to adapt to different materials or different structural cup shapes, without having to change the entire risk assessment framework. To further explain, in order to avoid significant jumps in output between adjacent batches due to small fluctuations near the threshold, the probability mapping function is preferably kept continuous; for piecewise linear mapping, a uniform slope can be used between the differences between the upper and lower limits, and numerical continuity can be maintained at the boundary points and the cutoff interval. For an S-shaped monotonic function, the midpoint and slope can be pre-calibrated so that the region with the difference close to 0 has a higher resolution, while the region with the difference far from 0 gradually tends to saturate. After this processing, the functional failure probability score retains the ability to respond to the degree of exceeding the threshold, and is also easy to compare stably with the failure threshold. As an anomaly handling mechanism, if the difference is extremely large, for example, much higher than the training and calibration interval, the function output can be automatically truncated to 1 to avoid the mapping result from exceeding 1; if the difference is extremely small, the output is truncated to 0; if the material batch changes, causing the fatigue limit multiple threshold to need to be updated, only the threshold and mapping configuration need to be updated, without rewriting the overall decision-making process. If a cup has multiple defects, the probability score of functional failure can be calculated for each defect, and the maximum value can be taken as the risk of a single cup. Alternatively, multiple medium-risk scores can be superimposed and corrected when the cumulative rule is met. Within the same batch, T002 had a predicted stress multiple that significantly exceeded the threshold, resulting in a functional failure probability score of 0.94 after mapping; T003 had only superficial defects, with a predicted value below the threshold, resulting in a score of 0.08 after mapping; the on-site operation interface can directly display 0.94 (high risk) and 0.08 (low risk), improving the interpretability of the judgment. The purpose of this step is to uniformly convert the physical model output into standardized risk values ​​that are easy to compare and make decisions, thereby achieving risk management at the same scale across different batches and cups with different structures.

[0026] In a preferred embodiment of the present invention, the step of classifying and rejecting thermos cups and outputting the judgment result based on functional failure probability score and appearance degradation score specifically includes: when the functional failure probability score is greater than or equal to a preset failure threshold, it is judged as a fatal defect, a forced rejection command is output and a mold maintenance alarm is triggered. When the functional failure probability score is less than the failure threshold and the appearance degradation score is greater than or equal to the preset appearance threshold, a defective product is determined to exist, and a degradation processing instruction is output; when the functional failure probability score is less than the failure threshold and the appearance degradation score is less than the appearance threshold, a good product is determined, and a release instruction is output. This embodiment provides a classification and rejection decision mechanism. Specifically, in the aforementioned process, if only a binary result of defective / no defect is output, it will lead to two problems: first, appearance defects and fatal functional defects are mixed together, which is not conducive to the processing of different subsequent work stations; second, the detection results cannot be fed back to the manufacturing process. Therefore, this embodiment subdivides the judgment result into three categories: forced rejection, downgrade processing, and release. The system receives a failure probability score and an appearance degradation score, and makes a joint judgment based on a set threshold; optionally, the failure threshold is set to 0.75 and the appearance threshold is set to 0.60. If the failure probability score of a certain cup body is greater than or equal to 0.75, even if the appearance is good, it is still judged to have a fatal risk, and a forced rejection command is directly output, while triggering a mold maintenance alarm. The reason for the linkage alarm is that such defects are often related to abnormal conditions of equipment such as welding fixtures, stretching dies, and rolling rollers. If the functional failure probability score is below 0.75, but the appearance degradation score is greater than or equal to 0.60, it means that the cup body is unlikely to fail in vacuum insulation, but its appearance defects may exceed the appearance tolerance benchmark. Therefore, a degradation processing instruction is output, and it can be sent to the rework polishing, spray painting repair or defective product sorting channel. If both scores are below their respective thresholds, a release instruction is output, allowing it to enter the packaging. A simplified deduction can be made: if the functional failure probability score of T001 is 0.19 and the appearance degradation score is 0.68, then it will enter the degradation process; if the functional failure probability score of T002 is 0.94 and the appearance degradation score is 0.22, then although the appearance is not significant, it will still be forcibly rejected; if the functional failure probability score of T003 is 0.08 and the appearance degradation score is 0.12, then it will be directly approved. To further explain, the classification and elimination decision module preferably executes according to a fixed priority: first, it determines whether the functional failure probability score reaches the failure threshold, then it determines whether the appearance degradation score reaches the appearance threshold, and outputs the release result; processing in this order can avoid instruction conflicts when the same cup meets different judgment conditions at the same time. For the conveyor line execution layer, forced rejection, downgrade processing and release can be respectively corresponding to different sorting channel numbers or actuator action numbers, so that the judgment results are in one-to-one correspondence with the on-site actions; As an exception handling mechanism, if the functional failure probability score is exactly equal to the failure threshold, it will be treated as high risk and forced rejection will be performed to avoid boundary release; if the appearance degradation score is exactly equal to the appearance threshold, it will be classified as degradation processing first; if there are multiple defects in the same cup, and one of them triggers the forced rejection condition, the whole cup will directly enter the rejection channel and will no longer be covered by other defects with lower scores. If the downstream downgrade processing station on the production line is temporarily full, the system can first transfer the defective products to the buffer area, while retaining their detection images, coordinates and scores, and then schedule them again after the station is restored; if a communication failure causes the rejection mechanism to not receive an action confirmation signal, the conveyor belt can automatically slow down and trigger manual interception. During a continuous production run, the system discovered that multiple cups had high-risk defects near the bottom weld in a short period of time. Therefore, these cups were forcibly removed one by one, and a mold maintenance alarm was sent to the maintenance terminal at the same time, indicating that there may be wear on the welding head or positioning misalignment. Meanwhile, another batch of cups only had visible scratches on the outer shell. The system sent them to the downgrade processing channel instead of using the scrap channel. The purpose of this mechanism is to categorize functional reliability and appearance grade for different levels, thereby achieving more refined closed-loop control in manufacturing and higher accuracy in classification and processing.

[0027] In a preferred embodiment of the present invention, the step of performing feature comparison on two-dimensional image data in combination with a preset appearance evaluation benchmark to generate an appearance downgrade score specifically includes: extracting the pixel area and grayscale contrast of the surface defect contour based on the mapping of the surface defect contour in the two-dimensional image data; comparing the pixel area with a preset area benchmark value to calculate the area difference; and generating an area deduction value based on the area difference using a preset area deduction mapping function. The grayscale contrast is compared with a preset contrast benchmark value to calculate the contrast difference. A contrast deduction value is generated based on the contrast difference using a preset contrast deduction mapping function. The area deduction value and the contrast deduction value are weighted and summed based on preset area weights and contrast weights to obtain an appearance degradation score.

[0028] This embodiment provides a mechanism for generating appearance degradation scores; specifically, in the aforementioned process, functional risk assessment can identify whether it will affect thermal insulation performance, but for end sales, it is still necessary to measure whether the defects affect the appearance of the product. Without an independent appearance score, some cups that are not defective but are obviously visible to the naked eye will be wrongly approved; therefore, this embodiment performs quantitative comparison of the defect mapping area in the two-dimensional image to generate an appearance downgrade score. The system extracts pixel area and grayscale contrast based on the projection position of the defect outline in the two-dimensional image. The pixel area reflects the visible range of the defect in the image, and the grayscale contrast reflects the degree of prominence of the defect relative to the surrounding surface. If a scratch outline covers 120 pixels in the unfolded image, and the baseline area is set to 50 pixels, then the area difference is 70. For example, if the average gray level of the scratched area is 90 and the average gray level of the surrounding background is 140, then the gray level contrast can be set to 50; if the baseline contrast is set to 20, then the contrast difference is 30. Furthermore, the area difference and contrast difference are mapped to area deduction values ​​and contrast deduction values, respectively; for example, the area difference of 70 can be mapped to 0.55, and the contrast difference of 30 can be mapped to 0.40; then, the two deduction values ​​are weighted and summed. If the weights are 0.6 and 0.4 respectively, the appearance degradation score is 0.55×0.6+0.40×0.4=0.49; another area, although only 30 pixels in size, has a high contrast, which may result in a high contrast deduction value, thus still having a high appearance risk; this can avoid the bias of only looking at the area and not the degree of conspicuousness. In appearance rating, the advantage of introducing two-dimensional image mapping is that it can be evaluated directly based on the visual information visible to the user, without being overly influenced by depth factors. In other words, the appearance degradation score is used to assess the visual salience of appearance defects, while the functional failure probability score is used to assess the structural failure risk of the product under the target operating conditions. The two have different responsibilities. As an anomaly handling mechanism, if the defect is located on the bottom of the cup, in the area covered by the cup lid, or in an area not visible after packaging, the appearance downgrade score can be reduced according to the preset visible area weight; if the background grayscale difference between the colored coated cup and the original stainless steel cup exceeds the preset grayscale difference threshold, different area benchmark values ​​and contrast benchmark values ​​can be used for different styles. If the outline area is in a highly reflective zone, resulting in artificially high grayscale contrast, the system can correct it by combining the average value of adjacent frames; if it is still unstable, the area item is used as the main factor and the weight of the contrast item is reduced; if a single cup has multiple appearance defects, the maximum appearance defect score can be taken, or the weighted sum can be calculated according to the importance of the area. On the T001 cup, there is a long scratch on the front of the cup body. The scratch is large and the grayscale contrast is obvious. The system calculates the appearance downgrade score as 0.68. Although the cup body's functional failure probability score is only 0.19, it is still transferred to the downgrade processing channel because the appearance score exceeds the threshold. In contrast, the microcracks in the weld of T002 mainly affect functionality. The projected area is small and the contrast is not strong. Its appearance downgrade score is only 0.22, but the functional risk is enough to trigger forced rejection. The purpose of this step is to establish quantitative standards for appearance that are more consistent with consumers' visual perception, thereby achieving the separation of responsibilities and joint decision-making between functional and appearance assessments.

[0029] In a preferred embodiment of the present invention, before the steps of extracting the center coordinates of the surface defect contour and calculating the absolute distance from the center coordinates to the pre-calibrated critical stress zone boundary, the method further includes: obtaining a three-dimensional structural model of the thermos cup; meshing the three-dimensional structural model and applying a preset simulated thermal stress boundary condition to obtain stress distribution results; Extract the regions in the stress distribution results where the stress value is greater than or equal to the preset stress threshold, and mark these regions as pre-calibrated critical stress areas.

[0030] This embodiment provides a pre-calibration mechanism for key stress zones; specifically, in the aforementioned parameter extraction process, the calculation of physical distance depends on the boundary of the key stress zone; If the boundary is manually defined based solely on experience, it is easily affected by different cup shapes, material thicknesses, and structural designs, leading to distortion of distance parameters. Therefore, in this embodiment, the key stress areas are pre-marked based on the three-dimensional structural model of the thermos cup and the results of thermal stress simulation. The system acquires a three-dimensional structural model of the thermos cup; this model can come from product design drawings or reverse measurement results, and includes structures such as the inner liner, outer shell, bottom connection, and rim flange area; the three-dimensional structural model is meshed, and simulated thermal stress boundary conditions are applied; Optionally, the boundary conditions include high-temperature liquid contact with the inner wall, ambient air cooling of the outer wall, and the influence of negative pressure in the vacuum layer; after finite element solution, the stress distribution of the entire cup under thermal cycling and negative pressure conditions is obtained; Furthermore, regions where stress values ​​exceed preset thresholds are extracted from the stress distribution results, and these regions are marked as critical stress areas. If a cup shape shows that the stress within 2mm around the bottom weld is greater than the preset first stress threshold, and the local stress generated at the cup mouth stretching flange during thermal shock is greater than the preset second stress threshold, then these two parts are marked as the bottom weld area and the cup mouth stretching area, respectively. In this way, the defect contours detected later only need to be calculated in terms of distance from these pre-calibrated areas, without having to repeat the finite element simulation calculations at the production line. On a microscopic scale, assuming that in the unfolded coordinate system, the projected boundary of the weld seam area at the bottom of the cup corresponds to the longitudinal coordinates 0 to 20, and the tensile area at the mouth of the cup corresponds to the longitudinal coordinates 180 to 200; when a defect center is located at 105, 18, it can be considered to fall inside or near the boundary of the weld seam area at the bottom of the cup, with a physical distance of 0 or close to 0. When another defect center is located at 88 or 100, its minimum distance to the boundary of the two types of critical stress areas mentioned above is relatively large, and it is judged to be far away from the critical stress area. To further explain, in order to enable the key stress area obtained from the 3D simulation to directly serve the online detection of the 2D image and depth map, the system also maps the 3D boundary of the key stress area to a template boundary consistent with the production line detection coordinate system during the offline calibration stage; For the outer shell of the cup, the circumferential surface can be unfolded into a cylindrical surface coordinate system according to the turntable angle; for non-perfectly flat areas such as the bottom of the inner liner or the mouth of the cup, the correspondence between three-dimensional points and image pixels can be established based on the camera's intrinsic and extrinsic parameters and structural marker points. After this processing, the critical stress area is no longer just a three-dimensional hotspot area in the simulation software, but is transformed into a two-dimensional boundary template that can be directly superimposed on the detection image, thereby ensuring that the defect center coordinates and the critical stress area boundary are in the same measurement system. To further explain, different cup shapes correspond to different key stress area templates; the system can establish a template library according to cup height, cup diameter, bottom structure form or product model, and the control unit reads the template number corresponding to the current cup shape before online testing; the template is registered with the unfolded diagram or inner liner view collected from the current cup body, and the registered boundary is then used for distance calculation; This absolute distance actually refers to the shortest actual distance between the defect center and the boundary of the critical stress area after the template mapping is completed, rather than the abstract geometric distance in the 3D model. Therefore, the problem of the simulation area being correct in 3D space but misaligned in the online image will not occur. As an anomaly handling mechanism, if a product change causes changes in cup height, cup diameter, or weld position, it is necessary to re-acquire the three-dimensional structural model and update the calibration template of the key stress area; if the high stress areas in the simulation results are relatively scattered, they can be merged according to engineering experience to form a continuous boundary, so as to avoid the subsequent distance calculation being too fragmented. If there are differences in the high-stress area under different working conditions, such as the hot spot being slightly offset between hot water and ice water conditions, the union area can be taken as the conservative boundary; if a product does not have an obvious cup mouth stretching area, only the cup bottom weld area can be retained in the template of the key stress area. During the introduction of the new cup shape, the engineering department first established a three-dimensional structural model of the cup shape and completed thermal stress simulation. It was found that the stress concentration coefficient of the thin-walled cup at the flange of the cup mouth is greater than that of the traditional thick-walled cup. Therefore, the template of the key stress area of ​​the cup shape was updated. Subsequently, when the production line detects a sharp dent near the rim of the cup, it can accurately identify it as a risky defect near a high-stress area, rather than treating it as a normal mid-section defect. The purpose of this mechanism is to provide physical reference boundaries for visual inspection using structural simulation results, thereby achieving the standardization and transferability of location risk parameters.

[0031] In a preferred embodiment of the present invention, after outputting the forced rejection command and triggering the mold maintenance alarm step, the method further includes: recording the geometric sharpness and physical distance corresponding to the surface defect contour that triggered the forced rejection command, and generating a critical defect feature library; feeding back the critical defect feature library to the control terminal of the preceding manufacturing process; and adaptively compensating and adjusting the process parameters of the preceding manufacturing process based on the critical defect feature library.

[0032] This embodiment provides a critical defect feedback and process compensation mechanism. Specifically, in the aforementioned classification and rejection process, if the system only rejects the current defective product, although it can prevent the defect from entering the market, it cannot reduce the continuous occurrence of the same defect. Especially when a certain type of critical defect is concentrated in a fixed area and has a fixed shape, it often means that there is a systematic deviation in the preceding manufacturing process. Therefore, this embodiment continues to record the characteristics of the critical defect and send them back to the preceding workstation after forced rejection, so as to realize adaptive process adjustment. For each cup that is forcibly rejected, the system records the geometric sharpness and physical distance of the surface defect contour, and can also record the cup type, inspection time, workstation number and defect area category; as the data accumulates, a critical defect feature library is formed. Multiple records appeared consecutively in the feature library: sharpness greater than 7, physical distance less than 0.8mm, and the area was concentrated in the weld seam area at the bottom of the cup; this indicates that this type of defect is not a random scattered point, but has a clear process origin. The feature library is fed back to the control terminal of the preceding manufacturing process. If the preceding process is bottom welding, the control terminal can focus on welding energy, clamping force, positioning deviation, or weld head wear. If the preceding process is stretch forming, the control terminal can focus on stretching speed, die clearance, and lubrication status. Furthermore, the control terminal adaptively compensates and adjusts process parameters based on a critical defect feature library. For example, when the system detects a significant increase in sharp cracks near the weld seam area at the bottom of the cup in the last 200 products, it can reduce the welding current by a small step, increase the welding pressure by a small step, or arrange for online mold correction. On a microscopic scale, it can be assumed that 10 cups are forcibly rejected in a certain period of time. Among them, the defects of 8 cups have a sharpness of 7.5 or higher and a physical distance of less than 0.5 mm, and are all concentrated in the weld seam area at the bottom of the cup. Based on this, the control terminal judges that the weld joint may have eccentricity or local ablation, and first performs a level one compensation, such as adjusting the position of the weld joint back to the theoretical center by 0.1 mm. If the number of such defects in the next batch of 100 products decreases significantly after compensation, the compensation is considered effective; if the defects continue to occur, the process will be escalated to manual maintenance and shutdown. As an exception handling mechanism, if the number of samples in the critical defect feature library is insufficient to support stable judgment, for example, if a certain type of critical defect only occurs once, the system can first record it as an observation event without immediately triggering a major process adjustment. If multiple preceding processes may cause the same morphological defects, the control terminal can combine timestamps and equipment status logs to attribute the cause and avoid incorrect parameter adjustments. If the appearance defect rate increases or the functional risk does not decrease after compensation, the current round of compensation is canceled and the previous set of process parameters is restored. If a series of high-risk events exceed the preset number, a production line shutdown for maintenance can be triggered directly, rather than just parameter fine-tuning. During a certain shift, the system issued a forced rejection notice for multiple products with sharp micro-cracks in the weld seam area of ​​the cup bottom, and continuously transmitted back the sharpness and location data; the welding control terminal identified that these fatal defects were all close to the weld seam boundary, and inferred that they were caused by a slight offset of the welding head, so it automatically corrected the positioning parameters; after the correction, the number of similar high-risk defects decreased significantly in the following two hours, and the production line returned to stability. The purpose of this mechanism is to transform the final inspection results into a basis for optimizing the preceding processes, thereby achieving closed-loop manufacturing control from defect detection to defect reduction.

[0033] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A method for removing surface defects of a thermos cup based on visual inspection, characterized in that, Includes the following steps: Acquire two-dimensional image data and three-dimensional depth data of the surface of the thermos cup, and perform spatial registration and combination of the two-dimensional image data and the three-dimensional depth data; The two-dimensional image data and the three-dimensional depth data after spatial registration and combination are processed based on a preset image segmentation network to extract the surface defect contour. The geometric sharpness, depth gradient and physical distance of the surface defect contour relative to the pre-marked key stress area are calculated based on the surface defect contour. The pre-marked key stress area includes the bottom weld area and the cup mouth tension area. The geometric sharpness, the depth gradient, and the physical distance are input into a preset stress concentration prediction proxy model, and the predicted local maximum stress multiple of the surface defect contour under a preset simulated thermal cycle and vacuum negative pressure environment is output. The predicted local maximum stress multiple is compared with the preset fatigue limit multiple threshold to generate a functional failure probability score, and the two-dimensional image data is compared with the preset appearance evaluation benchmark to generate an appearance degradation score. Based on the functional failure probability score and the appearance degradation score, a classification and elimination decision is made for the thermos cup, and the judgment result is output.

2. The method for removing surface defects of a thermos cup based on visual inspection according to claim 1, characterized in that, The steps of acquiring two-dimensional image data and three-dimensional depth data of the surface of the thermos cup specifically include: Send control commands to the multimodal vision acquisition device to enable it to scan the surface of the inner liner and the outer shell of the thermos cup; Acquire grayscale and color images, and use the grayscale and color images as the two-dimensional image data; A local depth map is obtained based on photometric stereo method and line laser scanning technology, and the local depth map is used as the three-dimensional depth data.

3. The method for removing surface defects of a thermos cup based on visual inspection according to claim 1, characterized in that, The steps of calculating the geometric sharpness, depth gradient, and physical distance of the surface defect contour relative to the pre-marked key stress area based on the surface defect contour specifically include: Edge detection and morphological analysis are performed on the surface defect contour to extract the aspect ratio and edge curvature radius. The aspect ratio and edge curvature radius are mapped to a comprehensive sharpness value according to a preset segmented mapping rule, and the comprehensive sharpness value is used as the geometric sharpness. Based on the three-dimensional depth data, the depth change rate of each pixel within the surface defect contour is calculated, and the depth change rate is used as the depth gradient. Extract the center coordinates of the surface defect contour and calculate the absolute distance from the center coordinates to the pre-calibrated boundary of the critical stress area, and use the absolute distance as the physical distance.

4. The method for removing surface defects of a thermos cup based on visual inspection according to claim 1, characterized in that, Before the step of inputting the geometric sharpness, the depth gradient, and the physical distance into the preset stress concentration prediction proxy model, the method further includes: Obtain a finite element analysis dataset, which includes historical geometric sharpness, historical depth gradient, historical physical distance, and the corresponding true local maximum stress multiple. Construct the initial neural network model; The historical geometric sharpness, the historical depth gradient, and the historical physical distance are input into the initial neural network model, and the predicted local maximum stress multiple is output. The loss value is calculated based on the predicted local maximum stress multiple and the actual local maximum stress multiple, and the network parameters of the initial neural network model are updated according to the loss value until the preset convergence condition is met, thereby obtaining the stress concentration prediction proxy model.

5. The method for removing surface defects of a thermos cup based on visual inspection according to claim 1, characterized in that, The step of comparing the predicted local maximum stress multiple with a preset fatigue limit multiple threshold to generate a functional failure probability score specifically includes: Calculate the difference between the predicted local maximum stress multiple and the fatigue limit multiple threshold; The difference is input into a preset probability mapping function configured with a target value range of 0 to 1 for normalization processing to obtain the probability value mapped to the target value range. The probability value is used as the probability score of the function failure.

6. The method for removing surface defects of a thermos cup based on visual inspection according to claim 1, characterized in that, The step of performing a classification and elimination decision on the thermos cup based on the functional failure probability score and the appearance degradation score, and outputting the judgment result, specifically includes: When the failure probability score of the function is greater than or equal to the preset failure threshold, it is judged as a fatal defect, a forced rejection command is output and a mold maintenance alarm is triggered. When the functional failure probability score is less than the failure threshold and the appearance degradation score is greater than or equal to the preset appearance threshold, it is determined that there is a defective product and a degradation processing instruction is output. When the functional failure probability score is less than the failure threshold and the appearance degradation score is less than the appearance threshold, the product is judged as good and a release command is output.

7. The method for removing surface defects of a thermos cup based on visual inspection according to claim 1, characterized in that, The step of performing feature comparison on the two-dimensional image data based on a preset appearance evaluation benchmark to generate an appearance downgrade score specifically includes: Based on the mapping of the surface defect contour in the two-dimensional image data, the pixel area and grayscale contrast of the surface defect contour are extracted; The pixel area is compared with a preset area reference value to calculate the area difference, and an area deduction value is generated based on the area difference using a preset area deduction mapping function. The grayscale contrast is compared with a preset contrast benchmark value to calculate the contrast difference, and a contrast subtraction value is generated based on the contrast difference using a preset contrast subtraction mapping function. Based on preset area weight and contrast weight, the area deduction value and the contrast deduction value are weighted and summed to obtain the appearance degradation score.

8. The method for removing surface defects of a thermos cup based on visual inspection according to claim 3, characterized in that, Before the steps of extracting the center coordinates of the surface defect contour and calculating the absolute distance from the center coordinates to the pre-calibrated critical stress zone boundary, the method further includes: Obtain the three-dimensional structural model of the thermos cup; The three-dimensional structural model is meshed, and preset simulated thermal stress boundary conditions are applied to obtain stress distribution results; Extract the regions in the stress distribution results whose stress values ​​are greater than or equal to a preset stress threshold, and mark these regions as the pre-calibrated key stress areas.

9. The method for removing surface defects of a thermos cup based on visual inspection according to claim 6, characterized in that, After the step of outputting the forced rejection command and triggering the mold maintenance alarm, the following steps are also included: Record the geometric sharpness and physical distance of the surface defect contours that trigger the forced rejection command to generate a critical defect feature library; The critical defect feature library is fed back to the control terminal of the preceding manufacturing process; Based on the aforementioned critical defect feature library, the process parameters of the preceding manufacturing process are adaptively compensated and adjusted.