Giter Club home page Giter Club logo

medic's Introduction

MEDIC

Please skip to our new repository MEDIC++ for faster execution speed and higher performance.

1. Introduction

This repository contains the implementation of the paper Generalizable Decision Boundaries: Dualistic Meta-Learning for Open Set Domain Generalization:

# PACS
Known classes: ['dog', 'elephant', 'giraffe', 'guitar', 'horse', 'house']
Unknown classes: ['person']

2. Dataset Construction

The dataset needs to be divided into two folders for training and validation. We provide reference code for automatically dividing data using official split in data_list/split_kfold.py.

root_dir = "path/to/PACS"
instr_dir = "path/to/PACS_data_list"

3. Train

To run the training code, please update the path of the dataset in ml_open.py:

if dataset == 'PACS':	
    train_dir = 'path/to/PACS_train' # the folder of training data 
	val_dir = 'path/to/PACS_val' # the folder of validation data 
	test_dir = 'path/to/PACS_all' or ['path/to/PACS_train', 'path/to/PACS_val']

then simply run:

python ml_open.py --source-domain ... --target-domain ... --save-name ... --gpu 0

4. Evalution

To run the evaluation code, please update the path of the dataset in eval.py:

if dataset == 'PACS':
        root_dir = 'path/to/PACS_all' or ['path/to/PACS_train', 'path/to/PACS_val']

then simply run:

python eval.py --save-name ... --gpu 0

medic's People

Contributors

zzwdx 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.