Skip to main content

Revised splits for Office31 domain adaptation experiments

Project description

Splits for Office31 domain adaptation tasks

This repository contains the revised protocol for creating Office31 splits for few shot domain adaptation.

Contrary to the usual splits, we define an independent test split here (split using a hardcoded seed), and let the train-val split vary according to a user-defined random seed.

Installation

pip install office31

Usage

Getting the splits is a simple as:

from office31 import office31

train, val, test = office31(
    source_name = "webcam",
    target_name = "amazon",
    seed=1,
    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",
    office_path = None, #automatically downloads to "~/data"
)

The function automatically downloads and unpacks the data if necessary. 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

office31-0.1.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

office31-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file office31-0.1.2.tar.gz.

File metadata

  • Download URL: office31-0.1.2.tar.gz
  • Upload date:
  • Size: 3.8 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 office31-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e5a3dbfbf91050ee109e2a8ff6b1ea9f4e2291d4ecb27a710cb9b0704e042753
MD5 1e88ac69bd2760ad1920c2d7cf3173ef
BLAKE2b-256 72c6649e42f34d67ac13ef22a326b5d7f75c377dc9c9b4f4bb04aea50416b678

See more details on using hashes here.

File details

Details for the file office31-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: office31-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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 office31-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d9a1bb5cb823ae310cdb6bae0f489ae4fcbc7b1e48cdcad688336d95c483894f
MD5 1a3836704ab41bedf0fc037780b69c7b
BLAKE2b-256 60126312717dce3ca5d4751cb1270157439c4ad731e6890c922c8da5087512d6

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