Adaptive texture and low-light feature learning in enhanced MobileNetV4 for industrial packaging quality inspection
摘要
Seal defect detection in food packaging integrity inspection presents substantial challenges, primarily owing to minimal textural disparities between defective and intact regions under industrial illumination. These challenges intensify in production environments where moderate class imbalance intersects with pronounced inter-class similarity. This study introduces an enhanced MobileNetV4 architecture incorporating adaptive feature learning mechanisms to overcome these limitations. A novel LocalAttention module, employing dynamically weighted rectangular sliding windows, augments the model’s texture discrimination capabilities by effectively isolating elongated structural anomalies characteristic of seal defects. To address suboptimal illumination conditions, we integrate Pinwheel-shaped Convolution (PConv), which leverages Gaussian-inspired distribution patterns to amplify weak signal detection in poorly lit environments. Additionally, an Adaptive Similarity-Modulated Loss function concurrently mitigates class imbalance while refining feature space organization for morphologically close categories. Evaluated on a grain packaging dataset from Zhangzhou, Fujian, the proposed framework achieves 99.54% accuracy and 99.75% F1-score with only 3.7M parameters and 25.27 FPS on Raspberry Pi 4B. To validate industrial reliability, robustness experiments under simulated LED degradation and sensor noise confirm consistent performance advantages over baseline architectures, and an 8-hour continuous stress test demonstrates stable edge deployment without thermal throttling. Cross-domain validation on NEU-CLS further achieves 99.72% accuracy with superior parameter efficiency, suggesting transferability to related industrial defect classification tasks.