Skip to main content

Page segmentation and segmentation evaluation

Project description

# ocrd_segment

This repository aims to provide a number of [OCR-D-compliant processors](https://ocr-d.github.io/cli) for layout analysis and evaluation.

## Installation

In your virtual environment, run: `bash pip install . `

## Usage

  • extracting page images (including results from preprocessing like cropping, deskewing or binarization) along with region polygon coordinates and metadata: - [ocrd-segment-extract-regions](ocrd_segment/extract_regions.py)
  • extracting line images (including results from preprocessing like cropping, deskewing, dewarping or binarization) along with line polygon coordinates and metadata: - [ocrd-segment-extract-lines](ocrd_segment/extract_lines.py)
  • comparing different layout segmentations (input file groups N = 2, compute the distance between two segmentations, e.g. automatic vs. manual): - [ocrd-segment-evaluate](ocrd_segment/evaluate.py) :construction: (very early stage)
  • repairing layout segmentations (input file groups N >= 1, based on heuristics implemented using Shapely): - [ocrd-segment-repair](ocrd_segment/repair.py) :construction: (much to be done)
  • pattern-based segmentation (input file groups N=1, based on a PAGE template, e.g. from Aletheia, and some XSLT or Python to apply it to the input file group) - ocrd-segment-via-template :construction: (unpublished)
  • data-driven segmentation (input file groups N=1, based on a statistical model, e.g. Neural Network) - ocrd-segment-via-model :construction: (unpublished)

For detailed description on input/output and parameters, see [ocrd-tool.json](ocrd_segment/ocrd-tool.json)

## Testing

None yet.

Project details


Release history Release notifications

This version

0.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ocrd-segment, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size ocrd_segment-0.0.2-py3-none-any.whl (14.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size ocrd_segment-0.0.2.tar.gz (10.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page