Foreword

The DeepSeek Harness Web interface runs in the browser and cannot directly access local files for OCR recognition. The pipiwolve/dsh-baidu-ocr plugin achieves the ability to call Baidu Cloud OCR from DSH through collaboration between the Host side and the Client side.

What It Is

This is a plugin compliant with the DeepSeek Harness bundle specification. It integrates Baidu Cloud OCR capabilities, supports dragging images, PDFs, or office documents into the page to recognize them as Markdown, and writes the results to local files.

Core Features

  • Dual-engine support: Supports PaddleOCR-VL (synchronous) and Unlimited-OCR (async).
  • Dual-mode usage: Provides a GUI drag-and-drop panel and a model tool (baidu_ocr).
  • Local output: Generates Markdown and JSON files, saved in the ocr_output directory next to the source file.
  • Zero dependencies and security: The Host side uses Node’s native fetch, with no additional dependencies; includes CSRF protection and path validation.

Installation and Activation

The installation command is as follows:

dsh plugin --profile web add <本仓库路径或 git url>

After installation, you need to restart the Web UI.

Typical Usage

  • Drag-and-drop recognition: Drag a file directly into the page and select an engine in the bottom-right panel to run recognition.
  • Command invocation: In the conversation, use the command use baidu_ocr to recognize /absolute/path/to/image.png.

Applicable Scenarios and Notes

  • API key configuration: A Baidu BCE IAM API key must be configured.
  • Key storage: The key is stored locally in ~/.dsh/baidu-ocr., with permission 0600, and is not echoed in the interface.
  • File formats: Images, PDFs, and office documents are supported (.pdf .ofd .doc .docx .txt .wps .ppt .pptx).

Conclusion

This plugin provides DeepSeek Harness with the ability to directly integrate Baidu Cloud OCR. It is suitable for scenarios that require batch document processing or offline recognition.