|
|
--- |
|
|
tags: |
|
|
- ocr |
|
|
- text-extraction |
|
|
- rolmocr |
|
|
- uv-script |
|
|
- generated |
|
|
--- |
|
|
|
|
|
# OCR Text Extraction using RolmOCR |
|
|
|
|
|
This dataset contains extracted text from images in [davanstrien/playbills-pdf-images-text](https://huggingface.co/datasets/davanstrien/playbills-pdf-images-text) using RolmOCR. |
|
|
|
|
|
## Processing Details |
|
|
|
|
|
- **Source Dataset**: [davanstrien/playbills-pdf-images-text](https://huggingface.co/datasets/davanstrien/playbills-pdf-images-text) |
|
|
- **Model**: [reducto/RolmOCR](https://huggingface.co/reducto/RolmOCR) |
|
|
- **Number of Samples**: 10 |
|
|
- **Processing Time**: 5.8 minutes |
|
|
- **Processing Date**: 2025-08-04 17:08 UTC |
|
|
|
|
|
### Configuration |
|
|
|
|
|
- **Image Column**: `image` |
|
|
- **Output Column**: `rolmocr_text` |
|
|
- **Dataset Split**: `train` |
|
|
- **Batch Size**: 16 |
|
|
- **Max Model Length**: 24,000 tokens |
|
|
- **Max Output Tokens**: 16,000 |
|
|
- **GPU Memory Utilization**: 80.0% |
|
|
|
|
|
## Model Information |
|
|
|
|
|
RolmOCR is a fast, general-purpose OCR model based on Qwen2.5-VL-7B architecture. It extracts plain text from document images with high accuracy and efficiency. |
|
|
|
|
|
## Dataset Structure |
|
|
|
|
|
The dataset contains all original columns plus: |
|
|
- `rolmocr_text`: The extracted text from each image |
|
|
- `inference_info`: JSON list tracking all OCR models applied to this dataset |
|
|
|
|
|
## Usage |
|
|
|
|
|
```python |
|
|
from datasets import load_dataset |
|
|
import json |
|
|
|
|
|
# Load the dataset |
|
|
dataset = load_dataset("{output_dataset_id}", split="train") |
|
|
|
|
|
# Access the extracted text |
|
|
for example in dataset: |
|
|
print(example["rolmocr_text"]) |
|
|
break |
|
|
|
|
|
# View all OCR models applied to this dataset |
|
|
inference_info = json.loads(dataset[0]["inference_info"]) |
|
|
for info in inference_info: |
|
|
print(f"Column: {info['column_name']} - Model: {info['model_id']}") |
|
|
``` |
|
|
|
|
|
## Reproduction |
|
|
|
|
|
This dataset was generated using the [uv-scripts/ocr](https://huggingface.co/datasets/uv-scripts/ocr) RolmOCR script: |
|
|
|
|
|
```bash |
|
|
uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/rolm-ocr.py \ |
|
|
davanstrien/playbills-pdf-images-text \ |
|
|
<output-dataset> \ |
|
|
--image-column image \ |
|
|
--batch-size 16 \ |
|
|
--max-model-len 24000 \ |
|
|
--max-tokens 16000 \ |
|
|
--gpu-memory-utilization 0.8 |
|
|
``` |
|
|
|
|
|
## Performance |
|
|
|
|
|
- **Processing Speed**: ~0.0 images/second |
|
|
- **GPU Configuration**: vLLM with 80% GPU memory utilization |
|
|
|
|
|
Generated with 🤖 [UV Scripts](https://huggingface.co/uv-scripts) |
|
|
|