| ---
|
| dataset_info:
|
| features:
|
| - name: image_name
|
| dtype: string
|
| - name: image
|
| dtype: image
|
| - name: obb
|
| dtype: string
|
| splits:
|
| - name: train
|
| num_bytes: 446206006
|
| num_examples: 3053
|
| - name: validation
|
| num_bytes: 101618505
|
| num_examples: 709
|
| download_size: 547824511
|
| dataset_size: 547824511
|
| configs:
|
| - config_name: default
|
| data_files:
|
| - split: train
|
| path: data/dataset_with_images_obb_train.parquet
|
| - split: validation
|
| path: data/dataset_with_images_obb_val.parquet
|
| license: cc-by-4.0
|
| task_categories:
|
| - object-detection
|
| language:
|
| - km
|
| size_categories:
|
| - 1K<n<10K
|
| ---
|
| # Table Dataset - Image & OBB Annotation (Train/Val Split)
|
|
|
| ## Dataset Overview
|
|
|
| Table detection dataset with OBB (Oriented Bounding Box) annotations in YOLO format,
|
| split into training and validation sets.
|
|
|
| - **Total examples:** 3762 image-annotation pairs
|
| - Train: 3053 (81.2%)
|
| - Validation: 709 (18.8%)
|
| - **Total size:** 522.45 MB
|
| - **Language:** Khmer (km)
|
| - **Document types:** Table documents
|
| - **Annotation format:** YOLO OBB (class cx cy w h)
|
|
|
| ## Dataset Statistics
|
|
|
| ### Split Information
|
|
|
| | Split | Examples | Size (MB) |
|
| |------------|----------|---------------|
|
| | Train | 3053 | 425.54 |
|
| | Validation | 709 | 96.91 |
|
| | **Total** | **3762** | **522.45** |
|
|
|
| ### Train/Val Ratio
|
| - **Train:** 81%
|
| - **Validation:** 19%
|
|
|
| ## Features
|
|
|
| | Feature | Type | Description |
|
| |-------------|---------------|--------------------------------------------------|
|
| | `image_name` | string | Document image filename (without extension) |
|
| | `image` | image (bytes) | PNG image binary data |
|
| | `obb` | string | OBB YOLO annotations (class cx cy w h per line) |
|
|
|
| ## Class Names
|
|
|
| | ID | Name |
|
| |----|--------|
|
| | 0 | cell |
|
| | 1 | column |
|
| | 2 | header |
|
| | 3 | row |
|
|
|
| ## Data Format
|
|
|
| ### Image
|
|
|
| PNG binary data — convert to PIL Image for processing:
|
|
|
| ```python
|
| from PIL import Image
|
| from io import BytesIO
|
|
|
| image_bytes = row['image']['bytes'] # HF datasets raw access
|
| image = Image.open(BytesIO(image_bytes))
|
| ```
|
|
|
| ### OBB TXT (string)
|
|
|
| YOLO format: one detection per line — `class_id cx cy w h` (all normalised 0-1):
|
|
|
| ```python
|
| obb_text = row['obb']
|
| for line in obb_text.strip().splitlines():
|
| parts = line.split()
|
| class_id = int(parts[0])
|
| cx, cy, w, h = map(float, parts[1:])
|
| ```
|
|
|
| ## Usage Examples
|
|
|
| ### Load with pandas
|
|
|
| ```python
|
| import pandas as pd
|
|
|
| df_train = pd.read_parquet('data/dataset_with_images_obb_train.parquet')
|
| df_val = pd.read_parquet('data/dataset_with_images_obb_val.parquet')
|
| print(f"Train: {len(df_train)}, Val: {len(df_val)}")
|
| ```
|
|
|
| ### Load with Hugging Face Datasets
|
|
|
| ```python
|
| from datasets import load_dataset
|
|
|
| dataset = load_dataset('parquet', data_files={
|
| 'train': 'data/dataset_with_images_obb_train.parquet',
|
| 'validation': 'data/dataset_with_images_obb_val.parquet',
|
| })
|
| ```
|
|
|
| ### Access a single row
|
|
|
| ```python
|
| from PIL import Image
|
| from io import BytesIO
|
|
|
| row = df_train.iloc[0]
|
|
|
| image = Image.open(BytesIO(row['image']['bytes']))
|
| print(image.size) # (width, height)
|
| print(row['image_name']) # filename stem
|
| print(row['obb']) # raw YOLO OBB text
|
| ```
|
|
|
| ## File Summary
|
|
|
| | File | Rows | Size (MB) |
|
| |----------------------------------------|--------|---------------|
|
| | dataset_with_images_obb_train.parquet | 3053 | 425.54 |
|
| | dataset_with_images_obb_val.parquet | 709 | 96.91 |
|
|
|
| ## Citation
|
|
|
| ```bibtex
|
| @dataset{table_dataset_obb_2026,
|
| title={Table Dataset - Image & OBB Annotations (Train/Val Split)},
|
| year={2026},
|
| note={Table detection dataset with YOLO OBB annotations}
|
| }
|
| ```
|
|
|
| ## License
|
|
|
| CC-BY-4.0
|
|
|
| ---
|
|
|
| **Last Updated:** 2026-06-01
|
| **Dataset Version:** 1.0
|
| **Total Examples:** 3762
|
| **Total Size:** 522.45 MB
|
|
|