diff --git a/README.md b/README.md index 4c04364..d7904c4 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,62 @@ -# video-product-snapshot +# video-product-snapshot — 视频商品截图 -Detect ecommerce products in video frames using Claude Vision, extract the best product snapshot, and optionally search for matching products via image-search API. +检测视频中的电商商品,提取最佳商品画面,并通过图片搜索在 1688 找同款。 -## How it works +## 工作原理 -1. Extracts frames from the video at a configurable interval using `ffmpeg` -2. Sends each frame to a vision model to detect whether a product is visible and rate confidence -3. Picks the highest-confidence frame as the best snapshot -4. Optionally calls an image-search API with the snapshot to find matching products +1. 使用 `ffmpeg` 按配置间隔从视频抽帧 +2. 将每帧发给视觉模型,检测是否有商品并评分 +3. 选出置信度最高的帧作为最佳商品截图 +4. 可选:用这张截图调用图片搜索 API 找同款商品 -## Install +## 安装 ```bash bun install -bun run build # outputs dist/run.js +bun run build # 输出到 dist/run.js ``` -## Usage +## 使用方法 ```bash bun dist/run.js [options] ``` -### Commands +### 命令 -| Command | Description | -|---------|-------------| -| `detect