AI / Computer Vision
Banana Classifier.
An AI-powered web application that classifies bananas as fresh or rotten using a computer vision model and real-time webcam input.

Project Information
Project Details
Overview
Banana Image Classifier is an AI and computer vision project that combines an image classification model with a Flask web application. The system allows users to capture an image of a banana through a webcam and classify it as either fresh or rotten.
Process
The project uses MobileNetV2 with transfer learning to train a binary image classification model for fresh and rotten bananas. The trained model is saved as an H5 file and loaded by the Flask backend when the application starts. The web application handles image requests, processes the captured image using NumPy and PIL, passes the processed input to the TensorFlow model, and returns the classification result to the frontend. The browser interface uses JavaScript and HTML5 Canvas to capture images from the webcam.
Insights
The trained MobileNetV2 model achieved a final test accuracy of 97.69% on the banana classification task.
Transfer learning was used to build the image classifier while keeping the resulting model lightweight at approximately 9 MB.
The Flask backend loads the trained model at application startup and provides the interface between the machine learning model and the web application.
The application combines computer vision and web development into an end-to-end workflow, from webcam image capture to fresh or rotten classification.
Next
All Work ↗