g41 commited on
Commit
26e64a4
·
1 Parent(s): b4b8b5a

dataset card

Browse files
README.md CHANGED
@@ -5,11 +5,10 @@ language:
5
  license: cc-by-4.0
6
  task_categories:
7
  - visual-question-answering
8
- - image-text-to-text
9
  task_ids:
10
- - open-ended-vqa
11
- - multi-choice-vqa
12
- - visual-grounding
13
  size_categories:
14
  - 10K<n<100K
15
  tags:
@@ -17,104 +16,176 @@ tags:
17
  - cultural-heritage
18
  - multimodal
19
  - benchmark
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  ---
 
21
  # KnowCP
22
 
23
  KnowCP is a benchmark for Chinese painting understanding and reasoning.
24
- It supports both recognition-style tasks (region/text extraction) and knowledge/reasoning tasks (open QA, multiple choice, and multi-turn QA).
25
 
26
  ## Dataset Summary
27
 
28
  - Name: KnowCP
29
  - Modality: image + text
30
- - Language: Chinese (Simplified/Traditional text may appear in source inscriptions)
31
  - License: CC BY 4.0
32
  - Total images: 2331
33
- - Total question items (`questions/questions_all.jsonl`): 26137
34
-
35
- ## Supported Tasks
36
-
37
- The release includes multiple task files in `questions/by_type/`:
38
-
39
- - `CC.jsonl` (922)
40
- - `ER_choice.jsonl` (2875)
41
- - `ER_fillin.jsonl` (1279)
42
- - `IR.jsonl` (2351)
43
- - `ITT_MHQA_choice.jsonl` (5290)
44
- - `ITT_MHQA_fillin.jsonl` (5290)
45
- - `MITT_MHQA_choice.jsonl` (330)
46
- - `MITT_MHQA_fillin.jsonl` (330)
47
- - `PR.jsonl` (922)
48
- - `SR.jsonl` (1792)
49
- - `TR_choice.jsonl` (1312)
50
- - `TR_fillin.jsonl` (1312)
51
- - `TTI.jsonl` (1210)
52
- - `VA.jsonl` (922)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  ## Repository Structure
55
 
56
- - `questions/by_type/*.jsonl`: per-task split files
57
- - `images/**`: image assets used by questions
58
- - `kb/knowledge_base.json`: structured knowledge base
59
- - `annotations/**`: annotation resources
60
-
61
- ## Data Format
62
-
63
- Each line in question files is a JSON object. Typical fields include:
64
-
65
- - `qid`: unique question id
66
- - `image_id`: image identifier
67
- - `phase`: benchmark phase
68
- - `question_no`: question index in phase
69
- - `type`: task type
70
- - `answer_format`: expected output format (`text` or `json`)
71
- - `prompt`: full question prompt with output constraints
72
- - `ground_truth`: reference answer (string or structured object)
73
- - `image_paths`: related image path list (relative paths)
74
-
75
- Example (single line from `questions/questions_all.jsonl`):
76
-
77
- ```json
78
- {
79
- "qid": "IMG000002-P4-Q3B",
80
- "image_id": "IMG000002",
81
- "phase": "P4",
82
- "question_no": "Q3B",
83
- "type": "CC",
84
- "answer_format": "text",
85
- "prompt": "请结合题材来源与图文对应关系,解释这幅作品的文化含义。",
86
- "ground_truth": "...",
87
- "image_paths": ["images/IMG000002_0.jpg", "images/IMG000002_1.jpg"]
88
- }
89
- ```
90
 
91
  ## Usage
92
 
93
- ### 1) Load by `datasets`
94
-
95
  ```python
96
  from datasets import load_dataset
97
 
98
- # Replace with your dataset repo id
99
  repo_id = "g41/KnowCP"
100
 
101
- all_ds = load_dataset(repo_id, data_files={"train": "questions/questions_all.jsonl"})
102
- ir_ds = load_dataset(repo_id, data_files={"train": "questions/by_type/IR.jsonl"})
103
 
104
- print(all_ds["train"][0]["qid"])
105
- print(ir_ds["train"][0]["type"])
106
  ```
107
 
108
- ### 2) Run evaluation with this project (`github_repo/run_eval_for_hf.py`)
109
 
