safesight/docs/README.md
tian 910febe703 docs: 部署文档归入 docs/deployment/ 子目录
- deployment/control-deployment/检查表/离线部署 4 个部署文档统一移入
- 更新 README 导航、部署手册互引、检查表、deploy.sh 提示中的路径
2026-08-02 11:30:03 +08:00

85 lines
3.8 KiB
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.

# SafeSight — AI 视觉安全监测平台
> **Safe Sight, Safe Production.**
> 以 AI 视觉算法驱动的工业安全生产监测平台。
## 仓库结构(单仓库)
```
safesight/ ← 唯一代码仓库(历史来自 safesight-edge + safesight-control
├── VERSION ← 设备端主版本号(发版修改)
├── agent/ → 边缘代理GoUDP 发现、模型管理、agent API
├── include/ src/ → 媒体引擎C++):视频 DAG 流水线、NPU 推理、推流报警
├── scripts/ → 设备端部署/运维脚本deploy.sh、setup-overlayroot.sh 等)
├── control/ → 管理端(原 safesight-control 仓库,完整保留)
│ ├── VERSION ← 管理端主版本号
│ ├── cmd/ internal/ → safesightdWeb UI / HTTP API / 设备管理
│ └── scripts/ → 管理端构建/打包脚本
├── docs/ → 文档(入口 + 按内容分类子目录)
│ ├── README.md ← 本导航
│ ├── deployment/ → 部署(主手册/管理端部署/现场检查表/离线部署)
│ ├── requirements/ → 需求(集成方案、功能差距、需求分析)
│ ├── design/ → 设计PRD、接口、技术方案、UI 主题)
│ ├── architecture/ → 架构DAG、媒体链路
│ ├── implementation/ → 实施(计划、跟踪、自动化方案)
│ ├── bugfix/ → 缺陷修复记录
│ ├── testing/ → 测试(压测报告、测试设备)
│ ├── guides/ → 操作指南(配置、模型、命令、依赖、调试)
│ ├── workshop_ai/ → AI 数据标注工作坊
│ └── archive/ → 归档(源码片段等)
└── third_party/ models/ web/ → 设备端依赖与资源
```
## 快速导航
| 想做什么 | 看这里 |
|---|---|
| 产品镜像制作 / 批量部署 / 断电保护 | `docs/deployment/deployment.md`(主手册) |
| 现场施工清单 | `docs/deployment/客户现场部署检查表.md` |
| 管理端安装打包 | `docs/deployment/control-deployment.md` |
| 模型命名与资产说明 | `docs/guides/models.md` |
| 依赖安装 | `docs/guides/dependencies.md` |
| 配置指南 | `docs/guides/config_guide.md` |
| 缺陷修复记录 | `docs/bugfix/` |
| 设备端部署脚本 | `scripts/deploy.sh`(部署到设备后位于 /opt/safesight-edge-server/scripts/ |
| 管理端构建 | `control/scripts/package.sh` |
## 版本机制(双层)
- **主版本号**:各端根目录 `VERSION` 文件(如 `1.0.0`),发版改文件即可,不依赖 git tag
- **构建号**:构建时自动注入 `YYYYMMDD.HHMMSS`,区分大量小版本迭代
- **git sha**:自动注入,精确定位代码
设备端列表页显示 `V1.0.0`,详情页显示 `V1.0.0 (build 20260801.171659 · 923ab10)`
## 合并历史说明
本仓库由 `safesight-edge`(设备端)与 `safesight-control`(管理端)通过 `git subtree` 合并:
- 仓库根 = 原 safesight-edge其 git 历史、tag v1.0.0 保留)
- `control/` = 原 safesight-control其 git 历史、tag v1.0.0 保留)
- 合并提交:`98e375d`
## 快速开始
### 管理端control/
```bash
cd control
go build -o safesightd.exe ./cmd/safesightd
./safesightd
# 访问 http://localhost:18080/ui
```
### 设备端
```bash
# 编译 Agent
cd agent
go build -o safesight-edge-agent ./cmd/safesight-agent
# 编译 Media EngineRK3588 板载编译)
cd ..
bash scripts/build.sh -m -j4
./build/safesight-edge-server --config configs/sample_cam1.json
```