A robust Convolutional Neural Network (CNN) designed to classify 100 different types of fruits with high accuracy. This project demonstrates optimized Deep Learning engineering practices using TensorFlow/Keras.
- CNN Architecture: Custom-built Convolutional Neural Network.
- Data Augmentation: Random flips and rotations to improve model generalization.
- Performance Tuning: Implements
tf.data.AUTOTUNEfor high-speed data prefetching. - Regularization: Dropout layers and Early Stopping to prevent overfitting.
- Optimized Training: Adaptive learning rate reduction.
fruit_classification.ipynb: Complete Jupyter Notebook with code for training and evaluation.train.py: Standalone Python script version of the model.requirements.txt: List of dependencies.
- Python 3.9 - 3.11 (Required for TensorFlow compatibility)
- Dataset: Fruit Classification Dataset
-
Clone the repository:
git clone https://github.com/Skandamrao/Fruit_Classification_Optimized_Model.git cd Fruit_Classification_Optimized_Model -
Download the Dataset:
- Download from the Kaggle link.
- Extract the folders (
train1,val1,test1) into project root directory.
-
Install Dependencies:
pip install -r requirements.txt
Option 1: Jupyter Notebook (Recommended)
Open fruit_classification.ipynb and run all cells for a step-by-step execution.
Option 2: Python Script
python train.pyIf you are using Python 3.12+, TensorFlow may not be installable directly. Please use Python 3.11 or run this project on Google Colab.