You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

CwI-Bench — Code-with-Image Bench

30 code-with-image tasks where models must write and run code against the image to reach the answer — pure visual inspection ("just look") is insufficient by design: answers require pixel-level precision (±px coordinates, exact counts, sub-degree angles, per-channel color recovery).

Each task is a config; each config has three splits:

split size source photos role
train 60 (15/tier) COCO train2017 reflection / skill-learning (tr60)
validation 50 (13/13/12/12) COCO train2017 selection set (sel50, the exact stratified slice used in runs)
test 100 (25/tier) COCO val2017 final evaluation (test_mini)

Zero photo overlap between train/validation (train2017) and test (val2017). Difficulty tiers: easy / medium / hard / expert in the difficulty column.

from datasets import load_dataset
d = load_dataset("ytz009/image_pot_bench", "alignment")
item = d["test"][0]   # columns: id, image, image_2, prompt, answer, difficulty, meta

image_2 is non-null only for two-image tasks (e.g. congruent_pair). meta is a JSON string with generation parameters (constructive ground truth). Scoring rules per task are given in the Scoring section below.

Scoring

Every item is scored all-or-nothing (0/1) — there is no partial credit, and a task's accuracy is the mean over its 100 held-out test items. The model's answer is the last <answer>…</answer> span in its output; no span scores 0. The rule column below is the exact condition under which a prediction is counted correct (it scores 1 if the condition holds, else 0). Discrete answers (permutations, counts, index sets, transform tuples) must match exactly; continuous answers (pixels, angles, RGB values, percentages) must fall within the task's tolerance — the tolerance is part of the task definition, and every generator rejects any sample a shortcut could land inside it.

Across the 30 tasks: 9 exact · 20 tolerance · 1 exact+tolerance (ring_rotor).

Each entry reads taskcriterion — the condition under which a prediction is counted correct.

Transformation

  • circular_shifttolerancedx,dy each within ±2 px of the true shift
  • restore_then_countexact — the integer equals the true count
  • shift_rot_aligntolerancedx,dy within ±2 px each and θ within ±1.875° (circular)
  • alignmenttolerancedx,dy each within ±2 px
  • rot_scaletolerance — angle within ±3° (circular) and scale within ±0.05
  • transform_chainexact — the (dx,dy,rot_k,fliph) tuple matches in every field
  • unshuffle2dexact — both the row and column permutations match exactly
  • jigsawexact — the full piece-order sequence matches exactly
  • rotated_jigsawexact — the full tile-and-rotation assignment matches exactly
  • restore_then_measuretolerance — the percentage is within ±1.5 pp
  • ring_rotorexact+tol — the ring index is exact and the angle within ±5°
  • double_exposuretolerance — every signed shift is within ±8 px (count and order match)

Perception

  • grating_periodtolerance — the period is within ±1.5
  • anomaly_v2exact — the reported cell set equals the true anomaly set
  • peak_countexact — the integer equals the true count
  • congruent_pairexact — the reported index pair equals the true congruent pair
  • trace_lengthtolerance — length/200 is within ±0.3
  • scan_moiretolerance — the scale is within ±0.004

Localization

  • crop_provenancetolerance — the box reaches IoU ≥ 0.5 with the true crop (coords normalized 0–1000)
  • brightest_blobtolerance — the point is within ±2 px on the 480-px canvas
  • sub_rect_swaptolerance — both boxes reach IoU ≥ 0.5, order-free (coords normalized 0–1000)
  • retouch_regiontolerance — the box reaches IoU ≥ 0.5 with the true region (coords normalized 0–1000)
  • circle_fittolerance — the point is within ±4 px on the 480-px canvas
  • print_misregtolerancedx,dy are each within ±0.3 px
  • gain_centertolerance — every spotlight centre is within ±15 px (in strength order)

Color

  • film_colortoleranceR,G,B each within ±10
  • swatch_rgbtoleranceR,G,B each within ±10
  • patch_mean_dotstoleranceR,G,B each within ±10
  • color_countexact — the integer equals the true count
  • channel_mixtoleranceR,G,B each within ±8

Tasks (30)

Transformation & rearrangement: circular_shift, restore_then_count, shift_rot_align, alignment, rot_scale, transform_chain, unshuffle2d, jigsaw, rotated_jigsaw, restore_then_measure, ring_rotor, double_exposure

Perception & counting: grating_period, anomaly_v2, peak_count, congruent_pair, trace_length, scan_moire

Localization: crop_provenance, brightest_blob, sub_rect_swap, retouch_region, circle_fit, print_misreg, gain_center

Color: film_color, swatch_rgb, patch_mean_dots, color_count, channel_mix

Note: trace_length uses the revised (v2fix) generator with a reference-solver fairness screen.

Downloads last month
101