Metallized film defect detection method and device, computer equipment and program product

By acquiring transmitted and reflected light images of metallized thin films, converting them into a sheet resistance distribution field and solving for the potential distribution field, and combining the power density field and physical attention neural network, the accuracy problem of metallized thin film defect detection in the prior art is solved, and accurate defect identification and risk assessment are achieved.

CN121962098APending Publication Date: 2026-05-01GUANG DONG METALFILM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANG DONG METALFILM TECH CO LTD
Filing Date
2026-01-20
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies cannot accurately detect defects in metallized thin films, especially tiny but narrow necks or microcracks that affect the current path. They are also prone to misjudging large-area but electrically safe shallow scratches, and have difficulty distinguishing between metallic and non-metallic foreign objects, resulting in inaccurate detection results.

Method used

By acquiring transmitted light images, converting them into a sheet resistance distribution field, applying a virtual voltage to solve for the potential distribution field, combining the power density field and the transmitted light image to identify defects, and correcting the sheet resistance distribution field through photoelectric mapping and reflected light images, dynamically adjusting the judgment threshold, and using a neural network with a physical attention module for defect identification.

Benefits of technology

It improves the accuracy of detecting defects in metallized thin films, avoids missed detections and misjudgments, can distinguish electrical risk levels and material types, and adapts to actual working conditions in production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962098A_ABST
    Figure CN121962098A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial visual inspection, in particular to a metallized film defect detection method and device, computer equipment and a program product. The metalized film defect detection method comprises the following steps: acquiring a transmitted light image of a metalized film to be detected; obtaining a sheet resistance distribution field of the metallized film through a photoelectric mapping relation according to light intensity distribution in the transmitted light image; virtual voltage is applied, the square resistance distribution field serves as a coefficient field, and a steady-state current continuity equation is solved to obtain a potential distribution field; a power density field is calculated according to the potential gradient of the potential distribution field and the square resistance distribution field, and the power density field represents the energy concentration degree caused by current crowding; and identifying defects in the metallized film based on the power density field and the transmitted light image. The accuracy of detecting the defects of the metallized film can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, computer equipment and software products for detecting defects in metallized thin films Technical Field

[0001] This application relates to the field of industrial visual inspection technology, and in particular to a method, apparatus, computer equipment and program product for detecting defects in metallized thin films. Background Technology

[0002] Film capacitors, as important electronic components, are widely used in power electronics, new energy vehicles, industrial control, and other fields. Metallized film is the core material of film capacitors, and its manufacturing process typically includes vacuum deposition, slitting, and winding. During the production of metallized film, various defects may appear on the film surface due to factors such as equipment precision, fluctuations in process parameters, and environmental conditions. These defects may include scratches, pinholes, uneven metal layers, and contamination points. The presence of these defects can affect the electrical performance and lifespan of the capacitor.

[0003] To ensure product quality, metallized thin films typically undergo defect detection on the production line. Currently, the most common detection method is machine vision-based inspection. Industrial cameras capture images of the film surface, and image processing algorithms are used to identify and classify defects. Common image processing methods include grayscale thresholding, edge detection, and template matching. These methods analyze features such as grayscale distribution, contrast, and geometric shape in the image to extract suspected defect areas from the background. With the development of deep learning technology, defect detection methods based on convolutional neural networks have also been gradually introduced into the field of thin film inspection, training models to learn visual feature representations of defects.

[0004] However, existing technologies still have some problems that prevent more accurate detection of defects in metallized thin films. Summary of the Invention

[0005] To solve the above-mentioned technical problems, or at least partially solve them, this application provides a method, apparatus, computer equipment, and program product for detecting defects in metallized thin films, which can improve the accuracy of detecting defects in metallized thin films.

[0006] In a first aspect, this application provides a method for detecting defects in metallized thin films, the method comprising the following steps: acquiring a transmitted light image of the metallized thin film to be detected; obtaining the sheet resistance distribution field of the metallized thin film through photoelectric mapping based on the light intensity distribution in the transmitted light image; applying a virtual voltage and using the sheet resistance distribution field as a coefficient field to solve the steady-state current continuity equation to obtain the potential distribution field; calculating a power density field based on the potential gradient of the potential distribution field and the sheet resistance distribution field, the power density field characterizing the degree of energy concentration caused by current congestion; and identifying defects in the metallized thin film based on the power density field and the transmitted light image.

[0007] Optionally, obtaining the sheet resistance distribution field of the metallized thin film through photoelectric mapping further includes the following correction steps: acquiring a reflected light image of the metallized thin film to be tested, and spatially registering the reflected light image with the transmitted light image; calculating the transmission-to-reflection ratio feature based on the transmitted light image and the reflected light image, and identifying non-metallic foreign object regions based on the transmission-to-reflection ratio feature; correcting the sheet resistance value corresponding to the non-metallic foreign object region, and correcting the sheet resistance value of the non-metallic foreign object region to a high resistance value, so as to obtain the corrected sheet resistance distribution field.

[0008] Optionally, the transmittance-to-reflectance ratio feature is obtained by calculating the ratio of the reflectance to the transmittance of pixels in the reflected light image and the transmitted light image; based on the comparison between the transmittance-to-reflectance ratio feature and a preset metal discrimination threshold, a metal confidence coefficient is determined. When the transmittance-to-reflectance ratio feature is lower than the metal discrimination threshold, the metal confidence coefficient approaches 0; when the transmittance-to-reflectance ratio feature is higher than or equal to the metal discrimination threshold, the metal confidence coefficient is 1; the corrected sheet resistance distribution field is determined by the ratio of the initial sheet resistance distribution field to the metal confidence coefficient.

[0009] Optionally, the metallized thin film defect detection method further includes: extracting pixels with power densities higher than the initial power density threshold from the power density field based on an initial power density threshold, forming potential high-risk regions; performing connected component analysis on the potential high-risk regions to obtain multiple connected components, and calculating the characteristic connected length of each connected component; calculating the self-healing failure probability of the corresponding connected component based on the ratio of the characteristic connected length to a preset self-healing radius, wherein the self-healing failure probability characterizes the possibility that the defect cannot be isolated by the self-healing mechanism after breakdown; and generating a dynamic judgment threshold for each connected component based on the self-healing failure probability, wherein the dynamic judgment threshold decreases as the self-healing failure probability increases.

