Add Readme.md
Browse files
README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
dataset_info:
|
| 3 |
- config_name: FiFA-100k
|
| 4 |
features:
|
|
@@ -353,3 +355,83 @@ configs:
|
|
| 353 |
path: FiFA-5k/train-*
|
| 354 |
default: true
|
| 355 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
pretty_name: Pick-a-Pic v2 · FiFA Filtered
|
| 3 |
+
license: mit
|
| 4 |
dataset_info:
|
| 5 |
- config_name: FiFA-100k
|
| 6 |
features:
|
|
|
|
| 355 |
path: FiFA-5k/train-*
|
| 356 |
default: true
|
| 357 |
---
|
| 358 |
+
|
| 359 |
+
# Pick-a-Pic v2 · **FiFA** Filtered Subsets
|
| 360 |
+
|
| 361 |
+
These subsets were produced by filtering the original [Pick-a-Pic v2 dataset](https://arxiv.org/abs/2305.01569) using **FiFA**, a data filtering algorithm proposed in the paper [*Automated Filtering of Human Feedback Data for Aligning Text-to-Image Diffusion Models*](https://arxiv.org/abs/2410.10166).
|
| 362 |
+
|
| 363 |
+
## Overview
|
| 364 |
+
|
| 365 |
+
The filtering process is based on three key metrics:
|
| 366 |
+
|
| 367 |
+
1. **Preference Margin**: Estimated using [PickScore](https://huggingface.co/yuvalkirstain/PickScore_v1)
|
| 368 |
+
2. **Text Quality**: Estimated through LLM scoring
|
| 369 |
+
3. **Text Diversity**: Estimated using K-NN distance
|
| 370 |
+
|
| 371 |
+
## Dataset Configurations
|
| 372 |
+
|
| 373 |
+
| Configuration | Size | Description |
|
| 374 |
+
|---------------|------|-------------|
|
| 375 |
+
| `FiFA-500` | 500 triplets | Small subset for quick experiments |
|
| 376 |
+
| `FiFA-1k` | 1,000 triplets | Lightweight training set |
|
| 377 |
+
| `FiFA-5k` | 5,000 triplets | Medium-sized training set |
|
| 378 |
+
| `FiFA-10k` | 10,000 triplets | Standard training set |
|
| 379 |
+
| `FiFA-20k` | 20,000 triplets | Large training set |
|
| 380 |
+
| `FiFA-50k` | 50,000 triplets | Extended training set |
|
| 381 |
+
| `FiFA-100k` | 100,000 triplets | Full-scale training set |
|
| 382 |
+
|
| 383 |
+
## Quick Start
|
| 384 |
+
|
| 385 |
+
```python
|
| 386 |
+
from datasets import load_dataset
|
| 387 |
+
|
| 388 |
+
# Load a specific configuration
|
| 389 |
+
dataset = load_dataset("Dragonjinny/FiFA-pickapic-v2", "FiFA-5k", split="train")
|
| 390 |
+
|
| 391 |
+
# Access the data
|
| 392 |
+
import io
|
| 393 |
+
from PIL import Image
|
| 394 |
+
|
| 395 |
+
for example in dataset:
|
| 396 |
+
caption = example["caption"] # The prompt text
|
| 397 |
+
jpg_0 = example["jpg_0"] # First image (bytes)
|
| 398 |
+
jpg_1 = example["jpg_1"] # Second image (bytes)
|
| 399 |
+
label_0 = example["label_0"] # Binary label (0 or 1) indicating which image is preferred
|
| 400 |
+
|
| 401 |
+
# Convert bytes to PIL Images
|
| 402 |
+
image1 = Image.open(io.BytesIO(jpg_0)).convert("RGB")
|
| 403 |
+
image2 = Image.open(io.BytesIO(jpg_1)).convert("RGB")
|
| 404 |
+
|
| 405 |
+
# Now you can work with the images
|
| 406 |
+
print(f"Caption: {caption}")
|
| 407 |
+
print(f"Preferred image: {'jpg_0' if label_0 == 1 else 'jpg_1'}")
|
| 408 |
+
# image1.show() # Display the first image
|
| 409 |
+
# image2.show() # Display the second image
|
| 410 |
+
```
|
| 411 |
+
|
| 412 |
+
## Data Format
|
| 413 |
+
|
| 414 |
+
Each example contains:
|
| 415 |
+
- `caption`: The prompt text
|
| 416 |
+
- `jpg_0`: First image (bytes)
|
| 417 |
+
- `jpg_1`: Second image (bytes)
|
| 418 |
+
- `label_0`: Binary label (0 or 1) indicating which image is preferred
|
| 419 |
+
|
| 420 |
+
## Citation
|
| 421 |
+
|
| 422 |
+
If you use this dataset in your research, please cite our paper:
|
| 423 |
+
|
| 424 |
+
```bibtex
|
| 425 |
+
@inproceedings{
|
| 426 |
+
yang2025automated,
|
| 427 |
+
title={Automated Filtering of Human Feedback Data for Aligning Text-to-Image Diffusion Models},
|
| 428 |
+
author={Yongjin Yang and Sihyeon Kim and Hojung Jung and Sangmin Bae and SangMook Kim and Se-Young Yun and Kimin Lee},
|
| 429 |
+
booktitle={The Thirteenth International Conference on Learning Representations},
|
| 430 |
+
year={2025},
|
| 431 |
+
url={https://openreview.net/forum?id=8jvVNPHtVJ}
|
| 432 |
+
}
|
| 433 |
+
```
|
| 434 |
+
|
| 435 |
+
## License
|
| 436 |
+
|
| 437 |
+
This dataset is licensed under [MIT License](https://opensource.org/licenses/MIT), following the license of the original Pick-a-Pic v2 dataset.
|