safesight/docs/README.md
tian dc62cf066c fix: 恢复被覆盖的 Readme.md(PRD),导航文档移至 docs/README.md
- Windows 大小写不敏感导致新 README.md 覆盖了原有 Readme.md(PRD 1305行)
- 从 git 历史恢复 PRD,导航内容另存为 docs/README.md
2026-08-02 11:15:33 +08:00

74 lines
2.9 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-edge/ ← 唯一代码仓库(历史来自 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/ → 产品级文档(部署手册、检查表、离线部署)
│ ├── deployment.md ← Edge 设备部署手册(唯一操作手册)
│ ├── control-deployment.md ← 管理端部署指南
│ ├── 客户现场部署检查表.md
│ └── 离线部署文档.md
└── third_party/ models/ web/ → 设备端依赖与资源
```
## 快速导航
| 想做什么 | 看这里 |
|---|---|
| 产品镜像制作 / 批量部署 / 断电保护 | `docs/deployment.md`(主手册) |
| 现场施工清单 | `docs/客户现场部署检查表.md` |
| 管理端安装打包 | `docs/control-deployment.md` |
| 设备端部署脚本 | `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
```