PROJECT 01
Edge AI Device for Retina Disease Detection
Portable embedded fundus camera running multi-model CNN inference on-device for diabetic retinopathy and cataract screening.
< 2 s
End-to-end inference
5
CNN models deployed
96.3%
Cataract accuracy
< 950 g
Device weight
Overview
The system is a portable, self-contained embedded device for point-of-care screening of vision-threatening retinal disease — specifically diabetic retinopathy and cataract. It combines a fundus-imaging optical front end with on-device deep-learning inference so that image capture, preprocessing, model execution, and result presentation all happen locally on the device, without any network or cloud dependency.
Edge AI is central to the design: conventional AI-driven retinal screening pipelines assume workstation-class hardware or cloud inference, which is impractical in low-resource clinical settings. Deploying quantised CNN models on a Raspberry Pi–class platform preserves patient data locality, removes connectivity as a failure mode, and brings unit hardware cost to a level consistent with field-deployable screening.
The demonstrated prototype captures fundus images through a Pi Camera V3 and a 20 D aspheric lens, runs a multi-model DR ensemble and a cataract classifier on-device, and reports a diagnosis with a per-class confidence score on an integrated LCD, driven by a joystick / button interface.
System Architecture
Optical Front End
20 D aspheric lens · Pi Camera V3 (NoIR)
Image Acquisition
OpenCV capture · preprocessing · normalisation
Edge Inference Engine
TensorFlow Lite · quantised CNNs · on-device
Ensemble & Decision
Majority-vote across 4 DR models + cataract head
Local UI & Storage
LCD display · joystick / button control · timestamped log
Hardware
| Subsystem | Selection & Role |
|---|---|
| Processing platform | Raspberry Pi 5 (4 GB) — quad-core ARM SBC used as sole compute node for imaging, preprocessing, inference and UI |
| Imaging | Raspberry Pi Camera Module V3 (NoIR + Wide) paired with a 20 D double aspheric lens for optical magnification of the retina |
| User input MCU | Arduino Leonardo — analog-to-digital conversion for joystick axes, six programmable tactile buttons, forwarded to the SBC |
| Display | Integrated LCD screen for live preview, diagnosis, and confidence readout; touch-independent, driven from the SBC |
| Power | 5 V / 5 A rechargeable Li-ion power pack sized for continuous inference under sustained load |
| Thermal | Passive cooling via aluminium heatsink; steady-state CPU temperature 61–65 °C under prolonged inference |
| Enclosure | 3D-printed acrylic frame integrating optics, SBC, MCU, display, controls and battery in a hand-held form factor (< 950 g) |
3D Prototype Showcase

Software & AI
Application code runs on Raspberry Pi OS in Python 3.10. Image capture and preprocessing are implemented with OpenCV; the user interface is composed with PyGame and rendered directly to the LCD framebuffer. Inference uses TensorFlow Lite for the quantised models, with the training-time toolchain (TensorFlow / Keras, PyTorch for exploratory work) kept off-device.
Five CNN classifiers were trained and deployed. Four architectures target diabetic retinopathy grading (MobileNetV2, EfficientNet-B0, EfficientNet-B3, EfficientNet-B5) against the APTOS 2019 Blindness Detection dataset; a fifth model, based on VGG19, performs binary cataract classification against ODIR-5K.
Trained models are converted to TensorFlow Lite and quantised to reduce memory footprint and per-inference latency without a significant accuracy penalty. At run-time all four DR models execute against the captured frame and their outputs are combined by majority vote, which reduces sensitivity to any single model's misclassification.
Key Engineering Work
- Model optimisation for edge deployment — conversion of five CNN classifiers to TensorFlow Lite with quantisation targeted at the Raspberry Pi 5 CPU inference path
- Multi-model ensemble arbitration — running four DR classifiers per frame and resolving them by majority vote to improve robustness against per-model bias
- Optical / sensor integration — mating a 20 D aspheric lens to the Pi Camera V3 to obtain a usable fundus field of view within a hand-held envelope
- SBC + MCU co-design — offloading analog joystick handling to an Arduino Leonardo so that the SBC's CPU budget is reserved for capture and inference
- Local UI stack — implementing a keyboard/mouse-free interaction model on the LCD with PyGame, suitable for use by non-technical operators
- Enclosure and thermal design — passive-cooled 3D-printed housing that keeps CPU temperatures within a safe steady-state band during continuous inference
Results & Validation
Per-model performance (deployed on Raspberry Pi 5)
System-level results
In clinical validation on 13 real patients, the ensemble correctly identified No-DR, Mild, Moderate and Severe cases at average confidence scores above 82%.
Independent ophthalmologist review of the deployment placed overall end-to-end diagnostic accuracy at approximately 70% — consistent with the intended positioning of the device as a low-cost pre-screening tool rather than a definitive diagnostic.
Technical Stack
Hardware
- Raspberry Pi 5 (4 GB)
- Pi Camera V3 (NoIR + Wide)
- 20 D double aspheric lens
- Arduino Leonardo (HID / MCU)
- LCD panel, joystick + buttons
- 5 V / 5 A Li-ion power pack
- 3D-printed acrylic enclosure
Software
- Raspberry Pi OS · Python 3.10
- OpenCV (image pipeline)
- PyGame (LCD UI)
- TensorFlow / Keras (training)
- TensorFlow Lite (edge inference)
- Quantisation toolchain
- Session logging + timestamped I/O
AI Models
- MobileNetV2 (DR)
- EfficientNet-B0 (DR)
- EfficientNet-B3 (DR)
- EfficientNet-B5 (DR)
- VGG19 (cataract)
- Majority-vote ensemble
- APTOS 2019 · ODIR-5K datasets