Abstract:
Piston quality directly affects the operating stability, service life, and safety of mechanical equipment. As a key precision component in engines, compressors, and other power systems, the piston needs strict dimensional accuracy and structural reliability during manufacturing. However, small defects still appear in piston corner regions because of machining deviation, process fluctuation, material inconsistency, and handling interference. These defects usually have small sizes, weak textures, irregular shapes, and are highly sensitive to metallic reflection and background noise. They are difficult to distinguish from normal machining traces. This situation increases the risk of missed or false detection in automated inspection. Piston corner defect detection requires a method that maintains high accuracy and meets the demand for real-time industrial deployment. This paper proposes a lightweight defect detection model called multi-scale dynamic enhancement-YOLO (MDE-YOLO) based on the YOLOv11 framework. The model is designed for industrial metal surface inspection with tiny defect targets and complex imaging conditions. Three main improvements are introduced. First, a poly kernel inception module is inserted into the backbone network, which builds parallel convolution branches with different receptive fields. It strengthens the extraction of local details and contextual information at different scales. As a result, the network improves its response to weak defect patterns and small defect regions. Second, a modulation fusion module is introduced into the neck network to replace the conventional static feature fusion. Instead of directly concatenating or summing multiscale features, this module assigns adaptive weights to different feature branches according to the input content. It adjusts the contributions of shallow detail and deep semantic information during feature fusion. This design reduces the mismatch and imbalance that often occur in multiscale fusion. Third, a mobile inverted bottleneck convolution (MBConv)-based lightweight detection head is adopted. The detection head combines the MBConv structure with a squeeze-and-excitation channel mechanism. It improves feature representation for classification and localization while reducing parameter redundancy and computational cost. To verify the proposed method, a self-built piston defect dataset was established under actual industrial production conditions. Image acquisition was completed using a 12-megapixel industrial camera. The dataset contains
6374 images and includes two defect categories: severe notch defects and slight scratch defects. In actual manufacturing, severe notch defects occur less frequently than slight scratches because piston parts are produced by precision machining and usually do not experience strong mechanical collision. Therefore, the dataset was divided by a stratified sampling strategy to preserve the practical class distribution. The training and test sets contain
5734 and 640 images, respectively. The class ratio was maintained at 4:5. Comparative experiments, ablation experiments, and supplementary validation were conducted. The experimental results show that MDE-YOLO obtains 96.6% mean average precision at 0.5 on the self-built piston defect dataset. The model contains 2.28 million parameters and requires approximately 5.2 giga floating-point operations per second. These results indicate that the proposed model reduced model complexity while maintaining defect detection performance. For the speed evaluation, the model was tested on an NVIDIA GeForce RTX
4090 platform with an input size of 640×640 and a batch size of 1. The reported speed was obtained after model training was completed, and the best weight was loaded. The testing process included forward inference and non-maximum suppression but did not include data loading time. Under these conditions, the model reached 182.7 frame·s
–1. This result indicates that the model satisfies the requirements of real-time inspection in practical industrial scenarios. Supplementary experiments on the public GC10-DET dataset further showed that the proposed model maintained stable performance in industrial metal defect detection tasks. These results indicate that MDE-YOLO is suitable for industrial inspection scenarios that require both accuracy and real-time performance.