This invention provides a defect detection method, a model training method, an apparatus, a device, a medium, and a product. The detection method includes: acquiring an image of a
battery cell sealing ring to be inspected, and a defect-free front image and a defect-free back image of a sample
battery cell sealing ring; constructing data from the foreground target pixels of the image of the
battery cell sealing ring to be inspected, the defect-free front image, and the defect-free back image of the sample battery
cell sealing ring to obtain a multi-channel foreground target image; determining the high-level features of the multi-channel foreground target image, the high-level features including: high-level features of the image of the battery
cell sealing ring to be inspected, high-level features of the defect-free front image, and high-level features of the defect-free back image; and performing adversarial classification between the high-level features of the image of the battery
cell sealing ring to be inspected and the high-level features of the defect-free front image and the defect-free back image, respectively, to obtain a probability value of the battery cell sealing ring image to be inspected containing surface defects.