I. Introduction
The pharmaceutical industry has a direct relationship with national security, and the detection of pharmaceutical product quality is indispensable and crucial in drug manufacture[1]. The process of quality detection covers all pharmaceutical production procedures and includes the detection of foreign objects, drug components, and packaging defects. Because of improper operation, incomplete cleaning, and changes in external conditions, unavoidably, visible foreign particles will be mixed into pharmaceutical liquids [2]. All patients, manufacturers and regulators have a strongly inherent requirement for safe, pure, and sterile pharmaceuticals[3]. It is a significant measure to protect patients via liquid foreign particle detection. The detection of liquid pharmaceutical goods has always been performed manually and offline. Professional inspectors judge the quality of a pharmaceutical by spinning the liquid medicine and observing its relative movement trajectory against a noninterfering background (bright field or dark field)[4]. During this process, the inspectors use their experience to determine whether foreign particles are present.