Introduction

In the plugin ecosystem of DeepSeek Harness (DSH), processing image data is a common requirement when building agents. xby-recog is an identification toolkit plugin designed to provide a unified interface for DSH plugins to handle various document and image recognition tasks, including general text recognition and structured information extraction from specific identification documents.

What Is It

This plugin is maintained by xby-skill and belongs to the “Model Inference” category. It provides a set of APIs covering capabilities from general text recognition to structured information extraction from specific documents, such as ID cards, passports, and business licenses. All code is licensed under the MIT License.

Installation and Enablement

You can complete the installation using the official command. After installation, the plugin becomes active. You need to use the set_xby_apikey command in chat to configure the API key.

dsh plugin --profile web add github:xby_skill/xby-recog

Configuration

Before using the recognition features, you need to obtain and set the API key.

  1. Obtain the key: Go to the Xiaobenyang official website to register and obtain an API key.
  2. Set the key: Execute the set_xby_apikey command in chat. The key is automatically persisted and remains valid after restarting.

Core Features

The plugin provides multiple recognition capabilities and supports three input methods: an image file URL, the BASE64 encoding of an image file, or the file path of an image file.

General OCR

  • ocr / ocr_for_data_base64 / ocr_for_data_file: Text recognition that balances speed and accuracy, suitable for scenarios such as documents, billboards, and screenshots.
  • ocr_pro / ocr_pro_for_data_base64 / ocr_pro_for_data_file: High-accuracy text recognition, suitable for scenarios with higher accuracy requirements.

Handwriting Recognition

  • ocr_handwriting / ocr_handwriting_for_data_base64 / ocr_handwriting_for_data_file: Recognition of handwritten text, suitable for handwritten notes, signatures, handwritten forms, and other similar content.

License Plate Recognition

  • plate_recognition / plate_recognition_for_data_base64 / plate_recognition_for_data_file: Recognizes license plate numbers, plate colors, single/double-layer plates, and bounding boxes.

Identity Document Recognition

  • ocr_id_card / ocr_id_card_for_data_base64 / ocr_id_card_for_data_file: Recognizes the front side of an ID card (name, gender, ethnicity, date of birth, address, ID number) and the back side (issuing authority, validity period). It supports automatic front/back side detection and validation of ID number validity.
  • ocr_pass / ocr_pass_for_data_base64 / ocr_pass_for_data_file: Recognizes Mainland Travel Permits to Hong Kong and Macau and Mainland Travel Permits to Taiwan, with support for parsing MRZ machine-readable codes.
  • ocr_passport / ocr_passport_for_data_base64 / ocr_passport_for_data_file: Recognizes passport information, with support for parsing MRZ machine-readable codes.

Business License and Vehicle Documents

  • ocr_biz_license / ocr_biz_license_for_data_base64 / ocr_biz_license_for_data_file: Recognizes a business license, including the Unified Social Credit Code, name, legal representative, registered capital, establishment date, business scope, registration authority, and business address.
  • ocr_driver_license / ocr_driver_license_for_data_base64 / ocr_driver_license_for_data_file: Recognizes the main page of a driver’s license (license number, name, gender, nationality, address, date of birth, qualified vehicle types, initial issue date, validity period) and the back page (file number).
  • ocr_vehicle_license / ocr_vehicle_license_for_data_base64 / ocr_vehicle_license_for_data_file: Recognizes a motor vehicle license, including the plate number, vehicle type, owner, address, brand/model, engine number, vehicle identification number, and other information. It supports automatic orientation detection and main/back page filtering.

Bank Card Recognition

  • ocr_bank_card / ocr_bank_card_for_data_base64 / ocr_bank_card_for_data_file: Recognizes the bank card number, issuing bank, and card type, and validates the card number using the Luhn algorithm.

Notes

  1. Input Limitation: When calling any of the above features, you must provide one of the following: an image file URL, a BASE64 encoding, or a file path.
  2. Dependency Configuration: The API key must be set using set_xby_apikey; otherwise, the recognition features cannot be used.
  3. Permissions and Security: The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license (MIT) before installation.