A Convolutional Neural Network (CNN)-based image classification model built with Python and TensorFlow/Keras. This project is designed to classify images efficiently and can be extended to various real-world applications like face detection, object recognition, and more.
- Deep Learning with CNNs โ Uses state-of-the-art convolutional layers for image feature extraction.
- Data Preprocessing โ Includes normalization, augmentation, and resizing pipelines.
- Training & Evaluation โ Built with TensorFlow/Keras for powerful training on image datasets.
- Model Visualization โ Plots training/validation accuracy and loss curves.
- Custom Dataset Support โ Easily plug in your own dataset.
- Python 3.x
- TensorFlow & Keras (Deep Learning)
- NumPy, Pandas (Data manipulation)
- Matplotlib & Seaborn (Data visualization)
- OpenCV (Image handling)
- Scikit-learn (Metrics and evaluation)
CNN-Image-Classifier/ โ โโโ data/ # Dataset (training/testing images) โโโ model/ # Saved trained model (H5/TF format) โโโ notebooks/ # Jupyter notebooks for experiments โโโ main.py # Main training/testing script โโโ requirements.txt # Project dependencies โโโ README.md # Project documentation
- Clone the repository
git clone https://github.com/MousamCodes/cnn-image-classifier.git cd cnn-image-classifier
- Install Dependencies
pip install -r requirements.txt
- Run the training script
python main.py
- Load Dataset โ Images are loaded and resized to the target shape.
- Preprocessing โ Normalization & augmentation for better generalization.
- CNN Architecture โ Convolutional, pooling, dropout, and dense layers.
- Training โ Compiled with Adam optimizer and categorical cross-entropy loss.
- Evaluation โ Achieves high accuracy on test data with confusion matrix visualization.
- Add Transfer Learning (ResNet, VGG16, EfficientNet).
- Deploy model as a REST API with FastAPI/Flask.
- Create a Streamlit web app for real-time image classification.
- Implement model quantization for mobile deployment.