The invention discloses an automobile covering part surface abnormal defect synthesis and detection method based on illumination condition constraint. The method comprises the following steps: acquiring an automobile covering part defect
data set; an illumination condition continuous mapping table is constructed, bilinear interpolation sampling is carried out on standardized sampling coordinates containing illumination conditions and defect types to obtain high-dimensional vectors, and encoding and mapping of defect sensing illumination conditions are achieved; a UNet adaptive modulation network integrated with an illumination
perception residual block is constructed, abnormal
texture enhancement is realized through the adaptive modulation network, and finally, the
mask, the normal image and the abnormal texture enhanced image are fused to perform synthesis of an abnormal sample; a pre-trained backbone Wide ResNet50 is used as a feature extractor to carry out multi-scale
feature aggregation on an illumination
perception anomaly synthesis sample, a dichotomy
discriminator is trained to discriminate the aggregated multi-scale features, and a trained model is used to carry out
anomaly detection and positioning on a test chart. According to the method, the illumination condition is used as an optimizable
control variable to be deeply fused into an abnormal synthesis and detection framework, illumination controllable abnormal synthesis, illumination robust
feature learning and high-precision defect positioning are realized, and an
effective solution is provided for industrial appearance detection under complex illumination.