The invention relates to the technical field of
image quality inspection, in particular to a
casting surface defect segmentation method and quality inspection
system based on multi-
modal attention, and the method comprises the steps: collecting a
color image and a depth image for a to-be-detected surface, and then sending the
color image and the depth image into a
casting defect recognition model; the
casting recognition model is of a codec structure,
color image features and depth image features are extracted respectively, fused and then subjected to up-sampling, and then a segmentation result corresponding to casting surface defects is obtained; for a depth image, a plurality of
gradient operators with different scales are adopted to perform enhancement
processing in an image
feature extraction process. Aiming at the defects of different scales such as cracks, pores and large-area recesses on the surface of the casting, a plurality of
gradient operators with different scales are designed to enhance the part of the depth image, so that the defects with different sizes can be effectively sensed in the extraction process of the depth image; and the method has better robustness for
noise, illumination variation and tiny irregularity of the surface of the casting.