[0010] Optionally, the self-healing failure probability is obtained by mapping the ratio of the feature connectivity length to the preset self-healing radius using a monotonically increasing function. When the ratio is less than 1, the self-healing failure probability approaches 0; when the ratio is greater than 1, the self-healing failure probability approaches 1. The calculation formula for the dynamic judgment threshold is: in, Let be the dynamic threshold for determining the i-th connected component. The preset reference power density threshold, The preset sensitivity adjustment coefficient, The value range is 0-1. Let be the self-healing failure probability of the i-th connected component.

[0011] Optionally, the metallized thin film defect detection method includes: assigning a dynamic judgment threshold to all pixels within each connected region to form a dynamic judgment threshold field; calculating a normalized risk field based on the ratio of the power density field to the dynamic judgment threshold field, wherein the normalized risk field characterizes the degree to which the power density exceeds the judgment criterion; constructing a defect recognition neural network including a physical attention module; inputting the power density field and the dynamic judgment threshold field as physical prior information into the neural network; inputting the transmitted light image into the feature extraction branch of the neural network to obtain a visual feature map; in the feature extraction layer of the neural network, using the normalized risk field as a spatial attention weight through the physical attention module to perform weighted modulation on the visual feature map to obtain a weighted feature map; and generating a binary segmentation map of the defect based on the weighted feature map through the neural network, wherein the binary segmentation map identifies the spatial location and region of the defect.

[0012] Optionally, when training the neural network, a physical consistency loss term is introduced, which constrains the neural network's prediction results to have higher defect detection confidence in high-normalization-risk regions and lower defect detection confidence in low-normalization-risk regions; the physical consistency loss term is weighted and combined with the segmentation loss based on labeled data to form a joint loss function; the neural network is trained based on the joint loss function.

[0013] In a second aspect, this application provides a metallized thin film defect detection device, the device comprising at least one module, the at least one module being used to perform any of the metallized thin film defect detection methods described in the first aspect.

[0014] Thirdly, this application provides a computer device including a processor for executing a computer program stored in a memory to implement the metallization thin film defect detection method as described in any of the first aspects.

[0015] Fourthly, this application provides a computer program product containing instructions that, when executed by a computer device, cause the computer device to perform the metallization thin film defect detection method as described in any of the first aspects.

[0016] The technical solution provided in this application has the following advantages compared with the prior art: One of its beneficial effects and its working principle is that traditional machine vision inspection methods rely on the geometric morphological characteristics of defects for judgment, such as setting thresholds by measuring the area, length, or grayscale contrast of the defects. This judgment method is prone to missing detection when faced with small but potentially current-causing narrow necks or microcracks because their geometric dimensions do not meet the preset threshold. Conversely, some large-area shallow scratches, although visually significant, do not actually affect electrical performance because they do not interrupt the main current path, but are misjudged as serious defects because they exceed the area threshold.

[0017] This application converts a transmitted light image into a sheet resistance distribution field, applies a virtual voltage to this field, and solves the steady-state current continuity equation to obtain the potential distribution field. Based on the power density field calculated from the potential gradient and the sheet resistance field, the degree of current congestion and energy concentration at each location is quantified. This application uses this power density field as physical guidance information, combined with the transmitted light image, for defect identification. The power density field indicates which areas are physically at risk of current congestion. Defect identification comprehensively considers both the power density field and the transmitted light image; areas with high power density are given priority even if their visual features are weak, rather than relying solely on the salience of visual features.

[0018] This physics-guided identification method enables the detection process to differentiate the electrical risk level of defects. Small defects that cause severe current path contraction, while not prominent in transmitted light images, will result in a high-value region of power density field at that location, guiding the identification process to focus more on that area. Large but electrically safe shallow scratches, although visually obvious in the image, will have a reduced response from the identification process because the power density field at that location does not show any abnormality. This avoids the problems of missed defects and false positives caused by purely geometric judgments.

[0019] Therefore, the metallized thin film defect detection method provided in this application can improve the accuracy of detecting metallized thin film defects.

[0020] The second beneficial effect and its working principle are as follows: In the actual production and testing of metallized thin films, non-metallic foreign objects such as oxide spots, carbonization points, or oil stains often exist on the film surface. These foreign objects also exhibit low-grayscale dark areas in transmitted light imaging, making them visually difficult to distinguish from the dark areas caused by the increase in metal layer thickness. When the photoelectric inversion process uniformly treats all dark areas as changes in metal thickness, non-metallic foreign objects are incorrectly inverted into low-impedance conductive regions. In the subsequent virtual current field solution, the current is incorrectly calculated as passing through these supposedly insulated foreign object locations, causing the power density field to fail to reflect the true current flow around and congestion effect at the edges of the foreign objects.

[0021] This application acquires both transmitted and reflected light images simultaneously, and obtains the transmittance-to-reflectance ratio feature by calculating the ratio of transmittance to reflectance of pixels. Metallic thin films exhibit low transmittance and high reflectance due to the presence of free electrons, resulting in a high transmittance-to-reflectance ratio. Non-metallic foreign matter such as oxides, carbon powder, and oil stains exhibit low transmittance and low reflectance, with significantly lower transmittance-to-reflectance ratios than metallic materials. This application determines the metal confidence coefficient based on a comparison of the transmittance-to-reflectance ratio feature with a preset metal discrimination threshold, correcting the sheet resistance value corresponding to the non-metallic foreign matter region to a high resistance value. When solving the virtual current field, the corrected sheet resistance distribution field forces the simulated current to bypass the foreign matter region, forming a true current concentration pattern at the foreign matter edge. This dual-mode material identification correction mechanism allows the power density field to accurately reflect the conductor's true topology. When a non-metallic foreign matter blocks the current path, the power density field at its edge region correctly displays the high-risk characteristic of current congestion, guiding the subsequent defect identification process to pay more attention to these areas. This avoids the problem of missing detection in high-risk areas around foreign objects due to material misjudgment, and ensures that the test results remain accurate even in actual working conditions with surface contamination or oxidation.

