Autoinjectors are among the medical devices that enable the safe self-administration of medication. Their digitisation has become a major focus in recent years. This thesis investigates a smartphone-only alternative to built-in electronics and add-on modules to capture an autoinjector’s usage state and specific information.
The connectivity of disposable autoinjectors simplifies patient monitoring and enhances data reliability in clinical studies. However, integrating electronics directly into these single-use medical devices generates significant plastic and electronic waste. Conversely, reusable add-on modules represent a substantial additional expense for both patients and healthcare providers.
This thesis aims to build a computer vision solution that relies solely on a smartphone camera. The project addresses three primary objectives:
The technical implementation relies entirely on classic computer vision and machine learning techniques applied to live camera frames across three phases.
First, a QR code affixed to the autoinjector, encoding device specifications and content details, is read. Then, the extracted spatial coordinates of the QR code allow the system to crop the camera frame and isolate the Region of Interest (ROI).
Second, a Convolutional Neural Network (CNN) classifies the extracted ROI to determine whether the autoinjector has been used or not. This deep learning model was trained on a custom image dataset within a Python environment and exported for local smartphone execution.
Third, the complete pipeline is implemented as an Android application written in Kotlin, handling both image processing and the display of results.
Trained on 3180 images, the current model achieves an overall accuracy of 99.69%, with a precision of 100% for used autoinjectors and 99.07% for unused ones (Figure 1). The application is structured around three interfaces: a home dashboard, a scanning view featuring a viewfinder with real-time instructions, and a results summary (Figure 2).
The scalability of this first implementation is limited by its local Android architecture. A backend infrastructure would enable large-scale deployments. Additionally, expanded training datasets would support diverse autoinjector types. These improvements could be further extended to automated return systems for used or expired autoinjectors, offering better inventory traceability.