Defect image generation method, device, electronic device and storage medium
By acquiring workpiece images, text prompt information and mask images, the defect image generation model is used to extract generation features from the workpiece images and text prompt information, and shape features from the mask image to generate a target defect image that meets the mask information constraints. This solves the problem in the existing technology that the defect generation model cannot accurately control the shape and position, and meets the actual needs of the defect image.
Patent Information
- Application Number
- CN202510683309.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-05-26
AI Technical Summary
The defect generation model in the existing technology cannot accurately control the shape and position of the defect, resulting in the generated defect image not meeting actual needs and cannot be used as an ideal negative sample.
By obtaining the workpiece image, text prompt information and mask image, and using the pre-trained defect image generation model, the generation features are extracted from the workpiece image and text prompt information, and the shape features are extracted from the mask image. Combined with the shape constraint sub-module and the stable diffusion sub-model, the target defect image that meets the mask information constraints is generated.
Precise control of defect shape and position is achieved, so that the generated defect image meets actual needs and can be used as an ideal negative sample.