CoolFace
Datasetpublic

vera365/lexica_dataset

LexicaDataset LexicaDataset is a large-scale text-to-image prompt dataset shared in [USENIX'24] Prompt Stealing Attacks Against Text-to-Image Generation Models. It contains 61,467 prompt-image pairs collected from Lexica. All prompts are curated by real users and images are generated by Stable Diffusion. Data collection details can be found in the paper. Data Splits We randomly sample 80% of a dataset as the training dataset and the rest 20% as the testing… See the full description on the dataset page: https://huggingface.co/datasets/vera365/lexica_dataset.

sourceHugging Facecc-by-4.0updated 2y agoView on Hugging Face
8likes134downloads
Dataset Card

Dataset Description

LexicaDataset

LexicaDataset is a large-scale text-to-image prompt dataset shared in [[USENIX'24] Prompt Stealing Attacks Against Text-to-Image Generation Models](https://arxiv.org/abs/2302.09923). It contains 61,467 prompt-image pairs collected from Lexica. All prompts are curated by real users and images are generated by Stable Diffusion. Data collection details can be found in the paper.

Data Splits

We randomly sample 80% of a dataset as the training dataset and the rest 20% as the testing dataset.

Load LexicaDataset

You can use the Hugging Face `Datasets` library to easily load prompts and images from LexicaDataset.

python
import numpy as np
from datasets import load_dataset

trainset = load_dataset('vera365/lexica_dataset', split='train')
testset  = load_dataset('vera365/lexica_dataset', split='test')

Metadata Schema

trainset and testset share the same schema.

ColumnTypeDescription
imageimageThe generated image
promptstringThe text prompt used to generate this image
idstringImage UUID
promptidstringPrompt UUID
widthuint16Image width
heightuint16Image height
seeduint32Random seed used to generate this image.
gridboolWhether the image is composed of multiple smaller images arranged in a grid
modelstringModel used to generate the image
nsfwstringWhether the image is NSFW
subjectstringthe subject/object depicted in the image, extracted from the prompt
modifier10sequenceModifiers in the prompt that appear more than 10 times in the whole dataset. We regard them as labels to train the modifier detector
modifier10_vectorsequenceOne-hot vector of modifier10

Ethics & Disclosure

According to the terms and conditions of Lexica, images on the website are available under the Creative Commons Noncommercial 4.0 Attribution International License. We strictly followed Lexica’s Terms and Conditions, utilized only the official Lexica API for data retrieval, and disclosed our research to Lexica. We also responsibly disclosed our findings to related prompt marketplaces.

License

The LexicaDataset dataset is available under the CC-BY 4.0 License.

Citation

If you find this useful in your research, please consider citing:

bibtex
@inproceedings{SQBZ24,
  author = {Xinyue Shen and Yiting Qu and Michael Backes and Yang Zhang},
  title = {{Prompt Stealing Attacks Against Text-to-Image Generation Models}},
  booktitle = {{USENIX Security Symposium (USENIX Security)}},
  publisher = {USENIX},
  year = {2024}
}