Problem
Plant disease recognition becomes more useful when a trained model is available through a simple image-upload workflow.
Constraints
The model recognises eight classes. The reported test accuracy comes from a single dataset split, without cross-validation; it should not be read as field accuracy on arbitrary plants.
Approach
A six-block convolutional neural network processes leaf images. A React and TypeScript interface sends an upload to FastAPI for preprocessing and inference.
Architecture
React on Vercel → FastAPI on Render → image preprocessing → TensorFlow CNN → class probabilities. An alternate TensorFlow Serving configuration supports versioned model serving.
Challenges and trade-offs
A hardcoded fifteen-class API mapping conflicted with the eight-class model. Defensive class slicing fixed the mismatch and prevented silent misclassification. Explicit input contracts matter as much as the model score.
Results
The CNN reached 94.9% test accuracy across eight classes using 9,612 PlantVillage images. The application exposes the model through a deployed browser-to-API workflow.
What I would do next
Evaluate real-world images, run cross-validation, and add uncertainty handling before extending the class set.
