Automating fruit freshness inspection using deep learning and a business-friendly demo app
FreshHarvest Logistics is a leading cold warehouse provider in California, sourcing select locally grown fruits from nearby farmers and delivering them to premium supermarkets. Their high-end clientele demands near-perfect freshness, with a service level where even one defective fruit per thousand is unacceptable.
To meet this standard, we developed an AI-powered freshness inspection system using Convolutional Neural Networks (CNNs) and Transfer Learning. The system detects overripe or spoiled fruits from conveyor belt images and alerts manual checkers, reducing human error and improving efficiency.
- CNN-Based Quality Control: Detects fresh vs. spoiled fruits across 8 categories.
- Two-Phase Model Training:
- Baseline CNN model (no transfer learning, no regularization)
- Optimized ResNet50 transfer learning model with regularization & hyperparameter tuning
- Real-Time Demo App: Interactive Streamlit app with drag-and-drop image classification.
- End-to-End Pipeline:
- Data ingestion & augmentation
- Dataset splitting (train/val/test)
- Model training, optimization, and saving
- Deployment-ready prediction API
- Supports 8 Fruits: Banana, Lemon, Lulo, Mango, Orange, Strawberry, Tamarillo, Tomato — each classified as Fresh or Spoiled.
https://freshharvest-fruit-classifier.streamlit.app/
-
Clone the Repository
git clone https://github.com/MindMatrixPro/FreshHarvest-Fruit-Classifier.git cd FreshHarvest-Fruit-Classifier -
Install Dependencies
pip install -r requirements.txt
-
Run the Streamlit App
streamlit run app.py
To Contribute, please submit issues or pull requests for enhancements or fixes.
Licensed under the Apache 2.0 License.