Virtually Possible: Enhancing Quality Control of 3D-Printed Medicines with Machine Vision Trained on Photorealistic Images

Abstract

Three-dimensional (3D) printing is an advanced pharmaceutical manufacturing technology, and concerted efforts are underway to establish its applicability to various industries. However, for any technology to achieve widespread adoption, robustness and reliability are critical factors. Machine vision (MV), a subset of artificial intelligence (AI), has emerged as a powerful tool to replace human inspection with unprecedented speed and accuracy. Previous studies have demonstrated the potential of MV in pharmaceutical processes. However, training models using real images proves to be both costly and time consuming. In this study, we present an alternative approach, where synthetic images were used to train models to classify the quality of dosage forms. We generated 200 photorealistic virtual images that replicated 3D-printed dosage forms, where seven machine learning techniques (MLTs) were used to perform image classification. By exploring various MV pipelines, including image resizing and transformation, we achieved remarkable classification accuracies of 80.8%, 74.3%, and 75.5% for capsules, tablets, and films, respectively, for classifying stereolithography (SLA)-printed dosage forms. Additionally, we subjected the MLTs to rigorous stress tests, evaluating their scalability to classify over 3000 images and their ability to handle irrelevant images, where accuracies of 66.5% (capsules), 72.0% (tablets), and 70.9% (films) were obtained. Moreover, model confidence was also measured, and Brier scores ranged from 0.20 to 0.40. Our results demonstrate promising proof of concept that virtual images exhibit great potential for image classification of SLA-printed dosage forms. By using photorealistic virtual images, which are faster and cheaper to generate, we pave the way for accelerated, reliable, and sustainable AI model development to enhance the quality control of 3D-printed medicines.

Introduction

Three-dimensional (3D) printing, also known as additive manufacturing, has emerged as a revolutionary technology in the pharmaceutical industry. While traditional pharmaceutical manufacturing adopts the paradigm of ‘one size fits all’, where large-scale manufacturing leads to identical dosage forms, the advent of 3D printing enables the production of small batches and on-demand fabrication of more personalized medicines [1,2]. It has several advantages over conventional manufacturing methods, including the ability to fabricate complex geometries with high precision, rapid prototyping, and reduced waste and cost [3,4,5,6,7,8,9]. Three-dimensional printing grants the ability to tailor medicines seamlessly to meet the individual patient’s needs, thereby enhancing the safety and efficacy of therapeutics [10]. The technology has the potential to achieve the on-demand manufacturing of personalized medical products at the point of care (PoC), where hospitals and healthcare providers can have their own 3D printers to produce customized medical devices or drug formulations as needed [11]. However, the PoC manufacturing of personalized medicines using 3D printing technologies has partially been hindered by the challenges associated with its quality control (QC).

QC is a crucial aspect of pharmaceutical manufacturing, ensuring that the product is safe, effective, and its production process is consistent and reproducible [12]. Existing traditional QC methods for large-scale manufacturing follow an end-product testing paradigm, which is usually destructive [13]. Thus, this requires additional dosage forms fabricated for QC purposes, which may not be suitable for the 3D printing of costly drugs [11]. With the transition from batch production to continuous production in the pharmaceutical industry, process analytical technology (PAT) has gained increasing research interest as a quality control method [14]. PAT provides the opportunity to monitor pharmaceutical manufacturing processes by real-time measurements and the control of predefined critical quality attributes and critical process parameters [15]. The widespread adoption of PAT by the pharmaceutical industry has been driven by regulatory guidelines like the FDA Pharmaceutical Quality for the 21st Century Initiative [16]. The application of PAT in pharmaceutical 3D printing aligns with the FDA’s emphasis on QC, traceability, and risk management, which will ensure that the 3D-printed products meet the regulatory standards for safety and efficacy [17]. This necessitates the development of non-destructive PAT, which maintains the integrity of the final product and requires minimal sample preparation. Researchers have explored the use of different PAT tools such as Near-Infrared Spectroscopy (NIR) and Raman Spectroscopy; however, these techniques are hindered by high costs and do not provide information regarding the quality of the print structure [18,19].

