paddleocr

Extract text from PDFs and images using PaddleOCR on local GPU, CPU, or Google Colab.

1|Updated May 8, 2026
One-click install
npx skills add https://github.com/franklinbaldo/skills --skill paddleocr-franklinbaldo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: paddleocr
Source: https://github.com/franklinbaldo/skills/tree/main/paddleocr
Command: npx skills add https://github.com/franklinbaldo/skills --skill paddleocr-franklinbaldo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires paddleocr, paddlepaddle, cyclopts, uv, and includes scripts (resource) and references (resource) components.

What problem does it solve? Scanned PDFs and images lack machine-readable text, and running OCR at scale requires choosing between slow CPU processing, a local CUDA setup, or remote GPU infrastructure. This Skill routes each document to the right PaddleOCR execution path and produces Markdown output with per-page confidence scores and timing metrics. ## Core Features & Use Cases - Multi-environment OCR routing: Runs PP-OCRv6 locally on NVIDIA GPU or CPU, or remotely on a Google Colab GPU via a wrapper script that provisions, uses, and tears down the VM automatically. - Structured output with metrics: Exports Markdown per page plus a metrics JSON file recording device, initialization time, inference time, mean seconds per page, and mean confidence. - Configurable pipeline: Supports language selection (Portuguese default), OCR version pinning, minimum confidence filtering, raw per-page JSON retention, and warm-pass benchmarking. - Use Case: A legal researcher has a 200-page scanned court document in Portuguese. The Skill detects no local GPU, launches a Colab T4 session, extracts the full text to Markdown, and reports per-page confidence so low-quality pages can be spot-checked against the source. ## Quick Start Use the paddleocr skill to extract this scanned PDF into Markdown and report the OCR speed and confidence metrics.

Frequently Asked Questions about paddleocr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I OCR a PDF to Markdown with PaddleOCR?▼

Run scripts/ocr.py with the input PDF and output Markdown path, for example with --device gpu:0 for a local NVIDIA GPU. The script writes Markdown per page plus a metrics JSON with timings and mean confidence scores.

How do I run PaddleOCR on a GPU without a local NVIDIA card?▼

Use the run_colab.sh wrapper, which creates a Google Colab GPU session, installs the CUDA 12.6 PaddlePaddle wheel with uv, uploads the document, runs OCR, downloads results, and stops the VM. It requires an authenticated Google Colab CLI on Linux, macOS, or WSL.

Does the Google Colab CLI work on Windows for PaddleOCR?▼

The google-colab-cli 0.6.0 package does not run natively on Windows because it imports Unix-only termios and tty modules. Invoke the wrapper from WSL instead, or use the litebox skill's Linux client recipe to reach the remote Colab GPU.

Why is PaddleOCR so slow on CPU for long PDFs?▼

CPU inference lacks GPU parallelism, so multi-page documents take dramatically longer than on a Colab T4 or local NVIDIA GPU. The skill warns before CPU runs and recommends the Colab branch for multi-page documents when no local GPU exists.

Can I filter out low-confidence OCR results?▼

Yes, pass --min-confidence with a threshold score to omit recognized lines below it. You can also retain raw per-page JSON with --json-dir and run a second warm pass with --warm-benchmark to measure warm inference timing.