BananaCare-AI-Plant-Disease-Detection: BananaCare AI: The Leaf Scanner That Turns a Model Into a Farm System

A Spring Boot backend, a FastAPI inference service, and plantation history tracking show how one disease classifier becomes an operational tool for growers.

7 min read • View on GitHub • More from chetan-patil17

A farmer studies a banana leaf through a magnifying lens. Inside the lens, the leaf becomes a layered software system with a disease label, confidence gauge, and plantation record branching outward. It explains how BananaCare turns a single image into a farm decision.
BananaCare treats leaf classification as the start of a workflow, not the end of one.
Key Takeaways

Most banana disease projects stop at the question, “What is this leaf?” BananaCare asks the better one: “What should happen next for this plantation?” That shift matters because a prediction becomes useful only when it is tied to records, history, and action.

The repo is built around that idea. A Spring Boot backend manages users, farms, plantations, and diagnosis history, while a separate FastAPI service handles TensorFlow inference. The model is a specialist. The backend is the memory.

Why the model lives separately

That split is the smartest architectural choice in the project. Python and TensorFlow stay isolated in a narrow inference service, while Java 21 and Spring Boot own authentication, CRUD, persistence, and status logic. It keeps the AI piece replaceable and the business layer stable.

The core loop is not prediction. It is prediction plus memory plus status.

The inference path is straightforward but practical. An uploaded image is resized to 224 by 224, normalized, and passed through a Keras model built on MobileNetV2 transfer learning. The service returns class probabilities, not just a single label, which gives the backend room to make a more cautious decision when confidence is low.

image = Image.open(file).convert("RGB").resize((224, 224))
arr = np.array(image) / 255.0
arr = np.expand_dims(arr, axis=0)
preds = model.predict(arr)
classes = ["cordana", "healthy", "pestalotiopsis", "sigatoka"]
result = classes[np.argmax(preds[0])]
confidence = float(np.max(preds[0]))

What happens after a prediction

This is where BananaCare stops being a demo. The data model links User, Farm, Plantation, and Diagnosis, so the system can track health over time instead of treating each upload as a one-off event. That hierarchy lets the app compute a plantation status such as Healthy, Monitor, or Attention Required.

This is not just an app, but a tool that contributes to an early warning system that supports farmers directly.

Michael Selvaraj, Lead Author/Researcher at Bioversity International · An AI-powered app can identify banana diseases with 90 percent accuracy
A split workbench shows a narrow inference module feeding a larger farm record board. On the left, upload and model steps stay compact. On the right, farm, plantation, diagnosis, and health status cards accumulate over time. It explains the repo’s separation between AI and operations.
BananaCare separates a small prediction engine from a larger operational record system.

Why this stack is surprisingly practical

The stack reads like a careful product decision rather than a stunt. Java 21, Spring Boot 3.5.4, React 19, Python 3.11, FastAPI, TensorFlow, Keras, MySQL, and Docker are all doing specific jobs. The result is not a single clever model. It is a system that can be shipped, split, and maintained.

ProjectScopeBanana focusOffline or lightweightBeyond classificationTarget user
BananaCare AIBanana disease workflowHighYes, with a small inference serviceYes, plantation history and statusGrowers and farm operators
TumainiBanana disease detectionVery highDesigned for field useYes, broader symptom coverageSmallholder farmers
PlantixMulti-crop disease detectionLowerMobile-first, but broader platformYes, community and adviceLarge farmer audience
Generic leaf classifierImage labeling onlyMediumOften yesUsually noStudents and prototypes

That matters in the field. The AI service can scale on its own hardware profile, and the backend can keep working even if the model changes. For a project in precision agriculture, that separation is the difference between a prototype and a system.

How it compares

Against Tumaini, BananaCare is smaller and less mature, but it is still pointed at the same real problem: turning banana disease diagnosis into something a farmer can act on. Against Plantix, it is narrower, but that narrowness is also its strength. It is built for one crop, one workflow, and one operational loop.

That is the most useful thing about the repo. It does not pretend that classification is the whole job. It treats diagnosis as the input to record-keeping, monitoring, and escalation.

What BananaCare suggests about AI for agriculture

The best agricultural AI tools will not just be accurate. They will be contextual. They will know which farm the image came from, what happened last week, and whether this result should raise an alarm or simply update a ledger. BananaCare gets that right.

Its real contribution is architectural. It shows how to wrap a model in software that remembers, compares, and escalates. That is how AI stops being an interesting demo and starts behaving like field equipment.