bafco / README.md
Mausul's picture
Update README.md
72c3616 verified
|
Raw
History Blame Contribute Delete
3.07 kB
metadata
license: cc-by-nc-4.0
language:
  - bn
  - en
pretty_name: BaFCo
size_categories:
  - n<1K
task_categories:
  - object-detection
  - image-to-text
tags:
  - document-understanding
  - document-layout-analysis
  - key-information-extraction
  - forms
  - bengali
configs:
  - config_name: kie
    data_files:
      - split: all
        path: bafco_kie/all_annotations.json
      - split: en
        path: bafco_kie/en_annotations.json
      - split: bn
        path: bafco_kie/bn_annotations.json
  - config_name: dla
    data_files:
      - split: all
        path: bafco_dla/all_annotations.json

BaFCo: A Document Understanding Benchmark for Complex Bangla Form Comprehension (ECCV 2026)

Real Bangladeshi government forms with manual annotations for two tasks: Document Layout Analysis (DLA) and Key Information Extraction (KIE).

This is the dataset and its schema. The full benchmark pipeline (inference, evaluation, and post-processing) lives in the code repository: github.com/mausulazad/BaFCo. Paper: arXiv:2607.05614.

BaFCo curates 200 complex multi-page government forms across 316 pages and 15 domains. It provides 16,382 layout entities and 8,771 inter-field relationships under a fine-grained 26-entity schema (with a separate 5-type coarse set) for DLA, and 1,926 key-value pairs across 156 forms for KIE. The forms come from sectors such as agriculture, education, banking, and land management.

Subsets

  • bafco_dla/: Document Layout Analysis. Layout bounding boxes, inter-box relations, and form-level labels. Images are partitioned by domain.
  • bafco_kie/: Key Information Extraction. Key-value pairs. Forms are split by language (English and Bangla).

Each subset is self-contained: annotations in all_annotations.json, images under the subset folder, and a README.md documenting the schema. Image references (local_images) are relative and resolve after download.

Load

Download the dataset, then read a subset's annotations. Each record is one form; image paths live in local_images as repo-relative strings.

from huggingface_hub import snapshot_download
import os, json

root = snapshot_download("Mausul/bafco", repo_type="dataset")

forms = json.load(open(os.path.join(root, "bafco_dla", "all_annotations.json"), encoding="utf-8"))

# Resolve the first page of the first form to an OS-native file path.
rel = forms[0]["local_images"][0]                      # e.g. "images/<domain>/form_<id>/<page>.jpg"
page_path = os.path.join(root, "bafco_dla", *rel.split("/"))

The KIE subset loads the same way from bafco_kie/all_annotations.json (or the en_ / bn_ language splits). Each subset's README.md documents the full annotation schema.

Running the benchmark

Inference, evaluation, and post-processing are in the code repository, which reads these files through a release_loader.py adapter. See github.com/mausulazad/BaFCo to reproduce the results.

License

Code: MIT, Dataset: CC-BY-NC-4.0.