EventsThe 1st International Online Conference on Imaging
Published
This submission belongs to the session S2. Computer Vision and Pattern Recognition of the event The 1st International Online Conference on Imaging
Published date
30 Oct, 2026
Academic Editor
author-avatarRaimondo Schettini
Citation
Yassine Bouhelassa, Khalid Hachemi, Capsule Detection in Pharmaceutical Images Using YOLO26 for Automated Visual Inspection, in Proceedings of The 1st International Online Conference on Imaging, 4 November–6 November 2026, MDPI: Basel, Switzerland
Share
Email
Facebook
Twitter
LinkedIn

Capsule Detection in Pharmaceutical Images Using YOLO26 for Automated Visual Inspection

Yassine Bouhelassa 1
Khalid Hachemi 1
1. Laboratory of Production Engineering and Industrial Maintenance (LGPMI), Institute of Maintenance and Industrial Safety, University of Oran 2 Mohamed Ben Ahmed, B.P. 1015 El M’naouer, Oran, 31000, Algeria
Abstract

Introduction: Automated visual inspection is increasingly important in pharmaceutical production, where capsule presence verification, localization, and counting must be performed consistently to reduce manual inspection errors. Real-time object detection models offer a practical solution for integrating image-based quality control into production-line monitoring. This work investigates the use of Ultralytics YOLO26 for capsule detection in pharmaceutical images.

Methods: A YOLO26 nano model was trained for capsule detection using an open-access capsule image dataset containing 314 images. The model was trained for 20 epochs with a batch size of 15 using the Ultralytics framework on a Tesla T4 GPU. The dataset was configured as a single-class object detection problem where capsules were annotated using bounding boxes. Model performance was evaluated using standard object detection metrics, including precision, recall, mean average precision at 50% IoU, and mean average precision from 50% to 95% IoU.

Results: The trained model achieved a precision of 0.862, a recall of 0.822, an mAP50 of 0.887and an mAP50–95 of 0.670 on the validation set, which included 31 images and 318 capsule instances. These results indicate that the model can reliably localize capsules under varying image conditions while maintaining fast inference performance.

Conclusions: The proposed YOLO26-based approach demonstrates the potential of deep learning for automated capsule detection in pharmaceutical imaging. The system can support preliminary visual inspection tasks such as capsule presence verification, localization, and counting. Future work will extend the dataset, include real production-line images, and investigate defect-specific capsule classification.

Keywords
YOLO26
Object Detection
Pharmaceutical Imaging
Capsule Detection
Deep Learning
Computer Vision
Automated Visual Inspection
One‑Class Deep Learning Framework for Anti‑NTD Plant Identification Using Synthetic Negatives and Transfer Learning
YOLO-Based Deep Learning Model for Real-Time Polyp and Dysplasia Detection in IBD Colonoscopy