VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY HUYNH PHUC NGHI FPGA ACCELERATOR FOR DEEP LEARNING NETWORKS APPLIED IN SMART PARKING Major: Computer Science Major code: 8480101 MASTER’S THESIS HO CHI MINH CITY, June 2024 THIS THESIS IS COMPLETED AT HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY – VNU-HCM Supervisor: Assoc. TRAN NGOC THINH Examiner 1: Assoc. TRAN MANH HA Examiner 2: Dr. PHAM TRUNG KIEN This master’s thesis is defended at HCM City University of Technology, VNU- HCM City on June 18, 2024 Master’s Thesis Committee: 1.
TRAN VAN HOAI - Chairman 2. LE TRONG NHAN - Secretary 3. TRAN MANH HA - Reviewer 1 4. PHAM TRUNG KIEN - Reviewer 2 5.
TRAN NGOC THINH - Member Approval of the Chair of Master’s Thesis Committee and Dean of Faculty of Computer Science and Engineering after the thesis being corrected (If any). CHAIR OF THESIS COMMITTEE DEAN OF FACULTY OF COMPUTER SCIENCE AND ENGINEERING VIETNAM NATIONAL UNIVERSITY - HO CHI MINH CITY SOCIALIST REPUBLIC OF VIETNAM HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY Independence – Freedom - Happiness THE TASK SHEET OF MASTER’S THESIS Full name: HUYNH PHUC NGHI Student ID: 2170076 Date of birth: 12/12/1998 Place of birth: Kon Tum Major: Computer Science Major ID: 8480101 I. THESIS TITLE (In Vietnames): Tăng tốc tính toán cho mạng học sâu áp dụng trong bãi đỗ xe thông minh trên FPGA II. THESIS TITLE (In English): FPGA ACCELERATOR FOR DEEP LEARNING NETWORKS APPLIED IN SMART PARKING III.
TASKS AND CONTENTS: • Study smart parking systems • Study embedded Deep Learning model on FPGA edge devices • Study algorithms to accelerate computation on edge devices. • Implement the Deep Learning inference testing to evaluate proposed solutions. THESIS START DAY: 06/02/2023 V. THESIS COMPLETION DAY: 12/05/2024 VI.
TRAN NGOC THINH Ho Chi Minh City, May 2024 SUPERVISOR CHAIR OF PROGRAM COMMITTEE (Full name and signature) (Full name and signature) DEAN OF FACULTY OF COMPUTER SCIENCE AND ENGINEERING (Full name and signature) Ho Chi Minh City University of Technology Faculty of Computer Science and Engineer Acknowledgement We would like to express our deepest gratitude to Assoc. Tran Ngoc Thinh and Assoc. Hoang Trong Thuc for their dedicated time and effort in teaching and guiding us throughout the completion of this thesis. We also want to thank all the teachers at Ho Chi Minh City University of Technology and the Faculty of Com- puter Science and Engineering for imparting valuable knowledge and experiences during our time at the university.
Lastly, our heartfelt thanks go to our families and friends for their unwavering support. Once again, thank you all from the bottom of our hearts! i Ho Chi Minh City University of Technology Faculty of Computer Science and Engineer Abstract Parking guidance systems have become increasingly popular in the develop- ment of smart cities. One crucial element of these systems is the algorithm that allows drivers to find available parking spaces in areas of interest. The traditional method of accomplishing this task involves using neural network classifiers with camera recordings.
In this study, we will develop a deep learning network model that combines convolutional computation and Fast Fourier Transform (FFT) tech- niques to reduce the number of parameters for the network, as well as the amount of network computation when performing inference. The aim is to introduce an alternative approach to Convolutional Neural Networks, which could reduce the edge computation requirements. Then, we implemented a parking application ap- plying the proposed neural network on programmable hardware Xilinx Zynq Ultra- Scale+ MPSoC, which is a low-latency, low-energy, with good accuracy device. The results showed that our solution reduces the model parameter size by about 37% and computation speed by about 9% compared to a CNN model with equivalent architecture.
ii Ho Chi Minh City University of Technology Faculty of Computer Science and Engineer Tóm tắt Hệ thống hướng dẫn đỗ xe dần trở thành công nghệ phổ biến trong sự phát triển của thành phố thông minh. Một yếu tố quan trọng của các hệ thống này là thuật toán cho phép người lái xe tìm chỗ đỗ xe còn trống trong bãi đỗ xe. Phương pháp truyền thống thường dùng trong hệ thống liên quan đến việc sử dụng các bộ phân loại neural network với các dữ liệu ghi được từ camera. Trong luận văn thạc sĩ này, chúng tôi sẽ phát triển mô hình mạng deep learning kết hợp các kỹ thuật tính toán tích chập và Biến đổi Fast Fourier (FFT) để giảm số lượng tham số cho mạng cũng như lượng tính toán mạng khi thực hiện suy luận.
Mục đích là để giới thiệu một cách tiếp cận thay thế cho Convolutional Neural Network, đồng thời làm giảm khối lượng tính toán tại biên. Sau đó, chúng tôi đã triển khai một ứng dụng đỗ xe áp dụng neural network được đề xuất trên phần cứng khả lập trình Xilinx Zynq UltraScale+ MPSoC, đây là một thiết bị có độ trễ thấp, tiêu thụ năng lượng thấp và đáp ứng độ chính xác. Kết quả cho thấy giải pháp của chúng tôi giảm kích thước tham số mô hình khoảng 37% và tốc độ tính toán khoảng 9% so với mô hình CNN có kiến trúc tương đương. iii Ho Chi Minh City University of Technology Faculty of Computer Science and Engineer Protestation "We declare that, unless specifically referenced, the content of this dissertation is original and has not been submitted for any other degree or qualification at any other university, either in whole or in part.
This dissertation is our own work and does not contain any material that is the result of collaboration with others, except as specified in the text and Acknowledgements." Ho Chi Minh City, June 2024 Huynh Phuc Nghi iv TABLE OF CONTENTS Acknowledgement i Abstract ii Protestation iv List of Tables vii List of Figures viii 1 Introduction 1 1.1 Smart Parking: Related work in the world .2 Smart Parking: Related work in Vietnam .3 Smart Parking Systems with Image Processing .4 Smart Parking Systems with FPGA accelerator .2 Management in the smart parking system .3 License plate recognition .4 Vehicle Make and Model Classification. 18 v Ho Chi Minh City University of Technology Faculty of Computer Science and Engineer 3 Background knowledge 19 3.1 Convolutional Neural Network .2 Fourier Transform in CNN layer .1 Fast Fourier Transform - FFT. 40 6 Conclusion 44 7 Publication 45 Bibliography 73 vi LIST OF TABLES 5.1 Details of CNRPark+EXT dataset .2 Details subset of CNRPark dataset .3 Performance of FCV and miniFCV .4 Resource Utilization of FFTConv unit on Ultra96-v2. 43 vii LIST OF FIGURES 2.1 Parking lot occupancy detection based on a heterogeneous platform.2 The proposed system architecture includes Vehicle Detection and Iden- tification .3 Block diagram of the processing unit .4 Proposed system flowchart .5 Management task needs three types of data: (1) Block ID (2) License plate ID (3) Brand, Model, Year .6 The license Plate Recognition task is composed of three consecutive sub-tasks: (1) Vehicle Detection => (2) LP Detection => (3) LP Recog- nition .7 Make and Model Classification three most researched approaches: (1) Global predictor, (2) Part-Based predictor, (3) Attention-Based predictor 18 3.1 Filters are convolued over the image or a feature map in a sliding win- dow fashion .2 Describe reinforcement learning activity flow .3 FFTConv Unit Architechture .4 FPGA SoC Architecture .1 Parking lot captured in CNRPark+EXT dataset.
38 viii Ho Chi Minh City University of Technology Faculty of Computer Science and Engineer 5.2 Parking spaces from the CNR dataset .4 CNV topology on CNRPark dataset[1] .5 Our FCV topology on CNRPark dataset. 42 ix Ho Chi Minh City University of Technology Faculty of Computer Science and Engineer List of short words 1. AI Artificial intelligence 2. ML Machine learning 3.
DL Deep learning 4. CNN Convolutional Neural Network 5. FFT Fast Fourier Transform 6. ALPR Automatic License Plate Recognition 7.
ROI Region Of Interest 8. SoC System on a chip x CHAPTER 1 INTRODUCTION 1.1 Overview In the last decade, there has been a significant increase in the development of Smart Cities worldwide. Among the critical components of Smart City architecture is the Smart parking system, which promises to enhance the quality of life by im- proving transportation and accessibility. Daily urban traffic congestion is mainly caused by drivers searching for parking spaces, accounting for 30% of the conges- tion.
Furthermore, searching for parking space is a daily routine for many people in cities globally, consuming about one million barrels of the world’s oil supply every day. As the world population continues to urbanize, these problems will continue to worsen without a well-planned and convenient solution to manage parking slots. The demand for personal transportation is increasing rapidly as a corollary of the growing economy. According to the Ministry of Industry and Trade of Vietnam, the number of cars in Vietnam will reach 1.8 million vehicles by 2030.
Such a large number entails the management of a large number of these vehicles as well as security issues becoming concerned. In addition, the fact that too many cars are concentrated in big cities such as Hanoi and Ho Chi Minh City, leading to finding parking locations in parking lots is extremely time-consuming and also entails the consequences that vehicle owners have to spend a lot of time to be able to find suitable parking spaces, emissions have also increased. In addition, the lack of 1 Ho Chi Minh City University of Technology Faculty of Computer Science and Engineer synchronization and standardization of ping lots in Vietnam also causes a lot of inadequacies for people in terms of prices, as well as finding suitable parking lots. Parking lot owners are in dire need of a parking system to be able to find suitable parking spaces and manage a large number of vehicles inside their parking lots.
The smart parking system was developed to solve this problem.2 Problem statement The Smart parking system was developed with the goal of setting up synchro- nization of lots, helping users to easily look up information about parking lots, and supporting utilities such as finding parking identifying in the parking lot, thereby contributing to reducing the amount generated, optimizing the parking reducing the time to find a parking position helps reduce the level of emissions to the envi- ronment, promoting the development of the economy and creating a friendly and modern city. This is also an important part of the goal of building a smart city. The smart parking system is no longer a new concept and has been used in de- veloped countries such as the US, UK, and Japan. However, this concept is not yet popular in our country.
There have been a number of smart parking applications implemented by major technology companies cooperating with the Department of Transport, with the goal of strongly supporting parking lookups, reservations, and payments, as well as directions to parking lots. However, the above applications still have relatively many inadequacies: • Most apps use data collected at once, which causes a misrepresentation of parking and occupancy information. • Not linking to the infrastructure in parking lots leads to a lack of accurate, real- time information about the parking lot’s status, which can cause difficulties for management. • Currently, the above applications are only pilot projects; most parking lots are still using cash collection and manual management.
Parking coordinates land use and transportation in urban areas. It is one of the most important assets of road transportation, especially in Vietnam, where road 2 Ho Chi Minh City University of Technology Faculty of Computer Science and Engineer transportation plays a dominant role. In 2019, road vehicles transported about 26.8 % of goods (million tons per km) and about 63.