v2.5.0
Datasets ⭐
EXAMPLE CODE
OPA Dataset
Load the OPA dataset in Python fast with one line of code. 73470 image dataset with masks. Stream OPA Dataset while training models in Pytorch and Tensorflow.
Visualization of OPA dataset on the Activeloop Platform

OPA dataset

What is OPA Dataset?

The Object Placement Assessment (OPA) dataset helps in the verification of whether a composite image is plausible in terms of object placement. OPA is a synthesized dataset for Object Placement Assessment based on the COCO dataset. For an image to be plausible in terms of object placement, the foreground object should be placed at a reasonable location in the background considering location, size, occlusion, semantics, etc. The authors of the dataset selected unoccluded objects from multiple categories as the candidate foreground objects. The foreground objects were pasted on their compatible background images with random sizes and locations to form composite images. Then the images were sent to human annotators labeling.

Download OPA Dataset in Python

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

Load OPA Dataset Training Subset in Python

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

Load OPA Dataset Testing Subset in Python

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

OPA Dataset Structure

OPA Data Fields

  • image: tensor containing the image.
  • boxes: tensor representing the bounding boxes.
  • foreground: tensor to represent the foreground of the image.
  • background: tensor to represent the background.
  • scale: tensor to identify the scaling.
  • occlusion: tensor representing if occlusion is present.
  • masks: tensor to represent the masks.

OPA Data Splits

How to use OPA Dataset with PyTorch and TensorFlow in Python

Train a model on OPA 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 OPA dataset with TensorFlow in Python

1
dataloader = ds.tensorflow()
Copied!

Additional Information about OPA Dataset

OPA Dataset Description

  • Repository: Github
  • Paper: Introduced by Liu,Liu and Zhang,Bo in OPA: Object Placement Assessment Dataseta
  • Point of Contact: N/A

OPA Dataset Curators

Liu,Liu and Zhang,Bo and Li,Jiangtong and Niu,Li and Liu,Qingyang and Zhang,Liqing

OPA 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!

OPA Dataset Citation Information

1
@article{liu2021OPA,
2
title={OPA: Object Placement Assessment Dataset},
3
author={Liu,Liu and Zhang,Bo and Li,Jiangtong and Niu,Li and Liu,Qingyang and Zhang,Liqing},
4
journal={arXiv preprint arXiv:2107.01889},
5
year={2021}
6
}
Copied!

OPA Dataset FAQs

What is the OPA dataset for Python?

The OPA dataset is a synthesized dataset for Object Placement Assessment based on the COCO dataset. The foreground object must be placed at a reasonable location on the background considering location, size, occlusion, and semantics to be considered plausible in terms of the object placement.

How can I use OPA dataset in PyTorch or TensorFlow?

You can stream OPA 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 OPA dataset with PyTorch in Python or train a model on OPA dataset with TensorFlow in Python.