Datasets:
File size: 7,884 Bytes
90e79ee 34bf819 90e79ee 34bf819 90e79ee 34bf819 90e79ee | 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 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | # Pointerbench-Text
**A 500-example GUI grounding benchmark for text.** Given a screenshot of a
text-rich interface and a short instruction (e.g. *"Click the word 'invoice'"*,
*"Place the cursor between the 'r' and 'e' in 'erfolgreich'"*, *"Return the
bounding box of this paragraph"*), a model must output either a pixel coordinate
or a bounding box. Point answers are correct if they land inside the target box.
Bbox answers are correct if they reach the configured IoU threshold.

## Why text?
General GUI-grounding suites (ScreenSpot, ScreenSpot-v2, ScreenSpot-Pro) target
icons, buttons, and widgets, but they barely test **pointing inside running
text**: a specific word among hundreds of near-identical ones, a single
character, a punctuation mark, or a caret position between two letters.
That precision is exactly what cursor-based editing, proofreading, and
text-selection agents need. Pointerbench-Text isolates it across many real text
surfaces and five languages.
## What's inside
- **500** examples, one instruction per image.
- **1024x768** PNG screenshots, fully synthetic (no scraping, no PII).
- **Many text surfaces**: articles, books, email inbox and threads, chat,
Slack, code editors, terminals, markdown notes, docs sites, forums, social
feeds, search results, data tables, log viewers, and dozens more.
- **6 data types** (interaction granularity):
| data_type | example instruction |
| ------------- | ---------------------------------------------------- |
| `word` | *Click the word "invoice".* |
| `char` | *Click the second "e" in "settlement".* |
| `punctuation` | *Click the period after "done".* |
| `caret` | *Place the cursor between the "r" and "e" in "core".* |
| `chrome` | *Click "Settings" in the toolbar.* |
| `bbox` | *Return the bbox of the paragraph beginning with "In".* |
- **17 fine-grained categories** under those types (word center, char center,
punctuation, caret before/after/between, between words, line start/end,
sentence boundary, paragraph start/end, blank line, chrome label, word bbox,
char bbox, line bbox, paragraph bbox).
- **5 languages, Latin alphabet only**: 50% English; the other 50% split evenly
across German, French, Spanish, Italian, Dutch.
- **Difficulty** tag (`easy` / `medium` / `hard`) from font size, target kind,
and theme contrast.
- Randomized realism: 20 font families, mixed sizes, per-span color / bold /
italic / underline / highlight / link / code / strike / faded styling, light
and dark themes, plus film grain, JPEG artifacts, and fake caret / cursor
distractors.
## Schema
Each line of `data/test/metadata.jsonl` (HuggingFace `imagefolder` layout):
```json
{
"file_name": "0000.png",
"id": "pbt_0000",
"instruction": "Click the word \"invoice\".",
"bbox": [596, 376, 681, 395],
"point": [638, 385],
"answer_type": "point",
"eval": {"type": "point_in_bbox", "bbox": [596, 376, 681, 395]},
"data_type": "word",
"category": "word_center",
"surface": "email_thread",
"language": "en",
"difficulty": "medium",
"image_size": [1024, 768]
}
```
- **`bbox`**: ground-truth target, **`[x1, y1, x2, y2]` in absolute pixels**
(top-left, bottom-right) on the 1024x768 image. For point rows, a prediction
is correct iff it lands inside this box. For bbox rows, the prediction is
scored against this box with IoU.
- **`point`**: a reference click point inside the box.
- **`answer_type`**: `point` or `bbox`.
- **`eval`**: binary evaluation rule for this row.
- **`data_type`**: coarse interaction granularity (see table above).
- **`category`**: the fine-grained target kind.
- **`surface`**: the rendered surface (app/document skin).
- **`language`**: instruction language (`en`, `de`, `fr`, `es`, `it`, `nl`).
- **`difficulty`**: `easy` / `medium` / `hard`.
## Quickstart
### Load the data
Via HuggingFace `datasets` (after the set is pushed to the Hub):
```python
from datasets import load_dataset
ds = load_dataset("YOUR_ORG/pointerbench-text", split="test")
ex = ds[0]
ex["image"] # PIL.Image, 1024x768
ex["instruction"] # "Click the word \"invoice\"."
ex["bbox"] # [x1, y1, x2, y2]
```
Or locally with the imagefolder loader:
```python
from datasets import load_dataset
ds = load_dataset("imagefolder", data_dir="data", split="test")
```
Or with no dependencies at all, read `data/test/metadata.jsonl` and open the
sibling PNGs yourself.
### Evaluate
1. Print the recommended system prompt with `python eval.py --show-system-prompt`,
or edit it for your inference stack while keeping the 1024x768 coordinate
frame fixed.
2. Run your model on every example's `instruction` + image and collect a
predicted click point or bbox (absolute pixels on the 1024x768 image).
3. Write predictions as JSONL, one object per example:
```json
{"id": "pbt_0000", "point": [612, 388]}
{"id": "pbt_0001", "bbox": [193, 643, 807, 688]}
```
4. Score (pure standard library, no dependencies):
```bash
python eval.py --predictions preds.jsonl
```
```
Pointerbench-Text: 500 examples
============================================
Accuracy: 64.20% (321/500)
By data type:
caret 48.81% (n=168)
char 55.56% (n=18)
...
```
The scorer reports overall accuracy plus per-data-type, per-category,
per-surface, per-language, and per-difficulty breakdowns. `--json report.json`
writes the full report.
### Turning model output into a point
Models emit clicks in many shapes; map them to `[x, y]` pixels before scoring.
For example, a `<click>x,y</click>` tag or a normalized `0-1` / `0-999` point:
```python
import re
def to_point(text, w=1024, h=768):
m = re.search(r"(-?\d+(?:\.\d+)?)\s*[,\s]\s*(-?\d+(?:\.\d+)?)", text)
x, y = float(m.group(1)), float(m.group(2))
if max(x, y) <= 1.0: x, y = x * w, y * h # normalized 0-1
elif max(x, y) <= 999: x, y = x / 999 * w, y / 999 * h # 0-999 grid
return [round(x), round(y)]
```
## Baselines
| Model | Accuracy | Notes |
| ----------------------------- | -------- | ------------------------- |
| Center-click (512, 384) | low | sanity floor |
| _your model here_ | n/a | open a PR |
## Construction and reproducibility
Examples are rendered programmatically (pure PIL, no browser, no real files), so
every ground-truth box is pixel-exact: the layout engine records per-glyph
geometry and an independent verifier confirms each instruction resolves to
exactly one target before the example is kept. The set is **held out**: it is
built with a generation seed disjoint from any training data, so no benchmark
page is reused for training. The generator and the exact build command live in
the [source repo](https://github.com/YOUR_ORG/YOUR_GENERATOR_REPO); see
[`REPRODUCE.md`](REPRODUCE.md).
## Limitations
- Fully synthetic: realistic but not screenshots of real applications.
- Fixed 1024x768 resolution; Latin-script languages only.
- Non-English instructions reference targets by quoted word or chrome label;
the fine-grained caret/char/punctuation categories are English and German.
- Targets are words, characters, punctuation, caret positions, and chrome
labels, and text bboxes, not icons, images, or widgets.
## Citation
```bibtex
@misc{pointerbench_text_2026,
title = {Pointerbench-Text: A GUI Grounding Benchmark for Text},
author = {Pointerbench-Text contributors},
year = {2026},
url = {https://github.com/YOUR_ORG/pointerbench-text}
}
```
## License
- **Data** (images + annotations): [CC BY 4.0](LICENSE).
- **Code** (`eval.py`): MIT.
|