The major industrialized countries in the world are currently transitioning from an "industrial economy" model to an "information economy" model. "Taking high-tech as the core and information electronicization as the means to increase the added value of industrial products" has become an important development goal for modern industrial enterprises. Currently, artificial intelligence technology is widely applied in almost every aspect of the production and manufacturing process. Although related technologies have greatly improved product yield, the production process is a complex process involving multiple factors. Uncontrollable factors such as sudden power outages and untimely replacement of old machine parts can still lead to defective products. Due to occasional incidents, the number of defective products is rare, and currently manufacturers still use manual screening for defective products. Although there are existing artificial intelligence defect product detection models, training the model relies on a large number of samples, making it unable to effectively solve the problem of detecting scarce defect samples. The circulation and use of defective products can reduce the service life of equipment and even cause serious safety accidents. The reporter has been collaborating extensively with the industry for a long time and has carried out a series of work to improve the detection performance of defective products based on generative models. They have also helped companies develop defect detection systems for O-rings of different specifications and surface defects in food packaging.