Pharmaceutical Foreign Particle Detection: An Efficient Method Based on Adaptive Convolution and Multiscale Attention

The detection of pharmaceutical product quality is indispensable and crucial in drug manufacture. In particular, the detection of liquid pharmaceutical products is generally performed manually and offline. However, this type of method is inefficient and possesses low precision due to limited personal sensing and eyesight capabilities. Since recent advanced computational intelligence (CI) algorithms have achieved great successes in computer vision, CI (e.g., deep neural networks (DNNs)) is expected to provide efficient and powerful tools that will substantially improve the decision-making of autonomous systems. Moreover, with the current automatic detection methods, it is still a challenge to detect tiny particles efficiently in liquid products. This article proposes an end-to-end deep learning (DL) method with adaptive convolution and multiscale attention to locate and classify foreign particles. First, we present a pixel-adaptive feature extraction (PAFE) method for extracting fine-grained features and reducing the intraclass disparities between particles. Following that, a multiscale attention-based feature fusion (MAFF) method, which effectively fuses the pixel-level and semantic-level information of particles, is proposed. Finally, we use a feature-selective anchor-free detection (FSAD) method to quickly detect foreign particles in liquid pharmaceuticals. To confirm the above initiatives, we validate the proposed method on a liquid pharmaceutical dataset, achieving a missed detection rate of 3.6 percent. The speed of our method is an order of magnitude faster than that of other methods, possibly reaching 15 frames per second (FPS). In addition, we test the model’s transferability on a wine dataset.