https://github.com/bertsky/ocrd_doxa

OCR-D wrapper for DoxaPy image binarization via locally adaptive thresholding

https://github.com/bertsky/ocrd_doxa

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 1 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary

Keywords

ocr-d
Last synced: 6 months ago · JSON representation

Repository

OCR-D wrapper for DoxaPy image binarization via locally adaptive thresholding

Basic Info
  • Host: GitHub
  • Owner: bertsky
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 28.3 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • Open Issues: 3
  • Releases: 0
Topics
ocr-d
Created over 4 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License

README.md

PyPI version Python CI Docker Image CD

ocrd_wrap

OCR-D wrapper for DoxaPy image binarization via locally adaptive thresholding

Introduction

This offers OCR-D compliant workspace processors for binarization via Doxa (using its native Python bindings).

It is itself written in Python, and relies heavily on the OCR-D core API. This is responsible for handling METS/PAGE, and providing the OCR-D CLI.

Installation

Create and activate a virtual environment as usual.

To install Python dependencies:

make deps

Which is the equivalent of:

pip install -r requirements.txt

To install this module, then do:

make install

Which is the equivalent of:

pip install .

Usage

OCR-D processor interface ocrd-doxa-binarize

To be used with PAGE-XML documents in an OCR-D annotation workflow.

``` ocrd-doxa-binarize -h

Usage: ocrd-doxa-binarize [OPTIONS]

binarize via locally adaptive thresholding

Options: -I, --input-file-grp USE File group(s) used as input -O, --output-file-grp USE File group(s) used as output -g, --page-id ID Physical page ID(s) to process --overwrite Remove existing output pages/images (with --page-id, remove only those) -p, --parameter JSON-PATH Parameters, either verbatim JSON string or JSON file path -P, --param-override KEY VAL Override a single JSON object key-value pair, taking precedence over --parameter -m, --mets URL-PATH URL or file path of METS to process -w, --working-dir PATH Working directory of local workspace -l, --log-level [OFF|ERROR|WARN|INFO|DEBUG|TRACE] Log level -C, --show-resource RESNAME Dump the content of processor resource RESNAME -L, --list-resources List names of processor resources -J, --dump-json Dump tool description as JSON and exit -h, --help This help message -V, --version Show version

Parameters: "dpi" [number - 0] pixel density in dots per inch (overrides any meta-data in the images); disabled when zero "level-of-operation" [string - "page"] PAGE XML hierarchy level to operate on Possible values: ["page", "region", "line"] "algorithm" [string - "ISauvola"] Thresholding algorithm to use. Possible values: ["Otsu", "Bernsen", "Niblack", "Sauvola", "Wolf", "Gatos", "NICK", "Su", "Singh", "Bataineh", "ISauvola", "WAN"] "parameters" [object - {}] Dictionary of algorithm-specific parameters. Unless overridden here, the following defaults are used: Bernsen: {'window': 75, 'threshold': 100, 'contrast-limit': 25} NICK: {'window': 75, 'k': -0.2} Niblack: {'window': 75, 'k': 0.2} Singh: {'window': 75, 'k', 0.2} Gatos: {'glyph': 60} Sauvola: {'window': 75, 'k': 0.2} Wolf: {'window': 75, 'k': 0.2} WAN: {'window': 75, 'k': 0.2} Su: {'window': 0 (based on stroke size), 'minN': windowSize (roughly based on size of window)}

(window/glyph sizes are in px, threshold/limits in uint8 [0,255]) ```

Testing

make deps-test
make test

Owner

  • Name: Robert Sachunsky
  • Login: bertsky
  • Kind: user

GitHub Events

Total
  • Push event: 5
  • Fork event: 1
Last Year
  • Push event: 5
  • Fork event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 3
  • Total Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Robert Sachunsky s****y@i****e 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 3
  • Total pull requests: 2
  • Average time to close issues: 17 minutes
  • Average time to close pull requests: about 3 hours
  • Total issue authors: 3
  • Total pull request authors: 2
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 3 hours
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • hnesk (1)
  • bertsky (1)
Pull Request Authors
  • joschrew (2)
  • stweil (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 15 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 1
pypi.org: ocrd-doxa

OCR-D wrapper for DoxaPy image binarization via locally adaptive thresholding

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 15 Last month
Rankings
Dependent packages count: 10.0%
Dependent repos count: 21.7%
Forks count: 22.6%
Average: 30.1%
Stargazers count: 38.8%
Downloads: 57.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • click >=7.0
  • doxapy >=0.9.1
  • numpy >=1.17.0
  • ocrd >=2.13
  • pillow >=7.1.2
.github/workflows/docker-image.yml actions
  • actions/checkout v4 composite
  • docker/login-action v2 composite
  • docker/setup-buildx-action v2 composite
Dockerfile docker
  • $DOCKER_BASE_IMAGE latest build
setup.py pypi