|
|
--- |
|
|
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/) |
|
|
|