An industrial anomaly detection generative data augmentation method based on light and shadow decoupling and edge constraint

CN122335747BActive Publication Date: 2026-10-27SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610437526.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-03
Publication Date
2026-10-27
Estimated Expiration
2046-04-03

AI Technical Summary

Technical Problem

工业无监督异常检测对像素级的空间对齐要求极高,而现有的生成式大模型在进行光照重绘时,往往无法严格保持原图的几何约束,不仅会造成边缘特征的偏移,甚至会凭空生成或抹除零部件的微观拓扑纹理

Benefits of technology

显著抑制结构幻觉并实现像素级坐标对齐:通过将扩散模型的功能定位由“全图生成”转变为受控的“虚拟光源渲染”,并利用边缘先验进行物理边界约束,有效避免了生成式模型对工业零部件微观拓扑结构的破坏。这种方式确保了增强图像与原始图像在像素级别上的高度对齐,消除了传统生成式数据增强中常见的特征漂移问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122335747B_ABST
    Figure CN122335747B_ABST
Patent Text Reader

Abstract

The application provides an industrial anomaly detection generative data enhancement method based on light and shadow decoupling and edge constraint. First, a generative model is used to generate light and shadow components that are geometrically topologically aligned with the original image, and based on the intrinsic image decomposition theory, the light and shadow components are superimposed back to the original image, instead of directly generating a complete target image. A spatial constraint condition protection is introduced, the edge contour of the original image is extracted as a hard constraint input, the potential diffusion model is forced to perform light and shadow rendering within a specific topological range, so that the generated shadow mask is accurately overlapped with the original geometry of the part. According to the difference of different industrial simulation scenes, a specific optical mixing function is matched according to the type of light. The application adopts the above-mentioned industrial anomaly detection generative data enhancement method based on light and shadow decoupling and edge constraint, which completely eliminates feature drift and structure illusion, and significantly improves the detection accuracy under complex light.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data augmentation, and in particular to a generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints. Background Technology

[0002] In modern industrial visual quality control, due to the extreme scarcity of real defect samples, unsupervised anomaly detection models based on architectures such as knowledge distillation have become the mainstream paradigm. The core logic of these models is to train using only normal samples and construct an ideal "normal feature manifold" by extracting features. However, this unsupervised model, which heavily relies on a single distribution, has a fatal vulnerability in practical deployment: it is extremely sensitive to illumination domain shifts. Because the model is trained under ideal, uniform lighting conditions, when deployed to complex real production lines, uncontrollable physical light variations such as local overexposure, underexposure, or directional shadows can lead to severe feature drift. Unsupervised models are highly prone to misclassifying these normal intrinsic shadows or reflections caused by ambient light as surface defects, resulting in a massive number of false positives. To alleviate this problem, the industry has attempted to use traditional data augmentation techniques such as linear adjustment of brightness and contrast at the two-dimensional pixel level. However, these shallow mappings cannot realistically simulate the complex diffuse reflection and highlights caused by changes in light angle in the three-dimensional physical world, nor can they reproduce the nonlinear response of camera sensors. More critically, recent attempts to introduce large-scale generative diffusion models to synthesize multi-illumination scenes to expand training data have revealed a severe "structural illusion" problem. Industrial unsupervised anomaly detection demands extremely high pixel-level spatial alignment, but existing large-scale generative models often fail to strictly maintain the geometric constraints of the original image during illumination redrawing. This not only causes edge feature shifts but can even generate or erase microscopic topological textures of components out of thin air. Any minute geometric deformation or topological disruption introduces irreversible structural noise into unsupervised distillation training, preventing the model from learning illumination-invariant features and further reducing its accuracy in locating real fine-grained defects. Therefore, achieving zero feature drift and absolute structural locking while using generative models to expand extreme illumination data has become a critical technical bottleneck in the field of industrial anomaly detection. Summary of the Invention

[0003] The purpose of this invention is to provide a generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints. By reducing the generative model to a controlled "virtual light source", the geometric edges of the parts are strictly locked, and a high-fidelity intrinsic shadow mask is generated. Thus, the training data manifold of the unsupervised anomaly detection model can be expanded at low cost and on a large scale with zero feature drift, which greatly improves the robustness of the model in complex lighting environments.

