MSG-YOLO: A Multi-Scale Dynamically Enhanced Network for the Real-Time Detection of Small Impurities in Large-Volume Parenterals
Ziqi Li, Dongyao Jia, Zihao He, Nengkai Wu · Electronics · 2025
The detection of small targets holds significant application value in the identification of small foreign objects within large-volume parenterals. However, existing methods often face challenges such as inadequate feature expression capabilities, the loss of detailed information, and difficulties in suppressing background interference. To tackle the task of the high-speed and high-precision detection of tiny foreign objects in production scenarios involving large infusions, this paper introduces a multi-scale dynamic enhancement network (MSG-YOLO) based on an improved YOLO framework. The primary innovation is the design of a multi-scale dynamic grouped channel enhancement convolution module (MSG-CECM). This module captures multi-scale contextual features through parallel dilated convolutions, enhances the response of critical areas by integrating channel-space joint attention mechanisms, and employs a dynamic grouping strategy for adaptive feature reorganization. In the channel dimension, cross-scale feature fusion and a squeeze-excitation mechanism optimize feature weight distribution; in the spatial dimension, local maximum responses and spatial attention enhance edge details. Furthermore, the module features a lightweight design that reduces computational costs through grouped convolutions. The experiments conducted on our custom large infusion dataset (LVPD) demonstrate that our method improves the mean Average Precision (mAP) by 2.2% compared to the baseline YOLOv9 and increases small target detection accuracy (AP_small) by 3.1% while maintaining a real-time inference speed of 58 FPS.