[0022] Therefore, the metallized thin film defect detection method provided in this application can improve the accuracy of detecting metallized thin film defects.

[0023] The third beneficial effect and its working principle are as follows: Metallized film capacitors have self-healing capabilities, but the self-healing mechanism of metallized films has physical limits. When a point breaks down, the metal layer around the breakdown point melts instantly and retreats to form an insulating isolation ring. For isolated small-scale defects, after breakdown, the isolation ring formed by the melting of the surrounding metal can completely cover the dangerous area, resulting in successful self-healing. For continuous linear or clustered defects, after breakdown, because their spatial continuity exceeds the isolation capacity of the melting metal, the residual short-circuit path cannot be completely isolated, leading to failure of self-healing and permanent failure. Although the power density field accurately quantifies the location and intensity of current congestion, it does not contain spatial topological information about defects or an assessment of self-healing capabilities. If the subsequent identification process uses a uniform judgment standard for all high power density areas, it will be unable to distinguish between self-healable isolated defects and non-self-healable continuous defects.

[0024] This application performs connected component analysis on the power density field, grouping spatially continuous high-power-density pixels into connected components and calculating the characteristic connected length of each component. Based on the ratio of the characteristic connected length to a preset self-healing radius, the self-healing failure probability of the connected component is obtained through a monotonically increasing function mapping. When the connected length is much smaller than the self-healing radius, the failure probability approaches 0. When the connected length exceeds the self-healing radius, the failure probability approaches 1. This application generates a dynamic judgment threshold for each connected component based on the self-healing failure probability; the higher the failure probability of a connected component, the lower its corresponding judgment threshold. Conversely, the lower the failure probability of a connected component, the higher its corresponding judgment threshold.

[0025] This dynamic threshold generation mechanism provides physical constraint information for subsequent defect identification. For isolated small-scale defects, the corresponding threshold is higher due to their low probability of self-healing failure, and the subsequent identification process will apply a relatively lenient judgment standard to this area. For continuous long-distance defect bands, the corresponding threshold is lower due to their high probability of self-healing failure, and the subsequent identification process will apply a stricter judgment standard to this area.

[0026] Therefore, the metallized thin film defect detection method provided in this application can improve the accuracy of detecting metallized thin film defects. Attached Figure Description

[0027] Figure 1 is a schematic diagram of an application scenario for the metallized thin film defect detection method provided in the embodiments of this application; Figure 2 is a schematic diagram of one of the flowcharts of the metallized thin film defect detection method provided in the embodiments of this application; Figure 3 is a schematic diagram of another of the flowcharts of the metallized thin film defect detection method provided in the embodiments of this application; Figure 4 is a schematic diagram of a third of the flowcharts of the metallized thin film defect detection method provided in the embodiments of this application. Detailed Implementation

[0028] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0029] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0030] Before providing a detailed explanation of the embodiments of this application, let's first introduce the application scenarios involved in the embodiments of this application.

[0031] Figure 1 is a schematic diagram of the application scenario of the metallized thin film defect detection method provided in the embodiments of this application.

[0032] As shown in Figure 1, a metallized film defect detection device is installed at the quality inspection station of the film capacitor production line. The metallized film defect detection device performs the method described in the following embodiment to detect defects in the metallized film to be inspected and outputs the defect detection results for quality processing by the inspection personnel.

[0033] The metallized thin film defect detection method provided in this application embodiment can be loaded and executed by a metallized thin film defect detection device, the device including at least one module, the at least one module being used to execute the metallized thin film defect detection method described in the following embodiments.

[0034] As shown in Figures 2-4, the metallized thin film defect detection method provided in this application includes the following steps: S201: Acquiring a transmitted light image of the metallized thin film to be detected; In this application embodiment, the metallized thin film to be detected is optically acquired using a transmitted light imaging system. The transmitted light imaging system includes a light source, a thin film support stage, and an industrial camera. The light source is located on one side of the thin film, and the industrial camera is located on the other side of the thin film. Light passes through the thin film and is received by the camera.

[0035] In practice, the light source can be an LED surface light source or a halogen lamp. The industrial camera can be a CCD or CMOS image sensor. The camera's exposure time and gain parameters are adjusted according to the film's transmittance to ensure full utilization of the grayscale dynamic range of the acquired image.

[0036] In transmitted light images, areas with thicker metal layers or metal deposits exhibit lower grayscale values ​​(dark areas) due to stronger light absorption. Areas with thinner metal layers or defects have higher light transmittance and exhibit higher grayscale values ​​(bright areas). The acquired transmitted light images are stored in the form of a digital image matrix, where each pixel corresponds to a spatial location on the thin film, and the pixel value represents the transmitted light intensity at that location.

[0037] S202: Based on the light intensity distribution in the transmitted light image, the sheet resistance distribution field of the metallized thin film is obtained through photoelectric mapping relationship; according to the Lambert-Beer law, for a metal thin film, the transmitted light intensity decreases exponentially with the thickness of the metal layer, while the sheet resistance is inversely proportional to the thickness, thereby establishing a functional mapping between the transmitted light intensity and the sheet resistance.

[0038] Before implementing this step, a mapping model needs to be established through a calibration process.

[0039] The calibration method is as follows: Select multiple standard metallized thin film samples with known thickness and sheet resistance, acquire their transmitted light images, measure the image grayscale values, and simultaneously measure the actual sheet resistance value of the samples using a four-probe tester. Fit the grayscale values ​​to the sheet resistance values ​​to establish a lookup table or fitting function. The fitting function can be in exponential or polynomial form, the specific form being determined based on the characteristics of the metal material and its thickness range.

[0040] After calibration, the transmitted light image of the thin film to be tested is processed. First, flat-field correction is performed on the image to eliminate the effects of light source inhomogeneity and camera response differences. Then, grayscale values ​​are read pixel by pixel, and according to a pre-established mapping model, the grayscale value of each pixel is converted into its corresponding sheet resistance value. The converted data is organized in the form of a two-dimensional array, constituting the sheet resistance distribution field. ,in Represents pixel coordinates, This indicates the sheet resistance at that location, expressed in ohms per square (Ω / □).