[0004] To achieve the above objectives, this invention provides a generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints, comprising the following steps: Acquire raw images of industrial parts Using edge detection operators Extract the high-frequency geometric topology of the original image to obtain a binary contour map. ; Binary contour map As a spatial guidance signal, it is injected into the potential diffusion model through a control network. Combined with preset lighting conditions, the description vector In the denoising process of the diffusion model, the forced diffusion model is only used when... The intrinsic shadow mask is obtained by rendering the lighting manifold within the constrained physical boundaries. ; Based on intrinsic image decomposition theory, the original image is... Treating it as a high-fidelity albedo substrate, using a nonlinear optical mixing function The generated intrinsic shadow mask Physical-level fusion with the original image yields fused features. ; Utilizing fused feature sets Constructing multi-illumination domain training manifolds is crucial for unsupervised anomaly detection models. By introducing feature consistency loss, the model is forced to extract stable intrinsic features under different lighting and shadow interference. .

[0005] Preferably, an edge detection operator is used. Extract the high-frequency geometric topology of the original image to obtain a binary contour map. This includes the following steps: Gaussian filtering on the original image Denoising preprocessing is performed, and then the gradient magnitudes of the original image in the horizontal and vertical directions are calculated using the first derivative operator Sobel. The original edge intensity map is obtained based on the gradient magnitudes in the horizontal and vertical directions. Then, the refined edge and edge confidence are calculated based on the gradient magnitudes in the horizontal and vertical directions. Based on edge refinement and edge confidence, some original edges are merged to obtain a high-frequency geometric topology that can define the three-dimensional geometric shape of an object. The extracted high-level topology is mapped to a binary space to generate a high-fidelity binary contour map: .

[0006] Preferably, the process of obtaining the original edge intensity map, thinning the edge, and determining the edge confidence based on the acquired gradient magnitudes in the horizontal and vertical directions includes the following steps: By comparing the horizontal gradient magnitude and the vertical gradient magnitude respectively, the local maximum points of the gradient are obtained, thereby initially locating the high-frequency components representing the edge of the component and generating the original edge intensity map. The gradient magnitudes in the horizontal and vertical directions are calculated separately to obtain the gradient response. Gradient responses greater than the first threshold are retained and compressed into a thinned edge with a single pixel width. Subsequently, edge confidence is calculated based on the gradient magnitudes in the horizontal and vertical directions.

[0007] Preferably, some of the original edges are merged to obtain a high-frequency geometric topology that can define the three-dimensional geometric shape of the object, specifically: A dual-threshold hysteresis detection mechanism is introduced, using a high threshold to lock strong edges with high confidence and a low threshold to lock weak edges with low confidence. The geometric topological properties between each weak edge and the strong edges in the neighborhood of the weak edge are calculated based on the refined edges. Based on the geometric topological properties, the weak edges and strong edges are merged into effective edges to form a complete contour and obtain a high-frequency geometric topological structure. If it is not connected to any strong edge, it is regarded as noise and discarded.

[0008] Preferably, the geometric topological properties between each weak edge and the strong edges in the neighborhood of the weak edge are calculated based on the refined edges. Based on the geometric topological properties, the weak edges and strong edges are merged into effective edges, specifically as follows: Based on the refined edge calculation, the spatial adjacency topology attribute between each weak edge and strong edge is calculated: through connected component tracking, if the weak edge is located within the connected extension path of the strong edge in the topological structure, the weak edge and the strong edge are merged into a valid edge to form a closed complete contour; conversely, if the geometric topology attribute of the weak edge shows that it has no spatial adjacency relationship with any of the strong edges, the weak edge is determined to be background noise interference and is removed.

