Datasets:
File size: 2,662 Bytes
453d00a 446c9b5 453d00a 9a5ec87 453d00a 9a5ec87 453d00a 9a5ec87 453d00a 9a5ec87 453d00a 66e19d4 9a5ec87 66e19d4 453d00a 66e19d4 453d00a 66e19d4 de9673a 66e19d4 de9673a 66e19d4 50dedc6 66e19d4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
---
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`](https://huggingface.co/datasets/naver-clova-ix/synthdog-en) generated with [PaddleOcr](https://github.com/PaddlePaddle/PaddleOCR).
![image](./syndog-boxes.jpg)
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
```python
from datasets import load_dataset
ds = load_dataset("nnethercott/synthdog-en-detection", split="train[:101]")
```
to visualize the boxes
```python
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](https://github.com/clovaai) synthdog dataset. If you find this work useful to you, please cite them:
```bibtex
@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}
}
``` |