[0041] This step realizes the conversion from the optical image domain to the electrical parameter domain, providing input parameters for subsequent virtual current field simulation.

[0042] S301: Obtaining the sheet resistance distribution field of the metallized thin film through photoelectric mapping further includes the following correction steps: The sheet resistance distribution field obtained in step S202 is based on an implicit assumption: all regions in the transmitted light image that cause a decrease in light intensity correspond to changes in metal thickness. However, in actual production environments, the surface of the metallized thin film may contain non-metallic foreign matter such as oxide spots, carbonization points, and oil stains. These foreign matter also exhibit dark area characteristics in transmitted light imaging, but their electrical properties are those of insulators or high-resistivity materials, rather than conductive metal layers.

[0043] If a non-metallic foreign object is mistakenly identified as an increase in metal thickness, the sheet resistance field obtained in step S202 will mark that location as a low-impedance region, leading to an incorrect assumption that current can pass through these insulated locations during subsequent virtual current field calculations. This will cause the power density field to fail to reflect the actual current flow around and congestion effects at the edge of the foreign object. To address this issue, this application introduces a material property identification and sheet resistance correction process based on step S202, distinguishing between metallic materials and non-metallic foreign objects by adding reflected light channel information.

[0044] S302: Acquire a reflected light image of the metallized thin film to be tested, and spatially register the reflected light image with the transmitted light image; simultaneously with acquiring the transmitted light image (step S201), acquire a reflected light image of the same field of view through a reflected light imaging system. The reflected light imaging system has a reflected light camera set on the thin film light source side to receive the reflected light from the thin film surface.

[0045] In practice, the reflected light camera and the light source are positioned on the same side of the thin film, while the transmitted light camera is located on opposite sides of the thin film. When the light emitted by the light source strikes the surface of the thin film, part of the light is reflected and received by the reflected light camera; the other part of the light passes through the thin film and is received by the transmitted light camera.

[0046] Both the transmitted light camera and the reflected light camera are fixedly mounted on the frame of the inspection system. The optical axes of both cameras are perpendicular to the thin film plane, and the centers of their fields of view are aligned with the same location on the thin film. During the installation and commissioning phase, a one-time spatial registration calibration must be performed using a calibration plate or standard sample to ensure that the images acquired by the two cameras correspond to the same area of ​​the thin film at the pixel level. After calibration, the camera positions remain fixed, and the transmitted light and reflected light images automatically maintain their spatial registration relationship during subsequent acquisition.

[0047] The dual-camera synchronous triggering mechanism enables the synchronous acquisition of transmitted light images and reflected light images, ensuring that the two images correspond to the same instantaneous state of the thin film.

[0048] In reflected light images, the metal thin film exhibits strong light reflection due to the presence of free electrons, resulting in high grayscale values ​​(bright areas). Non-metallic foreign matter such as oxides, toner, and oil stains mainly absorb or diffuse light, exhibiting low reflectivity and low grayscale values ​​(dark areas).

[0049] S303: Calculate the transmittance-reflection ratio feature based on the transmitted light image and the reflected light image, and identify non-metallic foreign object regions based on the transmittance-reflection ratio feature; the transmittance-reflection ratio feature is obtained by calculating the ratio of the reflectance to the transmittance of the pixels in the reflected light image and the transmitted light image; specifically, in this embodiment, the material properties are determined by utilizing the difference in the combined transmittance and reflectance features between metallic and non-metallic materials.

[0050] First, the registered transmitted light image and reflected light image are normalized by mapping the gray values ​​of the two images to the [0,1] interval, respectively, to obtain the normalized transmittance and normalized reflectance. The normalization method is to subtract the minimum value from the image gray value and then divide by the gray value range, or to use standard image normalization methods such as histogram equalization.

[0051] The normalized transmittance is expressed as: The normalized reflectance is expressed as: Then, the transmittance inverse feature is calculated pixel by pixel: in, To prevent the use of zero decimals, this is used to avoid division by zero. In practice, it is usually set to a value of [value missing]. arrive .

[0052] Transparency and Inverse Characteristics This reflects the optical response mode of the material. For metallic materials, this manifests as low transmittance and high reflectance, i.e., low transmittance (T) and high reflectance (R), resulting in a large γ value.

[0053] For non-metallic foreign matter (such as oxides and pollutants), it exhibits low permeability and low reflectivity, that is, both T and R are low, so the γ value is small.

[0054] Based on the comparison between the transmittance-to-reflection ratio feature and the preset metal discrimination threshold, a metal confidence coefficient is determined. When the transmittance-to-reflection ratio feature is lower than the metal discrimination threshold, the metal confidence coefficient approaches 0. When the transmittance-to-reflection ratio feature is higher than or equal to the metal discrimination threshold, the metal confidence coefficient is 1.

[0055] Specifically, material discrimination is based on transmittance / reflectance characteristics. A metal discrimination threshold is set. The threshold is determined by selecting known metal samples and typical non-metallic foreign objects (such as oxide spots, carbon powder, and oil stains) and calculating their γ values ​​respectively.

[0056] Statistical analysis is performed on the γ value distributions of the two types of samples to select a threshold that can effectively distinguish between them. The median of the γ value distributions of the two types of samples or the optimal threshold can usually be determined through ROC curve analysis.

[0057] To further quantify the confidence level of material properties, a metal confidence coefficient is introduced. .

[0058] when hour, Approaching 0; specifically, in the embodiments of this application: Where k is a preset steepness parameter that controls the degree of abruptness of the transition.

[0059] when hour, .

[0060] Through the above processing, the distribution of metal confidence coefficients across the entire field is obtained. This distribution identifies which locations are actual metallic conductors and which locations may be non-metallic foreign objects.

[0061] S304: Correct the sheet resistance value corresponding to the non-metallic foreign object region, and correct the sheet resistance value of the non-metallic foreign object region to a high resistance value, so as to obtain the corrected sheet resistance distribution field.

[0062] The corrected sheet resistance distribution field is determined by the ratio of the initial sheet resistance distribution field to the metal confidence coefficient.

[0063] Specifically, in this embodiment of the application, this step corrects the initial sheet resistance distribution field obtained in step S202 based on the material property information identified in step S303.

