Umi-OCR on a Mac, tested in Docker
1,786
of 1,955 words, English model, in Docker
No Mac build, but Docker works
Umi-OCR 2.1.5 came out on March 25, 2025. None of its downloads is for a Mac or for arm64.
| Download | Size |
|---|---|
| Windows x64, Paddle engine | 134 MB |
| Windows x64, Rapid engine | 103 MB |
| Linux x64, Paddle engine | 277 MB |
On an Apple silicon Mac, Docker Desktop ran the Linux build as x64 under emulation. The emulated CPU reports AVX and AVX2. The Paddle engine needs AVX.
The official Dockerfile needs one fix
The
Linux runtime repo
has a Dockerfile on debian:11-slim. Its apt step failed
with 404 errors: Debian 11 security updates are gone from
deb.debian.org, and archive.debian.org has them.
Add this line above the RUN apt-get line:
RUN sed -i 's|deb.debian.org|archive.debian.org|g' /etc/apt/sources.list
Then build it and start it with no window:
docker build --platform linux/amd64 -t umi-ocr-paddle .
docker run -d --platform linux/amd64 --name umi-ocr -e HEADLESS=true -p 127.0.0.1:1224:1224 umi-ocr-paddle
How I ran it
- Docker 29.8.2 on an Apple silicon Mac. The build took about 1.5 minutes, and the API answered within 6 seconds of the start.
-
For the test runs I capped the container at 2 CPUs with
--cpus 2. Umi still set its engine to 8 threads. - The 10 pages are proofread public domain book scans from Wikisource, 1920 px wide. A word counts when it is found in order.
Pick English, or it reads Chinese
The default model is models/config_chinese.txt. It reads
English too, but it found fewer words.
| Model | Words | Time |
|---|---|---|
| English | 1,786 | 4.1 s |
| Chinese, the default | 1,761 | 4.0 s |
The command line uses the app's setting. On page 1,
umi-ocr.sh --path gave the same text as the Chinese run.
Newer models found 118 more words
The Linux build ships PP-OCRv3 models. Here are other readers on the same 10 pages, with the same scorer.
| Reader | Words |
|---|---|
| RapidOCR, PP-OCRv5 mobile, English model | 1,904 |
| RapidOCR, PP-OCRv6 small | 1,895 |
| Our Actor's code | 1,879 |
| Tesseract 5.5.4 | 1,878 |
| Umi-OCR, searchable PDF | 1,792 |
| Umi-OCR, English model | 1,786 |
On a Mac, RapidOCR runs natively, with no Docker. The code is on our PP-OCRv5 page.
Searchable PDF out, same image bytes
The document API took our 10-page scan and gave back a layered PDF in 42 seconds.
| Page images kept byte for byte | 10 of 10 |
| Words found by pdftotext | 1,792 |
| File size in, then out | 6.5 MB, 6.6 MB |
Call the API from Python
POST a base64 image to /api/ocr. The options pick the
model and plain text output.
import base64
import json
import sys
import urllib.request
with open(sys.argv[1], "rb") as f:
img = base64.b64encode(f.read()).decode()
opts = {"ocr.language": "models/config_en.txt", "data.format": "text"}
req = urllib.request.Request(
"http://127.0.0.1:1224/api/ocr",
data=json.dumps({"base64": img, "options": opts}).encode(),
headers={"Content-Type": "application/json"},
)
r = json.load(urllib.request.urlopen(req))
print(r["data"] if r["code"] == 100 else r)
Run it as python3 ocr.py page.jpg. On page 1 it printed
the same text as my English run.
PDF calls and the command line
-
PDFs take four steps:
/api/doc/upload, then/api/doc/resultuntil it is done, then/api/doc/download, then the link it returns. The docs add a fifth,/api/doc/clear/<id>, to delete the task. -
Ask for
pdfLayered(the default) ortxt. Other types:pdfOneLayer,txtPlain,jsonl,csv. - The API docs say parallel calls are poorly supported. Send one at a time.
-
Command line in the container:
/app/umi-ocr.sh --path page.jpg --output page.txt.
Bigger pages read worse, then crashed
The default limit_side_len of 960 shrinks large pages
before reading.
| Size limit | Words |
|---|---|
| 960, the default | 959 |
| 2880 | 920 |
At 2880 the engine hit a 5 GB Docker memory cap (-m 5g) on page 6 and was killed, twice. A lower ram_max did
not stop it. Keep the default.
Scanned pages to text, no install
Run it yourself. Our Apify Actor turns a scanned PDF into Markdown or text. $0.006 a scanned page. Its code found 1,879 of these 1,955 words.
Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free.
Questions people ask
Is there an Umi-OCR Mac version?
No. Release 2.1.5 has Windows x64 and Linux x64 downloads only. On a Mac, the Linux build runs in Docker under x64 emulation, as tested on this page.
Is Umi-OCR free and open source?
Yes. Umi-OCR is MIT licensed. Its PaddleOCR-json engine is Apache-2.0, and RapidOCR-json is MIT.
Paddle or Rapid: which Umi-OCR download?
The engine docs say Paddle needs a CPU with AVX and runs faster, and Rapid has no special CPU needs. Linux gets the Paddle build only. We did not run the Windows builds.
How do I get Umi-OCR in English?
The app takes its menu language from your system on first start, and you can change it in the global settings. For English text, also pick the English model.
Does your Actor use Umi-OCR?
No. It reads scans with Tesseract. Its second reader, for English pages that Tesseract reads badly, is RapidOCR with PP-OCRv6 small.