File size: 6,642 Bytes
7f8bcfd
 
3c360ec
7f8bcfd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3c360ec
 
 
7f8bcfd
 
 
 
 
 
 
 
 
 
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
---
pretty_name: DocCount
license: cc-by-nc-nd-4.0
language:
- en
task_categories:
- visual-question-answering
- image-to-text
size_categories:
- n<1K
tags:
- document-ai
- visual-counting
- semantic-counting
- benchmark
configs:
- config_name: default
  data_files:
  - split: test
    path: data/test-*
---

<div align="center">
  <img src="assets/doccount-headline.png" width="100%" alt="DocCount: Counting Semantically Defined Entities in Documents">
  <p>
    <a href="https://sichenzhu.github.io/thinking-with-anchors/">Project</a> |
    <a href="https://github.com/SichenZhu/ADOPD2026">Code</a> |
    <a href="https://huggingface.co/datasets/adopd/adopd2026">ADOPD2026</a>
  </p>
</div>

DocCount is a manually curated document visual-counting benchmark with 442
original high-resolution images. Every row asks for the number of entities that
match one explicit semantic definition, with an integer ground-truth answer.

The first release contains only benchmark inputs and answers. Model responses,
reasoning traces, evaluation logs, masks, and semantic tagging artifacts are
not part of the dataset.

## Benchmark Summary

| Questions | Unique images | Target classes | Answer sum | Parquet shards |
| ---: | ---: | ---: | ---: | ---: |
| 442 | 442 | 4 | 2,555 | 2 |

![DocCount class distribution](assets/class-distribution.svg)

The four categories are deliberately defined semantically rather than by a
single visual template:

| Class | Questions | What is counted |
| --- | ---: | --- |
| `photograph` | 180 | photographic image regions meeting the row's class definition |
| `brand_logo` | 163 | visible brand or organization logo instances |
| `table` | 75 | distinct tabular structures |
| `chart_graph` | 24 | distinct charts, plots, or graphs |

## Loading

```python
from datasets import load_dataset

dataset = load_dataset("adopd/DocCount", split="test")
sample = dataset[0]

image = sample["image"]
prompt = sample["prompt"]
answer = sample["answer"]
```

Streaming is useful for evaluation runners that do not need a local copy:

```python
dataset = load_dataset("adopd/DocCount", split="test", streaming=True)
for sample in dataset:
    response = model(sample["image"], sample["prompt"])
```

## Evaluation Protocol

Send the original image and the row's `prompt` to a vision-language model.
Parse exactly one final integer and compare it with `answer`:

```python
correct = int(predicted_count) == sample["answer"]
```

The primary metric is exact-count accuracy over all 442 rows:

```text
accuracy = number of exactly correct integer answers / 442
```

Request failures and unparseable responses count as incorrect in the primary
metric and should also be reported separately. Do not replace the denominator
with only successfully parsed rows. Keep raw responses so parsing and model
errors remain distinguishable.

The prompt asks the model to reason carefully and permits a rationale, but the
final line must contain one integer in the machine-readable answer tag defined
by the row. Models should receive the row prompt verbatim.

## Selected Results

![DocCount selected model accuracy](assets/model-accuracy.svg)

| Model | Backend | Selected setting | Correct | Exact accuracy |
| --- | --- | --- | ---: | ---: |
| Kimi K2.5 | API | reasoning on | 322 / 442 | 72.85% |
| Qwen3.6 35B A3B | self-hosted | reasoning off | 319 / 442 | 72.17% |
| Qwen3.5 397B A17B | API | reasoning on | 313 / 442 | 70.81% |
| GPT-5.5 | API | best complete run | 304 / 442 | 68.78% |
| Claude Sonnet 4.5 | API | best complete run | 301 / 442 | 68.10% |
| GPT-5.2 | API | reasoning on | 293 / 442 | 66.29% |
| GLM-4.6V | self-hosted | reasoning on | 285 / 442 | 64.48% |
| Gemma 4 31B IT | self-hosted | reasoning on | 269 / 442 | 60.86% |

These are exact integer accuracies on the same 442-row test set. The chart uses
the best complete result available for each displayed model; reasoning settings
are therefore not uniform across rows. Use the released prompt and report model
version, inference backend, reasoning mode, sampling parameters, parse failures,
and request errors when adding comparisons.

## Row Schema

| Field | Type | Description |
| --- | --- | --- |
| `sample_id` | `string` | Stable identifier for the benchmark row |
| `image` | `Image` | Original high-resolution JPEG bytes |
| `image_width` | `int32` | Original width in pixels |
| `image_height` | `int32` | Original height in pixels |
| `image_sha256` | `string` | SHA-256 of the exact embedded image bytes |
| `target_class` | `string` | Human-readable semantic class name |
| `target_class_slug` | `string` | Stable machine-readable class key |
| `class_definition` | `string` | Inclusion/exclusion definition used to determine what counts |
| `question` | `string` | Natural-language counting question |
| `prompt` | `string` | Complete evaluation prompt to send to the model |
| `answer` | `int64` | Manually curated exact count |

`sample_id` and `image_sha256` are unique across all 442 rows. There is one
question per image in this release.

## Data Integrity

- The release contains exactly 442 rows and 442 unique images.
- All answers are integers and sum to 2,555.
- The two Parquet shards contain 229 and 213 rows.
- Embedded images retain their original JPEG bytes.
- Evaluation outputs and model-specific metadata are excluded from the release.

## Intended Uses And Limitations

DocCount is intended for evaluating semantic visual counting in document
images, including repeated logos, photographs, tables, and charts. It is not a
general object-counting training corpus. The category distribution is
intentionally non-uniform, and aggregate accuracy should be accompanied by
per-class results.

The benchmark is small enough for detailed error analysis but not large enough
to characterize every document domain, language, or layout. Models may exploit
OCR, visual repetition, and layout cues differently; raw response inspection is
recommended.

## License

DocCount uses ADOPD source images and is released under
[CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/).
It is intended for non-commercial research use. Redistribution must preserve
the dataset without adaptations and provide appropriate attribution.

## Citation

```bibtex
@misc{zhu2026thinkingwithanchors,
  title={Thinking with Anchors: Grounded and Efficient Document Reasoning},
  author={Sichen Zhu and Yuchen Zhu and Wenzhuo Xu and Jason Kuen and Wanrong Zhu and Jing Shi and Xuan Shen and Quanyi Wang and Yiwei Wang and Yujun Cai and Bing Shuai and Qin Zhang and Yongxin Chen and Shilong Liu and Molei Tao and Jiuxiang Gu},
  year={2026}
}
```