[0064] The principle of the correction is as follows: non-metallic foreign bodies should be considered as insulators or extremely high-impedance regions electrically, and their sheet resistance should be much greater than that of normal metallic layers. By forcibly correcting the sheet resistance of non-metallic regions to a maximum value, these regions can be numerically equivalent to open circuits or high-resistance barriers in subsequent virtual current field solutions.

[0065] In the embodiments of this application, the metal confidence coefficient is used. For the initial sheet resistance distribution field Corrections are made. The corrected sheet resistance distribution field. Determined by the following formula: in To prevent zero values, the value should be consistent with step S303.

[0066] From this modified formula, it can be seen that: when When =1 (metal region), Approximately equal to The resistance remains unchanged.

[0067] when When the value approaches 0 (in the non-metallic foreign object region), the α value calculated by the function in step S303 will be very small. At this time, because the denominator is extremely small, the sheet resistance is amplified, which is numerically equivalent to an open circuit.

[0068] Corrected sheet resistance distribution field It truly reflects the conductor topology of the thin film: the metallic region retains its original sheet resistance distribution characteristics, while the non-metallic foreign matter region is marked as a high impedance region.

[0069] S203: Apply a virtual voltage, using the sheet resistance distribution field as a coefficient field, and solve the steady-state current continuity equation to obtain the potential distribution field. This step, based on the sheet resistance distribution field obtained in step S304, numerically solves the current field equation to obtain the potential distribution within the thin film. This potential distribution reflects the current distribution in a non-uniform sheet resistance medium under virtual voltage excitation.

[0070] In practical implementation, the thin film is regarded as a two-dimensional resistive network, and the corrected sheet resistance distribution field is... The resistance parameters at each location in the network are defined.

[0071] First, a virtual voltage is applied to the boundary of the computational domain. The boundary conditions are set as follows: two opposite sides of the thin film are selected as the voltage application boundaries, with one side set to a high potential. The other side is set to low potential. Usually makes voltage difference It can be set to a unit voltage (e.g., 1V) for subsequent normalization processing. The other two sides perpendicular to the voltage application direction are set as insulating boundary conditions, i.e., the normal component of the current density is zero.

[0072] Under the above boundary conditions, the potential distribution inside the thin film Satisfies the steady-state current continuity equation: This equation describes the distribution of potential under steady-state conditions in a non-uniform resistive medium.

[0073] The equation is an elliptic partial differential equation. Given the boundary conditions and the corrected field resistance distribution, the potential distribution can be obtained by numerical solution.

[0074] Numerical solution methods can include the finite difference method, the finite element method, or the finite volume method. In this embodiment, the finite difference method is used. The computational domain is discretized into a regular grid, with each grid node corresponding to a pixel in the image. The differential operators in the equations are discretized using the central difference scheme, transforming the partial differential equations into a system of linear algebraic equations. The coefficient matrix of this system is sparse, and iterative methods are used to solve it. Alternatively, the conjugate gradient method, the Gauss-Seidel iteration method, or the multigrid method can be employed.

[0075] The electric potential distribution obtained by solving It is stored in the form of a two-dimensional array, where each element of the array corresponds to the potential value at a location on the thin film.

[0076] S204: Calculate the power density field based on the potential gradient of the potential distribution field and the sheet resistance distribution field. The power density field characterizes the degree of energy concentration caused by current congestion. This step calculates the local power density at each location in the thin film based on the potential distribution field obtained in step S203 and the corrected sheet resistance distribution field obtained in step S304, and quantifies the degree of energy concentration caused by current congestion.

[0077] The calculation of power density is based on Joule's law of heating. For a two-dimensional thin film, the power density per unit area can be expressed as the product of the square of the current density and the sheet resistance. According to Ohm's law, there is a definite relationship between the current density and the potential gradient, from which the formula for calculating the power density field can be derived: in, The magnitude of the potential gradient, This is the corrected sheet resistance distribution field. In specific implementation, the potential distribution field obtained in step S203 is first... Gradient calculation is performed. The gradient calculation uses numerical differentiation methods. For two-dimensional discrete data, a central difference scheme is used. in, and This represents the pixel spacing, typically set to 1 (corresponding to one pixel unit). For boundary pixels, forward or backward differencing is used.

[0078] After calculating the x and y components of the potential gradient, the gradient magnitude is obtained: Then, the square of the potential gradient modulus is divided by the corrected sheet resistance distribution field to obtain the power density field: Power density field It is stored in the form of a two-dimensional array, where each element represents the local power density value at the corresponding location.

[0079] S205: Based on the initial power density threshold, extract pixels with power densities higher than the initial power density threshold from the power density field to form potentially high-risk areas.

[0080] This step performs preliminary screening of the power density field obtained in step S204, extracting pixels with higher power density values ​​as input for subsequent connected component analysis.

[0081] In practice, an initial power density threshold is set. The principle for setting this threshold is to adopt a relatively lenient standard to ensure that all areas that may have the risk of current congestion are included in the analysis scope, and to avoid missing potential high-risk points.

[0082] The specific value can be determined in the following way: for the power density field Perform statistical analysis and calculate its mean. and standard deviation ,set up , where k is a preset coefficient, usually taking a value between 1 and 2. Alternatively, a certain percentile of the power density field can be used as the threshold, such as the 70th or 80th percentile.

[0083] Thresholding is applied to the power density field to extract values ​​that meet the conditions. All pixels, which constitute a potentially high-risk area. The extraction result can be represented as a binary image, where high-risk pixels are marked as 1 and the rest as 0.

[0084] It should be noted that a relatively lenient threshold is used here to ensure that no potentially high-risk points are overlooked.

[0085] S401: Perform connected component analysis on the potential high-risk area to obtain multiple connected components, and calculate the characteristic connectivity length of each connected component.

[0086] This step performs connected component analysis on the potential high-risk regions extracted in step S205, merging spatially adjacent high-risk pixels into multiple connected components, and calculating the spatial topological features of each connected component.

