nnethercott's picture
Update README.md
de9673a verified
metadata
dataset_info:
  features:
    - name: image
      dtype: image
    - name: ground_truth
      dtype: string
    - name: 2_coord
      list:
        - name: chunk
          dtype: string
        - name: coord
          sequence:
            sequence: float64
    - name: 4_coord
      list:
        - name: chunk
          dtype: string
        - name: coord
          sequence:
            sequence: float64
    - name: 2_coord_norm
      list:
        - name: chunk
          dtype: string
        - name: coord
          sequence:
            sequence: float64
    - name: 4_coord_norm
      list:
        - name: chunk
          dtype: string
        - name: coord
          sequence:
            sequence: float64
  splits:
    - name: train
      num_bytes: 4525075938
      num_examples: 50016
  download_size: 4302364671
  dataset_size: 4525075938
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
task_categories:
  - image-to-text
  - object-detection
language:
  - en
size_categories:
  - 10K<n<100K

SynthDoG detection πŸ•

OCR annotations with bounding boxes for synthdog-en generated with PaddleOcr.

image

This dataset contains annotations where the bounding boxes have the following formats:

  • 2_coord: [(xmin, ymin), (xmax,ymax)]
  • 2_coord: [(xmin/w, ymin/h), (xmax/w,ymax/h)] normalized version of 2_coord where (h, w) are the image height and width
  • 4_coord: [(x1, y1), (x2,y2), (x3,y3), (x4, y4)] all corners of the rectangle enclosing the text span
  • 4_coord_norm: [(x1/w, y1/h), (x2/w,y2/h), (x3/w,y3/h), (x4/w, y4/h)] normalized version of 4_coord

Usage

from datasets import load_dataset

ds = load_dataset("nnethercott/synthdog-en-detection", split="train[:101]")

to visualize the boxes

from PIL import ImageDraw

sample = ds[-1]
img, boxes = sample['image'], sample['2_coord']

draw = ImageDraw.Draw(img)
for item in boxes:
    draw.rectangle([tuple(xy) for xy in item['coord']], outline='red')

img.save('sample.jpg')

How to Cite

Always cite the original authors ! This dataset is just an annotated version of Clova AI's synthdog dataset. If you find this work useful to you, please cite them:

@inproceedings{kim2022donut,
  title     = {OCR-Free Document Understanding Transformer},
  author    = {Kim, Geewook and Hong, Teakgyu and Yim, Moonbin and Nam, JeongYeon and Park, Jinyoung and Yim, Jinyeong and Hwang, Wonseok and Yun, Sangdoo and Han, Dongyoon and Park, Seunghyun},
  booktitle = {European Conference on Computer Vision (ECCV)},
  year      = {2022}
}