Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

📢 Domain & Email Migration Notice

From May 30th, 2026, Fundusnap will transition to new domains as fundusnap.com will not be renewed:

🌐 Website: fundusnap.faizath.com (formerly fundusnap.com)
⚙️ API: fundusnap-api.faizath.com (formerly api.fundusnap.com)
📧 Email: contact@fundusnap.faizath.com (formerly contact@fundusnap.com)
🛰️ CDN: fundusnap-cdn.faizath.com (formerly cdn.fundusnap.com)
📈 Status Pages: https://status.faizath.com/status/fundusnap (formerly status.fundusnap.com)

Fundusnap

AI-powered diabetic retinopathy screening — from your phone to a clinical second opinion.

🌐 Website  •  ⚙️ API  •  📈 Status

Watch the Fundusnap demo video

▶️ Watch the demo video


🔍 What is Fundusnap?

Fundusnap is a comprehensive medical-imaging solution that helps healthcare workers and patients detect and analyze diabetic retinopathy (DR) from fundus (retinal) images. A user captures a photo of the back of the eye with the mobile app, and Fundusnap returns an AI classification of disease severity, highlights the specific retinal lesions it found, and lets the user ask follow-up questions to an AI medical assistant that explains the result in plain language.

It is delivered as an end-to-end product spanning a mobile app, a backend API, a marketing/management website, and a family of open AI models — a retinal lesion detector, a diabetic-retinopathy severity classifier, and a result-explanation language model — together with the synthetic dataset that language model was trained on.

🩺 The Problem

Diabetic retinopathy is one of the leading causes of preventable blindness worldwide, and it disproportionately affects regions with limited access to specialist eye care.

  • Too few specialists. Screening for DR traditionally requires an ophthalmologist to manually examine retinal images — a scarce and unevenly distributed resource, especially in rural and developing areas.
  • Late detection. Early-stage DR is often asymptomatic. By the time patients notice vision problems, the disease may already be advanced and harder to treat.
  • High screening cost & low throughput. Manual grading is slow and expensive, making large-scale population screening impractical.
  • Results are hard to understand. Even when a patient receives a screening result, the clinical terminology is rarely accessible to non-experts, leading to poor follow-up.

💡 How Fundusnap Solves It

Fundusnap brings specialist-grade screening to a smartphone and makes the result understandable to everyone:

  1. Capture — The Flutter mobile app guides users to take a high-quality fundus image (with photo and video capture support).
  2. Classify — The image is sent to the API, which runs it through Microsoft Azure Custom Vision to grade the severity of diabetic retinopathy, with our own fundusnap-v1-severitycls-rn34-22m ResNet34 grader as the open, self-hostable alternative.
  3. Detectfundusnap-v1-lesiondet-yolo11m-20m, a YOLO11m detector, locates and bounds individual retinal lesions and landmarks (microaneurysms, haemorrhages, exudates, optic disc, fovea), so the result is explainable rather than a black box.
  4. Explain — An AI medical chat assistant interprets the findings in simple, informative language and encourages appropriate follow-up with a healthcare professional — without making a clinical diagnosis. Two interchangeable backends serve this role: Microsoft's Phi-4 via OpenRouter, and the self-hosted fundusnap-v1-resultexp-clm-mediphi-3.8b-adapter — a MediPhi-Instruct LoRA fine-tuned on our FundusTalk v1 dataset to answer in Indonesian or English.
  5. Stay available offline — The severity classifier also ships as an ONNX graph for on-device inference, acting as a fallback for poor connectivity or primary-API outages, so screening keeps working where it's needed most.

All medical data is handled with security and compliance in mind (JWT-based auth, encrypted transmission, and secure image storage).


🏆 Achievements & Competitions

Fundusnap was built for and submitted to three national programs in Indonesia, achieving recognition in each:

