Introduction¶
The plugin mechanism of DeepSeek Harness (DSH) allows developers to quickly integrate third-party model capabilities. In the field of image recognition, object detection is a common requirement. Calling model APIs directly often involves cumbersome authentication and parameter handling. The following introduces an existing detection plugin for identifying cigarettes in images within chats or workflows.
What It Is¶
xby-smoking-detection is a model inference plugin maintained by xby-skill. It is based on the detection interface of Xiaoben Yang. Given an image as input, it outputs the detection boxes, confidence scores, and labels for all cigarette targets in the image.
Core Features¶
The plugin provides three detection interfaces and API key configuration:
set_xby_apikey: Sets the API key. The configuration is automatically persisted and remains valid after a restart.smoking_detection: Accepts an image file URL and returns the detection result.smoking_detection_for_data_base64: Accepts the BASE64 encoding of an image file and returns the detection result.smoking_detection_for_data_file: Accepts a local image file path and returns the detection result.
Installation and Activation¶
Install it using the official command. Pay attention to the --profile web parameter in the command to ensure the plugin is loaded in the correct environment.
dsh plugin --profile web add github:xby_skill/xby-smoking-detection
After installation is complete, you need to restart the DSH process for the configuration to take effect.
Typical Usage¶
Before using the plugin, you must call set_xby_apikey to set the API key. Then select the corresponding detection function based on the type of input data.
- If the image is stored as a URL, use
smoking_detection. - If the image is a BASE64 string, use
smoking_detection_for_data_base64. - If the image is a local file path, use
smoking_detection_for_data_file.
Use Cases and Notes¶
This plugin is suitable for scenarios that require cigarette recognition in images within a chat interface or workflow.
Notes:
- Before use, register on the official Xiaoben Yang website and obtain an API key.
- The plugin runs with the permissions of the current process. Please check the source code and license (MIT) before installation.
More Information¶
The plugin source code and documentation are available on GitHub: xby-skill/xby-smoking-detection.