VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY BUI MINH HIEU RESEARCH AND DEVELOP SOLUTIONS TO ESTIMATE TRAFFIC DENSITY FROM TRAFFIC CAMERAS AT MAIN INTERSECTIONS Major: COMPUTER SCIENCE Major code: 8480101 MASTER’S THESIS HO CHI MINH CITY, month 07 year 2023 THIS THESIS IS COMPLETED AT HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY – VNU-HCM Supervisor: Assoc. D Tran Minh Quang Examiner 1: Assoc. D Nguyen Van Vu Examiner 2: Assoc. D Nguyen Tuan Dang This master’s thesis is defended at HCM City University of Technology, VNU- HCM City on July 11th 2023 Master’s Thesis Committee: (Please write down full name and academic rank of each member of the Master’s Thesis Committee) 1.
D Le Hong Trang 2. D Phan Trong Nhan 3. D Nguyen Van Vu 4. D Nguyen Tuan Dang 5.
D Tran Minh Quang Approval of the Chairman of Master’s Thesis Committee and Dean of Faculty of Computer Science and Engineering after the thesis being corrected (If any). CHAIRMAN OF THESIS COMMITTEE HEAD OF FACULTY OF COMPUTER SCIENCE AND ENGINEERING i 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 : Bui Minh Hieu Student ID : 2170461 Date of birth : 17/02/1997 Place of birth : HCM Major : Computer science Major ID : 8480101 I. THESIS TITLE : RESEARCH AND DEVELOP SOLUTIONS TO ESTIMATE TRAFFIC DENSITY FROM TRAFFIC CAMERAS AT MAIN INTERSECTIONS (NGHIÊN CỨU, XÂY DỰNG CÁC PHÉP ƯỚC LƯỢNG MẬT ĐỘ GIAO THÔNG DỰA VÀO DỮ LIỆU CAMERA Ở NHỮNG NÚT GIAO THÔNG QUAN TRỌNG). TASKS AND CONTENTS : The objective of this thesis is to research and develop a method for estimating traffic density at intersection areas using images or videos.
Accordingly, the tasks involved in this work include determining the calculation method and evaluating traffic density for a given area, comparing existing papers and systems with the proposed method to identify any differences, proposing solutions to address challenges, and advancing the calculation method of the thesis. Additionally, designing a prototype system to demonstrate the functionality will be undertaken. THESIS START DAY : (According to the decision on assignment of Master’s thesis) 06/09/2022 IV. THESIS COMPLETION DAY : (According to the decision on assignment of Master’s thesis) 08/06/2023 V.D Tran Minh Quang HCM City, June 8th 2023 SUPERVISOR CHAIR OF PROGRAM COMMITTEE (Full name and signature) (Full name and signature) HEAD OF FACULTY OF COMPUTER SCIENCE AND ENGINEERING (Full name and signature) ii ACKNOWLEDGEMENT First and foremost, I would want to express my gratitude and extend my heartfelt gratitude to Assoc.
D Tran Minh Quang, the instructor who has completely guided and helped me to accomplish my thesis. I'd want to thank the Computer Science and Engineering instructors, as well as the teachers who generously shared their knowledge with me throughout my time at the HCM city University of Technology. Finally, I'd want to thank my family and friends, who have always supported and encouraged me throughout the process of doing this research. HCM City, June 8th 2023 Bui Minh Hieu iii ABSTRACT Traffic congestion has become a pressing issue, not only for the government but also for the general public, as it directly impacts the quality of life.
It is necessary to research and develop solutions to manage traffic conditions and minimize the impact of congestion. Understanding this, this study provides readers with a method to estimate traffic conditions, specifically traffic density at intersections. To achieve this, the research team divided the task into two main components: vehicle counting and area measurement. Vehicle counting is relatively simple with the assistance of modern technologies and techniques.
In contrast, and notably, this study offers readers methods to calculate the area of a region from images, without relying on camera specifications, based on the concept of object reference. Additionally, through this research, we also present the design of the testing system, the challenges faced, and the accompanying solutions during the design process, as well as the results achieved when applied in a real-world environment. Finally, alongside the expected outcomes, some limitations need to be discussed and addressed in the future. Keyword: Traffic density, Area of a region, Object reference iv TÓM TẮT LUẬN VĂN THẠC SĨ Tắc đường đã trở thành vấn đề cấp bách, không chỉ đối với chính phủ mà còn cả với người dân, vì nó ảnh hưởng trực tiếp đến chất lượng cuộc sống.
Việc nghiên cứu và phát triển các giải pháp quản lý tình trạng giao thông để giảm thiểu tác động của ùn tắc đã trở nên cần thiết hơn bao giờ. Nhằm để hiểu rõ hơn vấn đề đã nêu, nghiên cứu này cung cấp cho độc giả một phương pháp để ước tính, đánh giá điều kiện giao thông, cụ thể là tính mật độ giao thông tại các ngã tư. Để đạt được mục tiêu này, nhóm nghiên cứu đã chia công việc thành hai thành mục chính: đếm số phương tiện và đo diện tích khu vực. Việc đếm số phương tiện khá đơn giản với sự hỗ trợ của các công nghệ và kỹ thuật hiện đại.
Ngược lại, đo diện tích khu vực lại khó khăn hơn và thử thách hơn, do đó nghiên cứu này đề xuất các phương pháp tính toán diện tích của một khu vực từ hình ảnh, mà không dựa vào thông số của máy ảnh, dựa trên khái niệm về tham chiếu đối tượng. Bên cạnh đó, thông qua nghiên cứu này, chúng tôi cũng giới thiệu kiến trúc hệ thống mà chúng tôi thiết kế, các thách thức gặp phải trong quá trình chạy hệ thống và các giải pháp đi kèm, cũng như kết quả đạt được khi áp dụng trong môi trường thực tế. Cuối cùng, bên cạnh các kết quả dự kiến, một số hạn chế cần được thảo luận và giải quyết trong tương lai. Từ khóa: Mật độ giao thông, Diện tích khu vực, Tham chiếu đối tượng v THE COMMITMENT I confirm that this is my research.
The data utilized in the thesis's complete analytic process has a clear and transparent provenance, and it was released in compliance with scientific research standards and ethics. In this thesis, I have presented the results of my study openly and fairly. The thesis results are presented in this report for the first time and have not been published in any earlier thesis. HCM City, June 8th 2023 Bui Minh Hieu vi TABLE OF CONTENTS I.2 Objectives of the topic .3 Scope of study .4 Scientific and practical significances .1 Definition of traffic density .2 Definition of level of service (LOS) .3 Definition of computer vision - machine learning .1 Calculating Haar Features .2 Creating Integral Images .4 Implementing Cascading Classifiers .2 Convolutional neural network models .3 Fully connected layer .2 Bounding box regression .3 Intersection over union (IOU).3 Definition of pixel per meter .1 Traffic situation in Ho Chi Minh City .1 Overview of traffic situation in Ho Chi Minh City .2 Statistics of damage .2 Vehicles detect and count approaches .3 Convolutional neural network .3 Object size measuring methods .1 Math-based calculating method .2 Object reference method .4 Traffic density calculating .1 Calculate traffic density .2 Vehicle counting and categorizing .2 Vehicle classifying and converting .3 Calculate intersection area .1 Distance-based method .2 Mean-based method .1 Experiment setup environment .2 Experimental system architecture .1 Data collection module .2 Training server module .1 Obtain real area approach .2 Calculate error rate.3 Result from training and detecting.4 Result from inferring intersection area .5 Result from evaluating traffic density.
DISCUSSION AND FURTHER RESEARCH .2 Limitation of the study .3 Recommendations for further research .1 Research problem Urbanization is understood as the process of urban expansion expressed as a percentage of the urban area or population over the total area or population of an area or region. Moreover, urbanization is also considered a huge development process, improving quality of life, maintaining a balanced population, controlling population density, etc. By the end of June 2021, the coverage rate of urban zoning planning compared to construction land area in urban areas across the country will reach about 53%, in which 2 special urban areas (Hanoi and Ho Chi Minh City) and 19 grade I cities reach about 80–90%, and in urban areas of grades II, III, and IV, about 40–50%. The detailed coverage rate of urban planning is about 39% compared to the area of construction land [1].
According to several recent reports, the urbanization of Vietnam is at a gradually increasing pace, with the percentage of the country’s coverage reaching 40% in 2019 [2]. This process of urbanization brings many benefits to a country, such as accelerating economic growth, shifting labor and economic structures, and changing population distribution. Cities are not only big consumers of goods but also places to create job opportunities and income for workers [3]. Consequently, the necessity for travel has led to an increase in the number of means of transportation, which has increased traffic congestion as a result of the large cities' rapid population growth.
Traffic jams have always been a nuisance for every citizen in urbanized cities to cope with since it is uncomfortable to travel, and for Vietnam's governments to deal with since it not only costs a lot of money and consideration to establish an effective plan to solve the problem but is also very dangerous if left as is, as transport within Vietnam will be delayed and the economy will be affected due to such circumstances [3]. It is estimated that traffic jams in one of the most urbanized cities, Ho Chi Minh City, can damage the government budget 2 by up to 6 billion USD annually [4] and the budget of the citizens joining the traffic from the waste of gasoline in traffic jams [5]. Furthermore, the government has made enormous investments in the installation of closed-circuit television (CCTV) camera systems, although their full potential has not been realized. As a result, the research team must develop ways to evaluate traffic and utilize the capabilities of these cameras.
Many kinds of metrics are used to measure the level of traffic on roadways and in particular areas. The study team focuses on traffic density characteristics in this study. Two aspects must be considered when calculating traffic density: the number of vehicles and the area of region where the counting takes place, in this case, the junction area. Several studies and modern technology, particularly machine learning, have been committed to dealing with the vehicle counting problem.
On the other hand, calculating the area of an intersection presents a different level of complexity. Each camera has different attributes and is positioned at different heights and locations, making the calculation challenging and requiring significant effort in collecting these parameters. Additionally, for the convenience of applying the solution in practical settings and across the majority of intersections, we aim to find a solution to generalize the aforementioned problem, which means calculating the area without relying on those specific technical specifications. To solve the preceding issue, we propose an approach that needs the use of a reference object [31].
The use of a reference object is a strategy that utilizes the known size of an object in space to estimate the size of another. It was discovered in this study that reference objects have dynamic rather than static attributes. For the computations, we use traffic vehicles that frequently recognized reference objects. Based on that concept, we obtained numerous promising results from this study: - Propose a way to calculate traffic density at intersections.
- Propose a way to count vehicles appropriately. - Propose solutions for calculating the region’s area and evaluate them in real- world circumstances. - Develop an experimental system for practical application.