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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: KnowCP
|
| 3 |
+
language:
|
| 4 |
+
- zh
|
| 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:
|
| 16 |
+
- chinese-painting
|
| 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 \
|
| 121 |
+
--model bytedance-seed/seed-2.0-lite \
|
| 122 |
+
--api-base https://openrouter.ai/api/v1 \
|
| 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
|