abhinav153 / Trash_classifier

Classification of trash images using Convolutional Neural nets

Home Page:https://chel310.github.io/Trash_classifier/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trash_classifier

Classification of trash images using Convolutional Neural nets

Prior Research Work

Dataset used

Trashnet

Papers

1.Classification of trash for recyclability status
2.Smart trashnet : Waste localization
3.Classification of trashnet based on deeo learning models
4.A novel framework for trash classification using deep learning

Models

Following models were mostly used for trash classification on Trashnet

  1. Densenet121
  2. ResNext-101
  3. Xception
  4. MobileNetV2
  5. Inception V4
  6. R-CNN

In this project i used a MobileNetV2 from tensorflow hub for classification

Preprocessing

Data was augmented using computer vision python package to expand the dataset size , so that a better model could be trained Following augementation operations were done

  1. Rotation
  2. Vertical Flip
  3. Horizontal Flip
  4. Channel Shift
  5. Horizontal Shift
  6. Vertical Shift

In this project , using transfer learning i trained my augmented dataset, across all this networks, adding the a final fully connected layer for classification . The classification labels include

1.Trash
2.Plastic
3.Metal
4.Paper
5.Cardboard

Usage

Step 1. Clone the repository
Step 2: Ensure dependencies are installed as given in requirement.txt file or make a virtualenv
Step 3: To run the model for prediction , copy your image files to the prediction_image folder, and run

python predict.py

Files

data_augment.py - Uses the images in dataset folder , augments them and saves them in the data_augmented folder
trash_classifier_MobileNetV2.ipynb - Builds the model , and saves it in the saved_models folder
predict.py - Runs the model, and prints the predictions of the model on the images stored in prediction_images folder

References

Complete Image Augmentation in OpenCV
Transfer learning with TensorFlow Hub

About

Classification of trash images using Convolutional Neural nets

https://chel310.github.io/Trash_classifier/

License:MIT License


Languages

Language:Jupyter Notebook 97.9%Language:Python 1.0%Language:PureBasic 0.8%Language:JavaScript 0.2%Language:HTML 0.1%