<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>

1. Project overview

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:

2. Problem

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:

  1. Can a lightweight feature-engineering pipeline classify the target image groups effectively?
  2. Can user corrections be captured so the classifier can improve from real feedback?

3. Application flow

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

4. Feature-engineering strategy

The documented model uses 59 engineered features derived from the uploaded image.

Color features

Color statistics capture differences in leaf pigmentation that may correspond to healthy/unhealthy appearance.