[0009] Preferably, the binary contour map As a spatial guidance signal, it is injected into the potential diffusion model through a control network. Combined with preset lighting conditions, the description vector In the denoising process of the diffusion model, the forced diffusion model is only used when... The intrinsic shadow mask is obtained by rendering the lighting manifold within the constrained physical boundaries. ,include: Binary contour map As a spatial guidance signal, it is processed by the first encoder structure in the control network to obtain multi-scale spatial geometric features; In the denoising iteration of the latent space, the vector is described by the illumination condition. The intrinsic property stripping guided diffusion model focuses only on the evolution of the light and dark gradients; The binary contour map is fused with the temporal information of the diffusion model itself, and the latent variables are obtained by processing through the second encoder structure, where the first encoder structure and the second encoder structure are the same. Spatial geometric features are superimposed at the pixel level after each decoding block in the decoder structure and intermediate sampling blocks through zero convolutional layers; The control network intervenes in the latent variables of the diffusion model at each sampling step, forcing strict constraints on the light and shadow distribution. Within the locked topological boundaries; The denoised latent variables are restored to pixel space by the decoder, generating a pure grayscale intrinsic shadow mask. ; ; in, It represents random noise in the potential space.

[0010] Preferably, the generated intrinsic shadow mask Physical-level fusion with the original image yields fused features. For simulations of different operating conditions, the fusion formula is as follows: ; When simulating underexposed or dark environments Using the multiplication operator: ,in, This is element-wise multiplication; When simulating overexposure or highlight environments Employ a soft light blending operator; By introducing light and shadow transmission balance, nonlinear brightness and color temperature compensation, the realism of the synthesized image is enhanced.

[0011] Preferably, light and shadow transmission balance is achieved by using a linear interpolation factor. The enhancement intensity is controlled to simulate ambient light interference of different intensities; the calculation formula is as follows: ; In the formula, To utilize nonlinear optical mixing functions The initial re-illuminated image obtained by fusion; Nonlinear brightness and color temperature compensation: Perform final consistency correction on the synthesized image based on specific temperature difference shifts and overall brightness gain.

[0012] Preferably, the feature consistency loss is: ; In the formula, To enhance the image, This is the original ground truth image. This is a feature consistency measurement function.

[0013] Therefore, the present invention employs the above-mentioned generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints, and the technical effects are as follows: Significantly suppressing structural illusions and achieving pixel-level coordinate alignment: By shifting the functional positioning of the diffusion model from "full-image generation" to controlled "virtual light source rendering," and utilizing edge priors for physical boundary constraints, the destruction of the microscopic topology of industrial parts by the generative model is effectively avoided. This approach ensures a high degree of alignment between the enhanced image and the original image at the pixel level, eliminating the feature drift problem commonly found in traditional generative data augmentation.

[0014] Accurately simulates complex 3D lighting interactions and enhances physical consistency: Based on intrinsic image decomposition theory, lighting changes are decoupled into independent shadow masks and combined with optical blending functions optimized for specific industrial scenarios (such as local overexposure and directional shadows). Compared to traditional brightness adjustment relying on two-dimensional linear mapping, this solution can more realistically reproduce the diffuse reflection and specular characteristics in the physical world, significantly improving the physical realism of the synthesized images.

[0015] Achieving low-cost generalization of the illumination domain and improving detection robustness: This scheme avoids the high cost of acquiring extreme illumination images on dynamic production lines. By training with a synthetic multi-illumination enhanced image set, it effectively bridges the domain gap between the ideal training environment and the real production environment. Experiments show that on the multi-illumination industrial dataset MVTec AD 2, this scheme can significantly improve the performance of the anomaly detection model in fine-grained defect localization, demonstrating high engineering practical value. Attached Figure Description

[0016] Figure 1 This is a flowchart of a generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints according to the present invention. Figure 1 (a) in the image is the input image; Figure 1 (b) in the image is the edge map; Figure 1 (c) in the diagram represents a pure light and shadow mask; Figure 1 (d) in the image represents the synthesized output image; Figure 2 Images under different lighting conditions; Figure 2 (a) in the image is the original image; Figure 2 Image (b) is an overexposed image; Figure 2 (c) in the image is an underexposed image; Figure 2 (d) in the image represents other light rays; Figure 3This is a comparison chart of the baseline model and the optimized model in this embodiment; Figure 3 (a) in the figure represents the AU-PRO score; Figure 3 (b) shows a pixel-level F1-Score comparison; Figure 3 (c) in the figure represents the image-level F1-Score comparison. Detailed Implementation

