Code Monkey home page Code Monkey logo

mtml-learn-how-to-adapt-to-unseen-tasks's Introduction

Multi-task-meta-transfer-learning

This repository is the original implementation of the article "Multi-Task Meta Learning: learn how to adapt to unseen tasks" that can be found here

Introduction

This work aims to integrate two learning paradigms Multi-Task Learning (MTL) and meta learning, to bring together the best of both the worlds, i.e., simultaneous learning of multiple tasks, an element of MTL, and promptly adapting to new tasks, quality of meta learning. We propose Multi-task Meta Learning (MTML), an approach to enhance MTL compared to single task learning by employing meta learning. The fundamental idea of this work is to train a multi-task model, such that when an unseen task is introduced, it learns in lesser steps and gives better performance than conventional single task learning or MTL. By conducting various experiments, we demonstrate this approach on two datasets, NYU-v2, and the taskonomy dataset, on four tasks: semantic segmentation, depth estimation, surface normal estimation and edge detection.

Experiment configuration files

For analysing the performance of the proposed MTML algorithm, a wide range of experiments were conducted. Using this repository, 4 types of models can be trained (using the .yaml file) and tested.

  • Single task learning (exp_configs/single_task.yaml)
  • Multi-task learning (exp_configs/multi_task_baseline.yaml)
  • Multi-task meta learning (exp_configs/meta_multitask_baseline.yaml)
  • For adding new task or finetuning on an previously trained model (exp_configs/meta_testing.yaml)

Datasets:

Download the both datasets in the folder 'dataset' in NYU and Taskonomy dataset. Find the NYU dataset at here Find the taskonomy dataset here

Experiment Environment

Install the required python packages in a conda enviornment using the requirement.txt file using -- conda create --name --file requirements.txt

Training

To train the models use the following files-

  • For single_task training, edit the single_task.yaml file as required , activate the conda enviornment, and use the main.py file
    • python main.py --config_exp exp_configs/single_task.yaml
  • For multi-task training, edit the multi_task_baseline.yaml, activate the conda enviornment,
  • and use the main.py file
    • python main.py --config_exp exp_configs/multi_task_baseline.yaml
  • For training the multi-task meta learning model, edit the meta_multitask_baseline.yaml, activate the conda enviornment, and use the main_meta.py file
    • python main_meta.py --config_exp exp_configs/meta_multitask_baseline.yaml
  • For fine-tuning a task or adding a new task to a previously trained model, edit the meta_testing.yaml file, and use the main_meta_test.py file
    • python main_meta_test.py --config_exp exp_configs/meta_testing.yaml

Testing (any model)

To test any model use the test.MTL.py file

  • python test_MTL.py --test_exp ../results/Test/path_of_the_model_for_testing

mtml-learn-how-to-adapt-to-unseen-tasks's People

Contributors

ricupa avatar

Stargazers

 avatar Sahil Vaidya avatar Sameer Prabhu avatar  avatar Konstantina Nikolaidou avatar Prakash Chandra Chhipa 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.