Overview
A computer-vision pipeline for leaf-image analysis.
This project implements a plant-disease analysis prototype around leaf images. The service accepts image payloads, checks whether the input is a leaf, runs disease classification for supported plant models, and returns prediction metadata with an explanation image.
The current service configuration includes disease models for tomato and potato, plus a separate leaf-versus-non-leaf classifier.
System flow
Preprocessing, inference, explanation, and persisted analysis.
Technical contribution
Training and serving are both represented in the repository.
- Built train, validation, and test pipelines with PyTorch ImageFolder and DataLoader.
- Trained and served ResNet-based classifiers for tomato and potato disease categories.
- Combined SAM-assisted preprocessing with Grad-CAM++ to produce interpretable prediction heatmaps.
- Used cross-entropy loss, SGD optimization, StepLR scheduling, and multiclass accuracy evaluation in the training pipeline.
- Exposed analysis, garden, user, history, and statistics workflows through FastAPI and SQLite-backed data access.
Limitations
Results are framed without unsupported performance claims.
The repository supports model training, inference, explainability, and API integration, but it does not provide enough public evidence for a specific accuracy, dataset size, production deployment, mobile deployment, or real agricultural usage claim.