Bar-JEPA / README.md
Alex E
Add paper and code links to dataset card (#2)
9cd3997
|
Raw History Blame Contribute Delete
3.88 kB
metadata
language:
  - en
license: cc-by-nc-4.0
size_categories:
  - 10K<n<100K
task_categories:
  - image-to-text
  - table-question-answering
  - table-to-text
tags:
  - synthetic
  - chart
configs:
  - config_name: encoder_training
    data_files:
      - split: train
        path: hf_ready/encoder_training/data/train-*.parquet
      - split: test
        path: hf_ready/encoder_training/data/test-*.parquet
  - config_name: decoder_training
    data_files:
      - split: train
        path: hf_ready/decoder_training/data/train-*.parquet
      - split: test
        path: hf_ready/decoder_training/data/test-*.parquet
  - config_name: pipeline_testing
    data_files:
      - split: test
        path: hf_ready/pipeline_testing/data/test-*.parquet

Bar Chart Annotation Dataset

This dataset accompanies the paper Bar-JEPA: Extracting Values from Bar Chart with Joint-Embedding Predictive Architecture. Code is available at https://github.com/dralois/Bar-JEPA.

A collection of synthetic bar chart images with detailed structural annotations. Split into three subsets for different stages of a chart understanding pipeline.


Subsets

Subset Folder Train Test
encoder_training hf_ready/encoder_training/ 100,000 100
decoder_training hf_ready/decoder_training/ 17,000 3,400
pipeline_testing hf_ready/pipeline_testing/ — 100

Each subset is a standalone HuggingFace dataset (its own repo), formatted as sharded Parquet files under a data/ subfolder.


Columns

Column Type Description
filename string Original file stem (e.g. train_42) — use to reconstruct or cross-reference source files
image binary Original PNG bytes (RGBA, 1272×954)
annotation string Verbatim JSON annotation — identical to the source .json files
chart_type string "vertical" or "horizontal"
title string Chart title text
num_features int32 Number of data features (legend entries)
num_categories int32 Number of category-axis ticks
value_min float32 Value axis minimum
value_max float32 Value axis maximum

Loading

from datasets import load_dataset

ds = load_dataset("<org>/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": <int>,
    "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": <number>,
      "max_value": <number>,
      "bbox":      [...],
      "ticks":     [ { "label": { "text": "...", "bbox": [...] }, "bbox": [...] } ]
    },
    "features": [
      {
        "feature": "...",
        "data": [
          { "category": "...", "value": <number>, "bbox": [...] }
        ]
      }
    ]
  }
}

All bounding boxes are [x1, y1, x2, y2] in pixel coordinates.