init: tianyan-edge edge agent with Ascend NPU inference backend

- Go main process: stream ingestor, infer client, event uploader,
  heartbeat, config agent, OTA agent
- Python inference server rewritten to use CANN ACL (acl module)
  replacing ultralytics/PyTorch; supports YOLOv8 raw and YOLOv10
  NMS-free output formats via OUTPUT_FORMAT env var
- systemd services for edge-agent and edge-infer
- build/install/package scripts targeting arm64

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-06 21:49:04 +08:00
commit f6a85d7dfc
22 changed files with 1219 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
[Unit]
Description=Tianyan Edge Inference Server (Ascend NPU)
After=network.target
[Service]
Type=simple
Environment=INFER_SOCKET=/tmp/edge-infer.sock
Environment=OM_MODEL=/opt/tianyan-edge/model/model.om
Environment=CONF_THRESHOLD=0.5
Environment=IOU_THRESHOLD=0.45
Environment=DEVICE_ID=0
Environment=NAMES_FILE=/opt/tianyan-edge/model/names.txt
# raw: YOLOv8 output [1,4+nc,anchors] nms_free: YOLOv10 output [1,topk,6]
Environment=OUTPUT_FORMAT=raw
ExecStart=/usr/bin/python3 /opt/tianyan-edge/python/infer_server.py
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target