<aside> 🍌
BANANA LEAF DETECTOR is an applied machine-learning case study for classifying banana-leaf images with engineered computer-vision features, a lightweight KNN classifier, and an active-learning feedback loop.
</aside>
The project explores whether useful crop-image classification can be built without relying on a large deep-learning model for every prediction.
Instead of feeding raw images directly into a CNN, the application extracts a compact set of handcrafted visual features and uses a K-Nearest Neighbors classifier. A user-feedback loop allows incorrect predictions to become corrected training examples.
The target classes are:
Visual crop diagnosis can require agricultural expertise, while many ML demos are difficult to adapt after deployment. A model can also keep repeating the same mistake if users have no way to correct it.
The project therefore addresses two questions:
flowchart LR
IMAGE["Uploaded image"] --> PRE["Image preprocessing"]
PRE --> FEATURES["59 engineered features"]
FEATURES --> SCALE["Feature scaling"]
SCALE --> KNN["KNN classifier"]
KNN --> RESULT["Prediction"]
RESULT --> USER{"User confirms?"}
USER -->|Correct| DONE["Keep result"]
USER -->|Incorrect| LABEL["Corrected label"]
LABEL --> STORE["Persist feedback"]
STORE --> RETRAIN["Append sample + retrain"]
RETRAIN --> KNN
The documented model uses 59 engineered features derived from the uploaded image.
Color statistics capture differences in leaf pigmentation that may correspond to healthy/unhealthy appearance.