[0087] Connectivity analysis employs standard image connectivity analysis algorithms. In this embodiment, the 8-connectivity criterion is used, meaning that two pixels are considered connected if they are adjacent in a horizontal, vertical, or diagonal direction. The connectivity labeling algorithm can employ a two-pass scan algorithm or a queue-based seed-filling algorithm.

[0088] By analyzing connected components, potentially high-risk areas are identified. Divided into multiple non-overlapping connected sub-regions , where n is the number of connected components. Each connected component This represents a spatially continuous region of high power density. For each connected component... Calculate its characteristic connectivity length .

[0089] Feature connectivity length is used to quantify the spatial extent of connected domains, reflecting the geometric continuity of high-risk regions.

[0090] In this embodiment, the characteristic connectivity length is calculated using the skeleton length method. For connected components... Morphological thinning is performed to extract the skeleton (central axis). Skeleton extraction can employ the Zhang-Suen thinning algorithm or other standard skeleton extraction algorithms. After skeleton extraction, the number of pixels in the skeleton is counted, multiplied by the pixel spacing, and the skeleton length is obtained as the feature connectivity length. .

[0091] S402: Calculate the self-healing failure probability of the corresponding connected domain based on the ratio of the characteristic connected length to the preset self-healing radius. The self-healing failure probability represents the possibility that the defect cannot be isolated by the self-healing mechanism after it breaks down.

[0092] This step, based on the self-healing physical mechanism of thin-film capacitors, assesses whether each connected domain can be isolated through the self-healing mechanism after breakdown, thereby determining its failure risk level. The physical process of the self-healing mechanism is as follows: when a point on the thin film breaks down, the stored electrical energy is released within nanoseconds. The metal layer around the breakdown point melts and recedes instantaneously due to Joule heating, forming a circular or elliptical metal blank area (insulating isolation ring) around the breakdown point, blocking the short-circuit path and achieving fault isolation. The effective range of self-healing isolation is determined by the self-healing radius. Characterization. This parameter is determined by the material properties and process parameters of the metal layer, including the metal layer thickness, sheet resistance, and energy storage density per unit area.

[0093] The size of the metal blank area formed after self-healing in actual products can be determined in the following ways: based on engineering experience data from the film capacitor industry or through accelerated aging tests and artificial breakdown tests; or calculated based on metal layer parameters (thickness, sheet resistance) and energy storage density through energy balance relationships. In the embodiments of this application, As preset parameters, they are predetermined and stored in the device based on the process parameters of the specific product.

[0094] For connected components Calculate its characteristic connectivity length With self-healing radius The ratio: This ratio reflects the relationship between the spatial scale of the connected domain and its self-healing isolation capability.

[0095] Based on ratio Calculate the probability of self-healing failure. .

[0096] Specifically, the self-healing failure probability is obtained by mapping the ratio of the feature connectivity length to the preset self-healing radius using a monotonically increasing function. When the ratio is less than 1, the self-healing failure probability approaches 0, and when the ratio is greater than 1, the self-healing failure probability approaches 1.

[0097] In this embodiment, the Sigmoid function is used for mapping, and its form is: in, The steepness parameter controls the transition rate from low failure probability to high failure probability. In the embodiments of this application, s can take values ​​from 3 to 10.

[0098] Based on the above calculations, for each connected component... Obtain a self-healing failure probability value .

[0099] S403: Based on the self-healing failure probability, generate a dynamic judgment threshold for each connected component, wherein the dynamic judgment threshold decreases as the self-healing failure probability increases.

[0100] This step dynamically generates a judgment threshold for each connected component based on its self-healing failure probability. This threshold will guide the application of different judgment strictnesses to areas with different risk levels during subsequent defect identification.

[0101] The principle for generating dynamic decision thresholds is as follows: for connected components with a high probability of self-healing failure, lower the decision threshold and increase detection sensitivity; for connected components with a low probability of self-healing failure, increase the decision threshold and decrease detection sensitivity to avoid over-intercepting tolerable defects.

[0102] The formula for calculating the dynamic determination threshold is: in, Let be the dynamic threshold for determining the i-th connected component. The preset reference power density threshold, The preset sensitivity adjustment coefficient, The value range is 0-1. Let be the self-healing failure probability of the i-th connected component.

[0103] parameter The reference power density threshold is determined by statistical analysis of the sample power density field, usually using the high percentile (such as the 90th or 95th percentile) of the power density field.

[0104] parameter In this embodiment of the application, the adjustment range of the dynamic threshold is controlled. The possible values ​​are 0.3 to 0.7.

[0105] S206: Identify defects in the metallized thin film based on the power density field and the transmitted light image.

[0106] Specifically, firstly, the dynamic decision threshold generated in step S403 for each connected component is assigned to all pixels within that connected component to form a dynamic decision threshold field. For each connected component... The corresponding dynamic judgment threshold is The threshold value is assigned to all pixels within the connected component. .

[0107] For pixels that do not belong to any connected component (i.e., locations not extracted as potential high-risk areas in step S205), their dynamic determination threshold can be set to a preset baseline threshold. .

[0108] This yields the dynamic threshold field. .

[0109] Dynamic determination threshold field Stored in a two-dimensional array, along with the power density field With the same spatial resolution, the threshold value for each location reflects the risk level and the rigor of the judgment for the area to which that location belongs.

[0110] Based on the ratio of the power density field to the dynamic judgment threshold field, a normalized risk field is calculated, which characterizes the degree to which the power density exceeds the judgment criterion.

[0111] Normalized risk field The calculation formula is: in, This is the corrected power density field. For dynamic determination of the threshold field.

[0112] The normalized risk field combines the absolute magnitude of power density with a dynamic judgment criterion based on self-healing physics, and can more accurately reflect the true risk level of defects compared to a single power density field.

[0113] A defect recognition neural network incorporating a physical attention module is constructed. In this embodiment, a convolutional neural network based on an encoder-decoder architecture is used for defect recognition. The network is based on the U-Net framework, a network structure widely used in image segmentation tasks. U-Net extracts multi-scale features through an encoder, restores spatial resolution through a decoder, and preserves detailed information through skip connections.

