The invention relates to the technical field of
microelectronics, and discloses a small and special
electric machine armature defect detection method based on improved YOLOv11n, which comprises the following steps: S1, acquiring small and special
electric machine armature defect image data; s2, constructing an armature defect
network model, wherein an original YOLOv11n model structure is improved by constructing a C3K2-MA module; a lightweight
feature extraction module is used to replace a
convolution module in a
trunk feature extraction and down-sampling process, and a down-sampling module is improved; the CIoU of the original YOLOv11n model is improved by using DIOU, so that the model precision is improved, and a
loss function is improved; s3, using the
training set and the
test set obtained in the step S1 to
train through the armature defect
network model constructed in the step S2; and S4, using the trained armature defect
network model to carry out
field detection on the armature defects of the small and special
electric machine. According to the invention, a partial multi-scale
feature aggregation module C3K2-MA is provided, the detection capability of different scale targets is significantly improved, and the detection precision is improved.