The invention relates to a
polylactic acid test piece internal defect detection method, and belongs to the technical field of target detection, the method comprises the following steps: S1,
image processing to obtain an input image; s2, attention enhancement
feature extraction: preliminarily extracting spatial features, capturing
global information and local information, focusing a defect area, and generating an enhancement feature map; s3, carrying out
feature fusion, and outputting a fused feature map; s4, performing self-attention re-parameterization, and outputting a local feature map; s5, HSV spot detection including a color conversion
algorithm and a defect enhancement
algorithm; and S6, outputting a result, establishing a bounding box regression task, predicting a frame coordinate, outputting a defect position, identifying a category
label, outputting a defect type, and evaluating reliability and outputting confidence. According to the method,
feature extraction is carried out by using depth separable
convolution, the
visibility and detectability of low-contrast defects are enhanced, and the attention enhancement network is established to adaptively pay attention to key areas related to the defects, so that defect detection is more accurate and efficient.