應用於STM32N6開發平台之邊緣端物件偵測系統建構
Construction of Edge-Based Object Detection Systems Applied to the STM32N6 Development Platform
摘要
隨著邊緣運算(Edge AI)技術的快速發展,將深度學習物件偵測模型部署至微控制器(MCU)已成為物聯網與工業視覺應用的重要趨勢。然而,微控制器嚴苛的記憶體容量與算力限制,為複雜視覺模型的部署帶來了極大的挑戰。為解決此問題,本研究旨在建構一套基於 STM32N6570 開發平台、結合硬體神經處理器(NPU)之邊緣端物件偵測系統。
本研究建立了一套端到端(End-to-End)之系統部署流程。針對高複雜度的YOLOv8n 與 Tiny YOLOv2 模型,本系統採用 UINT8 訓練後量化(PTQ)技術,並透過 STEdgeAI-Core 工具鏈將預訓練模型轉換為微控制器可執行之最佳化微碼。
實機效能評估結果顯示,在核心時脈 800 MHz 且啟用 NPU 硬體加速的條件下,YOLOv8n 模型的單次推論延遲僅需 23.83 毫秒,Tiny YOLOv2 亦能控制於 30.38 毫秒,且兩者之動態記憶體消耗皆妥善維持於 626 KiB 以下。本研究成功證明了在資源受限的STM32N6 平台上執行深度物件偵測模型之高度可行性與卓越效能,為未來低延遲邊緣視覺系統的設計提供了具備實務價值之實作架構。
本研究建立了一套端到端(End-to-End)之系統部署流程。針對高複雜度的YOLOv8n 與 Tiny YOLOv2 模型,本系統採用 UINT8 訓練後量化(PTQ)技術,並透過 STEdgeAI-Core 工具鏈將預訓練模型轉換為微控制器可執行之最佳化微碼。
實機效能評估結果顯示,在核心時脈 800 MHz 且啟用 NPU 硬體加速的條件下,YOLOv8n 模型的單次推論延遲僅需 23.83 毫秒,Tiny YOLOv2 亦能控制於 30.38 毫秒,且兩者之動態記憶體消耗皆妥善維持於 626 KiB 以下。本研究成功證明了在資源受限的STM32N6 平台上執行深度物件偵測模型之高度可行性與卓越效能,為未來低延遲邊緣視覺系統的設計提供了具備實務價值之實作架構。
With the rapid development of Edge AI technology, deploying deep learning-based object detection models on Microcontroller Units (MCUs) has become a prominent trend for IoT and industrial vision applications. However, the stringent memory and computational constraints of MCUs pose significant challenges for the deployment of complex vision models. To address these issues, this study aims to construct an edge-based object detection system on the STM32N6570 development platform, leveraging its hardware Neural Processing Unit (NPU).
This research establishes an end-to-end system deployment workflow. For the high-complexity YOLOv8n and Tiny YOLOv2 models, UINT8 Post-Training Quantization (PTQ) technology is adopted. The STEdgeAI-Core toolchain is utilized to convert pre-trained models into optimized microcode executable by the MCU.
On-device evaluation results demonstrate that under an 800 MHz core clock with NPU hardware acceleration enabled, the single inference latency of the YOLOv8n model is only 23.83 ms, and Tiny YOLOv2 is controlled at 30.38 ms. The dynamic memory footprint for both models is well-maintained under 626 KiB. This study successfully proves the high feasibility and outstanding performance of executing deep object detection models on the resource-constrained STM32N6 platform, providing a highly practical implementation architecture for the design of future low-latency edge vision systems.
This research establishes an end-to-end system deployment workflow. For the high-complexity YOLOv8n and Tiny YOLOv2 models, UINT8 Post-Training Quantization (PTQ) technology is adopted. The STEdgeAI-Core toolchain is utilized to convert pre-trained models into optimized microcode executable by the MCU.
On-device evaluation results demonstrate that under an 800 MHz core clock with NPU hardware acceleration enabled, the single inference latency of the YOLOv8n model is only 23.83 ms, and Tiny YOLOv2 is controlled at 30.38 ms. The dynamic memory footprint for both models is well-maintained under 626 KiB. This study successfully proves the high feasibility and outstanding performance of executing deep object detection models on the resource-constrained STM32N6 platform, providing a highly practical implementation architecture for the design of future low-latency edge vision systems.