Backend:
- Persist alert events and robot delivery counters in SQLite (data/app.db,
YOLO_DB_PATH override); EventStore keeps its interface, DeliveryStatsStore
uses read/write-through UPSERT; in-memory fallback remains for standalone
AlertManager use
- Serve /api/detect from a sync endpoint and serialize YOLO inference with a
lock, so concurrent requests no longer block the event loop
- Unify single-image and session detection: requests without session_id
share the fixed single-image session and run full frame confirmation
- Store UTC Z-suffixed timestamps for sortable string comparison; close
executor and database on shutdown via FastAPI lifespan
Frontend:
- Split app.js into ES modules (main.js + modules/{dom,api,ui,charts,store}
+ views/{dashboard,inspection,events,robots,robotCards}), no build step
- Escape all server data interpolated into innerHTML; guard missing
event.classes; replace lazy element ID list with memoized qs()
- Remove hardcoded fake stats (trend badge, device donut segment)
Docs:
- Rewrite README: accurate weight policy (only trained best.pt committed,
no Git LFS), SQLite persistence, single-worker note, data asset inventory
- Align models/pretrained/README.md with actual files; add YOLO_DB_PATH to
.env.example; add persistence unit tests; ruff clean
20 lines
515 B
Plaintext
20 lines
515 B
Plaintext
YOLO_WEIGHTS=runs/detect/smoke_fire_yolo11s_v1-4/weights/best.pt
|
|
YOLO_DEVICE=0
|
|
YOLO_IMGSZ=768
|
|
YOLO_CONF=0.40
|
|
YOLO_IOU=0.45
|
|
|
|
# SQLite 数据库路径(事件与机器人投递统计持久化)。
|
|
YOLO_DB_PATH=data/app.db
|
|
|
|
# 企业微信群机器人,可留空。
|
|
WECHAT_WEBHOOK_URL=
|
|
|
|
# 飞书群自定义机器人,可留空。开启签名校验时再填写密钥。
|
|
FEISHU_WEBHOOK_URL=
|
|
FEISHU_SECRET=
|
|
|
|
# 连续命中帧数与每个类别的告警冷却时间。
|
|
ALERT_CONFIRM_FRAMES=3
|
|
ALERT_COOLDOWN_SECONDS=60
|