[0017] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0018] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0019] Example 1 like Figure 1 As shown, a generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints includes the following steps: Step S1: Spatial Prior Feature Extraction Acquire raw images of industrial parts Using edge detection operators Extract its high-frequency geometric topology. It is the set of real numbers (representing the mathematical space to which the pixel values ​​of an image belong). The height of the image. The width of the image. The process is as follows: using the edge detection operator... High-frequency components are separated from the original RGB image to obtain the geometric topology of industrial parts.

[0020] First, Gaussian filtering is used on the original image. Denoising preprocessing is performed, followed by calculating the gradient magnitudes of the image in the horizontal and vertical directions using the first-order derivative operator Sobel. By finding local maxima of the gradient, high-frequency components representing the edges of parts are initially located, generating the original edge intensity map. Non-maximum suppression (NMS) is applied to compress the wide gradient response into thinner edges with a single pixel width. Subsequently, a dual-threshold hysteresis detection mechanism is introduced, using a high threshold to lock in strong edges with high confidence and a low threshold to retain weak edges, merging them based on connectivity to effectively suppress background texture noise interference. Contour tracking and connection are performed on the thinned edges to calculate their geometric topological properties. By filtering topological chains with global saliency, subtle random textures inside parts are removed, retaining only high-level structural features that define the three-dimensional geometry of the object. The extracted high-level topological structure is mapped to binary space to generate a high-fidelity binary contour map. ; in, This is the extracted binarized edge contour map. This contour map serves as the absolute spatial geometric constraint for subsequent generation processes, ensuring strict alignment between the generated data and the original image in the pixel coordinate system.

[0021] Step S2: Generating Intrinsic Shadow Mask Binary contour map As a spatial guidance signal, it is injected into the potential diffusion model through a control network. By leveraging the controlled generation capabilities of the Latent Diffusion Model, a clean lighting layer highly aligned with the geometry of the original image is rendered. The process is as follows: Constructing physical scene description vectors To achieve decoupling of light and shadow, the prompts must include a mandatory "intrinsic attribute stripping" instruction (perfectly grayscale, monochrome) to ensure that the output does not contain the texture, color, or material details of the original part. Negative prompts (color, walnut texture, details) are introduced during the generation process to explicitly suppress interfering factors such as color shift and micro-texture illusions. Different combinations of descriptive vectors are adjusted based on preset typical industrial measurement and control scenarios such as underexposure, overexposure, 45-degree side-cut lighting, and top-level spotlighting.

[0022] In the denoising process of the diffusion model, the model is forced to only... Illumination manifold rendering is performed within the constrained physical boundaries. The control network intervenes in the features at each sampling step, forcing the generated light and dark distributions to be strictly limited to its locked geometric boundaries. This process outputs an intrinsic shadow mask. : ; in, For random noise in the latent space, the generated It can accurately reflect the light and shadow distribution of components under a specific physical light source.

[0023] Step S3: Physical-grade optical synthesis Based on intrinsic image decomposition theory, the original image is... It is considered a high-fidelity albedo substrate. A nonlinear optical mixing function is utilized. The generated intrinsic shadow mask Physical-level fusion is performed with the original image. The synthesis formula for different operating conditions is as follows: ; When simulating underexposed or dark environments Using the multiplication operator: In this mode, The dark areas in the image are proportionally reduced in pixel value from the base image, realistically reproducing the three-dimensional deep shadows caused by occlusion on the object's surface without destroying the original texture details. When simulating overexposed or highlight environments, A soft light blending operator is employed, which simulates the diffuse reflection and scattering effects of light on an object's surface, creating a soft, diffused effect in highlights while maintaining midtone contrast. To further enhance the realism of the synthesized image, the system introduces two key post-processing dimensions: Light and shadow transmission balance: using linear interpolation factors The enhancement intensity is controlled to simulate ambient light interference of different intensities; the calculation formula is as follows: ; This is a re-illuminated image.

