Giter VIP home page Giter VIP logo

pytorch-multi-label-classifier's Introduction

pytorch-multi-label-classifier

Introdution

A pytorch implemented classifier for Multiple-Label classification. You can easily train, test your multi-label classification model and visualize the training process.
Below is an example visualizing the training of one-label classifier. If you have more than one attributes, no doubt that all the loss and accuracy curves of each attribute will show on web browser orderly.

Loss Accuracy

Module

  • data

    data preparation module consisting of reading and transforming data. All data store in data.txtand label.txt with some predefined format explained below.
  • model

    scripts to build multi-label classifier model. Your model templets should put here.
  • options

    train test and visualization options define here
  • util

    • webvisualizer: a visdom based visualization tool for visualizing loss and accuracy of each attribute
    • util: miscellaneous functions used in project
    • html: used in webvisualizer.
  • test

    • mnist: mnist dataset arranged as defined data format.
    • celeba: exactract some of attributes of CelebA dataset

Multi-Label Data Format

Data Format Explanation.

  • label.txt

 Store attribute information including its name and value. label.txt example. Lines in label.txt stack as follows:

  • For each attribute :
    • number of attribute values ; id of attribute ; name attribute
    • For each attribute value belonging to current attribute :
      • id of attibute_value ; name of attribute value

 Note: mind the difference between attribute and attribute value.

  • data.txt

 Store objects information including attribute id and bounding box and so on. Each line is one json dict recording one object. data.txt example  

  • "box":object boundingbox. 'x': top_left.x , 'y':top_left.y, 'w': width of box, 'h': height of box.
  • "image_id": image identifier. An image content dependent hash value.
  • "box_id": object identidier. Combine image_id, box['x'], box['y'], box['w'], box["h"] with _.
  • "size": image width and height. Used for varifying whether box is valid.
  • "id": list of ids. Store multi-label attributes ids, the order is the same as the attributes' order in label.txt

Dependence

  • Visdom 0.1.7.2
  • Pytorch 0.3.1.post2

TODO

  • Snapshot loss and accuracy records
  • Support visualize multi top K accuracy
  • Support model finetuning
  • Complete test module
  • Add switch to control loss and accuracy curves displaying on one plot or multiple
  • Train and Test Log

Reference

Part of codes and models refer to some other OSS listed below for thanks:

pytorch-multi-label-classifier's People

Contributors

pangwong avatar

Watchers

James Cloos 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.