Skip to main content

Revised splits for MNIST-USPS domain adaptation experiments

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnistusps-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

mnistusps-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file mnistusps-0.1.0.tar.gz.

File metadata

  • Download URL: mnistusps-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for mnistusps-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d862ea835c305125ad6fff1e5932165a53b4d1c3180bfd504e73916462dad3bc
MD5 019fc42aa9485dc9113ad9f149f16242
BLAKE2b-256 5257a3f1266e7ab9ca1063aeaac2c31af6d2ddfcfaffb0906628a5f7db767099

See more details on using hashes here.

File details

Details for the file mnistusps-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mnistusps-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for mnistusps-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02bb1c2cfa36638926977de94dc81c3709031ed066ef7103a0c43ab67fec654e
MD5 5b72cf486625ae266d4f92cb6402d64b
BLAKE2b-256 ee699f2a5781bf0f091e0d3f533e54524a2f61bc5d9083054b60824d57e600c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page