This deep learning project uses a Convolutional Neural Network (CNN) to classify images of people based on facial expressions into two categories: Happy or Sad. The model is trained on a dataset of labeled images and built using TensorFlow and Keras in a Jupyter Notebook environment.
This project demonstrates how a CNN can be used for binary image classification by recognizing facial features that indicate emotional expressions. The model is trained on a small dataset of happy and sad facial images and achieves high accuracy using simple yet effective convolutional layers.
The purpose of this project is to:
- Learn how to prepare and load image data using Keras
- Build and train a CNN model from scratch
- Evaluate its performance on unseen data
- Predict whether a new image shows a happy or sad person
- Located in the
data/folder - Consists of two subdirectories:
happy/: images labeled as happysad/: images labeled as sad
- 💻 Python
- 📚 TensorFlow & Keras
- 📒 Jupyter Notebook
- 🧪 NumPy, Matplotlib
- 🧠 CNN (Convolutional Neural Networks)
- 🗂️ OS, shutil (for file handling and dataset preparation)
- Clone this repo:
git clone https://github.com/Waseemkhan09/ImageCalssification_DL_Model.git cd ImageCalssification_DL_Model - Install required dependencies:
pip install tensorflow numpy matplotlib
- Run the Notebook
Binary image classification using CNN Uses data generators for image preprocessing Trained and validated on labeled images Predicts emotion category of new/unseen images
Feel free to fork the repo and submit pull requests if you’d like to add improvements or fixes.
Waseem Khan GitHub: @Waseemkhan09