[0024] Nonlinear brightness and color temperature compensation: Perform final consistency correction on the synthesized image based on specific temperature difference shifts and overall brightness gain.

[0025] Step S4: Anomaly Detection Model Training and Deployment Using the generated enhanced image set Construct a multi-illumination domain training manifold for the unsupervised anomaly detection model. The process is as follows: Invoke parameterized scene parameters underexposed, overexposed, and directional shift for each original image. Generate a set of enhanced images with structural consistency but significant differences in lighting and shadow features. During the model training phase, the original images are used... Its corresponding enhanced image Simultaneously input into the feature extraction network. By introducing a feature consistency loss function, the model is forced to extract stable intrinsic features under different lighting and shadow interferences. : ; In the formula, To enhance the feature representation of the image, The feature representation of the original image, This is the feature consistency loss function.

[0026] This mechanism guides the model to ignore non-essential lighting fluctuations (such as local highlights and deep shadows) and focus on identifying genuine geometric and topological anomalies. It refines the "normal feature manifold" of the unsupervised model using enhanced massive images. Because the enhanced images are perfectly aligned with the original images at the pixel level, the model can learn the evolution of extremely subtle texture features under different lighting conditions, thus significantly reducing false positives caused by ambient light shifts. The system can perform millisecond-level anomaly localization and classification of parts in complex real-time production line environments, maintaining a high level of pixel-level accuracy. and index.

[0027] like Figure 2 As shown, the large diffusion model is reduced to a "virtual light source". The topological boundary is locked by using edge priors. Only the light and shadow layer is generated without changing the original texture. This ensures the absolute alignment of the augmented data at the pixel level and eliminates feature drift and structural illusion.

[0028] like Figure 3 As shown, by simulating real 3D optical interaction, the domain gap between the ideal training set and the complex testing environment is effectively bridged. On the highly challenging multi-illumination industrial dataset, compared with the baseline model (without enhancement), this method improves the pixel-level F1-Score by 5.45% and the absolute improvement of the anomaly localization index AU-PRO, which is extremely sensitive to fine-grained defects, by 6.61%, significantly improving the detection accuracy under complex lighting conditions and possessing extremely high industrial practical value.

[0029] Therefore, this invention adopts the above-mentioned generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints. Through the augmentation module, it provides the unsupervised anomaly detection model with high-confidence sample manifolds that have structural consistency and diverse light and shadow, thereby enhancing the model's real-time detection capability in complex environments.

[0030] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints, characterized in that, Includes the following steps: Acquire raw images of industrial parts Using edge detection operators Extract the high-frequency geometric topology of the original image to obtain a binary contour map. ; Binary contour map As a spatial guidance signal, it is injected into the potential diffusion model through a control network. Combined with preset lighting conditions, the description vector In the denoising process of the diffusion model, the forced diffusion model is only used when... The intrinsic shadow mask is obtained by rendering the lighting manifold within the constrained physical boundaries. ,include: Binary contour map As a spatial guidance signal, it is processed by the first encoder structure in the control network to obtain multi-scale spatial geometric features; In the denoising iteration of the latent space, the vector is described by the illumination condition. The intrinsic property stripping guided diffusion model focuses only on the evolution of the light and dark gradients; The binary contour map is fused with the temporal information of the diffusion model itself, and the latent variables are obtained by processing through the second encoder structure, where the first encoder structure and the second encoder structure are the same. Spatial geometric features are superimposed at the pixel level after each decoding block in the decoder structure and intermediate sampling blocks through zero convolutional layers; The control network intervenes in the latent variables of the diffusion model at each sampling step, forcing strict constraints on the light and shadow distribution. Within the locked topological boundaries; The denoised latent variables are restored to pixel space by the decoder, generating a pure grayscale intrinsic shadow mask. ; ; in, For random noise in the potential space; Based on intrinsic image decomposition theory, the original image is... Treating it as a high-fidelity albedo substrate, using a nonlinear optical mixing function The generated intrinsic shadow mask Physical-level fusion with the original image yields fused features. ; Utilizing fused feature sets Constructing multi-illumination domain training manifolds is crucial for unsupervised anomaly detection models. By introducing feature consistency loss, the model is forced to extract stable intrinsic features under different lighting and shadow interference. .

