Automated Tablet Quality Inspection: Pharmaceutical Computer Vision for Manufacturing Defects
Keywords:
Pharmaceutical Computer Vision, Tablet Defect Detection, Self-Supervised Learning, Industrial Anomaly Detection, Quality Control, Automated Visual InspectionAbstract
Automated visual inspection has become an important component of pharmaceutical manufacturing because tablet defects can affect product appearance, mechanical integrity, and compliance with established quality specifications. Conventional inspection methods, including manual examination and rule-based image processing, face difficulties when tablet surfaces exhibit subtle cracks, irregular edges, coating inconsistencies, or variations in illumination. This study proposes a computer vision framework that integrates self-supervised visual representation learning, multiscale defect localization, and uncertainty-aware classification for automated tablet quality assessment. The central research gap concerns the limited ability of conventional supervised inspection systems to recognize previously unseen manufacturing defects while maintaining reliable performance under changing production conditions. The proposed framework combines normal-sample representation learning with localized anomaly detection to identify surface irregularities without requiring extensive annotations for every possible defect category. A controlled experimental protocol is formulated to examine classification accuracy, defect localization, false-rejection behavior, processing latency, and robustness across different tablet appearances and imaging conditions.
References
• Diószegi, A., Ficzere, M., Mészáros, L. A., Péterfi, O., Farkas, A., Galata, D. L., & Nagy, Z. K. (2024). Automated tablet defect detection and the prediction of disintegration time and crushing strength with deep learning based on tablet surface images. International Journal of Pharmaceutics, 667, 124896. https://doi.org/10.1016/j.ijpharm.2024.124896
• Pathak, K. A., Kafle, P., & Vikram, A. (2025). Deep learning-based defect detection in film-coated tablets using a convolutional neural network. International Journal of Pharmaceutics, 671, 125220. https://doi.org/10.1016/j.ijpharm.2025.125220
• Roth, K., Pemula, L., Zepeda, J., Schölkopf, B., Brox, T., & Gehler, P. (2022). Towards total recall in industrial anomaly detection. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 14318–14328. https://openaccess.thecvf.com/content/CVPR2022/html/Roth_Towards_Total_Recall_in_Industrial_Anomaly_Detection_CVPR_2022_paper.html
• Oquab, M., Darcet, T., Moutakanni, T., et al. (2024). DINOv2: Learning robust visual features without supervision. Transactions on Machine Learning Research. https://mlanthology.org/tmlr/2024/oquab2024tmlr-dinov2/
• Zavrtanik, V., Kristan, M., & Skočaj, D. (2021). DRAEM—A discriminatively trained reconstruction embedding for surface anomaly detection. Proceedings of the IEEE/CVF International Conference on Computer Vision, 8330–8339. https://openaccess.thecvf.com/content/ICCV2021/html/Zavrtanik_DRAEM_-_A_Discriminatively_Trained_Reconstruction_Embedding_for_Surface_Anomaly_ICCV_2021_paper.html
• Rudolph, M., Wehrbein, T., Rosenhahn, B., & Wandt, B. (2022). Fully convolutional cross-scale-flows for image-based defect detection. Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, 1088–1097. https://openaccess.thecvf.com/content/WACV2022/html/Rudolph_Fully_Convolutional_Cross-Scale-Flows_for_Image-Based_Defect_Detection_WACV_2022_paper.html
• Liu, Z., Zhou, Y., Xu, Y., & Wang, Z. (2023). SimpleNet: A simple network for image anomaly detection and localization. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 20402–20411. https://doi.org/10.1109/CVPR52729.2023.01954
• Jeong, J., Zou, Y., Kim, T., Zhang, D., Ravichandran, A., & Dabeer, O. (2023). WinCLIP: Zero-/few-shot anomaly classification and segmentation. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 19606–19616. https://doi.org/10.1109/CVPR52729.2023.01878
• Batzner, K., Heckler, L., & König, R. (2024). EfficientAD: Accurate visual anomaly detection at millisecond-level latencies. Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, 128–138. https://doi.org/10.1109/WACV57701.2024.00020
• Bergmann, P., Batzner, K., Fauser, M., Sattlegger, D., & Steger, C. (2021). The MVTec anomaly detection dataset: A comprehensive real-world dataset for unsupervised anomaly detection. International Journal of Computer Vision, 129, 1038–1059. https://doi.org/10.1007/s11263-020-01400-4
Downloads
Published
Issue
Section
License
Copyright (c) 2025 International Journal of Pharmaceutical, Clinical and Innovative Research

This work is licensed under a Creative Commons Attribution 4.0 International License.