Strawberry Diseases Classification by TensorFlow Model:
This project is centered around building a comprehensive solution to classify diseases in strawberry plant leaves, spanning both a web and Android application. Our process was divided into clear stages, each leveraging specific technologies to ensure accurate classification and smooth deployment.
The web application allows users to upload images of strawberry leaves, and the classification is performed using our custom-trained TensorFlow model. Similarly, the Android application enables users to classify diseases by selecting images from their device's photo library or directly from the camera, utilizing the TensorFlow Lite version of the model for mobile deployment. Our model performance shown in the picture below:
Project Process:
1. Dataset Preparation: We began by gathering and preparing a dataset containing 2,500
images of strawberry plant leaves, divided into seven disease categories: Angular Leafspot,
Anthracnose Fruit Rots, Blossom Blight, Gray Mold, Leaf Spot, Powdery Mildew (Fruit), and
Powdery Mildew (Leaf). The dataset was split into 1,450 images for training, 307 for
validation, and 743 for testing. Using OpenCV and NumPy, we preprocessed and cleaned
the images, resizing them to a standard format and applying data augmentation to improve
model robustness. see the picture below.
2. Model Building with Transfer Learning: We implemented transfer learning, a method where
we fine-tuned pre-trained models on our dataset. The models we experimented with
included VGG16, VGG19, and ResNet50. This stage involved training the models using
Google Colab, utilizing the TensorFlow and Keras libraries in Python. After comparing the
performance of each model based on accuracy and validation loss, we selected ResNet50 as
the final model due to its superior results.
3. Model Training and Evaluation: Training the models involved multiple iterations and
evaluations. Matplotlib was used to visualize the training process, tracking metrics like loss
and accuracy over time. ResNet50 outperformed the other models with the highest accuracy
on the test set, making it the model of choice for the next stage.
4. Web Application Development: To make the model accessible to users, we built a web
application using Django with Python for the backend and HTML, CSS, and JavaScript for
the frontend. The web application allows users to upload images of strawberry leaves, which
are processed and classified by the trained ResNet50 model. The web app is powered by a
PostgreSQL database to manage user data and classification results.
5. Android App Implementation: We further developed an Android application, providing a
mobile solution where users can classify diseases either by selecting an image from their
gallery or by capturing a photo using the device’s camera. For this, we converted the
ResNet50 model into a TensorFlow Lite format to run efficiently on mobile devices. The
Android app was built in Android Studio using Java for native mobile development.
6. Deployment on AWS: Finally, the web application was deployed on AWS using services like
ECS and EC2 for server hosting, RDS for the PostgreSQL database, and S3 for static file
storage. The infrastructure was containerized using Docker, and Nginx was employed as a
reverse proxy to manage traffic and improve scalability.
Tools and Services:
• Backend: We used Django with Python and PostgreSQL as the database.
• Frontend: The web application was built using HTML, CSS, and JavaScript.
• Mobile App: Developed using Android Studio with Java for TensorFlow Lite integration.
• Cloud Infrastructure: Deployed on AWS, utilizing services such as RDS, ECS, EC2, and S3 for
data storage, computation, and hosting. For the TensorFlow model we used Sage-Maker.
Conclusion:
Through this structured process, we developed a robust solution for strawberry leaf disease
classification, with a ResNet50 model integrated into both web and mobile applications. The
project highlights the integration of AI with full-stack web development, mobile app
development, and cloud-based deployment, creating an accessible tool for agricultural disease
detection. The project graph is described below: