The invention discloses a
laser marking quality automatic evaluation method based on
machine vision. The method comprises the following steps of S1, collecting a
laser marking image and performing preprocessing; s2, inputting the preprocessed image into an
image segmentation network constructed based on FastSAM to generate a segmentation
mask image; s3, extracting a marking area communication block according to the segmented
mask image, and constructing an image sub-area set; s4, normalizing the sizes of the image sub-regions, constructing three-channel enhanced input, inputting the three-channel enhanced input into an image coding network constructed based on the OfficientViT, and extracting an image-level
feature vector; s5, inputting the image-level
feature vector into an ArcFace angle interval classification module, and outputting a defect type
classification result; s6, calculating a multi-dimensional quality scoring index; and S7, inputting the multi-dimensional quality scoring indexes into
a weighting function to generate a comprehensive scoring result, comparing the comprehensive scoring result with a qualified threshold, and outputting an
evaluation result. According to the method, a region
perception image segmentation strategy and a lightweight
feature coding mechanism are combined, and automatic identification and quality evaluation of character defects in the
laser marking image are realized.