Trashnet / README.md
aculotta's picture
Update README.md
f7abd45
---
license: bsd
language:
- en
metrics:
- accuracy
tags:
- climate
- trash
- classifier
- water
- aquatic
- pollution
- environment
datasets:
- brsdincer/garbage-collective-data-for-nature-conservation
- harshpanwar/aquatrash
model-index:
- name: Trashnet r = 1
results:
- task:
type: trash-classification # Required. Example: automatic-speech-recognition
dataset:
type: aquatic-trash # Required. Example: common_voice. Use dataset id from https://hf.co/datasets
name: combined-trash-images # Required. A pretty name for the dataset. Example: Common Voice (French)
metrics:
- type: accuracy-radius-1 # Required. Example: wer. Use metric id from https://hf.co/metrics
value: 27.47 # Required. Example: 20.90
- name: Trashnet r = 2
results:
- task:
type: trash-classification # Required. Example: automatic-speech-recognition
dataset:
type: aquatic-trash # Required. Example: common_voice. Use dataset id from https://hf.co/datasets
name: combined-trash-images # Required. A pretty name for the dataset. Example: Common Voice (French)
metrics:
- type: accuracy-radius-2 # Required. Example: wer. Use metric id from https://hf.co/metrics
value: 51.53 # Required. Example: 20.90
- name: Trashnet r = 3
results:
- task:
type: trash-classification # Required. Example: automatic-speech-recognition
dataset:
type: aquatic-trash # Required. Example: common_voice. Use dataset id from https://hf.co/datasets
name: combined-trash-images # Required. A pretty name for the dataset. Example: Common Voice (French)
metrics:
- type: accuracy-radius-3 # Required. Example: wer. Use metric id from https://hf.co/metrics
value: 62.97 # Required. Example: 20.90
---
# Trashnet - Trash Identification model for forensic trash cleanup
## Overview
This model takes images or video frames as input, and identifies the most likely types of trash present in the scene.
The model has been specifically built for aquatic trash, but performs almost equally well on terrestrial trash.
Applications include automatic trash classification, ecological monitoring, and sorting at recycling plants.
# Usage
The model has been trained on 120 x 120 RGB images. To evaluate the contents of an image, you will need to pass in a tensor of shape (120,120,3). <br>
Output consists of a 10-d tensor of class probabilities.
## Training and Classes
Trained for 22 epochs on 3000 data points. Model accuracies are in the sidebar.<br>
Please read the 'Limitations' section for information on how the model was evaluated for accuracy.
#### Class labels
trash_classes = ['battery','biological','glass','cardboard','clothes','metal','paper','plastic','shoes','trash']
#### Mapping common trash types from training data together
class_to_idx = {<br>
<tab>'battery':0,<br>
<tab> 'biological':1,<br>
<tab> 'glass':2,<br>
<tab>'brown_glass':2,<br>
<tab>'green_glass':2,<br>
<tab>'cardboard':3,<br>
<tab>'clothes':4,<br>
<tab>'metal':5,<br>
<tab>'paper':6,<br>
<tab>'plastic':7,<br>
<tab>'shoes':8,<br>
<tab>'trash':9<br>
}<br>
## Limitations
The model has limited training data of trash in the environment. Additionally, the model overrepresents plastic and glass
in its predictions due to sampling bias and visual similarities between plastic, glass, and other common types of trash.
One concern is that many types of trash look visually similar or identical, even to humans. The model can get confused and rank these classes at similar probabilities.
As a solution, the model is marked as 'correct' when the correct label is within the model's top r most predicted trash types.
radius = r = 3 gives the most appropriate results.