v2.5.0
Datasets ⭐
EXAMPLE CODE
PACS Dataset
Load PACS dataset in Python fast with one line of code. PACS is an art domain classification dataset. Stream PACS while training models in PyTorch & Tensorflow.
Visualization of PACS dataset on the Activeloop Platform

PACS dataset

What is PACS Dataset?

PACS is an image dataset for domain generalization. It consists of four domains, namely Photo (1,670 images), Art Painting (2,048 images), Cartoon (2,344 images), and Sketch (3,929 images). Each domain contains seven categories.

Download PACS Dataset in Python

Instead of downloading the PACS dataset in Python, you can effortlessly load it in Python via our open-source package Hub with just one line of code.

Load PACS Dataset Training Subset in Python

1
import hub
2
ds = hub.load('hub://activeloop/pacs-train')
Copied!

Load PACS Dataset Validation Subset in Python

1
import hub
2
ds = hub.load('hub://activeloop/pacs-val')
Copied!

Load PACS Dataset Testing Subset in Python

1
import hub
2
ds = hub.load('hub://activeloop/pacs-test')
Copied!

PACS Dataset Structure

PACS Data Fields

  • images: tensor containing the image.
  • labels: tensor to represent labels.
  • domains: tensor to represent domain.

PACS Data Splits

How to use PACS Dataset with PyTorch and TensorFlow in Python

Train a model on PACS dataset with PyTorch in Python

Let's use Hub's built-in PyTorch one-line dataloader to connect the data to the compute:
1
dataloader = ds.pytorch(num_workers=0, batch_size=4, shuffle=False)
Copied!

Train a model on PACS dataset with TensorFlow in Python

1
dataloader = ds.tensorflow()
Copied!

Additional Information about PACS Dataset

PACS Dataset Description

  • Paper: Python Annotated Code Search (PACS) Datasets (2021). Version 1.0. [Dataset (Text corpus)]. Source: European Language Grid. https://live.european-language-grid.eu/catalogue/corpus/9172
  • Point of Contact: N/A

PACS Dataset Curators

Xu, Jiaolong and Xiao, Liang and López, Antonio

PACS Dataset Licensing Information

Hub users may have access to a variety of publicly available datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have a license to use the datasets. It is your responsibility to determine whether you have permission to use the datasets under their license.
If you're a dataset owner and do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thank you for your contribution to the ML community!

PACS Dataset Citation Information

1
@unknown{unknown,
2
author = {Xu, Jiaolong and Xiao, Liang and López, Antonio},
3
year = {2019},
4
month = {07},
5
pages = {},
6
title = {Self-supervised Domain Adaptation for Computer Vision Tasks}
7
}
Copied!

PACS Dataset FAQs

What is the PACS dataset for Python?

The PACS dataset is often used for generalization methods because it contains data from multiple source domains so that a trained model can generalize to unseen domains. This dataset is popular for making label classifiesrs more robust to unknown domain changes.
How to download the PACS dataset in Python?
You can load PACS dataset fast with one line of code using the open-source package Activeloop Hub in Python. See detailed instructions on how to load PACS dataset training subset and testing subset in Python.

How can I use the PACS dataset in PyTorch or TensorFlow?

You can stream the PACS dataset while training a model in PyTorch or TensorFlow with one line of code using the open-source package Activeloop Hub in Python. See detailed instructions on how to train a model on PACS dataset with PyTorch in Python or train a model on PACS dataset with TensorFlow in Python.