Tools,

cnocr on 72 Chinese scans, tested

95.2%

characters right on 36 simplified scans

Get the script

Close to RapidOCR, well ahead of Tesseract

cnocr 2.3.3 (Apache-2.0) with the PP-OCRv5 text model, on 36 proofread pages from 10 books, in lines across:

Characters right, of 14,585, and time for all 36
Run Right Time
cnocr, ch_PP-OCRv5 95.2% 91.5 s
RapidOCR 3.10.0 95.6% 137.4 s
Our Actor's code 89.1% 213.1 s
Tesseract chi_sim 88.4% 89.2 s

RapidOCR scored a little higher: 60 more characters than cnocr's 13,879.

Every run was at low priority, so compare the times only with each other.

The plain pip install fails at import

pip install "cnocr[ort-cpu]" brings rapidocr 3.10.0, and then from cnocr import CnOcr fails:

ImportError: cannot import name 'resolve_model_key' from 'rapidocr.utils.model_resolver'

It comes from cnstd 1.2.8, and cnocr 2.3.3 has the same import. Pin rapidocr below 3.10, as on our Pix2Text page:

python3 -m venv .venv
source .venv/bin/activate
pip install "cnocr[ort-cpu]" \
  "rapidocr<3.10" pypdfium2

Tested with Python 3.14.7 and pip. The venv is about 1.7 GB. torch is the biggest part, at 0.66 GB.

We skipped the default model: no license tag

cnocr's default text model, densenet_lite_136-gru, is in a Hugging Face repo with no license tag, and its README has no license text. So we did not run it.

This page sets rec_model_name="ch_PP-OCRv5", a PaddleOCR model, and keeps cnocr's default text finder. Both repos are tagged Apache-2.0.

The repos and the commits we used
  • Skipped: breezedeus/cnstd-cnocr-models (6b6feaf7), with densenet_lite_136-gru and cnocr's other own models.
  • Text model: breezedeus/cnocr-ppocr-ch_PP-OCRv5 (5c54978d).
  • Text finder: breezedeus/cnstd-ppocr-multi_PP-OCRv6_det_small (bddaa48c).
  • Server text model: breezedeus/cnocr-ppocr-ch_PP-OCRv5_server (cc74722f).

One script: scan or PDF in, text out

Save this as ocr.py:

# The page's script (/cnocr/): a Chinese scan (PNG, JPG or PDF) in, text out.
# Run: python ocr.py scan.pdf > scan.txt
import sys

from cnocr import CnOcr

ocr = CnOcr(rec_model_name="ch_PP-OCRv5")  # PaddleOCR model, Apache-2.0


def read(img):
    return "\n".join(line["text"] for line in ocr.ocr(img))


f = sys.argv[1]
if f.lower().endswith(".pdf"):
    import pypdfium2 as pdfium

    for page in pdfium.PdfDocument(f):
        print(read(page.render(scale=200 / 72).to_pil()))  # 200 dpi
else:
    print(read(f))

Then run it in the venv:

python ocr.py scan.pdf > scan.txt

On one of our scans, its text matched the bench run. A 2-page PDF of two scans read 1,082 of 1,165 characters, the same as the scans.

Vertical pages come out of order

Set B: 36 traditional pages from 10 books, in columns read top to bottom, right to left.

Characters right, of 10,865
Run As returned In column order
cnocr 15.1% 69.5%
RapidOCR 17.2% 80.2%

RapidOCR is close kin, and lighter

With ch_PP-OCRv5, cnocr reads each line with RapidOCR's recognizer.

cnocr loads torch, RapidOCR does not. Peak memory over all 72 pages was 3.12 GB for cnocr and 1.66 GB for RapidOCR. More in our RapidOCR guide.

The server model: slower, better on vertical pages

We stopped ch_PP-OCRv5_server after 16 of 72 pages, to keep the run shorter. A small sample:

Characters right, and time
Model 4 pages of set A, of 2,214 12 of set B, as returned, of 3,286
Server 2,111, 36.8 s 617, 49.9 s
PP-OCRv5 2,111, 13.8 s 520, 22.5 s

In column order, the server model got 2,581 on those 12 pages, against 2,298.

Same 72 scans as our Tesseract test

Proofread zh.wikisource scans, fetched again. Tesseract chi_sim scored the same on all 72 as on Nov 8, so the scans match.

How we ran it
  • Set A: 36 simplified pages from 10 books, lines across.
  • Set B: 36 traditional pages from 10 books, in columns.
  • Score: proofread Chinese characters found in order, after NFKC. Punctuation, digits and Latin letters do not count. Running heads and page numbers cost nothing.
  • cnocr 2.3.3 with rapidocr 3.9.2 and torch 2.15.0.
  • RapidOCR 3.10.0 in a venv of its own.
  • Tesseract 5.5.4, tessdata_fast, one thread. Our Actor's code at build 0.1.145, two threads.
  • Two threads for each onnxruntime session and for torch, one job at a time, on an Apple M5 Max.
  • Times leave out the model load: 7.2 s for cnocr, 8.6 s for RapidOCR. Tesseract loads its model on every page, inside its time.
  • Not tested: cnocr's own models, its CLI and HTTP server, a GPU, other text finders, photos, handwriting.
  • Scripts and results stay in our private repo, in research/bench/cnocr-2026-11-26/.

No Python setup: our Actor

Our Apify Actor, PDF to Markdown OCR, reads scans in the cloud, with nothing to install.

Questions people ask

Is cnocr free for commercial use?

cnocr and cnstd are Apache-2.0, and the repos of the PP-OCRv5 text model and the text finder we ran are tagged Apache-2.0. pip also installs ultralytics and two of its add-ons, all AGPL-3.0, from cnstd. The default text model's repo has no license tag.

Why does from cnocr import CnOcr fail?

pip picks the newest rapidocr, 3.10.0, and cnstd 1.2.8 imports resolve_model_key from it, which fails. Install "rapidocr<3.10" with cnocr and the import works.

Does cnocr read traditional or vertical Chinese?

On our vertical traditional pages it got 15.1% as returned and 69.5% with its boxes sorted into columns. At least 126 of its wrong characters were the simplified form. We did not test traditional pages with lines across.

Is cnocr better than RapidOCR?

On our simplified scans RapidOCR scored a little higher and cnocr was faster. RapidOCR also used less memory over the whole run. With ch_PP-OCRv5, cnocr reads lines with RapidOCR's recognizer, so the two are close kin.

Does cnocr need a GPU?

No. Every cnocr run here was on a Mac CPU, with onnxruntime. We did not test a GPU.

Where does cnocr download its models from?

On the first run, cnstd asks hf-mirror.com first, then huggingface.co. It downloaded 9.9 MB for the text finder and 16.6 MB for the PP-OCRv5 text model.