TabM-CatBoost Model for Pharmaceutical Blister Packaging Defect Segmentation Based on Backlight Inspection Images
Authors
Muhammad Ahmad, Firdaus YaacobFiles
Abstract
Inspection of pharmaceutical blister packaging must identify small but consequential defects, including missing tablets, broken cavities, bubbles, dents, foreign objects, poor sealing and local contamination, while still operating under high- throughput production conditions. Backlight imaging improves the visibility of transparent or semi-transparent defects, but the same imaging setup can also amplify foil reflection, plastic-thickness variation, tablet-colour differences, camera- exposure drift and conveyor vibration. This paper proposes a TabM-CatBoost model for defect segmentation in backlight inspection images. For each blister image, a cavity-level window is aligned with the package template, and candidate masks, illumination descriptors, region statistics, geometry descriptors, source-quality flags and process attributes are converted into structured evidence. TabM then learns feature interactions among image texture, local contrast, cavity position, boundary geometry and production-state variables, while CatBoost estimates defect class, boundary reliability, defect-risk level, confidence and review priority. The simulated evaluation dataset contains 18,960 image windows covering normal packaging, missing tablets, foreign particles, weak sealing flaws, local dents, air bubbles and mixed defects. Training, validation and testing use 70%, 15% and 15% of the records, respectively, at package-lot level. The proposed model reaches a mean IoU of 0.887, a boundary F1 of 0.861 and a high-risk recall of 0.934; compared with the best baseline, it improves mean IoU by 4.8% and reduces false review alarms by 13.6%. These results indicate that backlight-enhanced mask evidence and interpretable tabular fusion can support stable industrial review under weak defect contrast, scarce abnormal samples and strict packaging quality-control requirements.
