Lessons from Building a Crop Disease Classifier with CNNs
What actually moved accuracy on a leaf-image CNN classifier, and what turned out to be a waste of time.

Sample post. This documents a real project on this portfolio — a CNN-based crop disease classifier — written as a lessons-learned post. Expand it with more detail whenever you like.
Overview
A deep learning classifier that takes a photo of a plant leaf and predicts whether — and with what disease — the plant is affected, trained on a labeled leaf-image dataset.
Problem
Crop disease is often identified too late, after visible damage has already spread, because manual inspection doesn't scale across a large field. An image classifier that a farmer can point a phone camera at closes that gap.
Goals
- Reasonable classification accuracy across multiple disease classes
- A model light enough to plausibly run on modest hardware
- Robustness to real-world photo variation — lighting, angle, background
Technologies
Python · TensorFlow · OpenCV
Architecture
A convolutional neural network trained on labeled leaf images, with OpenCV handling image preprocessing (resizing, normalization) before frames reach the model.
What Actually Moved Accuracy
Data augmentation — random rotations, flips, and brightness shifts — mattered more than architecture tweaks. The dataset had less real-world lighting and angle variation than photos taken in an actual field would have, and augmentation was the cheapest way to close that gap.
What Turned Out to Be a Waste of Time
Chasing a deeper network past a certain point stopped helping and started overfitting faster than it improved validation accuracy. The lesson wasn't new, but it's the kind of thing that's easy to forget mid-project when "just add more layers" feels like progress.
Results
85–90% classification accuracy across the target disease classes on the held-out validation set.
Lessons Learned
For a dataset this size, augmentation and preprocessing quality had a bigger effect on final accuracy than model depth. If I revisit this project, that's where I'd spend the next round of effort — not on the architecture.
Related Articles
ProjectsSafe Vision: Real-Time Assault Detection with Blockchain Evidence
How Safe Vision combines a real-time computer vision model with blockchain-backed evidence storage to flag suspicious activity from live video.
Aug 10, 2026 · 3 min readRead- Learning
Getting Started with OpenCV for Real-Time Video Analysis
A practical introduction to OpenCV — reading a video stream, running basic frame processing, and the patterns I reuse across every computer vision project.
Aug 5, 2026 · 2 min readRead
ProjectsKrishi Sakhi: A Malayalam-Voice AI Farming Assistant
Building an AI assistant that farmers can talk to in Malayalam, and why speech recognition accuracy mattered more than model size.
Jul 28, 2026 · 2 min readRead