仓库结构: edge/ 设备端(原根目录设备端代码整体移入) control/ 管理端(清理后) docs/ 文档(PRD 移入 design/) README.md 根导航(新增) 清理: - control/.brainstorm 临时草稿删除 - control 根级重复文档(API表/PRD_04)并入 docs/design/ - control/plan.md -> docs/implementation/control-plan.md - control/safesightd-linux-arm64 二进制取消版本控制(.gitignore) - edge/transform 模型转换产物归入 models/,onnx/pt 大源文件取消跟踪(.gitignore) - Readme.md(PRD) -> docs/design/PRD_Product_v1.2.md(避开 README 大小写冲突) 更新: - 根 README.md 导航、docs/README.md 文档索引 - deployment.md/检查表路径加 edge/ 前缀 - .gitignore 重写(edge/control 分区规则)
75 lines
2.6 KiB
Markdown
75 lines
2.6 KiB
Markdown
# SafeSight — AI 视觉安全监测平台
|
||
|
||
> **Safe Sight, Safe Production.**
|
||
> 以 AI 视觉算法驱动的工业安全生产监测平台。
|
||
|
||
## 仓库结构
|
||
|
||
```
|
||
safesight/
|
||
├── README.md ← 本导航
|
||
├── docs/ ← 文档(索引见 docs/README.md)
|
||
├── edge/ ← 设备端(RK3588 边缘计算)
|
||
│ ├── VERSION ← 设备端主版本号
|
||
│ ├── agent/ → 边缘代理(Go):UDP 发现、模型管理、agent API
|
||
│ ├── include/ src/ → 媒体引擎(C++):视频 DAG、NPU 推理、推流报警
|
||
│ ├── scripts/ → 部署/运维脚本(deploy.sh、setup-overlayroot.sh 等)
|
||
│ ├── configs/ models/ web/ third_party/
|
||
│ └── tools/ train/ tests/ test_assets/
|
||
└── control/ ← 管理端(safesightd,Go)
|
||
├── VERSION ← 管理端主版本号
|
||
├── cmd/ internal/ → Web UI / HTTP API / 设备管理
|
||
├── scripts/ tools/ → 构建打包、人脸库工具
|
||
├── models/ → 标准模型库(下发用)
|
||
└── deps/ → 离线依赖(onnxruntime 等)
|
||
```
|
||
|
||
## 快速导航
|
||
|
||
| 想做什么 | 看这里 |
|
||
|---|---|
|
||
| 产品镜像制作 / 批量部署 / 断电保护 | `docs/deployment/deployment.md`(主手册) |
|
||
| 文档索引 | `docs/README.md` |
|
||
| 管理端安装打包 | `docs/deployment/control-deployment.md` |
|
||
| 设备端部署 | `edge/scripts/deploy.sh` |
|
||
| 管理端构建 | `control/scripts/package.sh` |
|
||
|
||
## 快速开始
|
||
|
||
### 管理端(control/)
|
||
|
||
```bash
|
||
cd control
|
||
go build -o safesightd.exe ./cmd/safesightd
|
||
./safesightd
|
||
# 访问 http://localhost:18080/ui
|
||
```
|
||
|
||
### 设备端(edge/)
|
||
|
||
```bash
|
||
# 编译 Agent
|
||
cd edge/agent
|
||
go build -o safesight-edge-agent ./cmd/safesight-agent
|
||
|
||
# 编译 Media Engine(RK3588 板载编译)
|
||
cd edge
|
||
bash scripts/build.sh -m -j4
|
||
./build/safesight-edge-server --config configs/sample_cam1.json
|
||
```
|
||
|
||
## 版本机制(双层)
|
||
|
||
- **主版本号**:各端 `VERSION` 文件(如 `1.0.0`),发版改文件即可,不依赖 git tag
|
||
- **构建号**:构建时自动注入 `YYYYMMDD.HHMMSS`,区分大量小版本迭代
|
||
- **git sha**:自动注入,精确定位代码
|
||
|
||
设备端列表页显示 `V1.0.0`,详情页显示 `V1.0.0 (build 20260801.171659 · 923ab10)`。
|
||
|
||
## 历史说明
|
||
|
||
本仓库由原 `safesight-edge`(设备端)与 `safesight-control`(管理端)合并而来:
|
||
- `edge/` = 原 safesight-edge(git 历史、tag v1.0.0 保留)
|
||
- `control/` = 原 safesight-control(git 历史、tag v1.0.0 保留)
|
||
- 合并提交:`98e375d`
|