Detecting defects in multilayer ceramic capacitors (MLCCs) is a crucial quality control step. Existing methods failed to overcome the challenges posed by issues such as diverse defect scales and blurred edges. Focus on these problems, this paper proposed an efficient framework ADS-YOLO for MLCCs defect detection. Firstly, we introduced an attention-augmented path aggregation neck (A2PAN) structure to improve the model’s ability to extract and focus on features of varying scales and significant differences, thereby enabling more accurate detection. Additionally, we employed a dual residual head (DRH) design, which can reduce the model’s parameter count while maintaining high detection accuracy, ensuring fast response in real-time detection scenarios. Furthermore, a newly designed scaled-IoU locating loss (SSIL) function, enhances the model’s localization accuracy for complex boundaries and shapes, strengthening its ability to predict asymmetrical defect edges. Experiments demonstrate that the proposed ADS-YOLO achieves 4.1 % improvement of mAP, the model parameters and GFLOPs decreased by 21.6 %. and 19.7 % compared with the advanced object detector YOLOv8s.