[1.0] 项目初始化 - 目录结构 + README + .gitignore

This commit is contained in:
ericwyuan
2026-08-19 22:17:23 +08:00
commit 3a315c7129
2 changed files with 86 additions and 0 deletions

44
.gitignore vendored Normal file
View File

@@ -0,0 +1,44 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
.venv
*.egg-info/
dist/
build/
# IDE
.idea/
.vscode/
*.swp
*.swo
# OS
.DS_Store
Thumbs.db
# Config (contains secrets - use .example for templates)
config/config.yaml
config/*.local.yaml
# Logs
logs/
*.log
# Media temp
/tmp/fam_media/
*.mp4
*.jpg
*.jpeg
*.png
# Streamlit
.streamlit/secrets.toml
# Env
.env
.env.local

42
README.md Normal file
View File

@@ -0,0 +1,42 @@
# Sentinel Home AI - 家庭多模态智能监控系统
多模型并行 + 交互式命名 + AI 对话的家庭监控系统。
## 架构概览
| 节点 | 角色 | 服务 |
|------|------|------|
| Synology NAS | FAM-Core + FAM-UI + 数据库 | Flask (8000), Streamlit (8501), MariaDB (3306) |
| Oracle Cloud | FAM-Edge | Flask (5000), Ollama (11434), FFmpeg |
| 家庭网络 | 用户入口 | 浏览器访问 FAM-UI |
## 目录结构
```
sentinel-home-ai/
├── fam-core/ # NAS 端 - 任务调度/事件接收/对话/成员管理/视频服务
├── fam-edge/ # Oracle 端 - 视频预处理/AI编排/模型适配器
├── fam-ui/ # NAS 端 - Streamlit 前端
├── scripts/ # 数据库初始化/部署脚本
├── tests/ # 单元测试与集成测试
└── docs/ # 设计文档
```
## 技术栈
- **后端**: Python 3.10+, Flask, Gunicorn
- **数据库**: MariaDB (MySQL 兼容)
- **AI 模型**: Ollama (llava-phi3), Gemini 1.5 Flash
- **视频处理**: FFmpeg, OpenCV
- **前端**: Streamlit
## 快速开始
1. 数据库初始化: `python scripts/init_db.py`
2. 启动 FAM-Core: `cd fam-core && gunicorn -w 1 -b 0.0.0.0:8000 src.app:app`
3. 启动 FAM-Edge: `cd fam-edge && gunicorn -w 1 -b 0.0.0.0:5000 src.app:app`
4. 启动 FAM-UI: `cd fam-ui && streamlit run src/app.py`
## 代码仓库
- Gitea: `http://192.168.50.64:3000/ericwyuan/sentinel-home-ai`