File size: 2,719 Bytes
f115e06
 
 
88ff5f8
f115e06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5b250c7
f115e06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f01e436
f115e06
 
 
88ff5f8
 
 
 
f115e06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
db48417
f115e06
 
e301dbc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---

language:
- en
license: cc0-1.0
task_categories:
- image-to-text
- text-generation
pretty_name: Flickr8k Captions With Splits
size_categories:
- 1K<n<10K
configs:
- config_name: default
  data_files:
  - split: train
    path: train/**
  - split: dev
    path: dev/**
  - split: test
    path: test/**
dataset_info:
  features:
  - name: image
    dtype: image
  - name: file_name
    dtype: string
  - name: split
    dtype: string
  - name: caption_0
    dtype: string
  - name: caption_1
    dtype: string
  - name: caption_2
    dtype: string
  - name: caption_3
    dtype: string
  - name: caption_4
    dtype: string
---


# Flickr8k Captions With Splits

This dataset repackages the local Flickr8k image-caption corpus into a Hugging Face `imagefolder` layout with per-split `metadata.csv` files.

## Structure

- `train/`, `dev/`, and `test/` each contain image files and a `metadata.csv`.
- Each row represents one image with five captions.
- The `image` feature is inferred from `file_name` in each `metadata.csv`.

## Columns

- `image`: image file loaded by the Hugging Face Datasets library
- `file_name`: image filename stored as a string and used by `imagefolder` to map rows to image files
- `split`: one of `train`, `dev`, `test`
- `caption_0` to `caption_4`: the five raw Flickr8k captions for the image

## License

- CC0: Public Domain

## Counts

- Total included images: 8000
- Train images: 6000
- Dev images: 1000
- Test images: 1000
- Excluded caption entries without split or image file: 92

## Source Mapping

- Split assignments come from `Flickr_8k.trainImages.txt`, `Flickr_8k.devImages.txt`, and `Flickr_8k.testImages.txt`.
- Captions come from `Flickr8k.token.txt`, using `#0` through `#4` as `caption_0` through `caption_4`.

## Notes

- The original caption file contains 8,092 image-caption groups.
- Only the 8,000 images with explicit split assignments are included in this Hugging Face-ready dataset.
- Excluded rows are recorded in `excluded_rows.csv`.
- Missing local image files are recorded in `missing_image_rows.csv`.

## Loading Example

```python

from datasets import load_dataset



dataset = load_dataset("intro/flickr8k")

print(dataset["train"][0])

```

## Citation

If you use this dataset, please cite:

```bibtex

@article{hodosh2013framing,

  title={Framing Image Description as a Ranking Task: Data, Models and Evaluation Metrics},

  author={Hodosh, Micah and Young, Peter and Hockenmaier, Julia},

  journal={Journal of Artificial Intelligence Research},

  volume={47},

  pages={853--899},

  year={2013},

  url={http://www.jair.org/papers/paper3994.html}

}

```