-
Notifications
You must be signed in to change notification settings - Fork 7
OCR D on macOS
OCR-D can be used on macOS. It requires additional software which is provided for example by Homebrew.
The installation was tested on the latest version of macOS Big Sur. It requires lots of free disk space (more than 10 GiB).
Install Xcode command line tools and Homebrew first.
Installation of Homebrew is described at https://brew.sh/ and https://docs.brew.sh/Installation. A single command is needed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Homebrew installs python3.12 or newer by default, but the different versions of Tensorflow which are used by the OCR-D processors are only available for python3.8. Therefore python3.8 must be installed explicitly:
brew install "[email protected]"
If python3.12 was already installed before, a symbolic link /usr/local/bin/python3.8
must be added manually after the installation of python3.8.
In addition several other packages must be installed with Homebrew (tbd, list incomplete).
# Required by ocrd_olena.
brew install imagemagick
The installation is started by running xcode-select --install
.
The installation uses OCR-D/ocrd_all and is similar to the installation on a native Linux distribution. Start with these commands from the shell:
mkdir -p $HOME/src/github/OCR-D
cd $HOME/src/github/OCR-D
# Get OCRD/ocrd_all.
git clone https://github.com/OCR-D/ocrd_all.git
cd $HOME/src/github/OCR-D/ocrd_all
# Use Python 3.8 to create a virtual environment.
# Activate that environment before running make.
python3.8 -m venv $HOME/src/github/OCR-D/ocrd_all/venv
source $HOME/src/github/OCR-D/ocrd_all/venv/bin/activate
# Build the OCR-D tools. This takes some time.
make all PKG_CONFIG_PATH=/usr/local/Cellar/icu4c/66.1/lib/pkgconfig:/usr/local/Cellar/libarchive/3.4.2_1/lib/pkgconfig
Each command should work without showing an error message. Activate the virtual Python environment with all OCR-D tools:
source $HOME/src/github/OCR-D/ocrd_all/venv/bin/activate
Now you are ready to run the OCR-D tools. Try to run one of them:
ocrd --help
Congratulation if that works. You are now ready to use the OCR-D tools.
Each time when you open a new shell and want to work with OCR-D tools
and before running make
,
you must activate the virtual Python environment again:
source $HOME/src/github/OCR-D/ocrd_all/venv/bin/activate
Welcome to the OCR-D wiki, a companion to the OCR-D website.
Articles and tutorials
- Running OCR-D on macOS
- Running OCR-D in Windows 10 with Windows Subsystem for Linux
- Running OCR-D on POWER8 (IBM pSeries)
- Running browse-ocrd in a Docker container
- OCR-D Installation on NVIDIA Jetson Nano and Xavier
- Mapping PAGE to ALTO
- Comparison of OCR formats (outdated)
- A Practicioner's View on Binarization
- How to use the bulk-add command to generate workspaces from existing files
- Evaluation of (intermediary) steps of an OCR workflow
- A quickstart guide to ocrd workspace
- Introduction to parameters in OCR-D
- Introduction to OCR-D processors
- Introduction to OCR-D workflows
- Visualizing (intermediate) OCR-D-results
- Guide to updating ocrd workspace calls for 2.15.0+
- Introduction to Docker in OCR-D
- How to import Abbyy-generated ALTO
- How to create ALTO for DFG Viewer
- How to create searchable fulltext data for DFG Viewer
- Setup native CUDA Toolkit for Qurator tools on Ubuntu 18.04
- OCR-D Code Review Guidelines
- OCR-D Recommendations for Using CI in Your Repository
Expert section on OCR-D- workflows
Particular workflow steps
Workflow Guide
- Workflow Guide: preprocessing
- Workflow Guide: binarization
- Workflow Guide: cropping
- Workflow Guide: denoising
- Workflow Guide: deskewing
- Workflow Guide: dewarping
- Workflow Guide: region-segmentation
- Workflow Guide: clipping
- Workflow Guide: line-segmentation
- Workflow Guide: resegmentation
- Workflow Guide: olr-evaluation
- Workflow Guide: text-recognition
- Workflow Guide: text-alignment
- Workflow Guide: post-correction
- Workflow Guide: ocr-evaluation
- Workflow Guide: adaptation-of-coordinates
- Workflow Guide: format-conversion
- Workflow Guide: generic transformations
- Workflow Guide: dummy processing
- Workflow Guide: archiving
- Workflow Guide: recommended workflows