In an article recently published in the journal Sensors, researchers proposed a new two-stage induced deep learning (TSIDL) system to classify similar drugs with different packaging accurately and efficiently.
Background
Medical errors are among the leading causes of death in the United States (US), with largely preventable medication errors accounting for a significant share of all medical errors. Moreover, medication errors also lead to huge economic losses annually worldwide. Thus, medication errors must be prevented to decrease medication-related global harm substantially in the future. Currently, the absence of uniformity in generic drug appearance poses significant risks for medical errors.
Several medications have look-alike/sound-alike (LASA) names, which can cause fatal clinical issues. Different strategies have been proposed to mitigate LASA medication errors, such as using tall-man lettering, color coding, and separate storage locations.
Automated dispensing systems can allow robotic dispensers, pharmacy assistants, and pharmacists to share the medication dispensing responsibility to improve safety. However, automation cannot reduce all errors, as workflow adjustments can result in new errors.
Although barcode medication administration (BCMA) systems can enhance medication safety, the implementation of the BCMA system is technically challenging. In recent years, deep learning (DL) has been investigated extensively for medication classification.
However, due to low-contrast text, DL-based systems cannot effectively differentiate the challenging medication classes, such as capsules and pills. In a recent study, bidirectional generative adversarial networks (BiGAN) were applied to classify four unpackaged pill categories using near-infrared spectroscopy (NIS). This approach effectively addressed the common unpackaged pill classification challenges, including sensitive identification error costs, unbalanced samples, and insufficient samples.
Several studies have also been performed to investigate medication classification in different packaging contexts, such as vial bottles, boxed and bottled packaging, and blister packaging, using computer vision, optical character recognition (OCR) and image cropping techniques, deep convolutional neural networks (DCNN) combined with natural language processing (NLP) and OCR, and induced deep learning (IDL) approach.
A recent study developed a special IDL framework for recognizing medication images. IDL incorporates human cognition and experience into DL by image processing to improve classification capabilities, which reduces the need for large training data.
However, previous studies primarily focused on classifying the same type of packaged drugs or unpackaged medications. Although DL methods were applied for unpackaged drug recognition with higher accuracy, the share of unpackaged drugs in clinical operations is much smaller compared to packaged drugs of different characteristics and types.
Fewer studies have been performed for DL-based packaged drug classification. Additionally, most of these studies focused on a single packaging type and did not consider medications with various packaging types that are used extensively in the actual clinical-medication-dispensing process within medical facilities, which substantially increases the dispensing error risks.
Classifying similar drugs with diverse packaging
In this paper, researchers proposed a novel TSIDL method for accurate and efficient diverse-packaging drug classification. In the TSIDL framework, the first-stage CNN was used to classify medication class similarity groups (SGs), and then the second-stage CNN was employed to realize a more effective classification within every SG for particular medication names.
The proposed method allowed the DL models to directly learn critical features of a drug’s image based on the dispensing experience of the pharmacists. An experienced pharmacist cropped the key features from every drug image, such as the text on a box or engraved details on a pill, to provide more accurate content to DL models for learning.
Researchers assessed the feasibility of using the proposed TSIDL method to realize more precise classification results than advanced CNNs. They also investigated the TSIDL computational speed to determine the method's applicability in practical clinical operations.
The dataset used in this study comprised 108 medications with different packaging classes, such as one type of enema, 18 types of blister packs, five types of suppositories, and 12 types of bottles. Overall, researchers prepared a dataset containing 7776 images of 108 drugs distributed across 12 package types.
In the first DL stage, the first-stage CNN was trained using medication images from 108 diverse packaging classes to obtain the CNN Model 0. Subsequently, a five-fold cross-validation confusion matrix (5-fold CVCM) was generated using CNN Model 0.
In the similar-drugs grouping stage, the five-fold CVCM was subjected to a new similar-drugs grouping algorithm to classify SGs, leading to the formation of N number of SGs (SG1-N). Researchers determined the optimal regions of interest (ROI) cropping size during the IDL stage based on each SG’s characteristics and guided by the pharmacists' expertise.
Then, the optimal cropped ROI images of the drug were utilized for training Model 1-N corresponding to SG1-N in the second stage. A special AlexNet-based CNN architecture, designated single-stage CNN (SSCNN), was proposed for diverse-packaging drug classification.
Significance of the study
The proposed TSIDL method outperformed existing advanced CNN models in every classification metric. 98.16% drug classification accuracy was achieved using the SSCNN, while 99.92% group-level classification accuracy was attained using the new grouping algorithm.
Additionally, the optimal ROIs for five SGs (SG1-SG5) were determined successfully. Using the IDL method increased the accuracy for all SGs, with the accuracy of SG3 increasing significantly from 70.00% to 91.59%. Moreover, the novel TSIDL method achieved 99.39% classification accuracy with only 3.12 ms inference time per TSIDL image.
To summarize, the findings of this study demonstrated the potential of the proposed TSIDL method for the classification of similar drugs with different packaging in real-time and the feasibility of using the method in future dispensing systems to prevent the occurrence of dispensing errors and effectively ensure the safety of patients.