Skip to content

layamaryjoy/intel-image-classification-cnn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒ„ Intel Image Classification using CNN (Deep Learning)

Python TensorFlow CNN Platform

A deep learning project focused on building and evaluating a Convolutional Neural Network (CNN) for multi-class image classification using the Intel Image Classification dataset.


πŸš€ Run Notebook in Google Colab

Click the button below to open the notebook directly in Google Colab.

Open In Colab


πŸ“˜ Project Overview

This project implements a Convolutional Neural Network (CNN) to classify natural scene images into multiple categories.

The project covers the complete deep learning pipeline including:

  • Dataset exploration

  • Image preprocessing

  • Data augmentation

  • CNN architecture design

  • Model training and validation

  • Model evaluation using performance metrics

  • Prediction visualization

The goal is to build a robust CNN model capable of accurately classifying real-world natural scenes.


🎯 Objective

The main objectives of this project are:

πŸ”Ή Understand the structure of an image dataset

πŸ”Ή Perform image preprocessing and augmentation

πŸ”Ή Build a CNN architecture from scratch

πŸ”Ή Train the model using TensorFlow/Keras

πŸ”Ή Evaluate model performance using multiple metrics

πŸ”Ή Visualize model predictions on unseen test images


πŸ“‚ Dataset Information

The dataset used is the Intel Image Classification Dataset available on Kaggle.

Dataset Link:

https://www.kaggle.com/datasets/puneet6060/intel-image-classification

Dataset Details

Feature Description
Total Images 25,000+
Image Type Natural Scene Images
Number of Classes 6
Image Size Resized to 150 Γ— 150

Target Classes

The dataset contains 6 scene categories:

  • 🏒 Buildings

  • 🌲 Forest

  • 🧊 Glacier

  • β›° Mountain

  • 🌊 Sea

  • πŸ›£ Street


🧹 Data Preprocessing

Before training the CNN model, several preprocessing steps were applied:

βœ” Image Resizing

All images were resized to 150 Γ— 150 pixels to maintain uniform input size.

βœ” Pixel Normalization

Pixel values were scaled to the range 0–1 by dividing by 255.

βœ” Train / Validation / Test Split

The dataset was split into:

  • Training Set

  • Validation Set

  • Test Set

βœ” Data Augmentation

To improve model generalization and prevent overfitting, the following augmentation techniques were used:

  • Image Rotation

  • Horizontal Flip

  • Zoom

  • Width & Height Shift

  • Shear Transform


🧠 CNN Model Architecture

A Convolutional Neural Network (CNN) was built from scratch using TensorFlow / Keras.

Architecture Components

βœ” Convolutional Layers

βœ” ReLU Activation Function

βœ” Max Pooling Layers

βœ” Dropout Layers for Regularization

βœ” Fully Connected (Dense) Layers

βœ” Softmax Output Layer for Multi-Class Classification


βš™ Model Training

The CNN model was trained using the training dataset and validated using the validation dataset.

Training Techniques Used

  • Early Stopping

  • Model Checkpointing

  • Batch Training

  • Validation Monitoring

Training progress was monitored using:

  • Training Accuracy vs Validation Accuracy

  • Training Loss vs Validation Loss


πŸ“Š Model Evaluation

After training, the model was evaluated using the test dataset.

Evaluation Metrics

  • Accuracy

  • Precision

  • Recall

  • F1 Score

  • Confusion Matrix


πŸ” Prediction Visualization

To better understand the model’s performance:

  • 10 random test images were selected

  • Each image was displayed with:

    • Actual Label

    • Predicted Label


πŸ›  Tech Stack

Tool Purpose
Python Programming language
TensorFlow / Keras Deep learning framework
NumPy Numerical computation
Matplotlib Visualization
Seaborn Confusion matrix visualization
OpenCV / PIL Image processing
Kaggle API Dataset download
Google Colab Development environment

πŸ“ Repository Structure

intel-image-classification-cnn/

β”‚

β”œβ”€β”€ DL_Assignment_1_CNN.ipynb

β”œβ”€β”€ README.md

└── DL Assignment 1 - CNN.pdf

πŸš€ How to Run the Project

1️⃣ Open the Notebook

Click the Google Colab button above.


2️⃣ Install Required Libraries

pip install tensorflow matplotlib numpy seaborn kaggle

3️⃣ Kaggle API Setup

Upload your kaggle.json file and run:

!mkdir -p ~/.kaggle
!cp kaggle.json ~/.kaggle/
!chmod 600 ~/.kaggle/kaggle.json

Download dataset:

!kaggle datasets download -d puneet6060/intel-image-classification

Unzip dataset:

!unzip intel-image-classification.zip

4️⃣ Run the Notebook

Run all cells sequentially to:

  • Load dataset

  • Preprocess images

  • Train CNN model

  • Evaluate performance

  • Visualize predictions


🧠 Key Learning Outcomes

βœ” Understanding CNN architecture

βœ” Image preprocessing techniques

βœ” Data augmentation for deep learning

βœ” Training deep learning models

βœ” Evaluating classification performance

βœ” Visualizing CNN predictions


πŸ“Œ Academic Submission

This repository was created as part of a Deep Learning assignment to demonstrate the design, training, and evaluation of a Convolutional Neural Network (CNN) for real-world image classification.

πŸ“Œ Future Enhancements

  • Implement Transfer Learning (VGG16, ResNet, MobileNet) for better accuracy

  • Perform hyperparameter tuning to optimize model performance

  • Use larger and more diverse image datasets

  • Apply advanced augmentation techniques

  • Deploy the model as a web application (Streamlit / Flask)

  • Add real-time image prediction feature

πŸ“Œ Future Enhancements

  • Implement Transfer Learning (VGG16, ResNet, MobileNet) for better accuracy

  • Perform hyperparameter tuning to optimize model performance

  • Use larger and more diverse image datasets

  • Apply advanced augmentation techniques

  • Deploy the model as a web application (Streamlit / Flask)

  • Add real-time image prediction feature

    πŸ‘€ Author

Name: Laya Mary Joy

Organization: Entri Elevate

Date: March 15, 2026

⭐ Acknowledgment

Thanks to Entri Elevate for guidance and support.

About

CNN-based image classification using the Intel Image Classification dataset with TensorFlow in Google Colab.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors