The Inspiration:- The inspiration came from observing how quickly a single diseased plant can devastate an entire garden or crop cycle. For many, identifying whether a spot on a leaf is a simple nutrient deficiency or a contagious fungal infection is a guessing game. I wanted to build a "digital doctor" that could bridge the gap between complex plant pathology and the everyday grower, providing instant, actionable cures.

What I Learned:- Through this project, I gained a deep understanding of Convolutional Neural Networks (CNNs) and the importance of data diversity. I learned that a model trained only on studio-lit photos will fail in the real world where there are shadows, dirt, and different lighting conditions. I also learned the nuances of full-stack integration—specifically how to pass heavy image data from a frontend interface to a backend machine learning model seamlessly.

How I Built It:- The project is built on a modular stack designed for speed and accuracy:

The Brain (Machine Learning): I used TensorFlow and Keras to train a deep learning model. The model processes input images and classifies them into specific disease categories based on patterns in leaf texture and color.

The Backend (Logic & Routing): Python with the Flask framework acts as the bridge. It handles the image uploads, preprocesses them to the required input size, and runs the inference through the saved TensorFlow model.

The Frontend (User Interface): A clean, responsive UI built with HTML5, CSS3, and JavaScript. It allows users to upload photos via their camera or gallery and displays the diagnosis and treatment plan dynamically.

Challenges Faced:- Model Accuracy vs. Speed: Initially, the model was too heavy for a standard web server. I had to optimize the layers and use image augmentation to improve accuracy without making the file size unmanageable.

The "Noise" Problem: Real-world photos often include hands, soil, or background garden tools. Teaching the model to focus strictly on the leaf features was a significant hurdle.

Data Scarcity: Finding high-quality, labeled datasets for specific rare plant diseases required extensive searching and manual data cleaning to ensure the "cures" suggested were scientifically accurate.

Leaf Guard is now more than just a scanner; it’s a commitment to keeping the world a little bit greener, one leaf at a time.

Built With

Share this project:

Updates