Git Product home page Git Product logo

mnist-usps's Introduction

Splits for MNIST-USPS domain adaptation experiments

This repository contains the revised split protocol for creating splits for few shot domain adaptation on the MNIST-USPS datasets.

Contrary to often seen splits, we define an independent test split here and only let the train-val split vary according to a user-defined random seed.

Installation

pip install mnist-usps

Usage

Getting the splits is a simple as:

from mnistusps import mnistusps

train, val, test = mnistusps(
    source_name = "mnist",
    target_name = "usps",
    seed=1,
    num_source_per_class=200,
    num_target_per_class=3,
    same_to_diff_class_ratio=3,
    image_resize=(240, 240),
    group_in_out=True, # groups data: ((img_s, img_t), (lbl_s, _lbl_t))
    framework_conversion="tensorflow",
    data_path = None, # downloads to "~/data" per default
)

The function automatically downloads and unpacks the data using Torchvision internally. It then creates the splits using the Dataset Ops library. Depending on your choice of machine learning library, the dataset can be converted to Tensorflow or PyTorch (assuming either is pre-installed) using Dataset Ops.

mnist-usps's People

Contributors

lukashedegaard avatar

Stargazers

 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.