[0114] The network's encoder consists of four downsampling stages. Each stage contains two convolutional layers and one max-pooling layer. The convolutional layers use 3×3 kernels with ReLU activation. The max-pooling layers use 2×2 kernels with a stride of 2. After four downsampling stages, the spatial resolution of the feature maps decreases sequentially to 1 / 2, 1 / 4, 1 / 8, and 1 / 16 of the original image, while the number of feature channels gradually increases.

[0115] The network's decoder consists of four upsampling stages. Each stage contains one upsampling layer and two convolutional layers. The upsampling layers use bilinear interpolation or transposed convolution to magnify the spatial resolution of the feature maps by a factor of two. The convolutional layers also use 3×3 convolutional kernels and the ReLU activation function.

[0116] Features are passed between the encoder and decoder via skip connections. The feature map output from stage i of the encoder is passed to the input of stage (5-i) of the decoder through a channel concatenation operation, enabling the decoder to utilize the spatial detail information retained in the encoder.

[0117] The network's output layer uses 1×1 convolutions to reduce the number of channels in the feature map to 1, and then uses a Sigmoid activation function to map the output values ​​to the [0,1] interval to generate a defect probability map.

[0118] In the aforementioned infrastructure, this application inserts physical attention modules after the second, third, and fourth downsampling stages of the encoder. Each physical attention module receives two inputs: the visual feature map of the current layer and a normalized risk field.

[0119] The processing flow of the physics attention module is as follows: First, the normalized risk field is... Downsampling is performed using bilinear interpolation to achieve the same spatial size as the current level's visual feature map. For example, after the second stage of the encoder, if the feature map size is 1 / 4 of the original image, then... Downsampled to 1 / 4 size, denoted as .

[0120] Then, the normalized risk field after downsampling (l represents the layer) Feature transformation is performed through a 1×1 convolution operation. The number of output channels of the 1×1 convolution is the same as the number of channels of the current layer's visual feature map, enabling subsequent channel-by-channel modulation. The convolution output is then processed by a sigmoid activation function to generate an attention weight map. : in, The value range is [0,1].

[0121] Finally, the attention weight map Visual feature map Perform element-wise multiplication to obtain the weighted feature map: The weighted feature map, as the output of this level, continues to be passed to the next level or the decoder.

[0122] By inserting physical attention modules at multiple levels, the network is guided by physical fields at the shallow, middle, and deep layers during the extraction of visual features, thus achieving multi-scale physical constraints.

[0123] The corrected power density field and the dynamic decision threshold field are input into the neural network as physical prior information.

[0124] During the training and inference phases, the normalized risk field The normalized risk field is provided to the network as an auxiliary input. The normalized risk field is calculated from the modified power density field and the dynamic decision threshold field through the above steps. Therefore, these two physical fields are indirectly input into the network in the form of the normalized risk field.

[0125] The transmitted light image is input into the feature extraction branch of the neural network to obtain a visual feature map.

[0126] The transmitted light image serves as the primary input to the network, fed into the first convolutional layer of the encoder. The encoder extracts multi-scale visual features from the image through multiple convolutional layers and downsampling operations, including information on edges, textures, and shapes. Visual feature maps of different scales are extracted at different levels of the encoder.

[0127] In the feature extraction layer of the neural network, the normalized risk field is used as a spatial attention weight by the physical attention module to perform weighted modulation on the visual feature map to obtain a weighted feature map.

[0128] As mentioned earlier, the physical attention module performs weighted modulation of the visual feature map at multiple levels of the encoder. In the high-value region of the normalized risk field (i.e., the region where the power density is relatively high relative to the dynamic decision threshold), the attention weight is larger, and the visual features are enhanced; in the low-value region of the normalized risk field, the attention weight is smaller, and the visual features are suppressed.

[0129] This modulation mechanism enables the network to automatically focus on high-risk areas identified by physical fields when processing images, while reducing the response to low-risk areas, thus guiding the network's feature learning process according to physical laws.

[0130] The neural network generates a binary segmentation map of the defect based on the weighted feature map, and the binary segmentation map identifies the spatial location and region of the defect.

[0131] The weighted feature maps continue to pass through the encoder, and after the deepest feature extraction layer, they enter the decoder. The decoder gradually restores the spatial resolution of the feature maps to the original image size through upsampling and convolution operations. During the decoding process, skip connections stitch the feature maps of corresponding layers from the encoder to the decoder, supplementing spatial detail information.

[0132] The final layer output of the decoder is a single-channel feature map, which is then processed by a sigmoid activation function to generate a defect probability map. The value of each pixel represents the probability that the location belongs to a defect, ranging from [0,1]. The probability map is binarized by setting a threshold (usually 0.5): when... When the value is 1, the pixel is marked as a defect; otherwise, it is marked as a non-defect (value 0). The binarized result is the final defect binary segmentation map.

[0133] When training the neural network, a physical consistency loss term is introduced, which constrains the neural network's prediction results to have higher defect detection confidence in high normalization risk regions and lower defect detection confidence in low normalization risk regions.

[0134] The training dataset consists of the following: each training sample contains a transmitted light image, a corresponding reflected light image, a defect ground truth mask annotated by professionals or existing detection systems, and physical field data (including a corrected power density field, a dynamic decision threshold field, and a normalized risk field) obtained through offline calculations in steps S201 to S403. The reflected light image is used to perform the material correction process in steps S301 to S304, while the transmitted light image and the reflected light image are used together to generate the physical field data.

[0135] Network training uses a joint loss function, which consists of two parts: the first part is the standard segmentation loss. A combination of binary cross-entropy loss and Dice loss is used: The binary cross-entropy loss is defined as: Dice loss is defined as: Where S is the set of image pixels, Label the defect with a truth value (0 or 1). This represents the probability of defects predicted by the network.

[0136] The second part is the loss of physical consistency. This loss term constrains the consistency between the network prediction and the normalized risk field through weighted cross-entropy: in, This is a hyperparameter, and in this embodiment, it can be 0.5 to 2.0.

[0137] Weighting coefficient This weighting coefficient results in a larger loss weight in high normalization risk areas, and the network is more severely penalized for prediction errors in these areas, thereby guiding the network to pay more attention to the accuracy of physically high-risk areas.

[0138] The physical consistency loss term is weighted and combined with the segmentation loss based on labeled data to form a joint loss function.