110
- [GitHub link](https://github.com/41-edu/KnowCP),This runner expects local files. If your dataset is already on Hugging Face, download it first and point `--workspace-root` to the parent folder that contains both `github_repo` and `hf_repo`.
111
 
112
  ```bash
113
- # Example local layout after download:
114
- # D:/mylib/benchmark/
115
- # ├─ github_repo/
116
- # └─ hf_repo/
117
-
118
  python github_repo/run_eval_for_hf.py \
119
  --workspace-root D:/mylib/benchmark \
120
  --items-dir D:/mylib/benchmark/hf_repo/questions/by_type \
@@ -123,21 +194,7 @@ python github_repo/run_eval_for_hf.py \
123
  --api-key YOUR_API_KEY
124
  ```
125
 
126
- ## Intended Uses
127
-
128
- - Benchmarking multimodal models on Chinese painting understanding
129
- - Evaluating grounding, OCR-style extraction, and text reasoning
130
- - Multi-turn visual QA experiments
131
-
132
- ## Limitations
133
-
134
- - Prompts are optimized for benchmark consistency, not for general chat behavior.
135
- - Some tasks require strict JSON output formatting.
136
- - Evaluation metrics and threshold settings may differ by task type.
137
-
138
  ## Citation
139
 
140
- If you use this dataset, please cite the project repository and dataset page:
141
-
142
  - Code: https://github.com/41-edu/KnowCP
143
  - Dataset: https://huggingface.co/datasets/g41/KnowCP
 
5
  license: cc-by-4.0
6
  task_categories:
7
  - visual-question-answering
 
8
  task_ids:
9
+ - visual-question-answering
10
+ - multiple-choice-qa
11
+ - document-question-answering
12
  size_categories:
13
  - 10K<n<100K
14
  tags:
 
16
  - cultural-heritage
17
  - multimodal
18
  - benchmark
19
+ configs:
20
+ - config_name: gallery
21
+ default: true
22
+ data_files:
23
+ - split: train
24
+ path: viewer/gallery.jsonl
25
+ - config_name: qa_index
26
+ data_files:
27
+ - split: train
28
+ path: viewer/qa_index.jsonl
29
+ - config_name: qa_CC
30
+ data_files:
31
+ - split: train
32
+ path: viewer/qa_by_type/CC.jsonl
33
+ - config_name: qa_ER_choice
34
+ data_files:
35
+ - split: train
36
+ path: viewer/qa_by_type/ER_choice.jsonl
37
+ - config_name: qa_ER_fillin
38
+ data_files:
39
+ - split: train
40
+ path: viewer/qa_by_type/ER_fillin.jsonl
41
+ - config_name: qa_IR
42
+ data_files:
43
+ - split: train
44
+ path: viewer/qa_by_type/IR.jsonl
45
+ - config_name: qa_ITT_MHQA_choice
46
+ data_files:
47
+ - split: train
48
+ path: viewer/qa_by_type/ITT_MHQA_choice.jsonl
49
+ - config_name: qa_ITT_MHQA_fillin
50
+ data_files:
51
+ - split: train
52
+ path: viewer/qa_by_type/ITT_MHQA_fillin.jsonl
53
+ - config_name: qa_MITT_MHQA_choice
54
+ data_files:
55
+ - split: train
56
+ path: viewer/qa_by_type/MITT_MHQA_choice.jsonl
57
+ - config_name: qa_MITT_MHQA_fillin
58
+ data_files:
59
+ - split: train
60
+ path: viewer/qa_by_type/MITT_MHQA_fillin.jsonl
61
+ - config_name: qa_PR
62
+ data_files:
63
+ - split: train
64
+ path: viewer/qa_by_type/PR.jsonl
65
+ - config_name: qa_SR
66
+ data_files:
67
+ - split: train
68
+ path: viewer/qa_by_type/SR.jsonl
69
+ - config_name: qa_TR_choice
70
+ data_files:
71
+ - split: train
72
+ path: viewer/qa_by_type/TR_choice.jsonl
73
+ - config_name: qa_TR_fillin
74
+ data_files:
75
+ - split: train
76
+ path: viewer/qa_by_type/TR_fillin.jsonl
77
+ - config_name: qa_TTI
78
+ data_files:
79
+ - split: train
80
+ path: viewer/qa_by_type/TTI.jsonl
81
+ - config_name: qa_VA
82
+ data_files:
83
+ - split: train
84
+ path: viewer/qa_by_type/VA.jsonl
85
  ---
86
+
87
  # KnowCP
88
 
89
  KnowCP is a benchmark for Chinese painting understanding and reasoning.
90
+ It supports recognition-style tasks (region/text extraction) and knowledge/reasoning tasks (open QA, multiple choice, and multi-turn QA).
91
 
92
  ## Dataset Summary
93
 
94
  - Name: KnowCP
95
  - Modality: image + text
96
+ - Language: Chinese
97
  - License: CC BY 4.0
98
  - Total images: 2331
99
+ - Total question items (full set): 26137
100
+
101
+ ## Dataset Viewer Layout
102
+
103
+ This dataset has two viewer styles:
104
+
105
+ - `gallery` (default): one row per image page with selected metadata.
106
+ - `qa_*`: QA preview grouped by task type, so each type can be browsed separately.
107
+
108
+ Viewer source files:
109
+
110
+ - `viewer/gallery.jsonl`
111
+ - `viewer/qa_index.jsonl`
112
+ - `viewer/qa_by_type/*.jsonl`
113
+
114
+ `qa_*` files are lightweight previews (top rows per type) for stable Hugging Face Dataset Viewer rendering.
115
+ The full benchmark data remains in `questions/by_type/*.jsonl`.
116
+
117
+ ## Supported Task Files (Full Benchmark)
118
+
119
+ - `questions/by_type/CC.jsonl` (922)
120
+ - `questions/by_type/ER_choice.jsonl` (2875)
121
+ - `questions/by_type/ER_fillin.jsonl` (1279)
122
+ - `questions/by_type/IR.jsonl` (2351)
123
+ - `questions/by_type/ITT_MHQA_choice.jsonl` (5290)
124
+ - `questions/by_type/ITT_MHQA_fillin.jsonl` (5290)
125
+ - `questions/by_type/MITT_MHQA_choice.jsonl` (330)
126
+ - `questions/by_type/MITT_MHQA_fillin.jsonl` (330)
127
+ - `questions/by_type/PR.jsonl` (922)
128
+ - `questions/by_type/SR.jsonl` (1792)
129
+ - `questions/by_type/TR_choice.jsonl` (1312)
130
+ - `questions/by_type/TR_fillin.jsonl` (1312)
131
+ - `questions/by_type/TTI.jsonl` (1210)
132
+ - `questions/by_type/VA.jsonl` (922)
133
 
134
  ## Repository Structure
135
 
136
+ - `images/**`: image assets
137
+ - `kb/knowledge_base.json`: artwork metadata (`title`, `artist`, `dynasty`, `institution`)
138
+ - `questions/questions_all.jsonl`: merged full question file
139
+ - `questions/by_type/*.jsonl`: full by-type benchmark files
140
+ - `viewer/gallery.jsonl`: gallery view data
141
+ - `viewer/qa_by_type/*.jsonl`: by-type QA preview files
142
+
143
+ ## Data Fields in Viewer
144
+
145
+ ### `gallery`
146
+
147
+ - `image`
148
+ - `image_id`
149
+ - `page_index`
150
+ - `title`
151
+ - `title_en`
152
+ - `artist`
153
+ - `dynasty`
154
+ - `institution`
155
+ - `image_count`
156
+
157
+ ### `qa_*`
158
+
159
+ - `source_file`
160
+ - `qid`
161
+ - `type`
162
+ - `phase`
163
+ - `question_no`
164
+ - `answer_format`
165
+ - `prompt`
166
+ - `ground_truth_preview`
167
+ - `image`
168
+ - `image_count`
 
169
 
170
  ## Usage
171
 
 
 
172
  ```python
173
  from datasets import load_dataset
174
 
 
175
  repo_id = "g41/KnowCP"
176
 
177
+ gallery = load_dataset(repo_id, name="gallery")
178
+ qa_ir = load_dataset(repo_id, name="qa_IR")
179
 
180
+ print(gallery["train"][0]["image_id"])
181
+ print(qa_ir["train"][0]["type"])
182
  ```
183
 
184
+ ## Evaluation with This Project
185
 
186
+ To run the full benchmark with local files:
187
 
188
  ```bash
 
 
 
 
 
189
  python github_repo/run_eval_for_hf.py \
190
  --workspace-root D:/mylib/benchmark \
191
  --items-dir D:/mylib/benchmark/hf_repo/questions/by_type \
 
194
  --api-key YOUR_API_KEY
195
  ```
196
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  ## Citation
198
 
 
 
199
  - Code: https://github.com/41-edu/KnowCP
200
  - Dataset: https://huggingface.co/datasets/g41/KnowCP
viewer/gallery.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/CC.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/ER_choice.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/ER_fillin.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/IR.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/ITT_MHQA_choice.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/ITT_MHQA_fillin.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/MITT_MHQA_choice.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/MITT_MHQA_fillin.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/PR.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/SR.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/TR_choice.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/TR_fillin.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/TTI.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_by_type/VA.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
viewer/qa_index.jsonl ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"source_file": "CC.jsonl", "source_rows": 922, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
2
+ {"source_file": "ER_choice.jsonl", "source_rows": 2875, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
3
+ {"source_file": "ER_fillin.jsonl", "source_rows": 1279, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
4
+ {"source_file": "IR.jsonl", "source_rows": 2351, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
5
+ {"source_file": "ITT_MHQA_choice.jsonl", "source_rows": 5290, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
6
+ {"source_file": "ITT_MHQA_fillin.jsonl", "source_rows": 5290, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
7
+ {"source_file": "MITT_MHQA_choice.jsonl", "source_rows": 330, "preview_rows": 330, "preview_note": "Top 330 rows sampled for viewer"}
8
+ {"source_file": "MITT_MHQA_fillin.jsonl", "source_rows": 330, "preview_rows": 330, "preview_note": "Top 330 rows sampled for viewer"}
9
+ {"source_file": "PR.jsonl", "source_rows": 922, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
10
+ {"source_file": "SR.jsonl", "source_rows": 1792, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
11
+ {"source_file": "TR_choice.jsonl", "source_rows": 1312, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
12
+ {"source_file": "TR_fillin.jsonl", "source_rows": 1312, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
13
+ {"source_file": "TTI.jsonl", "source_rows": 1210, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}
14
+ {"source_file": "VA.jsonl", "source_rows": 922, "preview_rows": 800, "preview_note": "Top 800 rows sampled for viewer"}