A production-grade deep learning image classification system built with TensorFlow and Streamlit that accurately identifies 36 different types of fruits and vegetables from uploaded images.
- 📤 Easy Upload: Supports
.jpg,.jpeg, and.pngimage formats - 🎯 High Accuracy: 93% classification accuracy across 36 categories
- 📊 Confidence Scores: Real-time prediction confidence display
- 🚀 Fast Inference: Sub-2 second prediction time
- 🎨 Clean UI: Intuitive Streamlit interface
- 🔄 Real-time Processing: Instant image preprocessing and prediction
apple, banana, beetroot, bell pepper, cabbage, capsicum, carrot,
cauliflower, chilli pepper, corn, cucumber, eggplant, garlic, ginger,
grapes, jalepeno, kiwi, lemon, lettuce, mango, onion, orange, paprika,
pear, peas, pineapple, pomegranate, potato, raddish, soy beans, spinach,
sweetcorn, sweetpotato, tomato, turnip, watermelon
- Framework: TensorFlow/Keras
- Model Type: Convolutional Neural Network (CNN) with Transfer Learning
- Input Shape:
(180, 180, 3) - Model Format:
.keras - Accuracy: 93% on validation set
- Parameters: ~568M (fine-tuned)
- Training Dataset: Fruits & Vegetables Image Dataset
- Data augmentation (rotation, flip, zoom) for improved generalization
- Systematic hyperparameter tuning
- Regularization strategies to reduce overfitting by 15%
- Transfer learning for enhanced performance
- Python 3.11 or lower (Python 3.13 not supported)
- pip package manager
- (Optional) Conda for virtual environment management
git clone https://github.com/Srujanx/Image-Classification-System.git
cd Image-Classification-SystemUsing Conda:
conda create -n image-class python=3.11 -y
conda activate image-classUsing venv:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirement.txtstreamlit run app/main.pyThe application will open in your default browser at http://localhost:8501
- Upload Image: Click "Browse files" and select a fruit/vegetable image
- Wait for Prediction: The model will process the image automatically
- View Results: See the predicted class and confidence score
Image-Classification-System/
├── app/
│ ├── main.py # Streamlit application
│ ├── image.ipynb # Training notebook
│ ├── Image_Classifier.keras # Trained model (not in repo)
│ └── Fruits_Vegetables/ # Dataset directory (not in repo)
├── screenshots/ # Application screenshots
├── .gitignore # Git ignore file
├── README.md # Project documentation
└── requirement.txt # Python dependencies
The model was trained using a comprehensive pipeline:
- Data Preprocessing: Image resizing to 180x180, normalization
- Data Augmentation: Rotation, flipping, zooming for robustness
- Architecture: CNN with transfer learning (MobileNetV2 backbone)
- Optimization: Adam optimizer with learning rate scheduling
- Regularization: Dropout and L2 regularization to prevent overfitting
- Validation: 20% validation split for hyperparameter tuning
- Training Accuracy: 95%
- Validation Accuracy: 93%
- Test Accuracy: 93%
- Overfitting Reduction: 15% improvement through regularization
See app/image.ipynb for complete training code and experiments.
| Component | Technology |
|---|---|
| Framework | TensorFlow, Keras |
| Frontend | Streamlit |
| Image Processing | PIL, NumPy |
| Model Architecture | CNN with Transfer Learning |
| Deployment | Local/Cloud-ready |
- Accuracy: 93%
- Inference Time: < 2 seconds
- Model Size: ~50 MB
- Confidence Threshold: 0.6 (60%)
- Add support for 100+ fruit/vegetable categories
- Implement model quantization for faster inference
- Deploy to cloud (AWS/Heroku/Streamlit Cloud)
- Add batch image processing
- Implement nutritional information lookup
- Mobile app version (React Native + TensorFlow Lite)
- API endpoint for integration with other applications
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Srujan
- LinkedIn: srujan77
- GitHub: Srujanx
- Email: srujan.moni07@gmail.com
- TensorFlow and Keras for the deep learning framework
- Streamlit for the amazing web app framework
- The open-source community for inspiration and resources
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed description
- Contact via email: srujan.moni07@gmail.com
⭐ Star this repository if you find it helpful!
Last Updated: February 2026