File size: 8,734 Bytes
638ac2f
52a9aed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
638ac2f
 
52a9aed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ac7f2bf
 
 
638ac2f
52a9aed
 
 
 
 
f760e28
52a9aed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ac7f2bf
52a9aed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ac7f2bf
 
52a9aed
 
 
 
 
 
 
ac7f2bf
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
---
annotations_creators:
  - machine-generated
language_creators:
  - found
language:
  - en
license: other
multilinguality:
  - monolingual
size_categories:
  - 10K<n<100K
source_datasets:
  - lmms-lab/flickr30k
task_categories:
  - image-feature-extraction
  - zero-shot-image-classification
tags:
  - iscc
  - content-identification
  - similarity-search
  - deduplication
  - image
  - iso-24138
  - flickr30k
pretty_name: "ISCC Codes for Flickr30k"
dataset_info:
  features:
    - name: thumbnail
      dtype: image
    - name: source_dataset
      dtype: string
    - name: source_row_id
      dtype: string
    - name: filename
      dtype: string
    - name: caption
      dtype: string
    - name: iscc
      dtype: string
    - name: iscc_meta
      dtype: string
    - name: iscc_semantic
      dtype: string
    - name: iscc_content
      dtype: string
    - name: iscc_data
      dtype: string
    - name: iscc_instance
      dtype: string
    - name: width
      dtype: int32
    - name: height
      dtype: int32
    - name: filesize
      dtype: int64
    - name: image_path
      dtype: string
---

# ISCC Codes for Flickr30k

