Background
Dispensing Error occurs frequently in outpatient pharmacies. The aim of this article is to explore the value of the YOLO-V5 deep learning algorithm for object detection in packaging drugs from outpatient pharmacies and to develop an artificial intelligence assist pharmacist drug dispensation system (AI-APDDS) capable of completely reducing or eliminating dispensing errors.
Methods
A total of 1784 images from 136 different packaging drugs were collected and labeled to form a deep learning dataset. The dataset was split into training and validation sets at a ratio of 3:1. The YOLO-V5 deep-learning algorithm was trained using images from our dataset (training epochs:1000, batch size:4, learning rate:0.01). The values of precision (Pr) and mean average precision(mAP) were used as measures for model performance evaluation.
Results
Pr in the training set was, for all models, equal to 1.00. The mAP_0.5 of YOLO-V5x was 0.992, which was higher than that of YOLO-V5n (0.975), YOLO-V5s (0.976), YOLO-V5m (0.978), and YOLO-V5l (0.983). The mAP_0.5:0.95 of YOLO-V5x was 0.955, which was higher than those of YOLO-V5n (0.916), YOLO-V5s (0.920), YOLO-V5m (0.921) and YOLO-V5l (0.935). The training time and model size were 92.67 hours and 465MB, respectively, for YOLO-V5x, which were the highest among the four models. The speed of detection for one image was 6.0ms for YOLO-V5n, which was the fastest among the four models.
Conclusions
It can identify the packaging drugs accurately for five submodels of YOLO-V5, it is feasible to implement the artificial-intelligence assisted drug dispensation system for pharmacist to achieve “zero” dispensing error.