Install
openclaw skills install calorie热量侦探 v1.0.2 - AI 食物卡路里计算器。通过照片识别食物并自动计算卡路里、蛋白质、碳水、脂肪等营养数据。支持 Kimi 视觉识别,内置常见食物营养数据库。用于健康饮食管理、减肥健身追踪。再隐蔽的热量也逃不过我的眼睛!
openclaw skills install calorie🕵️ 再隐蔽的热量也逃不过我的眼睛!
通过 AI 视觉识别技术,像侦探一样找出食物中隐藏的热量,自动计算卡路里和营养成分,帮助你更好地管理饮食健康。
# 1. 访问 Kimi 控制台
https://platform.moonshot.cn/console/claw
# 2. 上传 skill 包
# 选择 calorie-detective-v1.0.2.zip
# 3. 使用 config/kimi_claw.yaml 配置
# 4. 部署完成后,在 Kimi 中使用:
/卡路里 [上传食物照片]
优点:
# 解压 skill
unzip calorie-detective-v1.0.2.zip -d calorie-detective
cd calorie-detective
# 安装依赖
pip install -r requirements.txt
# 配置 API Key
export KIMI_API_KEY="your_kimi_key"
# 运行
./run.sh data/food.jpg
方式 1:环境变量(推荐)
export KIMI_API_KEY="your_kimi_key"
方式 2:配置文件
编辑 config/config.local.yaml:
api_keys:
kimi: "your_kimi_key"
获取 Kimi API Key:
# 视觉识别配置
vision:
provider: kimi # 推荐使用 Kimi
model: moonshot-v1-auto
# 使用限制
usage:
max_requests_per_day: 10
max_requests_per_user: 5
🕵️ **热量侦探 - 营养分析报告**
📝 一碗牛肉拉面,配有青菜和红油汤底
📊 **营养分析**
🔥 总卡路里:**696 大卡**
💪 蛋白质:26.4g
🍚 碳水化合物:50.9g
🥑 脂肪:43.1g
📋 **详细分解**
• **面条** (1 碗)
- 卡路里:220 大卡
- 蛋白质:5.0g | 碳水:50g | 脂肪:1.0g
• **牛肉** (80 克)
- 卡路里:200 大卡
- 蛋白质:20.8g | 碳水:0g | 脂肪:12.0g
• **青菜** (30 克)
- 卡路里:6 大卡
- 蛋白质:0.6g | 碳水:0.9g | 脂肪:0.1g
• **红油汤底** (300ml)
- 卡路里:270 大卡
- 蛋白质:0g | 碳水:0g | 脂肪:30.0g
──────────────────────────────
💡 侦探建议:
• 红油汤底热量较高,建议少喝汤
• 蛋白质含量充足,适合作为主食
• 可搭配凉拌菜增加膳食纤维
# 查看所有定时任务
openclaw cron list
# 手动立即运行一次
openclaw cron run <job-id>
# 暂停任务
openclaw cron update <job-id> --enabled false
# 删除任务
openclaw cron remove <job-id>
calorie-detective/
├── SKILL.md # 本文件
├── config/
│ ├── config.yaml # 配置文件
│ ├── config.local.yaml # 本地配置(含 API Key)
│ └── kimi_claw.yaml # Kimi Claw 部署配置
├── src/
│ └── calorie_calculator.py # 主程序
├── data/
│ ├── food.jpg # 示例图片
│ └── calorie.log # 运行日志
├── requirements.txt # 依赖列表
├── run.sh # 运行脚本
└── test.sh # 测试脚本
已内置 100+ 种常见食物营养数据(每 100 克):
| 类别 | 食物举例 |
|---|---|
| 🍚 主食 | 米饭、面条、馒头、面包、土豆 |
| 🥚 蛋白质 | 鸡蛋、牛奶、鸡肉、猪肉、牛肉、鱼 |
| 🍎 水果 | 苹果、香蕉、橙子、葡萄、草莓 |
| 🥬 蔬菜 | 青菜、番茄、黄瓜、胡萝卜、西兰花 |
| 🍔 快餐 | 汉堡、薯条、炸鸡、披萨 |
| 服务商 | 模型 | 价格 | 需要 API Key | 推荐度 |
|---|---|---|---|---|
| Kimi | moonshot-v1-auto | ¥0.008/张 | ✅ | ⭐⭐⭐⭐⭐ |
| Kimi | k2.5 | 套餐包含 | ✅ | ⭐⭐⭐⭐⭐ |
| OpenAI | GPT-4o / GPT-4V | $0.01/张 | ✅ | ⭐⭐⭐⭐ |
| Claude | Claude 3 Vision | $0.003/张 | ✅ | ⭐⭐⭐⭐ |
推荐使用 Kimi:
pip install --break-system-packages -r requirements.txt
# 测试 API Key
curl https://api.moonshot.cn/v1/chat/completions \
-H "Authorization: Bearer $KIMI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "moonshot-v1-auto", "messages": [{"role": "user", "content": "Hello"}]}'
在 Kimi 控制台查看:
calorie-detective统计数据包括:
编辑 src/calorie_calculator.py 中的 COMMON_FOODS 字典:
COMMON_FOODS = {
'你的食物': {'calories': 100, 'protein': 5, 'carbs': 15, 'fat': 3},
...
}
继承 VisionRecognizer 类并实现 _recognize_xxx 方法。
MIT
欢迎提交 Issue 和 Pull Request!
如有问题或建议,请提交 Issue 或联系开发者。
🕵️ 热量侦探,再隐蔽的热量也逃不过我的眼睛! 🍽️