| 研究生: |
游鎮嘉 You, Jhen-Jia |
|---|---|
| 論文名稱: |
應用分散式推論於嵌入式系統實現人群計數之研究 A Study on Using Distributed Inference in Embedded System to Implement Crowd Counting |
| 指導教授: |
陳敬
Chen, Jing |
| 學位類別: |
碩士 Master |
| 系所名稱: |
電機資訊學院 - 電機工程學系 Department of Electrical Engineering |
| 論文出版年: | 2024 |
| 畢業學年度: | 112 |
| 語文別: | 中文 |
| 論文頁數: | 113 |
| 中文關鍵詞: | 分散式推論 、邊緣運算 、智聯網 、嵌入式系統設備 |
| 外文關鍵詞: | Distributed Inference, Edge computing, AIoT, Embedded System Devices |
| 相關次數: | 點閱:75 下載:2 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
嵌入式系統裝置由於記憶體容量較小、運算能力較弱,硬體資源受限所以現行嵌入式系統裝置產出的資料做機器學習應用,大都把工作卸載至遠端雲端處理,但因為網路頻寬與遠端雲端距離等問題導致嵌入式系統設備資料傳送時間較長,且資料傳送至第三方雲端會有資料隱私性與資料安全的疑慮,造成使用者體驗不佳。
本論文之研究針對嵌入式系統設備藉由分散式處理之概念達到機器學分散式推論之應用,有別於傳統嵌入式系統設備將資料傳送至雲端做機器學習推論。本論文以CSRNet視覺辨識模型分散式推論在同質性的邊緣裝置上,並以socket(TCP/IP)通訊協定讓同質性的邊緣裝置之間傳送切割模型之部分推論結果,裝置之間協同運作完成推論之最終果。
本研究之實作以分散式處理之架構設計為基礎,將視覺辨識之機器學習模型切割後分散在多個嵌入式系統裝置上做推論計算處理,完成辨識影像人數之應用。實作內容包含:(1)讓一場域的攝影機在固定間隔時間拍攝當前攝影鏡頭照攝之畫面;(2)分析嵌入式系統Raspberry Pi 400在運行原有攝影任務下,再運行CSRNet視覺辨識模型之處理器、記憶體情況,並對模型做切割,讓切割之模型在Raspberry Pi 400上即使有其他原本在執行的工作仍可運行;(3)分析CSRNet視覺辨識模型對影像做推論後,產生的多維numpy array傳送在Raspberry Pi 400之間的延遲盡量降低。(5)辨識出當前影像之人數。
Due to limited hardware resources, such as smaller memory capacity and weaker computational power, current embedded system devices typically offload data to remote cloud services for machine learning applications. However, this approach results in longer data transmission times due to distance and network bandwidth issues. In addition, transmitting data to third-party cloud services raises concerns about data privacy and security, which might not be preferable.
This study focuses on applying the concept of distributed processing to achieve distributed inference for machine learning on embedded platform devices. Unlike traditional embedded platforms that send data to the cloud for machine learning inference, this study demonstrates distributed inference using the CSRNet visual recognition model on homogeneous edge devices. It employs the socket (TCP/IP) communication protocol to transmit partial inference results of the segmented model between homogeneous edge devices, enabling collaborative operation to complete the final inference result.
The implementation of this paper is based on the architecture design of distributed processing. Distributing the visual recognition machine learning model across multiple embedded platform devices to perform inference computations and complete the application of recognizing the number of people in images. The implementation includes: (1) Capturing images from cameras in a specific area at fixed intervals, (2) Analyzing the performance of the CSRNet visual recognition model running on the processor and memory of the embedded platform Raspberry Pi 400, and segmenting the model so that the segmented model can run on the Raspberry Pi 400 even if there are other tasks that are originally being performed, (3) Minimizing the delay in transmitting the multi-dimensional Numpy array generated by the CSRNet visual recognition model inference between Raspberry Pi 400 devices, (4) Recognizing the number of people in the current image.
[1] j. Fernandez, Enterprise IoT market, 2024. https://iot-analytics.com/iot-market-size(Accessed August 2 2024).
[2] S. Omar, A. Ngadi, H.H. Jebur, Machine learning techniques for anomaly detection: an overview, International Journal of Computer Applications 79(2) (2013).
[3] M. De Donno, K. Tange, N. Dragoni, Foundations and evolution of modern computing paradigms: Cloud, iot, edge, and fog, IEEE access 7 (2019) 150936-150948.
[4] CLOUDMATRIX, AIO-M1, 2023. https://www.cloudmatrix.com.tw/hardware-aio-m1. (Accessed August 2 2024).
[5] AIMobile, AIM-Edge m1h3, 2023. https://www.aimobile.com.tw/product/edge-m1-h3. (Accessed August 2 2024).
[6] Canon, 邊緣運算影像分析, 2023. https://tw.canon/zh_TW/business/copy-of-paecia%E9%82%8A%E7%B7%A3%E9%81%8B%E7%AE%97%E5%BD%B1%E5%83%8F%E5%88%86%E6%9E%90%E7%B3%BB%E7%B5%B1%E5%AE%A4%E5%85%A7%E7%89%88m1-h3/product. (Accessed August 3 2024).
[7] A. Das, 15 Single Board Computers: Alternatives to Raspberry Pi, 2023. https://itsfoss.com/raspberry-pi-alternatives/. (Accessed August 3 2024).
[8] A. Canziani, A. Paszke, E. Culurciello, An analysis of deep neural network models for practical applications, arXiv preprint arXiv:1605.07678 (2016).
[9] A. Aminifar, M. Shokri, F. Rabbi, V.K.I. Pun, Y. Lamo, Extremely randomized trees with privacy preservation for distributed structured health data, IEEE Access 10 (2022) 6010-6027.
[10] R. Hadidi, B. Asgari, J. Cao, Y. Bae, D.E. Shim, H. Kim, S.-K. Lim, M.S. Ryoo, H. Kim, LCP: A low-communication parallelization method for fast neural network inference in image recognition, arXiv preprint arXiv:2003.06464 (2020).
[11] S. Han, H. Shen, M. Philipose, S. Agarwal, A. Wolman, A. Krishnamurthy, Mcdnn: An approximation-based execution framework for deep stream processing under resource constraints, Proceedings of the 14th Annual International Conference on Mobile Systems, Applications, and Services, 2016, pp. 123-136.
[12] J. Mao, X. Chen, K.W. Nixon, C. Krieger, Y. Chen, Modnn: Local distributed mobile computing system for deep neural network, Design, Automation & Test in Europe Conference & Exhibition (DATE), 2017, IEEE, 2017, pp. 1396-1401.
[13] W. Jiang, S. Lv, Inference acceleration model of branched neural network based on distributed deployment in fog computing, Web Information Systems and Applications: 17th International Conference, WISA 2020, Guangzhou, China, September 23–25, 2020, Proceedings 17, Springer, 2020, pp. 503-512.
[14] Y. Kang, J. Hauswald, C. Gao, A. Rovinski, T. Mudge, J. Mars, L. Tang, Neurosurgeon: Collaborative intelligence between the cloud and mobile edge, ACM SIGARCH Computer Architecture News 45(1) (2017) 615-629.
[15] J. Moon, S. Kum, S. Lee, A heterogeneous IoT data analysis framework with collaboration of edge-cloud computing: Focusing on indoor PM10 and PM2. 5 status prediction, Sensors 19(14) (2019) 3038.
[16] B. Posey, Fog computing, 2020. https://www.techtarget.com/iotagenda/definition/fog-computing-fogging. (Accessed August 2 2024).
[17]Mary, The Difference Between Deep Learning Training and Inference, 2020. https://community.intel.com/t5/Blogs/Tech-Innovation/Artificial-Intelligence-AI/The-Difference-Between-Deep-Learning-Training-and-Inference/post/1335634. (Accessed August 3 2024).
[18] Y. LeCun, L. Bottou, Y. Bengio, P. Haffner, Gradient-based learning applied to document recognition, Proceedings of the IEEE 86(11) (1998) 2278-2324.
[19] A. Krizhevsky, I. Sutskever, G.E. Hinton, ImageNet classification with deep convolutional neural networks, Communications of the ACM 60(6) (2017) 84-90.
[20] Y. Taigman, M. Yang, M.A. Ranzato, L. Wolf, Deepface: Closing the gap to human-level performance in face verification, Proceedings of the IEEE conference on computer vision and pattern recognition, 2014, pp. 1701-1708.
[21] S. Han, J. Pool, J. Tran, W. Dally, Learning both weights and connections for efficient neural network, Advances in neural information processing systems 28 (2015).
[22] D.H. Le, B.-S. Hua, Network pruning that matters: A case study on retraining variants, arXiv preprint arXiv:2105.03193 (2021).
[23] TensorFlow, TensorFlow Lite, 2023. https://www.tensorflow.org/lite/guide?h1=zh- tw&hl=zh-tw. (Accessed August 3 2024).
[24] R. David, J. Duke, A. Jain, V. Janapa Reddi, N. Jeffries, J. Li, N. Kreeger, I. Nappier, M. Natraj, T. Wang, Tensorflow lite micro: Embedded machine learning for tinyml systems, Proceedings of Machine Learning and Systems 3 (2021) 800-811.
[25] J. Dai, Real-time and accurate object detection on edge device with TensorFlow Lite, Journal of physics: conference series, IOP Publishing, 2020, p. 012114.
[26] TensorFlow, Convert Tool, 2023. https://www.tensorflow.org/lite/convert?h1=zh-tw&hl=zh-tw. (Accessed August 3 2024).
[27] P.P. Ray, A review on TinyML: State-of-the-art and prospects, Journal of King Saud University-Computer and Information Sciences 34(4) (2022) 1595-1623.
[28] Baeldung, What is TinyML, 2024. https://www.baeldung.com/cs/tinyml. (Accessed August 4 2024).
[29] R. Hadidi, J. Cao, M.S. Ryoo, H. Kim, Toward collaborative inferencing of deep neural networks on Internet-of-Things devices, IEEE Internet of Things Journal 7(6) (2020) 4950-4960.
[30] K. Simonyan, A. Zisserman, Very deep convolutional networks for large-scale image recognition, arXiv preprint arXiv:1409.1556 (2014).
[31] S.J. Pan, Q. Yang, A survey on transfer learning, IEEE Transactions on knowledge and data engineering 22(10) (2009) 1345-1359.
[32] S. Ren, K. He, R. Girshick, J. Sun, Faster r-cnn: Towards real-time object detection with region proposal networks, Advances in neural information processing systems 28 (2015).
[33] H. Ma, C. Zeng, C.X. Ling, A reliable people counting system via multiple cameras, ACM Transactions on Intelligent Systems and Technology (TIST) 3(2) (2012) 1-22.
[34] Diao, CSRnet, 2018. https://github.com/DiaoXY/CSRnet. (Accessed August 4 2024).
[35] G. Gao, J. Gao, Q. Liu, Q. Wang, Y. Wang, Cnn-based density estimation and crowd counting: A survey, arXiv preprint arXiv:2003.12783 (2020).
[36] R. Perko, M. Klopschitz, A. Almer, P.M. Roth, Critical aspects of person counting and density estimation, Journal of Imaging 7(2) (2021) 21.
[37] S. Laraib, What are the advantages of using Keras for deep learning, 2023. https://www.educative.io/answers/what-are-the-advantages-of-using-keras-for-deep-learning. (Accessed August 4 2024).
[38] Aquaveo, HDF5 Format, 2020. https://www.aquaveo.com/blog/2020/09/02/hdf5-file-format-and-modflow. (Accessed August 4 2024).
[39] Y. Li, X. Zhang, D. Chen, Csrnet: Dilated convolutional neural networks for understanding the highly congested scenes, Proceedings of the IEEE conference on computer vision and pattern recognition, 2018, pp. 1091-1100.
[40] Gravatar, Socket 原理流程, 2022.https://cg2010studio.com/2022/03/17/socket-%E5%8E%9F%E7%90%86%E8%88%87%E6%B5%81%E7%A8%8B/. (Accessed August 4 2024).
[41] OfficialPi, 樹莓派規格, 2023. https://www.raspberrypi.com/products/raspberry-pi-400-unit/. (Accessed August 5 2024).
[42] Debian, Debian bullseye, 2021. https://www.debian.org/releases/bullseye/. (Accessed August 5 2024).
[43] T. Gloe, A. Fischer, M. Kirchner, Forensic analysis of video file formats, Digital Investigation 11 (2014) S68-S76.
[44] T. Sharma, Jupyter Notebook優點, 2023. https://python.plainenglish.io/advantages-of-jupyter-notebook-5e41497bb4b2. (Accessed August 5 2024).
[45] J. Hunter, Using Matplotlib, 2002. https://matplotlib.org/stable/users/index.html. (Accessed August 5 2024).
[46] M. Waskom, Seaborn Statistical Data Visualization, 2019. https://seaborn.pydata.org/. (Accessed August 5 2024).
[47] Bryevdv, Bokeh, 2019. https://docs.bokeh.org/en/latest/. (Accessed August 5 2024).
[48] Zhang, ShanghaiTech Dataset, 2018. https://paperswithcode.com/dataset/shanghaitech. (Accessed August 13 2024).
[49] C. Zhang, H. Li, X. Wang, X. Yang, Cross-scene crowd counting via deep convolutional neural networks, Proceedings of the IEEE conference on computer vision and pattern recognition, 2015, pp. 833-841.
[50] Y. Zhang, D. Zhou, S. Chen, S. Gao, Y. Ma, Single-image crowd counting via multi-column convolutional neural network, Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, pp. 589-597.
[51] V.A. Sindagi, V.M. Patel, Generating high-quality crowd density maps using contextual pyramid cnns, Proceedings of the IEEE international conference on computer vision, 2017, pp. 1861-1870.
[52] Chavdarova, Wildtrack Dataset, 2018. https://paperswithcode.com/dataset/wildtrack. (Accessed August 5 2024).
[53] LCTT, nload 即時監控網路流量, 2014. https://linux.cn/article-2871-1.html. (Accessed August 5 2024).