--- language: - en license: cc-by-nc-4.0 size_categories: - 10K/encoder_training") sample = ds["train"][0] # Image from PIL import Image from io import BytesIO img = Image.open(BytesIO(sample["image"])) # Annotation (full structure, unchanged) import json ann = json.loads(sample["annotation"]) # ann["chart_metadata"] — title, type, bar_width, legend, origin, size # ann["data"] — category_axis, value_axis, features ``` --- ## Annotation Format Each annotation follows this schema (see `format.json` for the full JSON Schema): ``` { "chart_metadata": { "title": { "text": "...", "bbox": [x1, y1, x2, y2] }, "type": "vertical" | "horizontal", "bar_width": , "legend": { "bbox": [...], "entries": [ { "feature": { "text": "...", "bbox": [...] }, "patch": { "bbox": [...] } } ] }, "origin": { "bbox": [...] }, "size": { "bbox": [...] } }, "data": { "category_axis": { "label": { "text": "...", "bbox": [...] }, "bbox": [...], "ticks": [ { "label": { "text": "...", "bbox": [...] }, "bbox": [...] } ] }, "value_axis": { "label": { "text": "...", "bbox": [...] }, "min_value": , "max_value": , "bbox": [...], "ticks": [ { "label": { "text": "...", "bbox": [...] }, "bbox": [...] } ] }, "features": [ { "feature": "...", "data": [ { "category": "...", "value": , "bbox": [...] } ] } ] } } ``` All bounding boxes are `[x1, y1, x2, y2]` in pixel coordinates.