Files
Loongson_2k0300_SmartCar_Fr…/model/deploy_README.md

40 lines
926 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# NanoDetHeat v4 部署说明
## 模型文件
| 文件 | 说明 |
|------|------|
| model_heat_v4.py | 模型架构定义 (PyTorch) |
| best.pth | 训练权重 (141KB, FP32) |
| model_heat_v4.onnx | ONNX 格式模型 |
| config.json | 配置 + 类别参考尺寸 |
## 输入
- 格式: RGB, 160×120, 归一化到 [0,1]
- 预处理: BGR→RGB 翻转, /255.0
## 输出
- 形状: [1, 6, 15, 20]
- 通道 0-3: 类别 logits (红绿灯/锥桶/人行道/背景)
- 通道 4-5: 尺寸预测 (宽/高, 需乘参考尺寸)
## 后处理
1. softmax 通道 0-3 → 概率
2. 对每类找局部峰值 (3×3 邻域抑制)
3. 筛选置信度 > 阈值 (推荐 0.8)
4. 尺寸解码: 实际宽 = 预测宽 × 参考宽
5. 中心坐标: cx=(gx+0.5)×8, cy=(gy+0.5)×8
## 类别参考尺寸 (像素, 160×120)
红绿灯: 73.7 × 60.9
锥桶: 49.4 × 38.6
人行道: 71.2 × 36.3
## 推荐阈值
th=0.8: 精确度 62.9%, 召回 88.7%