The [Flickr30k](https://shannon.cs.illinois.edu/DenotationGraph/) dataset enriched
with full 256-bit [ISCC](https://iscc.codes/) (International Standard Content Code)
codes for content identification, similarity search, and deduplication research.

## What is ISCC?

The **International Standard Content Code** ([ISO 24138:2024](https://www.iso.org/standard/77899.html)) is a
content-derived identifier for digital media assets. Unlike traditional identifiers that are assigned
arbitrarily, ISCC codes are generated algorithmically from the content itself, enabling:

- **Content Identification**: Identify content regardless of format or location
- **Similarity Search**: Find visually or semantically similar images
- **Deduplication**: Detect exact and near-duplicate content
- **Provenance Tracking**: Link derived works to their sources

## ISCC Units

Each record contains five 256-bit ISCC-UNITs that capture different aspects of the content:

| Unit | Field | Description |
|------|-------|-------------|
| **Meta-Code** | `iscc_meta` | Similarity based on embedded metadata (filename, title) |
| **Semantic-Code** | `iscc_semantic` | AI-based visual semantic similarity (what the image depicts) |
| **Content-Code** | `iscc_content` | Perceptual image similarity (visual appearance) |
| **Data-Code** | `iscc_data` | Raw binary data similarity (file structure) |
| **Instance-Code** | `iscc_instance` | Cryptographic hash for exact matching (like SHA-256) |

The `iscc` field contains the composite ISCC-CODE combining all units.

## Dataset Structure

### Data Fields

| Field | Type | Description |
|-------|------|-------------|
| `thumbnail` | image | WebP thumbnail (128x128 max) for preview |
| `source_dataset` | string | Source HuggingFace dataset path (`lmms-lab/flickr30k`) |
| `source_row_id` | string | Original row identifier in source dataset |
| `filename` | string | Original filename (e.g., `1000092795.jpg`) |
| `caption` | string | First of 5 human-written captions from Flickr30k |
| `iscc` | string | Full composite ISCC-CODE |
| `iscc_meta` | string | 256-bit Meta-Code |
| `iscc_semantic` | string | 256-bit Semantic-Code |
| `iscc_content` | string | 256-bit Content-Code |
| `iscc_data` | string | 256-bit Data-Code |
| `iscc_instance` | string | 256-bit Instance-Code |
| `width` | int | Original image width in pixels |
| `height` | int | Original image height in pixels |
| `filesize` | int | File size in bytes |
| `image_path` | string | Relative path to cached source image |

### Data Splits

| Split | Samples |
|-------|---------|
| train | 31,783 |

## Usage

### Loading the Dataset

```python
from datasets import load_dataset

ds = load_dataset("iscc/iscc-flickr30k")
```

### Viewing a Sample

```python
sample = ds["train"][0]
print(f"ISCC: {sample['iscc']}")
print(f"Dimensions: {sample['width']}x{sample['height']}")
```

### Similarity Search Example

```python
import iscc_core as ic

# Get two ISCC codes to compare
code1 = ds["train"][0]["iscc_content"]
code2 = ds["train"][1]["iscc_content"]

# Calculate hamming distance (0 = identical, 256 = maximally different)
distance = ic.iscc_distance(code1, code2)
print(f"Hamming distance: {distance}")

# Convert to similarity percentage
similarity = 1 - (distance / 256)
print(f"Similarity: {similarity:.1%}")
```

### Finding Near-Duplicates

```python
import iscc_core as ic

# Threshold for near-duplicates (adjust based on use case)
THRESHOLD = 32  # ~87.5% similarity

reference = ds["train"][0]["iscc_content"]

for i, row in enumerate(ds["train"]):
    distance = ic.iscc_distance(reference, row["iscc_content"])
    if distance <= THRESHOLD and i > 0:
        print(f"Near-duplicate found: row {i}, distance={distance}")
```

### Semantic Similarity Search

```python
import iscc_core as ic

# Find semantically similar images (same subject/concept)
reference = ds["train"][0]["iscc_semantic"]

similar = []
for i, row in enumerate(ds["train"]):
    distance = ic.iscc_distance(reference, row["iscc_semantic"])
    if distance <= 64:  # ~75% semantic similarity
        similar.append((i, distance))

# Sort by similarity
for idx, dist in sorted(similar, key=lambda x: x[1])[:5]:
    print(f"Row {idx} (distance={dist})")
```

## Source Data

This dataset was derived from [lmms-lab/flickr30k](https://huggingface.co/datasets/lmms-lab/flickr30k).

### Original Flickr30k Dataset
The Flickr30k dataset contains 31,783 images collected from Flickr, each with 5
human-written captions. It is widely used for image captioning and visual-semantic
research.
**License**: The original Flickr30k images are subject to Flickr's Terms of Service.
This derivative dataset contains only ISCC codes and small 128px thumbnails for visual
verification of matches, not the original high-resolution images. Users should refer
to the original dataset for licensing details.

### Processing

ISCC codes were generated using:
- [iscc-sdk](https://github.com/iscc/iscc-sdk) - High-level ISCC generation
- [iscc-sci](https://github.com/iscc/iscc-sci) - Semantic image codes (experimental)

All processing was performed on original resolution images. WebP thumbnails (128x128 max, quality 80)
were generated separately for dataset preview purposes.

## Considerations

### Intended Use

- Content identification and matching research
- Image similarity search algorithm development
- Deduplication system benchmarking
- Visual-semantic retrieval experiments
- ISCC-based indexing research

### Limitations

- Semantic codes are generated using experimental AI models and may not capture all semantic nuances
- ISCC codes are sensitive to significant image modifications (heavy cropping, overlays, filters)
- Thumbnails are for preview only; use the source dataset for full-resolution images

### Privacy

This dataset contains ISCC codes and thumbnails derived from the source images. Refer to the original
dataset documentation for privacy considerations.

## Citation

If you use this dataset, please cite both this dataset and the original source:

**This Dataset:**
```bibtex
@dataset{iscc_flickr30k,
  title = {{ISCC Codes for Flickr30k}},
  author = {{ISCC Foundation}},
  year = {{2026}},
  publisher = {{Hugging Face}},
  url = {{https://huggingface.co/datasets/iscc/iscc-flickr30k}}
}
```

**Original Flickr30k:**
```bibtex
@article{young2014image,
  title = {{From image descriptions to visual denotations: New similarity metrics
  for semantic inference over event descriptions}},
  author = {{Young, Peter and Lai, Alice and Hodosh, Micah and Hockenmaier, Julia}},
  journal = {{Transactions of the Association for Computational Linguistics}},
  volume = {{2}},
  pages = {{67--78}},
  year = {{2014}},
  publisher = {{MIT Press}}
}
```

**ISCC Standard:**
```bibtex
@misc{iso24138,
  title = {{ISO 24138:2024 Information and documentation -- International Standard Content Code (ISCC)}},
  author = {{International Organization for Standardization}},
  year = {{2024}},
  url = {{https://www.iso.org/standard/77899.html}}
}
```

## Additional Resources

- [ISCC Foundation](https://iscc.io/) - Standards organization
- [ISCC Documentation](https://sdk.iscc.codes/) - Technical documentation
- [ISO 24138:2024](https://www.iso.org/standard/77899.html) - Official standard
- [iscc-sdk](https://github.com/iscc/iscc-sdk) - Python SDK for ISCC generation
- [Flickr30k Project Page](https://shannon.cs.illinois.edu/DenotationGraph/)

## Contact

- **Dataset Issues**: [iscc-datasets GitHub](https://github.com/iscc/iscc-datasets/issues)
- **ISCC Questions**: [ISCC Foundation](https://iscc.io/)