fastai
classification
waste
resnet
waste-classifier / README.md
santit96's picture
update readme with model name and demo information
e6b7009
|
raw
history blame
6.33 kB
metadata
datasets:
  - rootstrap-org/waste-classifier
library_name: fastai
tags:
  - classification
  - waste
  - fastai
  - resnet

Model Description

A machine learning model for waste classification

  • Developed by: rootstrap
  • Model type: classifier
  • License: ?

Waste Classifier Model

The aim is to build a model for waste classification that identifies among the different classes:

  • cardboard
  • compost
  • glass
  • metal
  • paper
  • plastic
  • trash

This machine learning model will help people to improve their decision when classifying trash

Fastai is a deep learning library which provides high-level components that can quickly and easily provide state-of-the-art results in standard deep learning domains.

It has two main design goals:

To be approachable and rapidly productive To be also configurable.

Model Sources

Uses

At Rootstrap we classify waste. We found that people were struggled to classify correctly, and then we end up not recycling most of the generated waste at the office, since if there were items in the wrong basket, all the basket should not be classified. Because of this reason, we created an app to help people at our company to classify waste.

Direct Use

model = load_learner("result-resnet50.pkl")
model.predict()

Bias, Risks, and Limitations

Take into account that the model has been trained mostly with images that have white background, and also that contains only one object. So, you won't be able to classify several objects at the same time, or pictures that have one object above another. This does not aim to replace humans to classify trash, at least for now, instead it is a tool to help them to better classify.

How to Get Started with the Model

You can use the following Google

Training Details

Training Data

The data is already splitted in train and test folders. Inside each folder contains one folder for each class. Those images were obtained using Bing searcher using the api HTTP. You can find the code used to download the images at this Google Colab. You can find the final dataset splitted into train and test rootstrap-org/waste-classifier in a Google Drive folder.

Split into train/test You can find the code for the classifier resnet-model.ipynb To load the model in the file result-resnet34.pkl

The model has been trained to classify waste into 6 classes. This repository contains the dataset that we collected. Currently, the dataset consists of 2527 images:

  • 501 glass
  • 594 paper
  • 403 cardboard
  • 482 plastic
  • 410 metal
  • 137 trash

The dataset was built joining images search on the internet using Bing plus some images taken manually, in addition to images from Trashnet dataset If you are using the dataset, please give a citation of this repository. The dataset can be downloaded at rootstrap-org/waste-classifier.

Training Procedure

You can find the code for training at resnet-model.ipynb Training the model using resnet50: ResNet34 is a convolutional neural network(CNN) that has 34 layers. It has been already trained with images from the ImageNet database. It classifies 1000 object from very broad categories, such as pencil or animals. The input size of the network is 224x224.

Evaluation and Results

The model reaches an accuracy of 0.98, here we can see the confusion matrix: confusion_matrix

Summary

{{ results_summary | default("", true) }}

Model Examination [optional]

{{ model_examination | default("[More Information Needed]", true)}}

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: {{ hardware | default("[More Information Needed]", true)}}
  • Hours used: {{ hours_used | default("[More Information Needed]", true)}}
  • Cloud Provider: {{ cloud_provider | default("[More Information Needed]", true)}}
  • Compute Region: {{ cloud_region | default("[More Information Needed]", true)}}
  • Carbon Emitted: {{ co2_emitted | default("[More Information Needed]", true)}}

Technical Specifications [optional]

Model Architecture and Objective

{{ model_specs | default("[More Information Needed]", true)}}

Compute Infrastructure

{{ compute_infrastructure | default("[More Information Needed]", true)}}

Hardware

{{ hardware | default("[More Information Needed]", true)}}

Software

{{ software | default("[More Information Needed]", true)}}

Citation [optional]

BibTeX:

{{ citation_bibtex | default("[More Information Needed]", true)}}

APA:

{{ citation_apa | default("[More Information Needed]", true)}}

Glossary [optional]

{{ glossary | default("[More Information Needed]", true)}}

More Information [optional]

{{ more_information | default("[More Information Needed]", true)}}

Model Card Authors [optional]

{{ model_card_authors | default("[More Information Needed]", true)}}

Model Card Contact

{{ model_card_contact | default("[More Information Needed]", true)}}