[0139] in, This is a balancing coefficient that controls the relative weights of the two losses. In the embodiments of this application, The possible values ​​are 0.1 to 0.5.

[0140] The neural network is trained based on the joint loss function.

[0141] Training employs the standard backpropagation algorithm and the Adam optimizer. In each training iteration, the network receives a transmitted light image and a normalized risk field as input, outputs a defect probability map, calculates the gradient based on the joint loss function, and updates the network parameters.

[0142] The trained network is able to generate more accurate defect segmentation maps.

[0143] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0144] In the various embodiments of this application, unless otherwise specified or logically conflicting, the terminology and / or descriptions between different embodiments are consistent and can be referenced mutually. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. In the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. In the textual description of the embodiments of this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. In this application, "first," "second," and various numerical designations are only for ease of description and are not used to limit the scope of the embodiments of this application. For example, they are used to distinguish different messages, rather than to describe a specific order or sequence.

[0145] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. The order of the process numbers does not imply the order of execution; the execution order of each process should be determined by its function and internal logic.

[0146] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for detecting defects in metallized thin films, characterized in that, The method for detecting defects in metallized thin films includes the following steps: acquiring a transmitted light image of the metallized thin film to be detected; obtaining the sheet resistance distribution field of the metallized thin film through photoelectric mapping based on the light intensity distribution in the transmitted light image; applying a virtual voltage and using the sheet resistance distribution field as a coefficient field to solve the steady-state current continuity equation to obtain the potential distribution field; calculating the power density field based on the potential gradient of the potential distribution field and the sheet resistance distribution field, wherein the power density field characterizes the degree of energy concentration caused by current congestion; and identifying defects in the metallized thin film based on the power density field and the transmitted light image.

2. The method for detecting defects in metallized thin films according to claim 1, characterized in that, Obtaining the sheet resistance distribution field of the metallized thin film through photoelectric mapping also includes the following correction steps: acquiring a reflected light image of the metallized thin film to be detected, and spatially registering the reflected light image with the transmitted light image; calculating the transmission-to-reflection ratio feature based on the transmitted light image and the reflected light image, and identifying non-metallic foreign object regions based on the transmission-to-reflection ratio feature; The sheet resistance value corresponding to the non-metallic foreign object region is corrected to a high resistance value to obtain a corrected sheet resistance distribution field.

3. The method for detecting defects in metallized thin films according to claim 2, characterized in that, The transmittance-to-reflectance ratio feature is obtained by calculating the ratio of the reflectance to the transmittance of pixels in the reflected light image and the transmitted light image. Based on the comparison between the transmittance-to-reflectance ratio feature and a preset metal discrimination threshold, a metal confidence coefficient is determined. When the transmittance-to-reflectance ratio feature is lower than the metal discrimination threshold, the metal confidence coefficient approaches 0. When the transmittance-to-reflectance ratio feature is higher than or equal to the metal discrimination threshold, the metal confidence coefficient is 1. The corrected sheet resistance distribution field is determined by the ratio of the initial sheet resistance distribution field to the metal confidence coefficient.

4. The method for detecting defects in metallized thin films according to claim 2, characterized in that, The metallized thin film defect detection method further includes: extracting pixels with power densities higher than the initial power density threshold from the power density field based on an initial power density threshold, forming potential high-risk regions; performing connected component analysis on the potential high-risk regions to obtain multiple connected components, and calculating the characteristic connected length of each connected component; calculating the self-healing failure probability of the corresponding connected component based on the ratio of the characteristic connected length to a preset self-healing radius, wherein the self-healing failure probability characterizes the possibility that the defect cannot be isolated by the self-healing mechanism after breakdown; and generating a dynamic judgment threshold for each connected component based on the self-healing failure probability, wherein the dynamic judgment threshold decreases as the self-healing failure probability increases.

5. The method for detecting defects in metallized thin films according to claim 4, characterized in that, The self-healing failure probability is obtained by mapping the ratio of the feature connectivity length to the preset self-healing radius using a monotonically increasing function. When the ratio is less than 1, the self-healing failure probability approaches 0; when the ratio is greater than 1, the self-healing failure probability approaches 1. The calculation formula for the dynamic judgment threshold is: in, Let be the dynamic threshold for determining the i-th connected component. The preset reference power density threshold The preset sensitivity adjustment coefficient The value range is 0-1 Let be the self-healing failure probability of the i-th connected component.

6. The method for detecting defects in metallized thin films according to claim 4, characterized in that, The metallized thin film defect detection method includes: assigning a dynamic judgment threshold to all pixels within each connected region to form a dynamic judgment threshold field; calculating a normalized risk field based on the ratio of the power density field to the dynamic judgment threshold field, wherein the normalized risk field characterizes the degree to which the power density exceeds the judgment criterion; constructing a defect recognition neural network including a physical attention module; inputting the power density field and the dynamic judgment threshold field as physical prior information into the neural network; inputting the transmitted light image into the feature extraction branch of the neural network to obtain a visual feature map; in the feature extraction layer of the neural network, using the normalized risk field as spatial attention weights through the physical attention module to perform weighted modulation on the visual feature map to obtain a weighted feature map; and generating a binary segmentation map of the defect based on the weighted feature map through the neural network, wherein the binary segmentation map identifies the spatial location and region of the defect.

7. The method for detecting defects in metallized thin films according to claim 6, characterized in that, When training the neural network, a physical consistency loss term is introduced, which constrains the neural network's prediction results to have higher defect detection confidence in high-normalized risk regions and lower defect detection confidence in low-normalized risk regions. The physical consistency loss term is weighted and combined with the segmentation loss based on labeled data to form a joint loss function. The neural network is then trained based on the joint loss function.

8. A metallized thin film defect detection device, characterized in that, The apparatus includes at least one module for performing the metallized thin film defect detection method according to any one of claims 1-7.

9. A computer device, characterized in that, The computer device includes a processor for executing a computer program stored in a memory to implement the metallized thin film defect detection method according to any one of claims 1-7.

10. A computer program product containing instructions, characterized in that, When the instructions are executed by a computer device, the computer device performs the metallization thin film defect detection method as described in any one of claims 1-7.