Competition Achievement
elevAIte Microsoft × Biji-biji Hackathon 2025 — Tel-U Hub 🥉 3rd Winner
Digination Fest PPI Hackathon 2025 🏅 Top 5 Finalist
Pikiran Terbaik Negeri × elevAIte 2025 🏅 Top 30

elevAIte Microsoft × Biji-biji Hackathon 2025 — 🥉 3rd Winner

Organized by Microsoft, the Biji-biji Initiative, and Telkom University, held at Tel-U Hub.

ElevAIte Indonesia is an AI-skilling initiative by Microsoft and the Biji-biji Initiative that aims to equip 1 million Indonesian talents with relevant AI skills for the era of digital transformation — free of charge and with no selection barrier. The program partners with government, industry, educational institutions, and communities to connect talent with new opportunities created by AI, such as improved productivity, creativity, and responsible innovation. It runs as a journey — from mastering AI fundamentals on Microsoft Learn and earning the Microsoft AI-900 certification, to a Hackathon where participants apply their AI skills to solve real-world problems, followed by an incubation phase. Fundusnap was developed and submitted during this hackathon stage and placed 3rd overall.

Digination Fest PPI Hackathon 2025 — 🏅 Top 5 Finalist

Organized by the Indonesia World Students Association (Perhimpunan Pelajar Indonesia Dunia / PPI Dunia).

Digination Competition 2025, themed "AI for All: Bridging Innovation and People," is a hackathon open to active undergraduate Indonesian students from universities around the world. Teams of three members from one university submit a paper and video to advance through the stages, competing across three impact tracks — Health, Education, and Social Business — for prizes of IDR 10,000,000 per track. Fundusnap competed in the health track and reached the Top 5 Finalists.

Pikiran Terbaik Negeri × elevAIte 2025 — 🏅 Top 30

Organized by Yayasan BUMN, Microsoft, and the Biji-biji Initiative.

Pikiran Terbaik Negeri is a grant-competition created by Yayasan BUMN in partnership with impact-investment organizations, media partners, and the ANGIN Foundation. The program's mission is to identify, nurture, and develop social entrepreneurs (menemukan, membina, dan mengembangkan wirausaha sosial) who create meaningful impact for Indonesian communities and environmental sustainability. Beyond grants, participants receive bootcamp training to strengthen their entrepreneurial skills and networking opportunities with financiers in the impact sector. Fundusnap was selected into the Top 30.

📸 Moments

🥉 3rd Winner Awarding
The Fundusnap team receiving the Juara 3 award at the elevAIte Microsoft × Biji-biji Hackathon 2025, held at Tel-U Hub.
🏢 Fundusnap Booth
The team demonstrating Fundusnap to visitors and judges at the exhibition booth, held during the competition day at Telkom University.

📱 Screenshots


🧩 Project Components

Component Repository 🤗 Hub Deployment
📱 Mobile App fundusnap-app Android APK release
🌐 Website fundusnap-web fundusnap.faizath.com
⚙️ Backend API fundusnap-api fundusnap-api.faizath.com
🔬 Lesion Detector fundusnap-v1-lesiondet-yolo11m-20m model Self-hosted FastAPI service
🧠 Severity Classifier fundusnap-v1-severitycls-rn34-22m model ONNX · offline-capable
💬 Result Explainer fundusnap-v1-resultexp-clm-mediphi-3.8b-adapter model Self-hosted (merged → vLLM)
📚 FundusTalk v1 Dataset fundusnap-fundustalk-v1-chatsft-11k dataset Hugging Face dataset

📱

Fundusnap Mobile App

A modern cross-platform app that guides users to capture high-quality fundus images, runs AI-powered diabetic retinopathy analysis, and answers questions through an intelligent medical chatbot.

Flutter Dart Flutter Bloc Go Router Dio

✨ Highlights: Fundus photo & video capture · Encrypted on-device secure storage · On-the-go DR analysis · Conversational medical assistant

Repository  Android APK

Full tech stack — Mobile App
  • Framework: Flutter (SDK ^3.8.0)
  • Language: Dart
  • State Management: Flutter Bloc
  • Navigation: Go Router
  • Key Dependencies:
    • Camera — camera: ^0.11.1
    • Video Player — video_player: ^2.9.5
    • Secure Storage — flutter_secure_storage: ^9.2.4
    • Image Picker — image_picker: ^1.1.2
    • HTTP Client — dio: ^5.8.0+1

🌐

Fundusnap Website

The public-facing landing experience that introduces the product, showcases its features, and routes visitors to downloads and access links.

Next.js React TypeScript Tailwind CSS Cloudflare

✨ Highlights: Marketing & product showcase · Edge-hosted on Cloudflare Pages

Repository  Live site


⚙️

Fundusnap API

The backend brain — handling authentication, image analysis & processing, AI chat interactions, and secure medical-data storage.

Bun Node.js Express MongoDB JWT Cloudflare R2 Azure Custom Vision OpenRouter

🤖 AI services: Azure Custom Vision (DR grading) · fundusnap-v1-lesiondet-yolo11m-20m (lesion detection) · medical chat via Microsoft Phi-4 on OpenRouter or the self-hosted MediPhi LoRA adapter

Repository  Live API

Full tech stack — API
  • Runtime: Bun / Node.js
  • Framework: Express.js
  • Database: MongoDB with Mongoose
  • Authentication: JWT (access + refresh tokens)
  • Storage: Cloudflare R2 (with Azure Blob Storage support)
  • AI Services:
    • Microsoft Azure Custom Vision API (DR severity grading)
    • fundusnap-v1-lesiondet-yolo11m-20m — self-hosted YOLO11m lesion-detection service
    • Medical chat, two interchangeable backends:
      • OpenRouter API with Microsoft's Phi-4 model
      • Self-hosted fundusnap-v1-resultexp-clm-mediphi-3.8b-adapter (MediPhi-Instruct LoRA)
  • Email Service: Nodemailer

🔬

Fundusnap Lesion Detector — fundusnap-v1-lesiondet-yolo11m-20m

A YOLO11m object detector that finds where the findings are. Given one colour fundus photograph it returns bounding boxes for twelve classes — ten pathological findings plus the optic disc and fovea as anatomical landmarks — each with a label and a confidence score, so a severity grade comes with visual evidence instead of being a black box.

YOLO11m Ultralytics PyTorch FastAPI 20M parameters CC BY-NC 4.0

📊 Performance: 0.53 mAP@50 · 0.28 mAP@50-95 · 0.54 precision · 0.53 recall

✨ Highlights: 12 classes (10 lesions + Disc/Fovea landmarks) · JSON and annotated-image endpoints · Dockerised FastAPI service · exports to ONNX, TorchScript, TFLite, CoreML

Repository  Hugging Face  Self-hosted

