A React Native TypeScript mobile application for offline tomato disease diagnosis using TensorFlow Lite. Designed for low-literacy farmers with Amharic localization and large, accessible UI elements. Built with Expo managed workflow for easy development and deployment.
# TomatoDx
**Offline tomato disease diagnosis for smallholder farmers.**
TomatoDx is a cross-platform mobile app that helps farmers and gardeners detect tomato plant diseases quickly and accurately. Using on-device machine learning, the app analyzes leaf photos locally, no internet connection required, and returns a diagnosis with treatment guidance in the user's preferred language.
**Live demo:** tomatodx.netlify.app
---
## Screenshots
---
## Features
- **Instant leaf scanning** — Capture a photo with the camera or upload from the gallery.
- **On-device AI inference** — TensorFlow.js runs entirely on the phone; images never leave the device unless you choose to share them.
- **10 disease classes** — Detects common tomato diseases plus healthy-leaf classification.
- **Actionable results** — View confidence scores, severity levels, symptoms, and treatment advice for each diagnosis.
- **Scan history & insights** — Review past scans, track trends over time, and monitor crop health from the dashboard.
- **Multilingual support** — English, Amharic (አማርኛ), and Afaan Oromoo.
- **Ethiopian calendar** — Dates displayed using the Ethiopian calendar where applicable.
- **Privacy-first design** — All processing happens locally; optional sharing for research is entirely user-controlled.
- **Reminders** — Scheduled notifications to encourage regular crop checkups.
- **Dark & light themes** — Automatic theme switching based on system preference.
---
## Model Evaluation
The classifier was evaluated on a held-out test set of 15,253 images, separate from the training data, across all 10 disease classes plus an out-of-distribution "Unknown" class used to reject non-leaf or unrecognized inputs.
**Overall Accuracy:** 91.65%
**Macro F1 Score:** 0.8892
**Weighted F1 Score:** 0.9147
| Class | Precision | Recall | F1 Score |
| ----------------------------- | --------- | ------ | -------- |
| Tomato Yellow Leaf Curl Virus | 0.9958 | 0.9714 | 0. …