Photovoltaic cell controllable defect generation method based on attention enhancement diffusion and large model driving prompt
By combining the attention-enhanced diffusion model with the large language model, the problems of defect attribute control and structural consistency in photovoltaic cell defect image generation are solved, high-quality and controllable defect image generation is achieved, and the training data and recognition accuracy of the photovoltaic cell defect recognition system are improved.
Patent Information
- Application Number
- CN202510811007.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-26
AI Technical Summary
Existing technologies have difficulty generating high-quality and diverse photovoltaic cell defect images, and existing methods are unable to accurately control defect properties and maintain photovoltaic structure consistency, resulting in insufficient generalization capabilities of deep learning models.
The attention-enhanced diffusion model is combined with a large language model. Photovoltaic cell images are processed through brightness normalization and edge enhancement. The large language model is used to generate defect description text. The user-controllable mask and the model are combined to self-extract the attention area to control the location, type and range of defect generation. The image quality is improved through the attention enhancement module, and the generated results are screened by combining image quality indicators.
It achieves accurate generation of defect images with a small number of real defect images, improves the training data quality of the defect recognition system, improves the classification and recognition performance, enhances the realism and structural consistency of the generated images, and significantly improves the recognition accuracy.
Smart Images

Figure CN120707409A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a controllable image generation method, and in particular to a photovoltaic cell defect image generation method driven by an attention-enhanced diffusion model and a large language model, belonging to the field of large-scale Wensheng image models. Background Art
[0002] Solar energy, as a clean energy source, has experienced rapid growth in recent years. Photovoltaic panels, as the application platform for its core technology, have been widely adopted in commercial, residential, and industrial sectors. With technological advancements and declining production costs, the economics of photovoltaic power generation continue to improve, making it a key option for energy transition in a growing number of countries and regions. In this context, defect detection and maintenance of photovoltaic panels are particularly important, as they directly impact system efficiency and return on investment. Due to transportation and prolonged exposure to outdoor environments, photovoltaic panel cells can develop various defects that can affect their power output and usability.
[0003] In recent years, with the development of deep learning technology, the automatic identification and segmentation of photovoltaic panel defects has gradually become a research hotspot and a future development trend. However, the implementation of this technology faces significant challenges: due to the random occurrence and diverse types of defects in actual production, it is difficult to obtain a sufficient number of high-quality defect samples to train effective recognition models.
[0004] Photovoltaic cell defect detection relies on a large number of high-quality defect samples, but in actual scenarios, defect samples are difficult to obtain and the category distribution is severely unbalanced, resulting in insufficient generalization capabilities of deep learning models. Traditional data augmentation methods (such as rotation and scaling) can only perform simple transformations on existing images and cannot generate defect samples with new details. Although existing generative adversarial networks (GANs) can synthesize defect images, they have the disadvantages of low generation diversity, blurred boundaries, and the inability to accurately control defect properties. In addition, the background of photovoltaic cell images contains regularly arranged bus bars, and existing generation methods are prone to abnormal bus bar spacing, affecting the authenticity of the image. Therefore, there is an urgent need for a controllable, high-fidelity defect generation method that can maintain the consistency of photovoltaic structures. Summary of the Invention
[0005] The objective of the present invention is to provide a controllable generation method for photovoltaic defect images based on an attention-enhanced diffusion model and large language model prompts. The method first obtains a defect-free electroluminescence (EL) image and performs normalization processing, improving the overall image quality through brightness normalization and edge enhancement. The large language model is then used to complete the textual expression of abstract defect categories and generate prompt descriptions containing detailed features. The image and text prompts are input into the diffusion generation model, and the generation location, type, and range of the defect are determined by introducing user-controllable mask information and combining it with the attention area extracted by the model. During the denoising process, an attention enhancement module is introduced to focus on updating the target area, and a step adjustment mechanism inside and outside the mask is combined to improve the naturalness of the fusion between the defect area and the background, thereby ensuring that the generated image has stronger realism and structural consistency. At the output stage, the generated results are automatically screened by combining image quality indicators and busbar spacing assessment (BSA) to eliminate image samples with structural abnormalities or visual unreasonableness. This method can accurately generate and edit defect images by inputting defect types and target areas without relying on a large number of real defect images, thereby enhancing the training data of the defect recognition system and improving classification and recognition performance. It is particularly suitable for image simulation and classification assistance of multiple types of defects in photovoltaic panels.
[0006] To achieve the above objectives, the technical solution of the present invention is as follows: a method for generating photovoltaic cell defect images based on an attention-enhanced diffusion model and a large language model, the method comprising the following steps:
[0007] S1: Obtain a real standardized photovoltaic cell image, perform brightness normalization and edge enhancement on the image, and obtain a quality-enhanced image as the input image of the diffusion model;
[0008] S2: Use the large language model to convert the defect category into a specific defect description text, and use the image processed in step S1 and the corresponding text to form an image-text pair as the conditional input;
[0009] S3: Use dreambooth to fine-tune the diffusion model to adapt it to the photovoltaic image defect characteristics;
[0010] S4: gradually add noise to the input normal sample to obtain a noisy image. The normal image serves as the editing background;
[0011] S5: The original noise image is gradually denoised using the target defect category name as a cue to obtain an informative noise image. The attention map is obtained using the cross-attention mechanism of the U-net network, which reflects the interesting parts of the noise image.
[0012] S6: The final mask is determined by combining the controllable mask input by the user with the key area map generated by the attention mechanism to control the location, type and size of the defect generation;
[0013] S7: The image after adding noise to the normal image, the denoised noise map attention map and the controllable mask are input into the attention enhancement module to obtain the attention enhanced noise image;
[0014] S8: gradually denoising the noise image to obtain a defect image with a specified size, position and defect category;
[0015] S9: To solve the problem of poor seamlessness, i.e., the inconsistency of editing inside and outside the mask. Since too much noise is introduced during the editing process, the original image information is destroyed, resulting in poor seamlessness of the image. An editing regulator is proposed to adjust the step size;
[0016] S10: Use FID, SSIM and BSA indicators to evaluate and screen the generated images.
[0017] Furthermore, step S1 selects images containing four defect categories—crack, corrosion, contact, and interconnect—from the public dataset UCF-EL as raw samples. Defect categories with insufficient data are replicated and expanded to ensure a balanced number of training samples for each category. The raw images are brightness normalized to eliminate illumination variations. The Canny edge detection algorithm is used to enhance defect edge features, resulting in a standardized output image with a resolution of 512×512.
[0018] In step S2, the large language model is used to generate the prompt word of the text description: "Describe the defect features of the input image" to obtain a high-quality text prompt.
[0019] In step S3, the image-text pair is input into the dreambooth model, and the U-Net and text encoder are fine-tuned. The U-Net learning rate is set to 1e-6, the text encoder learning rate is set to 5e-7, the batch size is set to 1, and the optimizer is Adam.
[0020] The noise addition formula in step S4 is:
[0021]
[0022] Among them, α r , α r+1 is the noise attenuation coefficient for time steps r and r+1, x r Refers to the noise map of the rth step, r is the time step, ∈ θ is a noise prediction network based on U-Net, fθ Depend on Calculation shows that the noise graph x of the r+1th step is obtained r+1 For normal image x in Perform progressive noise addition to generate a noise image x R ,The whole process requires R steps.
[0023] Furthermore, the denoising formula in step S5 is:
[0024]
[0025] in is the noise map of the s-th step, ∈ θ is a noise prediction network based on U-Net, α s-1 α s is the noise attenuation coefficient for time steps s-1 and s, and the noise map for step s-1 is obtained Provides defect information, from the original noise x no Starting from the specified defect name c, through the denoising process, the denoised image is finally obtained The whole process takes S steps. At the same time, through the cross-attention mechanism of U-Net, an attention map A is obtained. This attention map captures and highlights the defect features represented in the input image, providing a detailed representation of the area that needs careful inspection.
[0026] In step S6, during this process, the binary mask M topk is generated by selecting the top-k pixel positions P that exhibit the highest attention values in the attention map A. This selection prioritizes the pixels that are most likely to contain key information about the defect:
[0027] P={(i,j)|A i,k ∈TopK(A,K)}
[0028] Among them, A is the attention map, k is the number of topk pixels, and p represents the position information of the topk pixels in the attention map.
[0029]
[0030] Binary mask M topk [i,j] is a mask of 1 depending on whether the pixel position is at position P, and 0 if it is not at position P. The guided mask automatically identifies key areas, and users can further refine the process by specifying the area of interest by coordinates, allowing users to focus on specific areas they deem important:
[0031] M f =M⊙M topk .
[0032] Where M is a controllable mask, M f Combining these user inputs with attention-driven selection for the final mask provides a tailored image editing approach.
[0033] The enhancement process in step S7 is as follows:
[0034]
[0035] where x R is the denoised noise image, is the noise image after adding noise, ⊙ is the multiplication operation per pixel, M f is the final mask. Finally, the enhanced noise map is obtained Furthermore, this operation preserves the integrity of the background structure while selectively enhancing the identified defect-related improvement areas. This approach ensures that the enhancements are seamlessly integrated into the image, maintaining a natural appearance while focusing on defect details.
[0036] In step S8, the image is edited to minimize noise based on the target text. The mask fuses the noisy original image and the intermediate results from the editing process, enabling the model to perform multiple defect edits within the mask while avoiding unnecessary edits outside the mask. The target prompt is used for DDIM sampling, where the intermediate results are integrated into the DDIM trajectory. At each denoising step, the region is denoised using the denoising formula:
[0037]
[0038] in is the refined noise image at time steps r and r-1, and the noisy image x at step r-1 is obtained r-1 , M is a controllable mask, and ⊙ is a pixel-by-pixel multiplication operation. Similarly, the entire denoising process has a total of R steps, and the final denoising is After being decoded by the decoder, the edited image x is output out .
[0039] The editing controller in step S9 controls the number of noise addition and defect denoising steps using a proportional parameter p, where the number of noise addition steps is R = p·T and the number of denoising steps is S = (1-p)·T. T is the total number of steps. This method solves the problem of seamless editing when editing the original image to a specific defect image. The editing controller can control the early termination of noise addition to the original EL image and feed the image with less noise into the attention enhancement module.
[0040] In step S10, the generated image is evaluated using image quality assessment metrics, including but not limited to metrics based on image structure similarity and distribution difference, to measure the clarity, authenticity, and consistency of the generated image with the real image. BSA uses Hough lines to detect convergence lines and calculates the difference in the distribution of their spacing. This evaluation result can be used to filter out low-quality samples, further improving the reliability and application value of the generated image.
[0041] Compared with the existing technology, the present invention has the following advantages: First, the introduction of a large language model prompt mechanism can transform abstract defect categories into specific descriptions with semantic information, enhance the generation model's ability to understand defect types, and achieve higher text-image alignment accuracy. Second, by fusing user-controllable mask information with the attention area automatically extracted by the model, precise control of defect type, location, and size is achieved. It has good interactivity and flexibility and supports the concurrent generation of multi-type and multi-region defects. Third, the introduction of an attention enhancement module in the diffusion generation process effectively enhances the expressiveness of the target area and significantly improves the clarity of defect edges and details in the generated image, with a 9.43% decrease in FID and a 4.27% increase in SSIM. In addition, by setting a step size adjustment mechanism and adopting a differentiated generation strategy inside and outside the mask, the problems of image blur and lack of seamlessness during multiple iterations are effectively alleviated, ensuring that the defect area naturally blends into the background structure. Finally, by combining indicators such as image structure similarity and bus spacing consistency (BSA), the generated images are automatically evaluated and screened, improving data screening efficiency and ensuring stable training data quality. The overall solution not only improves the controllability and realism of defect images, but also achieves a substantial improvement in recognition accuracy in synthetic data-assisted training. It has clear industrial application value and technology promotion potential. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 The flowchart of the controllable defect generation method for photovoltaic cells based on attention-enhanced diffusion and large model-driven prompts is shown in Figure 2.
[0043] Figure 2 To enhance the data of the controllable defect generation method for photovoltaic cells based on attention-enhanced diffusion and large model-driven prompts, we obtain text prompts and a fine-tuning process flow chart.
[0044] Figure 3 This is a flow chart of the controllable generation part of the photovoltaic cell controllable defect generation method based on attention-enhanced diffusion and large model-driven prompts. DETAILED DESCRIPTION
[0045] Embodiment: The present invention provides a diffusion model fine-tuning method for generating a few-sample defect image, such as Figure 2As shown, the defect image generation model includes a data enhancement module, a large language model prompt generation module, a U-Net encoder, a U-Net decoder, an attention enhancement module, and a user selection mask module. The method includes the following steps:
[0046] 101: Enhance the original data,
[0047] This step acquires real, standardized photovoltaic cell images and replicates them to expand these defect categories, thereby obtaining relatively balanced training data. Furthermore, this example improves visual clarity and enhances the recognizability of defect features by adjusting brightness and enhancing image edge features. The processed images are resized to a uniform resolution of 512×512 pixels to accommodate subsequent stable diffusion fine-tuning.
[0048] 102. Use large language models to obtain detailed descriptions of defects
[0049] This step feeds the image into a large language model. In this study, Chat-GPT4 was selected to automatically generate text descriptions of the image. The prompt, "Describe the characteristics of the input image," guides the model in generating appropriate text descriptions for images of different defect categories. Accurate defect descriptions provide the model with more information about the defect, which is essential for the model to understand and generate more accurate defect descriptions.
[0050] 103. Fine-tune the model
[0051] This step combines the textual hint obtained in step 102 with the image obtained in step 101 to form an image-caption pair. This is then used to fine-tune the U-Net and text encoder in DreamBooth during the stable diffusion process. This fine-tuning step aims to focus the model on the specific characteristics of photovoltaic cells when generating images. During fine-tuning, DreamBooth's default settings are used, aiming to optimize the model using the image-text pair reconstruction loss. This ensures that the generated images are better aligned with the textual descriptions.
[0052] 104. Noise the normal image
[0053] First, this example uses different normal images as input and then passes them through the encoder to obtain x1. Then, a
[0054] The noise processing step by step finally produces a normal image with noise. The noise addition formula is:
[0055]
[0056] Among them, α r , α r+1 is the noise attenuation coefficient for time steps r and r+1, x rRefers to the noise map of the rth step, r is the time step, ∈ θ is a noise prediction network based on U-Net, f θ Depend on Calculation shows that the noise graph x of the r+1th step is obtained r+1 For normal image x in Perform progressive noise addition to generate a noise image x R ,The whole process requires R steps.
[0057] 105. Use defect name as a guide to gradually denoise the original noise
[0058] In this example, to provide defect information, the process begins with a random initial noisy image and performs an image noise operation using the defect name as input text c. Guided by the target text, the noisy input is denoised step by step to obtain a denoised image S, performing a total of denoising steps. The denoising process is based on the following formula:
[0059]
[0060] in is the noise map of the s-th step, ∈ θ is a noise prediction network based on U-Net, α s-1 α s is the noise attenuation coefficient for time steps s-1 and s, and the noise map for step s-1 is obtained Provides defect information, from the original noise x no Starting from the specified defect name c, through the denoising process, the denoised image is finally obtained The whole process takes S steps. At the same time, through the cross-attention mechanism of U-Net, an attention map A is obtained. This attention map captures and highlights the defect features represented in the input image, providing a detailed representation of the area that needs careful inspection.
[0061] 106. Determination of the final mask
[0062] This example guides the mask to automatically identify key regions, and users can further refine the process by specifying regions of interest by coordinates. This step allows users to focus on specific regions they deem important, resulting in a controllable mask M. The final mask Mf combines these user inputs with attention-driven selection to provide a tailored image editing method:
[0063] P={(i,j)|A i,j ∈TopK(A,K)}
[0064] Among them, A is the attention map, k is the number of topk pixels, and p represents the position information of the topk pixels in the attention map.
[0065]
[0066] Binary mask M topk [i,j] is a mask of 1 depending on whether the pixel position is at position P, and 0 if it is not at position P. The guided mask automatically identifies key areas, and users can further refine the process by specifying the area of interest by coordinates, allowing users to focus on specific areas they deem important:
[0067] M f =M⊙M topk
[0068] Where M is a controllable mask, M f Combining these user inputs with attention-driven selection for the final mask provides a tailored image editing approach.
[0069] 107. Enhanced Attention
[0070] The enhancement process consists in replacing the final mask M f Pixels within the boundary. Noise image x R The pixels belonging to the mask are replaced by the noise image The value in , which contains the refined information:
[0071]
[0072] where x R is the denoised noise image, is the noise image after adding noise, ⊙ is the multiplication operation per pixel, M f is the final mask. Finally, the enhanced noise map is obtained Furthermore, this operation preserves the integrity of the background structure while selectively enhancing the identified defect-related improvement areas. This approach ensures that the enhancements are seamlessly integrated into the image, maintaining a natural appearance while focusing on defect details.
[0073] 108. Progressive Denoising
[0074] This example fuses the noisy original image and the intermediate results of the editing process based on the mask, enabling the model to perform multiple defect editing within the mask while avoiding unnecessary editing outside the mask. The target category prompt is used for DDIM sampling, where the intermediate results are integrated into the DDIM trajectory. At each step of denoising, the region is denoised.
[0075]
[0076] in is the refined noise image at time steps r and r-1, and the noisy image x at step r-1 is obtained r-1 , M is a controllable mask, and ⊙ is a pixel-by-pixel multiplication operation. Similarly, the entire denoising process has a total of R steps, and the final denoising is After being decoded by the decoder, the edited image x is output out .
[0077] 109. Edit Regulator
[0078] This example proposes an editing regulator to adjust the step size; the number of denoising steps is R = p·T, and the number of denoising steps is S = (1-p)·T, where T is the total number of steps. This approach solves the problem of seamless editing when editing the original image to a specific defect image. The editing regulator can control the early stopping of noise addition to the original EL image and feed the image with less noise into the attention enhancement module.
[0079] S10: This example evaluates the generated results based on common image evaluation metrics, including structural similarity and distribution difference, to measure image clarity, realism, and proximity to the real image. The structural similarity metric assesses image detail preservation, reflecting the image's consistency with the reference image in terms of brightness, contrast, and texture. The distribution difference metric measures the distance between the generated image and the real image from the perspective of overall distribution, reflecting their proximity at the data level. The BSA metric is used to automatically filter defective images, automatically screening for samples with abnormal busbar (i.e., bus) distribution in the image. Specifically, the system first performs edge detection on the generated image and uses the Hough line detection method to extract the locations of horizontally arranged busbars in the image. The system then counts the pixel spacing between adjacent busbars and calculates the standard deviation of all spacing values. Excessively uneven busbar spacing in an image may indicate structural distortion or poor generation quality. To this end, the system sets a reasonable standard deviation threshold. If the spacing standard deviation of an image exceeds this threshold, it is identified as an image with abnormal distribution and automatically removed.
[0080] It should be noted that the above embodiments are not intended to limit the scope of protection of the present invention, and equivalent changes or substitutions made on the basis of the above technical solutions fall within the scope of protection of the claims of the present invention.
Claims
1. A photovoltaic cell controllable defect generation method based on attention-enhanced diffusion and large model-driven prompting, characterized by: The method comprises the following steps: S1: Obtain a real standardized photovoltaic cell image, perform brightness normalization and edge enhancement on the image, and obtain a quality-enhanced image as the input image of the diffusion model; S2: Use the large language model to convert the defect category into a specific defect description text, and use the image processed in step S1 and the corresponding text to form an image-text pair as the conditional input; S3: Use dreambooth to fine-tune the diffusion model to adapt it to the photovoltaic image defect characteristics; S4: gradually adding noise to the input normal sample to obtain a noisy image, and the normal image is used as the editing background; S5: By gradually denoising the original noise map with the target defect category name as a hint, a noise map containing information is obtained. The attention map is obtained using the cross-attention mechanism of the U-net network, and the attention map reflects the interesting parts of the noise map. S6: The final mask is determined by combining the controllable mask input by the user with the key area map generated by the attention mechanism to control the location, type and size of the defect generation; S7: The image after adding noise to the normal image, the denoised noise map attention map and the controllable mask are input into the attention enhancement module to obtain the attention enhanced noise image; S8: gradually denoising the noise image to obtain a defect image with a specified size, position and defect category; S9: To solve the problem of poor seamlessness, i.e., the incoordination of editing inside and outside the mask, which results in poor seamlessness of the image due to excessive noise introduced during the editing process and destruction of the original image information, an editing regulator is proposed to adjust the step size; S10: Use FID, SSIM and BSA indicators to evaluate and screen the generated images.
2. The photovoltaic cell controllable defect generation method based on attention enhancement diffusion and large model driven prompting according to claim 1 is characterized in that: Step S1 selects images containing four types of defects, namely cracks, corrosion, poor contact, and interconnection, from the public dataset UCF-EL as original samples. The defect types with insufficient data are replicated and expanded to balance the number of training samples for each type. The original images are brightness normalized to eliminate lighting differences. At the same time, the defect edge features are enhanced using the Canny edge detection algorithm, and a standardized image with a resolution of 512×512 is output.
3. The photovoltaic cell controllable defect generation method based on attention enhancement diffusion and large model driven prompting according to claim 1 is characterized in that: In step S2, the large language model is used to generate a text description prompt word: "Describe the defect features of the input image", obtaining a high-quality text prompt.
4. The photovoltaic cell controllable defect generation method based on attention enhancement diffusion and large model driven prompting according to claim 1, characterized in that: In step S3, the image-text pair is input into the dreambooth model, and the U-Net and text encoder are fine-tuned. The U-Net learning rate is set to 1e-6, the text encoder learning rate is set to 5e-7, the batch size is set to 1, and the optimizer is Adam.
5. The photovoltaic cell controllable defect generation method based on attention enhancement diffusion and large model driven prompting according to claim 1, characterized in that: The noise addition formula in step S4 is: Among them, α r , α r+1 is the noise attenuation coefficient for time steps r and r+1, x r Refers to the noise map of the rth step, r is the time step, ∈ θ is a noise prediction network based on U-Net, f θ Depend on Calculation shows that the noise graph x of the r+1th step is obtained r+1 , for the normal image x in Perform progressive noise addition to generate a noise image x R ,The whole process requires R steps.
6. The photovoltaic cell controllable defect generation method based on attention enhancement diffusion and large model driven prompting according to claim 5, characterized in that: The denoising formula in step S5 is: in is the noise map of the s-th step, ∈ θ is a noise prediction network based on U-Net, α s-1 α s is the noise attenuation coefficient for time steps s-1 and s, and the noise map for step s-1 is obtained Provides defect information, from the original noise x no Starting from the specified defect name c, through the denoising process, the denoised image is finally obtained The whole process requires S steps. At the same time, through the cross-attention mechanism of U-Net, an attention map A is obtained, which captures and highlights the defect features represented in the input image and provides a detailed representation of the areas that need careful inspection.
7. The photovoltaic cell controllable defect generation method based on attention enhancement diffusion and large model driven prompting according to claim 6, characterized in that: Step S6 is specifically as follows: P={(i,j)|A i,j ∈TopK(A,K)} Among them, A is the attention map, k is the number of topk pixels, and p represents the position information of the topk pixels in the attention map. Binary mask M topk [i, j] Depending on whether the pixel position is at position P, the mask value is 1, and if it is not at position P, the mask value is 0. This guides the mask to automatically identify key areas. Users can further refine the process by specifying the area of interest by coordinates, allowing users to focus on specific areas they deem important. The final mask is: M f =M⊙M topk Where M is a controllable mask, M f Combining these user inputs with attention-driven selection for the final mask provides a tailored image editing approach.
8. The photovoltaic cell controllable defect generation method based on attention enhancement diffusion and large model driven prompting according to claim 7, characterized in that: In step S7, the enhancement process includes replacing the final mask M f Pixels within the boundary, where x R is the denoised noise image, is the noise image after adding noise, ⊙ is the multiplication operation per pixel, M f is the final mask, and the enhanced noise map is finally obtained 9. The photovoltaic cell controllable defect generation method based on attention enhancement diffusion and large model driven prompting according to claim 8, characterized in that: In step S8, the noisy image is minimized based on the target text editing. The noisy original image and the intermediate results of the editing process are fused based on the mask, enabling the model to perform multi-defect editing within the mask while avoiding unnecessary editing outside the mask. The target prompt is used for DDIM sampling, and the intermediate results are integrated into the DDIM trajectory. In each step of denoising, the region is denoised: in is the refined noise image at time steps r and r-1, and the noisy image x at step r-1 is obtained r-1 , M is a user-controllable mask, ⊙ is a pixel-by-pixel multiplication operation, and the entire denoising process has a total of R steps. The final denoising is After being decoded by the decoder, it is decoded into the output image x out .
10. The photovoltaic cell controllable defect generation method based on attention enhancement diffusion and large model driven prompting according to claim 9, characterized in that: In step S9, the editing regulator controls the number of noise addition and defect denoising steps with a proportional parameter p, where the number of noise addition steps is R = p·T and the number of denoising steps is S = (1-p)·T, where T is the total number of steps; In step S10, the generated image is evaluated using image quality assessment indicators, including indicators based on image structure similarity and indicators based on distribution differences, which are used to measure the clarity, authenticity and consistency of the generated image with the real image. The evaluation results can be used to screen out low-quality samples and further improve the reliability and application value of the generated image.
Citation Information
Cited By
Synthetic leather defect image generation and semantic annotation method
CN122089883A