Git Product home page Git Product logo

waste-cnn-image-classification's Introduction

Waste Image Classification using CNN

This repository contains code for comparing and evaluating various CNN classification models on a waste image dataset.


๐ŸŒฑ Introduction

This project was completed by Agnes Song and Asmita Rokaya as part of the CSE 5717 - Big Data Analytics course in UCONN Data Science Master's program. The project applies the concepts and skills learned throughout the course, with focus on image classification.


๐Ÿ“ Objective

This project aims to develop an automated waste image classification system using the Hugging Face waste image dataset. The project uses a dataset of 3,263 images to train and test various models. We explored various deep learning models to identify the most accurate model for classifying multiple types of waste. The selection of the optimal model was based on a combination of test accuray, model complexity, and training time.


๐Ÿ“ถ Dataset

The dataset used for this project is the Waste Image Dataset from Hugging Face ๐Ÿค—. It includes images categorized into seven types of waste - cardboard, compost, glass, metal, paper, plastic, trash.

image

Sample dataset


๐Ÿ› ๏ธ Methodology

  1. Data Preparation: Setting up the dataset for model training. The preparation process includes image resizing, scaling, and data augmentation. The dataset prepration method slightly varied depending on the model employed.
  2. Model Training:
    • CNN Base Model
    • CNN Base Model with Data Augmentation
    • Xception Model
      • Data Augmentation w/o Selective Layer Training
      • Data Augmentation w/ Selecitve Layer Training
      • Feature Extraction
    • VGG16 Model with Feature Extraction
    • ResNet50 Model with Feature Extraction
  3. Model Evaluation: Above models were evaluated based on accuracy score, model complexity, and training time.

๐Ÿ“ Project Structure

.
โ”‚   README.md
โ”‚   LICENSE
โ”‚   waste_classification.ipynb

๐Ÿ“Š Results

  • Our initial models showed low accuracy.

  • Data augmentation did not improve the performance of the base CNN model, possibly due to overfitting.

  • Pre-trained models like VGG16, ResNet50, and Xception showed remarkable performance with feature extraction. The chart below shows comparison of all models explored.

    Model Test Accuracy # of Parameters Training Time (s)
    CNN (Base Model) 0.6135 59,079,751 568
    CNN with Data Augmentation 0.5844 59,079,751 828
    Xception w/ Data Augmentation, w/o SLT 0.8635 21,914,159 821
    Xception w/ Data Augmentation, w/ SLT 0.8742 21,914,159 829
    Xception with Feature Extraction 0.9770 33,556,487 248
    VGG16 with Feature Extraction 0.9969 8,390,663 230
    ResNet50 with Feature Extraction 0.9969 33,556,487 256
  • We selected VGG16 model with feature extraction as our final model for its highest accuracy and reasonable training time.


๐Ÿ’ญ Future Improvements

Future improvements on this project would include:

  • include more diverse waste images beyond seven categories
  • address dataset imbalance by adding more images to underreprsented categories (glass)
  • further optimization on model parameters
  • evaluate models for real-time application

waste-cnn-image-classification's People

Contributors

mfsungeun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.