Full tech stack — Lesion Detector
  • Framework: Ultralytics 8.3.165 / PyTorch
  • Base Model: yolo11m.pt, COCO-pretrained — yolo11m.yaml scale m, anchor-free Detect head, nc=12
  • Input: 640×640, letterboxed (coordinates returned in the original image's pixel space)
  • Training: 35 epochs, batch 16 (nbs=64), optimizer auto (lr0=0.01, lrf=0.01, momentum 0.937, weight decay 0.0005), 3 warmup epochs, AMP, seed 0 deterministic
  • Loss weights: box 7.5 · cls 0.5 · dfl 1.5
  • Augmentation: mosaic 1.0 (off for the last 10 epochs), fliplr=0.5, scale=0.5, translate=0.1, HSV (0.015/0.7/0.4), erasing=0.4, RandAugment
  • Shipped checkpoint: epoch 27 — best by Ultralytics fitness (0.1·mAP50 + 0.9·mAP50-95 = 0.3071), stripped of optimiser/EMA state (~40 MB, Git LFS)
  • Serving: POST /inspect/fundus-artifacts/ (JSON detections) · POST /visualize/fundus-artifacts/ (annotated JPEG) · GET / (health) — python:3.10-slim, port 8000
  • License: CC BY-NC 4.0 (weights derive from Ultralytics YOLO11 — review Ultralytics' AGPL-3.0 terms before redistributing)

🧠

Fundusnap Severity Classifier — fundusnap-v1-severitycls-rn34-22m

A ResNet34 classifier that grades how severe the retinopathy is. It predicts one of the five standard ordinal ICDR grades (0 = No DR through 4 = Proliferative) with a probability for each, and ships as an ONNX graph with a dynamic batch axis — which is what keeps screening working offline or during a primary-API outage.

FastAI PyTorch ONNX ResNet34 22M parameters CC BY-NC 4.0

📊 Performance: 0.82 accuracy · 0.8153 macro F1 · 0.81 macro precision · 0.82 macro recall

✨ Highlights: 5 ordinal ICDR grades · ONNX opset 14 with dynamic batch · fastai checkpoint for further fine-tuning · ONNX → TensorFlow/TFLite path for on-device inference

Repository  Hugging Face  ONNX / offline-capable

Full tech stack — Severity Classifier
  • Deep Learning Framework: FastAI / PyTorch, exported to ONNX (opset 14)
  • Base Model: resnet34, ImageNet-pretrained (timm/resnet34.tv_in1k)
  • Head: fastai default (AdaptiveConcatPool2d → BN/dropout → linear), n_out=5
  • Loss Function: Focal Loss
  • Input: Resize(224) centre crop, ImageNet normalisation
  • Training: batch 32, learn.fine_tune(4) (1 frozen + 4 unfrozen epochs), LR from lr_find() valley, seed 3865
  • Data Augmentation: Albumentations — ShiftScaleRotate, HorizontalFlip, RandomBrightnessContrast, HueSaturationValue
  • Dataset: Kaggle resized-2015-2019-diabetic-retinopathy-detection (EyePACS 2015 + APTOS 2019), each grade resampled to 10,000 rows for a 50,000-image balanced frame, 10% held out
  • Performance Metrics:
    • Overall Accuracy: 0.82
    • Macro Average F1-Score: 0.8153
    • Weighted Average F1-Score: 0.81
    • Grades 3–4 separate near-perfectly (F1 0.97–0.98); grades 0/1/2 sit at 0.65–0.76
  • Deployment: ONNX Runtime for inference (offline-capable), fastai checkpoint for fine-tuning
  • License: CC BY-NC 4.0 (training data carries its own Kaggle / EyePACS / APTOS terms)

💬

Fundusnap Result Explainer — fundusnap-v1-resultexp-clm-mediphi-3.8b-adapter

A LoRA adapter over microsoft/MediPhi-Instruct that turns a prediction record into a plain-language explanation, in Indonesian or English. It is the conversational layer of the pipeline and the only model that never sees an image — it reads the severity probabilities and the lesion boxes the other two produce, and explains them without ever diagnosing.

PEFT LoRA MediPhi-Instruct Transformers FastAPI 3.8B + 50M LoRA Indonesian and English CC BY-NC 4.0

📊 Performance: val loss 1.2290.691 · 0/60 stub replies (base: 10/60) · 40/41 Indonesian prompts answered in Indonesian (base: 35/41)

✨ Highlights: explains rather than diagnoses — every conversation routes to a clinician · bilingual with code-switching · FastAPI serve.py · merge.py fuses the adapter into a standalone checkpoint for vLLM

Repository  Hugging Face  Self-hosted / vLLM

Full tech stack — Result Explainer
  • Base Model: microsoft/MediPhi-Instruct (Phi-3 architecture, 3.82B)
  • Method: QLoRA-style supervised fine-tuning, loss on assistant turns only
  • LoRA config: r=32, α=64, dropout 0.05 — targets qkv_proj, o_proj, gate_up_proj, down_proj
  • Trainable params: 50,331,648 (1.30% of the model)
  • Training Data: FundusTalk v1 — 10,201 synthetic consultations distilled from microsoft/phi-4 (~70% Indonesian incl. code-switched, ~30% English)
  • Schedule: 2 epochs, 638 steps, lr 1e-4 cosine, effective batch 32, bf16
  • Hardware: 1× A100-SXM4-40GB, ~170 min
  • Prompt envelope: the exact three-system-message format the API sends (persona → severity JSON → detection JSON), byte-for-byte compatible with JSON.stringify
  • Serving: GET / · POST /chat · POST /prompt (returns the envelope without generating) — or merge and serve with vLLM
  • Licensing: weights CC BY-NC 4.0 · repository code MIT · base and teacher models both MIT

📚

FundusTalk v1 — fundusnap-fundustalk-v1-chatsft-11k

The synthetic SFT dataset behind the Result Explainer: 10,849 multi-turn consultations that teach a model to explain a diabetic retinopathy screening result and never to diagnose it. Fully synthetic — no patient data, images, or recorded conversations — with every prediction record procedurally generated and every rejected sample published alongside the kept ones.

Hugging Face Datasets JSONL 10,849 conversations Teacher: phi-4 Indonesian and English CC BY-NC 4.0

📊 Measured quality: 97.2% numeric grounding · 100% opening diversity · 88.8% safety-refusal rate · 90.4% keep rate after filtering

✨ Highlights: 39,288 assistant turns (mean 77.2 words) · 5 categories incl. safety_refusal and adversarial_oos · 12 patient/caregiver/clinician personas · splits 10,201 / 324 / 324 · drops straight into TRL's SFTTrainer

Repository  Hugging Face  Hugging Face dataset

Full breakdown — FundusTalk v1
  • Teacher: microsoft/phi-4 via OpenRouter · Intended student: microsoft/MediPhi-Instruct
  • Scale: 10,849 conversations · 39,288 assistant turns · 3.62 turns per conversation
  • Splits: train 10,201 · validation 324 · test 324 — disjoint by conversation id, stratified on category, language, grade, and record profile
  • Configs: default (filtered, 10,849) · raw (unfiltered teacher output, 12,000) · scenarios (the seeded, deterministic generation plan)
  • Categories: result_explanation 42.2% · safety_refusal 16.5% · detector_literacy 16.3% · general_knowledge 14.5% · adversarial_oos 10.5%
  • Languages: Indonesian 47.2% · English 29.3% · Indonesian–English code-switch 23.5%
  • Record profiles: deliberate edge cases — landmarks_only, empty_detections, poor_quality, low_confidence, disagreement
  • Filtering: 12,000 generated → 10,849 kept (90.4%); the safety-critical filters are no_clinician_referral and diagnostic_language
  • Reproducibility: seeded scenario plan, full generation and filtering logs, complete reject list
  • License: CC BY-NC 4.0

Important

The four AI repositories above are released for research and engineering use. None of them is a medical device, none carries regulatory clearance (FDA, CE/MDR, or otherwise), and none has been prospectively validated. Reported metrics are self-reported on the runs' own validation splits. They must never be the sole basis for a diagnosis, referral, or treatment decision — keep a qualified clinician in the loop.


🔒 Security & Compliance

The entire system is designed with security and compliance in mind:

  • Secure authentication using JWT (short-lived access tokens + refresh tokens)
  • Encrypted data transmission
  • Secure storage of medical images
  • Privacy-conscious handling of medical data
  • Regular security updates and patches

🚀 Getting Started

Each component has its own repository with detailed setup instructions. Please refer to the individual README files in each repository for specific setup and installation steps.

📝 License

This project is licensed under the MIT License.

👥 Authors

Fundusnap Developers dev@fundusnap.faizath.com

About

Organization profile and shared community health files for Fundusnap — accessible AI-powered diabetic retinopathy screening.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors