GithubHelp home page GithubHelp logo

fvilmos / multi_task_learning_shape_color_position Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 6.74 MB

Implementation of a slim multi-task learner DNN with 3 tasks (heads). Detects shape type, color, the position of the midpoint of the shape.

License: GNU General Public License v3.0

Jupyter Notebook 100.00%
dnn multi-task-learning mtl cnn cnn-keras object-detection position-prediction mt-dnn

multi_task_learning_shape_color_position's Introduction

Multi Task Learning example for shape type, color, position detection

Implementation of a simple multi-task learner with 3 tasks (heads). Shares internal representation between different tasks (hard parameter sharing, see [2]) having the direct benefit of a lighter, faster model with less trainable parameters.

This implementation has ~192 k trainable parameters, compared to ~290 k used for the same tasks with a multi-headed implementation on separate branches, see [3]. Compared to [3] training samples and epochs are significantly increased, after 2k cycles position accuracy is ~84% while color and shape ~99%.

Steps:

  1. Create toy database, generate shapes, color it
  2. Normalize the generated images / output values (for the regression head)
  3. Create the multi-task learner Keras functional model, train and test it
  4. Generate the metrics:
    • mean_absolute_error - regression head
    • confusion matrix, f1-score for classification heads
  5. (optional) Freeze the feature detetor part, finetune the regression head
  6. reivew the metrics

Model:

Outputs:

  1. Regression head (position)

1.1. Regression head (position), after fine-tuning:

2. Color prediction head Confusion Matrix

3. Shape type prediction head Confusion Matrix

Links

  1. keras
  2. An Overview of Multi-Task Learning in Deep Neural Networks, arXiv:1706.05098 [cs.LG]
  3. Multi headed DNN predictor, detects object coordinates, color and shape type

/Enjoy.

multi_task_learning_shape_color_position's People

Contributors

fvilmos avatar

Stargazers

 avatar  avatar

Watchers

 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.