A potential technology that can be used to provide structural information is machine vision (MV), which is a subset of artificial intelligence (AI). AI is an emerging technology in pharmaceutics in which machines are trained to perform tasks like humans, with the end goal of replacing human activity. In pharmaceutics, AI has the potential to accelerate developments through automating tasks of varying complexity, and has recently been applied to predicting 3D printing outcomes, food–drug interaction, crystallization, and the generation of nanoparticles [20,21,22,23,24]. Similarly, MV has been researched in pharmaceutics. MV, also referred to as computer vision, is a rapidly growing subset of AI that involves the use of digital images and pattern recognition algorithms to interpret and understand visual information. Compared to manual inspection, MV offers digital precision, speed, and is not subject to human error or bias [25]. In manufacturing, MV systems can be employed for real-time QC monitoring, allowing them to perform tasks such as inspection and identification [26]. By automating visual tasks and providing fast and accurate results, MV is helping to improve efficiency, reduce errors, and enhance safety in various applications [27,28,29,30]. In pharmaceutics, MV was found to achieve high accuracy in the real-time detection of measuring coating thickness and detecting defects in film-coated tablets [28]. It has also been used for inspecting liquid droplets in pharmaceutical injections [27], data augmentation [30], and in situ monitoring of the selective laser sintering process [29].

Collectively, these studies demonstrate that MV can perform automated QC tasks with high accuracy, precision, and speed, which could be applied to pharmaceutical 3D printing. However, a large dataset is required for model development, which for nascent technology like 3D printing, can be a time-consuming and costly endeavor [31]. One approach is to generate synthetic data that are used to train the AI platform. Synthetic data refers to data that are artificially generated to resemble real-world data. They are created using algorithms and models that consider patterns observed in existing data. Synthetic data are simpler and more cost effective to obtain than real data [32]. Additionally, synthetic data are more sustainable and can be generated in potentially unlimited numbers with pre-annotation, which would otherwise be required to be added manually to the real-world data [33]. Synthetic data have been successfully demonstrated to enhance model performance [31,32,33,34,35]. Additionally, it is important to highlight that the Medicines and Healthcare products Agency (MHRA) has introduced two synthetic datasets that have played a significant role in advancing medical technologies in the fight against COVID-19 and cardiovascular disease. According to Janet Valentine, the Director of the Clinical Practice Research Datalink, these synthetic datasets will assist in accelerating the market entry of safe products, thereby enabling patients to enjoy the advantages of cutting-edge technological progress [36]. Therefore, with its growing adoption, synthetic data could address the lack of data available in 3D printing.

In this study, synthetic data were used to train an AI pipeline that could be applied as a QC method of 3D-printed pharmaceuticals. The pipeline consisted of MV techniques to process the images, followed by machine learning (ML) for image classification. Synthetic data in the form of photorealistic rendered images were used to train ML models to distinguish between ‘Good’ and ‘Bad’ printing outcomes. The study focused on rendering images of three commonly printed dosage forms: capsules, tablets, and films. Once trained, the ML models were tested on real images of 3D-printed dosage forms, which were fabricated by stereolithography (SLA). The performance of the ML models was scrutinized, and the results are discussed herein.

Download the full article as PDF here: Virtually Possible: Enhancing Quality Control of 3D-Printed Medicines with Machine Vision Trained on Photorealistic Images

or read it here

Sun, S.; Alkahtani, M.E.; Gaisford, S.; Basit, A.W.; Elbadawi, M.; Orlu, M. Virtually Possible: Enhancing Quality Control of 3D-Printed Medicines with Machine Vision Trained on Photorealistic Images. Pharmaceutics 202315, 2630. https://doi.org/10.3390/pharmaceutics15112630


Read also more on Overview of Pharmaceutical 3D printing here:

3D Printing
3D Printing
You might also like