openakita/skills@baidu-paddleocr-text

Extract text from images using Baidu OCR APIs for general, accurate, and handwriting recognition.

2.0k|274|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/openakita/openakita --skill openakita-skills-baidu-paddleocr-text
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openakita/skills@baidu-paddleocr-text
Source: https://github.com/openakita/openakita/tree/main/skills/baidu-paddleocr-text
Command: npx skills add https://github.com/openakita/openakita --skill openakita-skills-baidu-paddleocr-text

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manually transcribing text from photos, scanned documents, or handwritten notes is slow and error-prone. This Skill automates OCR text extraction from images using Baidu's OCR APIs and the PP-OCRv5 lightweight model.

Core Features & Use Cases

  • General Text Recognition: Extract printed text from natural scene photos and everyday images.
  • High-Accuracy Mode: Run precise recognition on complex documents where accuracy matters most.
  • Handwriting Recognition: Convert handwritten notes into machine-readable text.
  • Use Case: You receive a photo of a printed contract. Run the accurate mode to extract all text into structured JSON, then feed it into your document processing pipeline.

Quick Start

Set the BAIDU_OCR_AK and BAIDU_OCR_SK environment variables, then ask the assistant to extract text from your image file using the baidu-paddleocr-text skill.

Frequently Asked Questions about openakita/skills@baidu-paddleocr-text

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

FAQPage Schema
How do I extract text from an image using Baidu OCR?

Set the BAIDU_OCR_AK and BAIDU_OCR_SK environment variables, then run the script with a mode and image path, such as python3 baidu_ocr_text.py general /path/to/image.jpg. The result is returned as JSON containing the recognized text.

What OCR modes does the Baidu text recognition script support?

The script supports three modes: general for standard printed text, accurate for high-precision document recognition, and handwriting for handwritten notes. Each mode maps to a different Baidu OCR API endpoint.

Can Baidu OCR process images from a URL instead of a local file?

Yes, the script accepts both local file paths and HTTP or HTTPS image URLs. When a URL is provided, it is passed directly to the Baidu API instead of uploading base64-encoded image data.

Why does the Baidu OCR script fail with a credentials error?

The script exits with an error when BAIDU_OCR_AK or BAIDU_OCR_SK environment variables are missing. Obtain an API Key and Secret Key from the Baidu AI platform and export both variables before running the script.

What are the limitations of Baidu OCR text recognition?

Recognition quality depends on image clarity, lighting, and text orientation, and the API requires network access to Baidu servers. Low-resolution or heavily distorted images may produce incomplete or inaccurate results.