在树莓派上实现本地生成式AI,让监控系统不传图像也能自动生成自然语言警报。
On-Device Generative AI for GDPR-Compliant Visual Monitoring: Natural Language Alerts from Local Object Detection

- 模型和语言生成全在设备端运行,图像数据处理后立即丢弃
- 使用YOLOv5n-seg检测物体,用Phi-3 Mini生成1-2句警报文本
- 适合需要GDPR合规、隐私敏感的本地化监控场景
依赖云端人工智能推理的视觉监控系统会将原始图像数据暴露于外部服务,违背了通用数据保护条例(GDPR)中的数据最小化原则。本文提出一个隐私设计原型方案,通过将全部推理过程完全置于边缘设备来解决这一矛盾。基于Hailo-8L AI加速器部署的YOLOv5n-seg模型在Raspberry Pi 5上实现实时目标检测,原始像素缓存将在推理后立即删除。一个状态感知的触发引擎将最小的JSON事件数据包发送至本地运行的Phi-3 Mini(3.8B参数,Q4_0量化),该模型生成1至2句话的自然语言警报供操作员阅读。整个过程中无图像数据跨网络传输,仅发送生成的文本警报。我们描述了完整的系统架构与实现,报告了目标硬件上的推理延迟与资源利用率,并展示代表性生成警报。结果表明,在单板计算机上结合专用神经网络加速器与本地大语言模型不仅可行,且能生成可读性强的监控输出,同时符合GDPR第5(1)(c)条的设计要求。
原文摘要 · Abstract (English)
Visual monitoring systems that rely on cloud-based AI inference expose raw image data to external services, creating fundamental tensions with the data-minimisation principle of the General Data Protection Regulation (GDPR). This paper presents a proof-of-concept privacy-by-design pipeline that resolves this tension by confining all inference entirely to the edge device. A YOLOv5n-seg model compiled for a Hailo-8L AI accelerator delivers real-time object detection on a Raspberry Pi 5, from which raw pixel buffers are immediately discarded after inference. A stateful trigger engine forwards minimal JSON event payloads to a locally hosted instance of Phi-3 Mini (3.8B parameters, Q4_0 quantisation), which synthesises one-to-two sentence natural-language alerts for a human operator. No image data crosses the network boundary at any point; only the generated text alert is transmitted. We describe the full system architecture and implementation, report measured inference latency and resource utilisation on the target hardware, and present representative generated alerts. The results demonstrate that combining a dedicated neural-network accelerator with an on-device large language model on a single-board computer is not only feasible but produces practically deployable, human-readable monitoring output while aligning with GDPR Art. 5(1)(c) by design.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。