This project was developed as part of the course APT3010: Introduction to Artificial Intelligence at United States International University-Africa (USIU-Africa), under the guidance of Prof. Edward Ombui.
# AI-Based Tomato Health Monitoring for Farmers
## 1. Introduction
This project focuses on developing an AI-based system to monitor the health of tomato plants, specifically targeting the common challenges faced by small-scale farmers. Early detection of diseases like blight, mosaic, and septoria can significantly reduce crop loss and increase harvest yields.
## 2. Prior work
The academic review by Thangaraj et al. (2022) provides a comprehensive overview of AI in tomato disease detection. However, its generalized approach may not fully account for the unique characteristics of tomato varieties, diseases, and environmental conditions specific to Kenyan agricultural contexts. Our project addresses this shortcoming by focusing on building a model that will be trained on a more diverse set of Kenyan farm images.
## 3. Methodology
The project utilizes a comprehensive approach that includes data collection, preprocessing, and model architecture to build an effective disease detection system.
### (i) Data Collection
**Diseases Targeted:** Tomato Mosaic Disease, Septoria, Blight, and healthy tomatoes.
**Sources:** Data was collected from web scraping tools and manual collection, with a focus on web scraping techniques using a selenium-hybrid approach.
**Dataset:** A total of 1885 images were collected.
**Data Sample**
### (ii) Preprocessing
**Techniques:** Augmentation (rotation, zoom, flip) and a train-validation split were used to prepare the data for training.
### (iii) Model Architecture
**Base Model:** A MobileNetV2 pretrained model was used.
**Key Features:** Transfer learning was applied, and regularization and dropout layers were added to mitigate overfitting and improve model performance.
### (iv) Data Visualization
The class distribution of the dataset is as follows:
Blight Tomatoes: 26.5%
Healthy Tomatoes: 26.5%
Mosaic Tomatoes: 26.5%
Septoria Tomatoes: 20.4%
### (v) Training visualization
## 4. Results
The model achieved a best value accura …