2. The generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints according to claim 1, characterized in that, Using edge detection operators Extract the high-frequency geometric topology of the original image to obtain a binary contour map. This includes the following steps: Gaussian filtering on the original image Denoising preprocessing is performed, and then the gradient magnitudes of the original image in the horizontal and vertical directions are calculated using the first derivative operator Sobel. The original edge intensity map is obtained based on the gradient magnitudes in the horizontal and vertical directions. Then, the refined edge and edge confidence are calculated based on the gradient magnitudes in the horizontal and vertical directions. Based on edge refinement and edge confidence, some original edges are merged to obtain a high-frequency geometric topology that can define the three-dimensional geometric shape of an object. The extracted high-level topology is mapped to a binary space to generate a high-fidelity binary contour map: 。 3. The generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints according to claim 1, characterized in that, Based on the obtained gradient magnitudes in the horizontal and vertical directions, the original edge intensity map, edge refinement, and edge confidence are obtained, including the following steps: By comparing the horizontal gradient magnitude and the vertical gradient magnitude respectively, the local maximum points of the gradient are obtained, thereby initially locating the high-frequency components representing the edge of the component and generating the original edge intensity map. The gradient magnitudes in the horizontal and vertical directions are calculated separately to obtain the gradient response. Gradient responses greater than the first threshold are retained and compressed into a thinned edge with a single pixel width. Subsequently, edge confidence is calculated based on the gradient magnitudes in the horizontal and vertical directions.

4. The generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints according to claim 1, characterized in that, By merging some of the original edges, a high-frequency geometric topology that can define the three-dimensional geometric shape of the object is obtained, specifically: A dual-threshold hysteresis detection mechanism is introduced, using a high threshold to lock strong edges with high confidence and a low threshold to lock weak edges with low confidence. The geometric topological properties between each weak edge and the strong edges in the neighborhood of the weak edge are calculated based on the refined edges. Based on the geometric topological properties, the weak edges and strong edges are merged into effective edges to form a complete contour and obtain a high-frequency geometric topological structure. If it is not connected to any strong edge, it is regarded as noise and discarded.

5. The generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints according to claim 4, characterized in that, Based on the refined edges, the geometric topological properties between each weak edge and the strong edges within the weak edge's neighborhood are calculated. Based on these geometric topological properties, the weak edges and strong edges are merged into a single valid edge. Specifically: Based on the refined edge calculation, the spatial adjacency topology attribute between each weak edge and strong edge is calculated: through connected component tracking, if the weak edge is located within the connected extension path of the strong edge in the topological structure, the weak edge and the strong edge are merged into a valid edge to form a closed complete contour; conversely, if the geometric topology attribute of the weak edge shows that it has no spatial adjacency relationship with any of the strong edges, the weak edge is determined to be background noise interference and is removed.

6. The generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints according to claim 1, characterized in that, The generated intrinsic shadow mask Physical-level fusion with the original image yields fused features. For simulations of different operating conditions, the fusion formula is as follows: ; When simulating underexposed or dark environments Using the multiplication operator: ,in, This is element-wise multiplication; When simulating overexposure or highlight environments Employ a soft light blending operator; By introducing light and shadow transmission balance, nonlinear brightness and color temperature compensation, the realism of the synthesized image is enhanced.

7. The generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints according to claim 6, characterized in that, Light and shadow transmission balance: using linear interpolation factors The enhancement intensity is controlled to simulate ambient light interference of different intensities; the calculation formula is as follows: ; In the formula, To utilize nonlinear optical mixing functions The initial re-illuminated image obtained by fusion; Nonlinear brightness and color temperature compensation: Perform final consistency correction on the synthesized image based on specific temperature difference shifts and overall brightness gain.

8. The generative data augmentation method for industrial anomaly detection based on light and shadow decoupling and edge constraints according to claim 1, characterized in that, Feature consistency loss is: ; In the formula, To enhance the image, This is the original ground truth image. This is a feature consistency measurement function.