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.
Release files for mnistusps 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mnistusps-0.1.0.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mnistusps-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / mnistusps-0.1.0.tar.gz
| Download URL | mnistusps-0.1.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d862ea835c305125ad6fff1e5932165a53b4d1c3180bfd504e73916462dad3bc
|
|
BLAKE2b-256 checksum How to use checksums |
5257a3f1266e7ab9ca1063aeaac2c31af6d2ddfcfaffb0906628a5f7db767099
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / mnistusps-0.1.0-py3-none-any.whl
| Download URL | mnistusps-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02bb1c2cfa36638926977de94dc81c3709031ed066ef7103a0c43ab67fec654e
|
|
BLAKE2b-256 checksum How to use checksums |
ee699f2a5781bf0f091e0d3f533e54524a2f61bc5d9083054b60824d57e600c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|