← 返回 Skills 市场
300
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install sam
功能描述
Use SAM (Segment Anything Model) to remove image backgrounds and extract foreground subjects as transparent PNGs. Use when users want to remove backgrounds,...
安全使用建议
This skill appears to be what it claims, but it will: (1) auto-install the segment_anything package from GitHub at runtime, and (2) download large model checkpoints (~375MB–2.5GB) to ~/.cache/sam. Before installing, ensure you have sufficient disk space and bandwidth and that you trust pulling code from the segment-anything GitHub repo. If you prefer tighter control, pre-install the dependencies and provide a local checkpoint via --checkpoint to avoid runtime pip installs and downloads. Run in an environment where large native packages (torch) are supported (and consider GPU/CUDA compatibility) or in an isolated sandbox if you want to limit risk.
功能分析
Type: OpenClaw Skill
Name: sam
Version: 1.0.0
The skill performs image segmentation using Meta's SAM model but exhibits high-risk behaviors, including the use of `os.system` in `scripts/segment.py` to install dependencies from a remote Git repository and the automatic downloading of large binary checkpoints (up to 2.5GB) from `dl.fbaipublicfiles.com`. While these actions are aligned with the stated purpose in `SKILL.md`, the use of shell execution for package management and unverified remote file retrieval are significant security vulnerabilities.
能力评估
Purpose & Capability
The name/description (SAM background removal) matches the code and declared dependencies: python3, pillow, numpy, torch, torchvision, and the segment_anything package. The script implements segmentation and saving transparent PNGs as advertised.
Instruction Scope
SKILL.md simply instructs running scripts/segment.py and documents parameters. The runtime behavior (auto-installing segment_anything via pip and auto-downloading model checkpoints to ~/.cache/sam) is clearly described. The instructions do not read unrelated files, environment variables, or transmit data to unexpected endpoints.
Install Mechanism
Install spec lists pillow, numpy, torch, torchvision (appropriate for SAM). The script may auto-run pip install git+https://github.com/facebookresearch/segment-anything.git if needed and downloads large model checkpoints from dl.fbaipublicfiles.com (Meta's public hosting). This is expected but involves dynamic code download and large network transfers (~375MB–2.5GB).
Credentials
No environment variables, credentials, or unrelated config paths are requested. The script writes checkpoints to ~/.cache/sam and saves outputs where the user specifies; those are proportionate to the function.
Persistence & Privilege
always is false and the skill does not modify other skills or system-wide settings. It stores model checkpoints in the user's cache directory only, which is reasonable for repeated use.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install sam - 安装完成后,直接呼叫该 Skill 的名称或使用
/sam触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of "sam-segmentation" skill for background removal and image segmentation.
- Extracts foreground subjects from images using Meta's Segment Anything Model (SAM) and saves as transparent PNGs.
- Supports multiple model sizes (`vit_b`, `vit_l`, `vit_h`) for different speed and quality needs.
- Allows foreground hint points, grid-sweep mode for extracting all distinct elements, and various mask filtering parameters.
- Automatically installs needed dependencies (`segment_anything`, Pillow, numpy, torch, torchvision) on first use.
- Model checkpoint is auto-downloaded if not provided.
元数据
常见问题
Segment Anything 是什么?
Use SAM (Segment Anything Model) to remove image backgrounds and extract foreground subjects as transparent PNGs. Use when users want to remove backgrounds,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 300 次。
如何安装 Segment Anything?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install sam」即可一键安装,无需额外配置。
Segment Anything 是免费的吗?
是的,Segment Anything 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Segment Anything 支持哪些平台?
Segment Anything 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Segment Anything?
由 scikkk(@scikkk)开发并维护,当前版本 v1.0.0。
推荐 Skills