license:cc-by-nc-sa-4.0 region:us
---
license: cc-by-nc-sa-4.0
---
# Shape-adaptive Image-Text Dataset
The official release of Shape-adaptive Image-Text Dataset.


## License
The whole dataset is licensed under CC BY-NC-SA 4.0. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/

## Disclaimer

We are releasing this dataset in the hope that it will benefit research in the relevant field. This dataset consists entirely of synthesized data and is intended for research purposes only. Beware that this large-scale dataset is uncurated, and as such, it may contain some content that could be disturbing. Please use it at your own risk. The views and content within the dataset do not reflect those of the authors.

## Example Usage
```python
import os
import json
from PIL import Image
from io import BytesIO
import pyarrow.parquet as pq

with open("./meta.json", "r") as file:
    meta = json.load(file)

parquet_item = meta[0]

parquet_file_path = os.path.join(".", "data", parquet_item[0])
parquet_file = pq.read_table(parquet_file_path, columns=["jpg", "mask", "caption"])
parquet_slice = parquet_file.slice(parquet_item[1], length=1).to_pydict()

img = Image.open(BytesIO(parquet_slice["jpg"][0])).convert("RGB")
mask = Image.open(BytesIO(parquet_slice["mask"][0])).convert("L")
caption = parquet_slice['caption'][0]
```