Add sample
Browse files
README.md
CHANGED
@@ -38,6 +38,70 @@ dataset_info:
|
|
38 |
dataset_size: 20509417374.165
|
39 |
---
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
## Dataset Construction
|
42 |
|
43 |
The dataset contructed from translating the captions of [MS COCO 2014 dataset](https://huggingface.co/datasets/HuggingFaceM4/COCO) [2] to Thai by using [NMT](https://airesearch.in.th/releases/machine-translation-models/) provided by VISTEC-depa Thailand Artificial Intelligence Research Institute [3]. The translated of 3 splits (train, validation and test) dataset was published in the [Huggingface](https://huggingface.co/datasets/patomp/thai-mscoco-2014-captions).
|
|
|
38 |
dataset_size: 20509417374.165
|
39 |
---
|
40 |
|
41 |
+
## Usage
|
42 |
+
|
43 |
+
```python
|
44 |
+
from datasets import load_dataset
|
45 |
+
dataset = load_dataset("patomp/thai-mscoco-2014-captions")
|
46 |
+
dataset
|
47 |
+
```
|
48 |
+
output
|
49 |
+
```bash
|
50 |
+
DatasetDict({
|
51 |
+
train: Dataset({
|
52 |
+
features: ['image', 'filepath', 'sentids', 'filename', 'imgid', 'split', 'sentences_tokens', 'sentences_raw', 'sentences_sentid', 'cocoid', 'th_sentences_raw'],
|
53 |
+
num_rows: 113287
|
54 |
+
})
|
55 |
+
validation: Dataset({
|
56 |
+
features: ['image', 'filepath', 'sentids', 'filename', 'imgid', 'split', 'sentences_tokens', 'sentences_raw', 'sentences_sentid', 'cocoid', 'th_sentences_raw'],
|
57 |
+
num_rows: 5000
|
58 |
+
})
|
59 |
+
test: Dataset({
|
60 |
+
features: ['image', 'filepath', 'sentids', 'filename', 'imgid', 'split', 'sentences_tokens', 'sentences_raw', 'sentences_sentid', 'cocoid', 'th_sentences_raw'],
|
61 |
+
num_rows: 5000
|
62 |
+
})
|
63 |
+
})
|
64 |
+
```
|
65 |
+
|
66 |
+
A sample
|
67 |
+
```python
|
68 |
+
dataset["validation"][0]
|
69 |
+
```
|
70 |
+
output
|
71 |
+
```bash
|
72 |
+
{
|
73 |
+
"image":<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x336 at 0x7F6C5A83F430>,
|
74 |
+
"filepath":"COCO_val2014_000000184613.jpg",
|
75 |
+
"sentids":[474921,479322,479334,481560,483594],
|
76 |
+
"filename":"COCO_val2014_000000184613.jpg",
|
77 |
+
"imgid":2,
|
78 |
+
"split":"val",
|
79 |
+
"sentences_tokens":[
|
80 |
+
["a", "child","holding", "a","flowered","umbrella","and","petting","a","yak"],["a","young","man","holding","an","umbrella","next","to","a","herd","of","cattle"],
|
81 |
+
["a","young","boy","barefoot","holding","an","umbrella","touching","the","horn","of","a","cow"],
|
82 |
+
["a","young","boy","with","an","umbrella","who","is","touching","the","horn","of","a","cow"],
|
83 |
+
["a","boy","holding","an","umbrella","while","standing","next","to","livestock"]
|
84 |
+
],
|
85 |
+
"sentences_raw":[
|
86 |
+
"A child holding a flowered umbrella and petting a yak.",
|
87 |
+
"A young man holding an umbrella next to a herd of cattle.",
|
88 |
+
"a young boy barefoot holding an umbrella touching the horn of a cow",
|
89 |
+
"A young boy with an umbrella who is touching the horn of a cow.",
|
90 |
+
"A boy holding an umbrella while standing next to livestock."
|
91 |
+
],
|
92 |
+
"sentences_sentid":[474921,479322,479334,481560,483594],
|
93 |
+
"cocoid":184613,
|
94 |
+
"th_sentences_raw":[
|
95 |
+
"เด็กถือร่มที่มีดอกหนึ่งคันและลูบคลูบลํา",
|
96 |
+
"ชายหนุ่มคนหนึ่งถือร่มไว้ข้
|
97 |
+
างๆ ฝูงวัว",
|
98 |
+
"เด็กหนุ่มคนหนึ่งเท้าเปล่าจับร่มจับแตรของวัว",
|
99 |
+
"เด็กชายที่มีร่มสัมผัสแตรของวัว",
|
100 |
+
"เด็กชายถือร่มในขณะที่ยืนถัดจากปศุสัตว์"
|
101 |
+
]
|
102 |
+
}
|
103 |
+
```
|
104 |
+
|
105 |
## Dataset Construction
|
106 |
|
107 |
The dataset contructed from translating the captions of [MS COCO 2014 dataset](https://huggingface.co/datasets/HuggingFaceM4/COCO) [2] to Thai by using [NMT](https://airesearch.in.th/releases/machine-translation-models/) provided by VISTEC-depa Thailand Artificial Intelligence Research Institute [3]. The translated of 3 splits (train, validation and test) dataset was published in the [Huggingface](https://huggingface.co/datasets/patomp/thai-mscoco-2014-captions).
|