Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

sam萨姆

Agent Skill

sam 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

9,210

周安装

369

GitHub Stars

公开资料未说明

下载量

2,982
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sam(萨姆)
来源仓库:https://github.com/scikkk/sam
安装命令:
openclaw skills install sam
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install sam

简介

sam 利用 SAM 模型实现图像背景去除与前景主题透明化处理。

  • 适用于图片编辑、素材提取与设计辅助类研究检索任务。sam 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 通过 clawhub 安装后,输入图像即可返回 PNG 格式透明背景文件。
  • 使用前需确认图像版权归属与商用授权范围是否允许修改。
  • 建议对高精度需求场景进行人工校验边缘细节处理效果。

SKILL.md

name
sam-segmentation
description
Use SAM (Segment Anything Model) to remove image backgrounds and extract foreground subjects as transparent PNGs. Use when users want to remove backgrounds, cut out objects, extract foreground subjects, or perform image segmentation.
metadata
openclaw
requires
bins
install
package
pillow
package
numpy
package
torch
package
torchvision

SAM Background Removal

Extract foreground subjects from images using Meta's Segment Anything Model, outputting transparent PNGs.

Quick Start

python3 scripts/segment.py <input_image> <output.png>

Defaults to the image center as the foreground hint — works well for portraits and product shots where the subject is centered.

Parameters

ParamDescriptionDefault
inputInput image pathrequired
outputOutput PNG path (single mode) or directory (--all mode)required
--modelModel size: vit_b (fast) · vit_l (medium) · vit_h (best quality)vit_h
--checkpointLocal checkpoint path; auto-downloaded if omittedauto
--pointsForeground hint points as x,y, multiple allowedcenter
--allGrid-sweep mode: extract all distinct elementsoff
--gridGrid density for --all; 16 means 16×16=256 probe points16
--iou-threshMinimum predicted IoU to accept a mask (--all)0.88
--min-areaMinimum mask area as fraction of image (--all)0.001

Examples

# Basic background removal (auto-downloads vit_h ~2.5GB)
python3 scripts/segment.py photo.jpg output.png

# Specify hint point when subject is off-center
python3 scripts/segment.py photo.jpg output.png --points 320,240

# Multiple hints with lightweight model
python3 scripts/segment.py photo.jpg output.png --model vit_b --points 320,240 400,300

# Extract all elements (one PNG per element)
python3 scripts/segment.py photo.jpg ./elements/ --all

# Denser grid to capture small objects
python3 scripts/segment.py photo.jpg ./elements/ --all --grid 32

# Use a local checkpoint
python3 scripts/segment.py photo.jpg output.png --checkpoint /path/to/sam_vit_h_4b8939.pth

Dependencies

segment_anything is auto-installed on first run, or install manually:

pip install git+https://github.com/facebookresearch/segment-anything.git
pip install pillow numpy torch torchvision

Workflow

  1. User provides image path
  2. Ask if hint points are needed (when subject is off-center)
  3. Run script; checkpoint auto-downloads on first use to ~/.cache/sam/
  4. Output transparent-background PNG

Model Selection

ModelSizeSpeedQuality
vit_b~375 MBfastestgood
vit_l~1.25 GBmediumbetter
vit_h~2.5 GBslowerbest

CUDA is used automatically when a GPU is available.

适合场景

01

商品图处理

02

人像抠图

03

透明背景素材

04

营销设计资产

能力概览

能力 1

调用背景移除模型

能力 2

输出透明背景图片

能力 3

支持商品、人像和营销素材处理

能力 4

可接入图像编辑工作流

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

82.51%
按下载量换算2,460

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills