Files
jc-video-recognize/models/README.md
wwh 54ac754660 docs: Add model setup documentation and script
- Add models/README.md with model file information
- Add scripts/setup-models.sh for easy model linking
- Document how to obtain and setup model files
2026-05-18 10:56:40 +08:00

1.8 KiB

模型文件目录

此目录用于存放 AI 检测模型文件。

模型清单

模型 文件名 来源 大小
火灾检测 fire_detection/best.pt fire_detection/models/best.pt ~61MB
安全帽检测 helmet_detection/yolov8n.pt yolov/yolov8n.pt ~6MB
人群检测 crowd_detection/yolov8l.pt behavior_detection/Crowd-Gathering/models/yolov8l.pt ~100MB
抽烟检测 smoking_detection/smoking_yolov8n.pt behavior_detection/smoker-detection/models/smoking_yolov8n.pt ~6MB
徘徊检测 loitering_detection/yolov8n.pt behavior_detection/Loitering-Detection/yolov8n.pt ~6MB

设置模型

方式1: 符号链接(开发环境)

# 在项目根目录执行
ln -sf /path/to/fire_detection/models/best.pt models/fire_detection/
ln -sf /path/to/yolov/yolov8n.pt models/helmet_detection/
ln -sf /path/to/behavior_detection/Crowd-Gathering/models/yolov8l.pt models/crowd_detection/
ln -sf /path/to/behavior_detection/smoker-detection/models/smoking_yolov8n.pt models/smoking_detection/
ln -sf /path/to/behavior_detection/Loitering-Detection/yolov8n.pt models/loitering_detection/

方式2: 复制文件

cp /path/to/fire_detection/models/best.pt models/fire_detection/
cp /path/to/yolov/yolov8n.pt models/helmet_detection/
cp /path/to/behavior_detection/Crowd-Gathering/models/yolov8l.pt models/crowd_detection/
cp /path/to/behavior_detection/smoker-detection/models/smoking_yolov8n.pt models/smoking_detection/
cp /path/to/behavior_detection/Loitering-Detection/yolov8n.pt models/loitering_detection/

方式3: 使用初始化脚本

bash scripts/setup-models.sh

注意

模型文件较大,未包含在 Git 仓库中。请从原始位置复制或创建符号链接。