File size: 2,649 Bytes
e59cb1a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
license: cc-by-4.0
task_categories:
  - image-to-text
  - text-to-image
language:
  - en
tags:
  - laion
  - recaptioned
  - vision-language-alignment
  - clip-training
  - webdataset
pretty_name: Recaptioned LAION (Gemma-3-27B)
size_categories:
  - 100K<n<1M
---

# Recaptioned LAION

A subset of LAION recaptioned with **Gemma-3-27B-IT**. Each image is paired
with a single descriptive sentence (~20–30 words) generated by Gemma using
the prompt:

> *Describe this image in 20-30 words. Do not include any preamble or
> introduction, just the description.*

This dataset is used by the **PuzzleBench** project for vision/text
alignment training.

## Stats

| | |
|---|---:|
| Samples | 508,025 |
| Image resolution | up to 1500×1500 (varies) |
| Format | JPEG |
| Caption type | Gemma-3-27B recaption (declarative, ~130 chars avg) |
| Shards | 30 webdataset `.tar` files (~2.4 GB each) |
| Total size | ~72 GB |

## Format: WebDataset

The dataset ships as **30 webdataset-compatible tar shards**, the de facto
standard for large image-text corpora (used by LAION-400M, LAION-5B, CLIP
training pipelines, etc.). Each shard is a flat tar containing:

```
shards-00000.tar
├── 000000.jpg     # raw image bytes
├── 000000.txt     # caption (utf-8)
├── 000001.jpg
├── 000001.txt
└── ...
```

A `metadata.csv` with the same `image_id, url, caption` is also shipped
alongside for non-webdataset consumers.

## Usage

### With `webdataset` (streaming, no extraction needed)

```python
import webdataset as wds

url = "https://huggingface.co/datasets/PuzzleBench/Recaptioned_LAION/resolve/main/shards-{00000..00029}.tar"
ds = (
    wds.WebDataset(url)
    .decode("pil")
    .to_tuple("jpg", "txt")
)

for image, caption in ds:
    # image: PIL.Image
    # caption: str
    ...
```

### With `huggingface_hub` snapshot + local extraction

```python
from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="PuzzleBench/Recaptioned_LAION",
    repo_type="dataset",
    local_dir="recaptioned_laion",
)
```

### With `pandas` (captions only, no images)

```python
import pandas as pd
df = pd.read_csv("hf://datasets/PuzzleBench/Recaptioned_LAION/metadata.csv")
# columns: image_id, url, caption
```

## License

This dataset of recaptions is released under **CC BY 4.0**. The underlying
images are sourced from public LAION URLs and retain their original
licensing — please consult the LAION usage terms when redistributing or
training on the image content.

## Citation

If you use this dataset, please cite the PuzzleBench project and credit
the LAION corpus and the Gemma-3 recaptioning model.