From 3a315c71299b6563b18b2b68038a495ed14a612d Mon Sep 17 00:00:00 2001 From: ericwyuan Date: Wed, 19 Aug 2026 22:17:23 +0800 Subject: [PATCH] =?UTF-8?q?[1.0]=20=E9=A1=B9=E7=9B=AE=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=20-=20=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84=20+=20READ?= =?UTF-8?q?ME=20+=20.gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 44 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 .gitignore create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..67126a8 --- /dev/null +++ b/.gitignore @@ -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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..83466c4 --- /dev/null +++ b/README.md @@ -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`