Enhancing YOLOv8n with Mamba-like linear attention for defect detection and coating thickness analysis of irregular film tablet.

Journal: International journal of pharmaceutics
Published Date:

Abstract

This study presents a real-time system that integrates deep learning and machine vision for defect detection and coating thickness measurement of irregularly shaped film-coated tablets. To overcome the accuracy and speed limitations of the traditional YOLOv8 model on irregular shapes, we propose an enhanced YOLOv8n architecture incorporating a Mamba-Like Linear Attention (MLLA) mechanism. This modification significantly improves the model's ability to detect subtle defects with higher precision. The system captures real-time tablet images using industrial cameras, ensuring reliable and accurate defect identification. For coating thickness measurement, the system employs sub-pixel image processing techniques to precisely measure the Feret diameter of tablets, while weight analysis is integrated to assess coating uniformity. By establishing a strong linear correlation between tablet diameter and weight, the system enables accurate estimation of coating thickness. Experimental validation demonstrates a Root Mean Square Error of Prediction (RMSEP) of 2.2 mg, which ensures highly precise weight monitoring throughout the coating process. The proposed system achieves an overall classification accuracy of 91.87 % across eight types of coated tablets, confirming its robustness and effectiveness. This innovative solution offers pharmaceutical manufacturers a scalable and cost-efficient tool for real-time quality assessment of irregularly shaped tablets, enhancing production efficiency, optimizing quality control, and minimizing defects in continuous manufacturing environments.

Authors

  • Ziqian Wang
  • Qing Tao
    Department of Radiology, The First Affiliated Hospital of Soochow University, NO.899 Pinghai Road, Gusu District, Suzhou, Jiangsu, China.
  • Zhijian Zhong
    China Resources Jiangzhong Pharmaceutical Group Co., Ltd., 330103 Nanchang, China.
  • Ming Yang
    Wuhan Institute for Food and Cosmetic Control, Wuhan 430014, China.
  • Xuecheng Wang
  • Xiaorong Luo
    China Resources Jiangzhong Pharmaceutical Group Co., Ltd., 330103 Nanchang, China. Electronic address: lxr@crjz.com.
  • Zhenfeng Wu
    National Key Laboratory for the Modernization of Classical and Famous Prescriptions of Chinese Medicine, Jiangxi University of Chinese Medicine, 330004 Nanchang, China; Key Laboratory of Modern Preparation of TCM, Ministry of Education, Jiangxi University of Chinese Medicine, Nanchang 330004, China. Electronic address: zfwu527@163.com.