Skip to content

Vansh2639/SceneSense-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌎 SceneSense AI

Python PyTorch Streamlit Accuracy

Overview

SceneSense AI is a Deep Learning-based Multi-Class Image Classification project that classifies natural scene images into six categories using Transfer Learning with ResNet18.

The project was built using PyTorch for model development and Streamlit for deployment, providing an interactive web application for real-time scene classification.


🚀 Live Demo

🔗 Web Application:
https://scenesense-ai.streamlit.app/

🔗 GitHub Repository:
https://github.com/Vansh2639/SceneSense-AI


📸 Screenshots

Home Page

Home Page

Dashboard

Dashboard

Prediction Example

Prediction


Dataset

The project uses the Intel Image Classification Dataset, which contains thousands of images belonging to six natural scene categories:

  • Buildings
  • Forest
  • Glacier
  • Mountain
  • Sea
  • Street

The dataset was cleaned and validated before training to remove corrupted images.


Dataset Source

Intel Image Classification Dataset: https://www.kaggle.com/datasets/puneet6060/intel-image-classification


Model Architecture

  • Backbone: ResNet18
  • Framework: PyTorch
  • Transfer Learning: Yes
  • Input Size: 224 × 224
  • Output Classes: 6

The final fully connected layer of ResNet18 was modified to classify the six scene categories.


Data Preprocessing

The following preprocessing techniques were applied:

  • Image Resizing (224 × 224)
  • Random Horizontal Flip
  • Random Rotation
  • Tensor Conversion
  • ImageNet Normalization

These transformations help improve model generalization and performance.


Training Details

  • Loss Function: CrossEntropyLoss
  • Optimizer: Adam
  • Transfer Learning with ResNet18
  • GPU Training on Kaggle

The model was trained and evaluated using separate training and testing datasets.


Results

Metric Value
Test Accuracy 93%
Classes 6
Model ResNet18
Framework PyTorch

Test Accuracy

93%

Evaluation Metrics

  • Confusion Matrix
  • Classification Report
  • Class-wise Precision
  • Class-wise Recall
  • F1 Score

The model performs well across all six scene categories and demonstrates strong generalization capability.


Streamlit Application

The trained model was deployed using Streamlit, allowing users to:

  • Upload scene images
  • Get real-time predictions
  • View confidence scores
  • View Top-3 predictions
  • Explore project information through an interactive dashboard

Project Structure

SceneSense-AI/

├── app.py
├── intel_resnet18.pth
├── requirements.txt
├── README.md
├── notebook/
│   └── Intel_Scene_Classification.ipynb
└── Screen_shots/
    ├── home.png
    └── prediction.png

Installation

Clone the repository:

git clone https://github.com/Vansh2639/SceneSense-AI.git

Move into the project directory:

cd SceneSense-AI

Install dependencies:

pip install -r requirements.txt

Run the application:

streamlit run app.py

Technologies Used

  • Python
  • PyTorch
  • TorchVision
  • Streamlit
  • NumPy
  • PIL
  • Scikit-Learn

Future Improvements

  • Fine-tune deeper ResNet layers
  • Deploy on Streamlit Community Cloud
  • Add Grad-CAM visualizations
  • Experiment with EfficientNet and Vision Transformers
  • Add batch image prediction support

Author

Vansh Garg

B.Tech CSE

Machine Learning & AI Enthusiast


⭐ If you found this project useful, consider giving it a star.

About

Multi-Class Scene Classification using Transfer Learning with ResNet18 and Streamlit

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages