Skip to content

lavanyanigam/SortNow

Repository files navigation

SortNow: AI-Powered Waste Classification System

A Custom YOLO based waste detection system for real-time waste classification through web interface. Classifying waste into 6 categories: Biodegradable, Cardboard, Glass, Metal, Paper, and Plastic.

Key Features

  • Custom YOLO with 14×14 grid detection, 2 boxes per cell, 6 classes
  • Flask web application with interactive UI
  • Trained on 7,260 images, validated on 3,114 images

Model Architecture

Architecture

  • Type: Custom YOLOv1
  • Input Size: 448×448 pixels
  • Grid Size: 14×14 (S=14)
  • Bounding Boxes per Cell: 2 (B=2)
  • Classes: 6 waste categories
  • Output: Class predictions + bounding box coordinates

Dataset

Original: Roboflow Garbage Classification
Preprocessed: Custom Kaggle Dataset

Preprocessing

  1. Analyzed dataset with preprocessing/analyze.py
  2. Filtered images with >98 objects using preprocessing/max_obj_filter.py
  3. Final: 7,260 images across 6 classes

Reproduce Training

Installation for Web Interface

  1. Clone the Repository
git clone https://github.com/lavanyanigam/SortNow.git
cd SortNow
  1. Install Dependencies
pip install -r requirements.txt
  1. Download Trained Model:
SortNow/
├── app.py
├── best_model.pth
├── requirements.txt
├── templates/
└── static/

Usage

  1. Run the Application
python app.py
  1. Open in Browser
http://localhost:5001
  1. Classify Waste

Training Details

  • Notebook: Training Code
  • Framework: PyTorch
  • Optimizer: Adam
  • Learning rate: 1e-4
  • Batch size: 16
  • Epochs: 100 (Early stopping at Epoch 64)
  • Hardware: Kaggle GPU P100

Results

  • Early stopping triggered at epoch 64
  • Best model at epoch 54 with validation loss: 176.3113
  • Final training loss: 65.5796
  • Final validation loss: 177.0820
  • These results indicate overfitting, likely due to dataset imbalance and limited model capacity.
  • Training History

Development History

About

A Custom YOLO based waste detection system for real-time waste classification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors