g41 commited on
Commit
7164bf9
·
1 Parent(s): 003a6ea
README.md CHANGED
@@ -17,11 +17,15 @@ tags:
17
  - multimodal
18
  - benchmark
19
  configs:
20
- - config_name: images_metadata
21
  default: true
22
  data_files:
23
  - split: train
24
- path: card_samples/parquet/images_metadata.parquet
 
 
 
 
25
  ---
26
 
27
  # KnowCP
@@ -40,8 +44,10 @@ It supports recognition-style tasks (region/text extraction) and knowledge/reaso
40
 
41
  ## Dataset Viewer Layout
42
 
43
- The dataset card uses one simple config: `images_metadata`.
44
- It displays the first 100 images and their metadata.
 
 
45
 
46
  The card data is generated only from core folders:
47
 
@@ -55,11 +61,13 @@ The card data is generated only from core folders:
55
  - `images/**`: image assets
56
  - `kb/knowledge_base.json`: artwork metadata (`title`, `artist`, `dynasty`, `institution`)
57
  - `annotations/*.json`: seal/inscription/object/technique annotation exports
58
- - `card_samples/parquet/images_metadata.parquet`: viewer-facing image metadata table
 
 
59
 
60
  ## Data Fields in Viewer
61
 
62
- ### `images_metadata`
63
 
64
  - `image` (rendered image)
65
  - `image_id`
@@ -69,6 +77,14 @@ The card data is generated only from core folders:
69
  - `institution`
70
  - `material`
71
 
 
 
 
 
 
 
 
 
72
  ## Usage
73
 
74
  ```python
@@ -76,9 +92,11 @@ from datasets import load_dataset
76
 
77
  repo_id = "g41/KnowCP"
78
 
79
- images_metadata = load_dataset(repo_id, name="images_metadata")
 
80
 
81
- print(images_metadata["train"][0]["title"])
 
82
  ```
83
 
84
  To regenerate the dataset-card samples:
@@ -87,7 +105,8 @@ To regenerate the dataset-card samples:
87
  python for_hf/scripts/build_dataset_card_samples.py \
88
  --hf-repo hf_repo \
89
  --out-dir hf_repo/card_samples \
90
- --images-limit 100
 
91
  ```
92
 
93
  ## Evaluation with This Project
 
17
  - multimodal
18
  - benchmark
19
  configs:
20
+ - config_name: image
21
  default: true
22
  data_files:
23
  - split: train
24
+ path: card_samples/parquet/image.parquet
25
+ - config_name: qa
26
+ data_files:
27
+ - split: train
28
+ path: card_samples/parquet/qa.parquet
29
  ---
30
 
31
  # KnowCP
 
44
 
45
  ## Dataset Viewer Layout
46
 
47
+ The dataset card has two simple series:
48
+
49
+ - `image`: first 100 single-image artworks with metadata
50
+ - `qa`: 14 question types, 10 items per type (140 total)
51
 
52
  The card data is generated only from core folders:
53
 
 
61
  - `images/**`: image assets
62
  - `kb/knowledge_base.json`: artwork metadata (`title`, `artist`, `dynasty`, `institution`)
63
  - `annotations/*.json`: seal/inscription/object/technique annotation exports
64
+ - `questions/by_type/*.jsonl`: source questions by type
65
+ - `card_samples/parquet/image.parquet`: image series table
66
+ - `card_samples/parquet/qa.parquet`: qa series table
67
 
68
  ## Data Fields in Viewer
69
 
70
+ ### `image`
71
 
72
  - `image` (rendered image)
73
  - `image_id`
 
77
  - `institution`
78
  - `material`
79
 
80
+ ### `qa`
81
+
82
+ - `image` (rendered image)
83
+ - `qid`
84
+ - `type`
85
+ - `question`
86
+ - `ground_truth`
87
+
88
  ## Usage
89
 
90
  ```python
 
92
 
93
  repo_id = "g41/KnowCP"
94
 
95
+ image_ds = load_dataset(repo_id, name="image")
96
+ qa_ds = load_dataset(repo_id, name="qa")
97
 
98
+ print(image_ds["train"][0]["title"])
99
+ print(qa_ds["train"][0]["qid"])
100
  ```
101
 
102
  To regenerate the dataset-card samples:
 
105
  python for_hf/scripts/build_dataset_card_samples.py \
106
  --hf-repo hf_repo \
107
  --out-dir hf_repo/card_samples \
108
+ --images-limit 100 \
109
+ --qa-per-type 10
110
  ```
111
 
112
  ## Evaluation with This Project
card_samples/parquet/{images_metadata.parquet → image.parquet} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:627042528a9f046200350b1e1d583a5e71e6df9292d650791c74cb94011cd7c6
3
- size 497425345
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:683a17d592310dd81539b62b0ffe5c39823127e7d57ae4b0661d52047d9ab560
3
+ size 528434862
card_samples/parquet/qa.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1389412e2da43aaf5daec04fa136094127a413637dd054a5b9eb7bc8f2e3dee6
3
+ size 339904117
card_samples/summary.json CHANGED
@@ -1,6 +1,29 @@
1
  {
2
- "images_metadata_rows": 100,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  "images_limit": 100,
4
- "parquet_path": "hf_repo/card_samples/parquet/images_metadata.parquet",
 
5
  "out_dir": "hf_repo\\card_samples"
6
  }
 
1
  {
2
+ "image_rows": 100,
3
+ "qa_rows": 140,
4
+ "qa_per_type": 10,
5
+ "qa_per_type_counts": {
6
+ "CC": 10,
7
+ "ER_choice": 10,
8
+ "ER_fillin": 10,
9
+ "IR": 10,
10
+ "ITT_MHQA_choice": 10,
11
+ "ITT_MHQA_fillin": 10,
12
+ "MITT_MHQA_choice": 10,
13
+ "MITT_MHQA_fillin": 10,
14
+ "PR": 10,
15
+ "SR": 10,
16
+ "TR_choice": 10,
17
+ "TR_fillin": 10,
18
+ "TTI": 10,
19
+ "VA": 10
20
+ },
21
+ "single_image_only": true,
22
+ "excluded_image_ids": [
23
+ "IMG001211"
24
+ ],
25
  "images_limit": 100,
26
+ "image_parquet_path": "hf_repo/card_samples/parquet/image.parquet",
27
+ "qa_parquet_path": "hf_repo/card_samples/parquet/qa.parquet",
28
  "out_dir": "hf_repo\\card_samples"
29
  }