InspirationDiabetic Retinopathy causes avoidable permanent blindness worldwide. A severe shortage of expert eye clinicians hinders management. High diagnostic costs also prevent early eye screening. Underserved areas lack vital retinal imaging infrastructure. We created a highly accessible screening tool. Standard smartphones can now grade condition severity instantly.How We Built ItWe built RetinoAI, a multi-architecture Vision Transformer framework. The system automates retinal disease severity grading. We aggregated ten public data repositories for training. This curated nearly 54,000 balanced images. This massive data consolidation eliminated class imbalance bias. The Swin Vision Transformer outperformed traditional convolutional networks. It maps global contextual relationships across the entire retina. We fine-tuned models using Cross-Entropy Loss. An inverse frequency class weighting strategy prevented majority dominance.(\mathcal{L}(\theta )=-\sum {i=1}^{n}\sum _{k=1}^{K}w{k}\cdot y_{i,k}\cdot \log (\phi _{i,k}))Challenges We FacedInitial testing led to severe diagnostic metric degradation. Common medical datasets skew heavily toward healthy patients. We solved this using TrivialAugmentWide and oversampling. Running transformer models on mobile screens is intensive. We decoupled the heavy architectures to fix this. We utilized a localized Lion and MobileViT architecture. This maintained high accuracy under resource constraints.What We LearnedLarge-scale dataset amalgamation is highly reliable. It works better than simple algorithmic weighting alone. Global attention mechanisms drastically improved lesion mapping sensitivity. Our final Swin-ViT model achieved 95.70% classification accuracy. It also reached an outstanding 99.40% macro-AUC score. Earlier performance gaps stemmed purely from dataset structure issues.
Built With
- a100
- amazon-web-services
- nvidia
- onnx
- pytorch
- react.js
- supabase
- timm
- torchscript
Log in or sign up for Devpost to join the conversation.