← 返回 Skills 市场
ide-rea

Baidu image recognize

作者 ide-rea · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
108
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install image-recognize
功能描述
百度AI识别图片中的物体、场景、文字等内容,需要用户提供本地图片或网络图片,支持Base64编码。支持(题目,文字,图片人脸,植物,动物,表情,素材,商品,玩具,景点,通用识别等)内容识别。用于通用图片内容分类识别,不负责图片生成或编辑
使用说明 (SKILL.md)

图片识别

基于百度AI的通用图片识别能力,可识别多种场景下的图片内容。当用户要求识别图片主体、分类标签、场景内容时触发使用,

前置条件,获取api_key

  1. 从对话上下文中提取(用户曾提及或粘贴过)
  2. 读取环境变量 BAIDU_API_KEY
  3. 以上均无 → 询问用户:「请提供千帆 API Key(格式:bce-v3/ALTAK-...)」

🎯 功能特点

  • 多场景识别:支持景点、动物、植物、商品、表情、人脸、文字等
  • 多种输入格式:本地图片、网络图片、Base64编码
  • 简单易用:只需一个图片参数,返回识别结果
  • 不适用场景:不适用于图片编辑、OCR精确提取、目标检测定位、身份核验、人脸比对、医学影像分析等

📋 使用方法

基本参数

  • --image:图片路径/URL/Base64(必需),图片大小不能超过4MB,最好控制在1MB以下,否则可能出现识别失败。
  • --similar_count:返回相似图数量(可选,默认3)

使用示例

# 本地图片
python3 scripts/image_recognize.py --image "/path/to/local/image.jpg"

# 网络图片
python3 scripts/image_recognize.py --image "https://example.com/image.jpg"

# Base64编码
python3 scripts/image_recognize.py --image "base64编码字符串"

# 指定相似图数量
python3 scripts/image_recognize.py --image "/path/to/image.jpg" --similar_count 5

⚙️ 配置要求

  • Python 3:需要安装python3
  • 百度API Key:需要在OpenClaw配置中设置BAIDU_API_KEY环境变量

📝 输出说明

返回MARKDOWN格式的识别结果,包含:

  • 识别结果描述
  • 置信度评分
  • 相似图片(如启用)
  • 分类标签

示例输出

# 图片识别结果:

## 识别结果: 威尔士柯基
**类型**: 动物
**置信度**: 1(高)

### 简要描述
威尔士柯基个子矮小,骨量适中,胸深。整个身体的侧面轮廓的比例是长度远大于高度。尾巴位置非常低,而且象狐狸尾巴。给人的整体印象是:漂亮、有力的小型犬,速度和耐力都非常好,聪明,结构坚固,但不粗糙。

### 识别摘要
==**威尔士柯基犬是中小型犬,体格结实,体长大于身高,头部似狐狸,耳朵直立,四肢粗短,拥有浑圆臀部,毛色多样,彭布罗克柯基多断尾,卡迪根柯基则有长尾巴**==[1][2][3][4]。

### 详细信息

### 参考资源

1. [威尔士柯基犬](https://baike.baidu.com/item/威尔士柯基犬/84385)
2. [卡迪根威尔士柯基犬](https://baike.baidu.com/item/卡迪根威尔士柯基犬/625957)

安全使用建议
This skill appears to be what it says: it will send image content (base64) to Baidu's qianfan API and requires your BAIDU_API_KEY. Consider: (1) only provide non-sensitive images because image bytes will be transmitted to Baidu; (2) supplying a URL causes the skill to download that URL (remote hosts will see the request and your IP); (3) use a restricted/limited API key if possible rather than a high-privilege account; (4) check network policies if you must prevent outbound requests. If you are comfortable with those privacy/network implications, the skill is coherent and usable.
功能分析
Type: OpenClaw Skill Name: image-recognize Version: 1.0.0 The skill provides image recognition capabilities by interfacing with the Baidu Qianfan API. The script (image_recognize.py) handles local file reading, URL downloads, and Base64 encoding as required for its stated purpose, and the SKILL.md instructions are well-aligned with the tool's functionality without any evidence of malicious intent or prompt injection.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
Name/description (Baidu image recognition) match the required artifacts: a python script, BAIDU_API_KEY env var, and ability to accept local/URL/Base64 images. The API host (qianfan.baidubce.com) and '千帆 API Key' format are consistent with the stated purpose.
Instruction Scope
SKILL.md instructs reading BAIDU_API_KEY from env or asking the user, accepting image input in expected forms, and returning recognition results. The included script performs only image normalization (local file / download / data URI), encodes to base64, and calls the Baidu API. It does not reference unrelated system files, additional env vars, or alternate external endpoints.
Install Mechanism
No install spec is present (instruction-only with a runnable script). The only runtime requirement is python3 and the requests library (imported in script). No remote archive downloads or unusual installers are used.
Credentials
Only BAIDU_API_KEY is required and declared as the primary credential. That is appropriate for calling Baidu's API. No unrelated tokens, keys, or system config paths are requested.
Persistence & Privilege
The skill is not force-installed (always=false) and does not attempt to modify other skills or agent-wide config. It runs only when invoked and requires no persistent system privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install image-recognize
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /image-recognize 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the “image-recognize” skill. - Supports object, scene, text, landmark, plant, animal, face, emotion, product, toy, and general image recognition using Baidu AI. - Accepts local images, URLs, or Base64-encoded images as input. - Requires a Baidu API Key (set via environment variable or user prompt). - Results include description, confidence score, similar images (optional), and category tags in Markdown format. - Not intended for image editing, precise OCR extraction, detection/localization, identity verification, face comparison, or medical imaging.
元数据
Slug image-recognize
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Baidu image recognize 是什么?

百度AI识别图片中的物体、场景、文字等内容,需要用户提供本地图片或网络图片,支持Base64编码。支持(题目,文字,图片人脸,植物,动物,表情,素材,商品,玩具,景点,通用识别等)内容识别。用于通用图片内容分类识别,不负责图片生成或编辑. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 108 次。

如何安装 Baidu image recognize?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install image-recognize」即可一键安装,无需额外配置。

Baidu image recognize 是免费的吗?

是的,Baidu image recognize 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Baidu image recognize 支持哪些平台?

Baidu image recognize 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Baidu image recognize?

由 ide-rea(@ide-rea)开发并维护,当前版本 v1.0.0。

💬 留言讨论