無人載具上使用物件偵測技術執行人的偵測研究
Utilizing object detection techniques on drone to perform humans detection
摘要
隨著無人機於國防與空拍領域的應用普及,對無人機具備即時目標偵測的需求日益提升。嵌入式系統因低成本、輕量化及易於部署等特性,特別適合用於無人機作為整合人工智慧的運算平台。本研究開發一套以樹梅派為核心的無人載具行人偵測系統,於校園內蒐集影像並訓練MobileNet V2結合SSD之輕量化模型,經超參數調整後,在測試資料集達到平均精準度96.7%,作為部署於無人機即時物件偵測程式的核心模型。
為提升物件偵測程式於嵌入式系統之執行效能與偵測準確性,本研究利用樹梅派多核心硬體特性,實作平行化實時物件偵測程式,使幀率表現提升到6 fps,相比原有程式速度快50%;同時,搭配整數量化後之MobileNet V2 SSD模型,使平均幀率由原始4 fps顯著提升至11 fps。進一步,針對高解析度輸入影像,提出將影像切分為左右兩區塊,分別同時對兩區塊執行MobileNet V2 SSD模型推論後做影像拼接,輸出最終偵測結果,以保留豐富特徵資訊並減少影像縮放造成之細節損失。為驗證所提方法之效能,於30張解析度1280×720之行人影像進行評估,實驗結果顯示,原始方法之平均精準度(AP)為71.76%,而經改良後提升至87.71%,顯示在算力受限的嵌入式系統上能顯著提升偵測表現。此外,於無人機以每秒3公尺速度移動的實驗情境下,較高的推論幀率由於偵測頻率提升,有助於增進偵測反應的即時性與穩定性,進而降低無人機於快速移動時可能導致的漏偵情形。
整體而言,本研究針對嵌入式系統資源受限的問題,分別提出提升運算效能與偵測準確性的優化方法,驗證其可於無人載具應用中實現有效部署。
為提升物件偵測程式於嵌入式系統之執行效能與偵測準確性,本研究利用樹梅派多核心硬體特性,實作平行化實時物件偵測程式,使幀率表現提升到6 fps,相比原有程式速度快50%;同時,搭配整數量化後之MobileNet V2 SSD模型,使平均幀率由原始4 fps顯著提升至11 fps。進一步,針對高解析度輸入影像,提出將影像切分為左右兩區塊,分別同時對兩區塊執行MobileNet V2 SSD模型推論後做影像拼接,輸出最終偵測結果,以保留豐富特徵資訊並減少影像縮放造成之細節損失。為驗證所提方法之效能,於30張解析度1280×720之行人影像進行評估,實驗結果顯示,原始方法之平均精準度(AP)為71.76%,而經改良後提升至87.71%,顯示在算力受限的嵌入式系統上能顯著提升偵測表現。此外,於無人機以每秒3公尺速度移動的實驗情境下,較高的推論幀率由於偵測頻率提升,有助於增進偵測反應的即時性與穩定性,進而降低無人機於快速移動時可能導致的漏偵情形。
整體而言,本研究針對嵌入式系統資源受限的問題,分別提出提升運算效能與偵測準確性的優化方法,驗證其可於無人載具應用中實現有效部署。
As advancements in hardware continue to drive the development of artificial intelligence (AI), many fields are increasingly utilizing AI applications. At the same time, the growing demand for unmanned aerial vehicles in defense and consumer markets has made integrating AI technologies into unmanned aerial vehicles an inevitable trend. Although embedded systems do not match the computing power of personal computers, their low cost and lightweight design make them suitable for developing various applications and experiments. In light of these factors, this study develops a Raspberry Pi-based system that applies object detection technology to perform humans detection on unmanned aerial vehicles.
Focusing on humans detection, we first collected training images on campus. Considering the limited computing power of embedded systems, we adopted the lightweight MobileNet V2 combined with SSD for training. We optimized multiple model hyperparameters and adjusted default box scales, achieving an average precision of 96.7% on the test dataset ,which served as the core model for the real-time object detection program deployed on UAVs.
To further enhance the system’s performance, we leveraged the Raspberry Pi’s multi-core capability to implement parallelized real-time object detection, increasing the frame rate to 6 fps—a 50% improvement over the original implementation. Furthermore, by using an integer-quantized MobileNet V2 SSD model, the frame rate was even boosted to a maximum of 11 fps, significantly improving real-time performance. In a test where the UAV moved at 3 m/s, the higher frame rate allowed more frequent detections, improving response time and reducing missed detections during rapid UAV movement.
Finally, for high-resolution input images, we divided the image into left and right halves and performed inference on each half simultaneously. The detection results were then merged. Compared to directly downscaling high-resolution images before inference, this method yielded better detection performance. To quantify the improvement, we collected and tested 30 images with a resolution of 1280x720. The original method achieved an average precision (AP) of 71.76 %, while the improved method reached 87.71%, demonstrating that applying parallel image splitting and inference can effectively enhance detection accuracy on resource-contrained embedded systems.
Focusing on humans detection, we first collected training images on campus. Considering the limited computing power of embedded systems, we adopted the lightweight MobileNet V2 combined with SSD for training. We optimized multiple model hyperparameters and adjusted default box scales, achieving an average precision of 96.7% on the test dataset ,which served as the core model for the real-time object detection program deployed on UAVs.
To further enhance the system’s performance, we leveraged the Raspberry Pi’s multi-core capability to implement parallelized real-time object detection, increasing the frame rate to 6 fps—a 50% improvement over the original implementation. Furthermore, by using an integer-quantized MobileNet V2 SSD model, the frame rate was even boosted to a maximum of 11 fps, significantly improving real-time performance. In a test where the UAV moved at 3 m/s, the higher frame rate allowed more frequent detections, improving response time and reducing missed detections during rapid UAV movement.
Finally, for high-resolution input images, we divided the image into left and right halves and performed inference on each half simultaneously. The detection results were then merged. Compared to directly downscaling high-resolution images before inference, this method yielded better detection performance. To quantify the improvement, we collected and tested 30 images with a resolution of 1280x720. The original method achieved an average precision (AP) of 71.76 %, while the improved method reached 87.71%, demonstrating that applying parallel image splitting and inference can effectively enhance detection accuracy on resource-contrained embedded systems.