49 lines
1.9 KiB
Markdown
49 lines
1.9 KiB
Markdown
|
|
---
|
|||
|
|
name: scratch-report-generator
|
|||
|
|
description: 汽车环车旧伤 HTML 检测报告生成。用于 scratch_report_generator 能力:汇总 video_info.json、damages.json、grounding.json、best_frames.json 中的旧伤、车辆品牌型号、车牌、VIN、里程、胎压、轮胎状态等结果,生成内联 base64 图片的完整 HTML 报告,同时输出 TYCM 回调用 reportMarkdown、conditionScore、summary。
|
|||
|
|
license: MIT
|
|||
|
|
metadata:
|
|||
|
|
version: "1.0.0"
|
|||
|
|
category: vehicle-inspection
|
|||
|
|
skillType: compute-entry
|
|||
|
|
aliases: ["scratch_report_generator"]
|
|||
|
|
tags: ["vehicle", "report", "html", "tycm", "旧伤报告"]
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# 环车旧伤报告生成
|
|||
|
|
|
|||
|
|
前置条件:已完成抽帧、检测、定位、选帧全流程。
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"name": "scratch-report-generator",
|
|||
|
|
"input": {
|
|||
|
|
"taskId": "order_10001"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## 工作流程
|
|||
|
|
|
|||
|
|
1. 读取 workspace 中的 `video_info.json`、`damages.json`、`grounding.json`、`best_frames.json`。
|
|||
|
|
2. 汇总车辆信息:品牌型号、前后车牌、VIN、里程、胎压、轮胎纹理健康度、轮胎规格。
|
|||
|
|
3. 汇总去重后的旧伤列表和最佳展示帧。
|
|||
|
|
4. 计算车况评分,生成整体评估和维修建议。
|
|||
|
|
5. 生成 `report/index.html`,所有图片 base64 内联。
|
|||
|
|
|
|||
|
|
## 输出
|
|||
|
|
|
|||
|
|
- `reportUrl`: workspace 下 HTML 报告路径 URL。
|
|||
|
|
- `totalDamages`: 去重后的旧伤总数。
|
|||
|
|
- `conditionScore`: 1-10 车况评分。
|
|||
|
|
- `summary`: 中文检测摘要。
|
|||
|
|
- `reportMarkdown`: TYCM 回调可直接保存的 Markdown 摘要。
|
|||
|
|
|
|||
|
|
## 报告内容
|
|||
|
|
|
|||
|
|
报告包含:车辆信息、统计卡片、视频信息、整体评估、损伤汇总表、损伤详情、最佳帧图片、处理建议。
|
|||
|
|
|
|||
|
|
需要 Node.js 18+。共享 workspace 根目录优先读取 `VEHICLE_SCRATCH_WORKSPACE_ROOT`,其次兼容 `RZYX_AI_WORKSPACE_ROOT`,否则使用 `RZYX_AI_DATA_DIR/workspace/vehicle-scratch-inspection`。
|
|||
|
|
|
|||
|
|
用中文回答所有内容。
|