All Projects β†’ garythung β†’ Trashnet

garythung / Trashnet

Licence: mit
Dataset of images of trash; Torch-based CNN for garbage image classification

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Trashnet

Deep learning projects
Stars: ✭ 28 (-92.39%)
Mutual labels:  dataset, convolutional-neural-networks, image-classification
Fashion Mnist
A MNIST-like fashion product database. Benchmark πŸ‘‡
Stars: ✭ 9,675 (+2529.08%)
Mutual labels:  dataset, convolutional-neural-networks
Recursive Cnns
Implementation of my paper "Real-time Document Localization in Natural Images by Recursive Application of a CNN."
Stars: ✭ 80 (-78.26%)
Mutual labels:  dataset, convolutional-neural-networks
Deepecg
ECG classification programs based on ML/DL methods
Stars: ✭ 124 (-66.3%)
Mutual labels:  dataset, convolutional-neural-networks
Multidigitmnist
Combine multiple MNIST digits to create datasets with 100/1000 classes for few-shot learning/meta-learning
Stars: ✭ 48 (-86.96%)
Mutual labels:  dataset, image-classification
Images Web Crawler
This package is a complete tool for creating a large dataset of images (specially designed -but not only- for machine learning enthusiasts). It can crawl the web, download images, rename / resize / covert the images and merge folders..
Stars: ✭ 51 (-86.14%)
Mutual labels:  dataset, image-classification
Protest Detection Violence Estimation
Implementation of the model used in the paper Protest Activity Detection and Perceived Violence Estimation from Social Media Images (ACM Multimedia 2017)
Stars: ✭ 114 (-69.02%)
Mutual labels:  dataset, image-classification
Awesome Project Ideas
Curated list of Machine Learning, NLP, Vision, Recommender Systems Project Ideas
Stars: ✭ 6,114 (+1561.41%)
Mutual labels:  dataset, image-classification
Hdltex
HDLTex: Hierarchical Deep Learning for Text Classification
Stars: ✭ 191 (-48.1%)
Mutual labels:  dataset, convolutional-neural-networks
Dynamic Training Bench
Simplify the training and tuning of Tensorflow models
Stars: ✭ 210 (-42.93%)
Mutual labels:  dataset, convolutional-neural-networks
Torchdata
PyTorch dataset extended with map, cache etc. (tensorflow.data like)
Stars: ✭ 226 (-38.59%)
Mutual labels:  dataset, torch
Assembled Cnn
Tensorflow implementation of "Compounding the Performance Improvements of Assembled Techniques in a Convolutional Neural Network"
Stars: ✭ 319 (-13.32%)
Mutual labels:  convolutional-neural-networks, image-classification
Facerank
FaceRank - Rank Face by CNN Model based on TensorFlow (add keras version). FaceRank-δΊΊθ„Έζ‰“εˆ†εŸΊδΊŽ TensorFlow (ζ–°ε’ž Keras η‰ˆζœ¬) ηš„ CNN ζ¨‘εž‹οΌˆQQ羀:167122861οΌ‰γ€‚ζŠ€ζœ―ζ”―ζŒοΌšhttp://tensorflow123.com
Stars: ✭ 841 (+128.53%)
Mutual labels:  dataset, convolutional-neural-networks
Codar
βœ… CODAR is a Framework built using PyTorch to analyze post (Text+Media) and predict Cyber Bullying and offensive content. πŸ’¬πŸ“·
Stars: ✭ 52 (-85.87%)
Mutual labels:  dataset, image-classification
Caffenet Benchmark
Evaluation of the CNN design choices performance on ImageNet-2012.
Stars: ✭ 700 (+90.22%)
Mutual labels:  dataset, convolutional-neural-networks
Core50
CORe50: a new Dataset and Benchmark for Continual Learning
Stars: ✭ 91 (-75.27%)
Mutual labels:  dataset, convolutional-neural-networks
Cvat
Powerful and efficient Computer Vision Annotation Tool (CVAT)
Stars: ✭ 6,557 (+1681.79%)
Mutual labels:  dataset, image-classification
Label Studio
Label Studio is a multi-type data labeling and annotation tool with standardized output format
Stars: ✭ 7,264 (+1873.91%)
Mutual labels:  dataset, image-classification
Motion Sense
MotionSense Dataset for Human Activity and Attribute Recognition ( time-series data generated by smartphone's sensors: accelerometer and gyroscope)
Stars: ✭ 159 (-56.79%)
Mutual labels:  dataset, convolutional-neural-networks
Pytorch Image Classification
Tutorials on how to implement a few key architectures for image classification using PyTorch and TorchVision.
Stars: ✭ 272 (-26.09%)
Mutual labels:  convolutional-neural-networks, image-classification

trashnet

Code (only for the convolutional neural network) and dataset for mine and Mindy Yang's final project for Stanford's CS 229: Machine Learning class. Our paper can be found here. The convolutional neural network results on the poster are dated since we continued working after the end of the quarter and were able to achieve around 75% test accuracy (with 70/13/17 train/val/test split) after changing the weight initialization to the Kaiming method.

Dataset

This repository contains the dataset that we collected. The dataset spans six classes: glass, paper, cardboard, plastic, metal, and trash. Currently, the dataset consists of 2527 images:

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

The pictures were taken by placing the object on a white posterboard and using sunlight and/or room lighting. The pictures have been resized down to 512 x 384, which can be changed in data/constants.py (resizing them involves going through step 1 in usage). The devices used were Apple iPhone 7 Plus, Apple iPhone 5S, and Apple iPhone SE.

The size of the original dataset, ~3.5GB, exceeds the git-lfs maximum size so it has been uploaded to Google Drive. If you are planning on using the Python code to preprocess the original dataset, then download dataset-original.zip from the link below and place the unzipped folder inside of the data folder.

If you are using the dataset, please give a citation of this repository. The dataset can be downloaded here.

Installation

Lua setup

We wrote code in Lua using Torch; you can find installation instructions here. You'll need the following Lua packages:

After installing Torch, you can install these packages by running the following:

# Install using Luarocks
luarocks install torch
luarocks install nn
luarocks install optim
luarocks install image
luarocks install gnuplot

We also need @e-lab's weight-init module, which is already included in this repository.

CUDA support

Because training takes awhile, you will want to use a GPU to get results in a reasonable amount of time. We used CUDA with a GTX 650 Ti with CUDA. To enable GPU acceleration with CUDA, you'll first need to install CUDA 6.5 or higher. Find CUDA installations here.

Then you need to install following Lua packages for CUDA:

You can install these packages by running the following:

luarocks install cutorch
luarocks install cunn

Python setup

Python is currently used for some image preprocessing tasks. The Python dependencies are:

You can install these packages by running the following:

# Install using pip
pip install numpy scipy

Usage

Step 1: Prepare the data

Unzip data/dataset-resized.zip.

If adding more data, then the new files must be enumerated properly and put into the appropriate folder in data/dataset-original and then preprocessed. Preprocessing the data involves deleting the data/dataset-resized folder and then calling python resize.py from trashnet/data. This will take around half an hour.

Step 2: Train the model

TODO

Step 3: Test the model

TODO

Step 4: View the results

TODO

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Acknowledgments

TODOs

  • finish the Usage portion of the README
  • add specific results (and parameters used) that were achieved after the CS 229 project deadline
  • add saving of confusion matrix data and creation of graphic to plot.lua
  • rewrite the data preprocessing to only reprocess new images if the dimensions have not changed
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].