Giter Club home page Giter Club logo

garbage-image-classification's Introduction

Garbage Image Classification

Description

Garbage image classification using PyTorch transfer learning pretrained model Resnet152 with FastAPI for API based application. This model will classification 6 class: cardboard, glass, metal, paper, plastic, trash (other).

Installation

$ git clone https://github.com/hafidh561/Garbage-Image-Classification.git

Installation Python

# Python version 3.6
$ git clone https://github.com/nodefluxio/vortex.git
$ cd vortex/ && git checkout drop-enforce
$ pip install ./src/runtime[onnxruntime] && cd ../
$ pip install -r requirements.txt
$ python download_model.py

Installation Docker

# Newest docker version
$ docker build -t hafidh561/garbage-image-classification:1.0 .

Usage

Usage Python

$ python app.py

Usage Docker

$ docker run --rm -p <YOUR PORT>:6969 hafidh561/garbage-image-classification:1.0
# Example
$ docker run --rm -p 301:6969 hafidh561/garbage-image-classification:1.0

Usage API

  1. After you run app use python or docker, open your web browser and go to http://localhost:<YOUR PORT | 6969>/docs for looking some documentation.

  2. Now it's time to testing API, open your application for testing API. I'll use Postman for testing API.

  3. Set up postman like this.

    postman_body

  4. Press button "Select Files" to select image you want to classification.

  5. Press "Send" button and waiting for response.

  6. Now open response body and look object response member class and search for highest value.

Example Test API

glass

{
	"filename": "glass.jpg",
	"contentype": "image/jpeg",
	"class": "glass",
	"confidence": "0.99995697"
}

Report Article

Give It a Try

If you want make your own deep learning for image classification? Give it a try in this Google Colab

License

MIT LICENSE

© Developed by hafidh561 - Internship at Nodeflux

garbage-image-classification's People

Contributors

hafidh561 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.