File size: 4,181 Bytes
4d6a49a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
dataset_info:
  viewer: false
---

# 📌 ViTextVQA — Vietnamese Text-based Visual Question Answering Dataset

---

## 🇻🇳 Giới thiệu (Tiếng Việt)

**ViTextVQA** là một dataset **Visual Question Answering (VQA)** dành cho tiếng Việt, tập trung vào khả năng đọc hiểu **chữ xuất hiện trong ảnh** (scene text), dựa trên bài báo *ViTextVQA: A Large-Scale Visual Question Answering Dataset for Evaluating Vietnamese Text Comprehension in Images* (ArXiv 2404.10652).  
Bản release trên Hugging Face này **đã được chỉnh sửa cấu trúc và bổ sung các file phục vụ việc huấn luyện mô hình**.

---

## 🇺🇸 Introduction (English)

**ViTextVQA** is a *Visual Question Answering (VQA)* dataset for Vietnamese, focusing on **scene text comprehension** in images, as described in the paper *ViTextVQA: A Large-Scale Visual Question Answering Dataset for Evaluating Vietnamese Text Comprehension in Images* (ArXiv 2404.10652).  
This Hugging Face release contains reorganized annotation format and additional supporting files for model training.

---

## 📁 Dataset Structure

```

ViTextVQA/
├── images.zip
├── train.json
├── dev.json
├── test.json
├── vitextvqa_coco.json
├── vitextvqa_captions.json
├── docr_features_of_vitext.npy
└── README.md

````

| File | Mô tả / Description |
|------|----------------------|
| `images.zip` | Ảnh dataset (đã nén) / All dataset images (zipped) |
| `train.json` | COCO-like annotation cho split train |
| `dev.json` | COCO-like annotation cho split validation |
| `test.json` | COCO-like annotation cho split test |
| `vitextvqa_coco.json` | (Optional) Original COCO-like annotations |
| `vitextvqa_captions.json` | Caption/annotation bổ sung |
| `docr_features_of_vitext.npy` | OCR / document features precomputed |
| `README.md` | File mô tả này |

---

## 🧠 Annotation Format (COCO-like)

Cấu trúc annotation ban đầu theo dạng COCO-like:

```json
{
  "images": [
    { "id": 9836, "filename": "9836.jpg" },
    { "id": 14257, "filename": "14257.jpg" }
  ],
  "annotations": [
    {
      "id": 74,
      "image_id": 22,
      "question": "cửa tiệm màu xanh là gì ?",
      "answers": ["nhà thuốc"]
    },
    ...
  ]
}
````

Để training VQA hoặc dùng chung với frameworks như Hugging Face, bạn có thể convert mỗi annotation thành 1 sample:

```json
{
  "image": "images/9836.jpg",
  "question": "cửa tiệm màu xanh là gì ?",
  "answers": ["nhà thuốc"],
  "question_id": 74
}
```

---

## 📊 Dataset Statistics / Thống kê

| Split | Images | QA pairs (annotations) |
| ----- | ------ | ---------------------- |
| train | 11,733 | 35,159                 |
| dev   | 1,676  | 5,155                  |
| test  | 3,353  | 10,028                 |

> Các con số được tính bằng script thống kê annotation COCO-like.

---

## 🛠️ Usage / Hướng dẫn sử dụng

### 📦 Giải nén ảnh (unzip images)

```bash
unzip images.zip -d images/
```

### 📖 Load JSON với Python

```python
import json

with open("train.json", "r", encoding="utf-8") as f:
    data = json.load(f)

print(data[0])
```

### 📚 Dùng dataset với Hugging Face `datasets`

```python
from datasets import load_dataset

dataset = load_dataset("json", data_files="train.json")
print(dataset["train"][0])
```

---

## 📜 Citation / Trích dẫn

Nếu bạn sử dụng dataset này trong nghiên cứu, vui lòng trích dẫn:

```bibtex
@article{ViTextVQA2024,
  title={ViTextVQA: A Large-Scale Visual Question Answering Dataset for Evaluating Vietnamese Text Comprehension in Images},
  author={Quan Van Nguyen and Dan Quang Tran and Huy Quang Pham and Thang Kien-Bao Nguyen and Nghia Hieu Nguyen and Kiet Van Nguyen and Ngan Luu-Thuy Nguyen},
  journal={arXiv preprint arXiv:2404.10652},
  year={2024},
  url={https://arxiv.org/abs/2404.10652}
}
```

---

## 📬 Contact / Liên hệ

Dataset gốc được công bố bởi nhóm tác giả nghiên cứu tại **University of Information Technology, Vietnam National University, Ho Chi Minh City**.