Crowd Density Estimation and Location Prediction in Public Transport System

DOI : 10.17577/IJERTV11IS070053

Download Full-Text PDF Cite this Publication

Text Only Version

Crowd Density Estimation and Location Prediction in Public Transport System

Deepthi VS1*, Venkat Chavan N2, Sandhya Shanbhag3, Sakshi S Dandappala4

1Assistant Professor, Department of Information Science and Engineering, Global Academy ofTechnology, Bangalore

2,3,4Student, Department of Information Science and Engineering, Global Academy of Technology,Bangalore

Abstract: Important factors in urban is crowd management and management of the transport system for reliable performance of these problems like overcrowding, longer duration of travel might occur. Emerging technologies has given avenue of opportunities to perceive human activities and in digital advancement. Through the project implementation certain issues of the urban public transport are resolved and a smart system with new technologies are developed. The smart system comforts the passengers and the travel agency with certain services like crowd density estimation, location prediction of the bus. scheduling of the bus, travel time from source to destination.

Index words: Crowd Density, Internet of Things(IoT), IR sensors, GPS, Cloud, Travel Time, Location API.


    In this modern generation time is considered very precious waiting for longer hours to travel from one place to other can be avoided using smart transport system. Advanced technology has contributed to the collection of data in urban space. These data are generated from portable devices, non- frequency devices, satellites, transport system and social networking services. Emerging technologies has given avenue of opportunities to understand and predict the urban dynamics in detail with planning of services. Public transport plays a major role in transporting people efficiently from place to place. These are preferred more because of their affordable rates and extensive routes. Bus systems are the back bones of public transport system specially in cities. The possibility of sensing and predicting the crowd is important factor for improving urban mobility, planning safety and tourism activity. It also helps in crowd management and crowd stability analysis. Intelligence system of public transport can result in proper utilization of the time. If the real time data like seating availability routes and so on can be obtained it not only helps scheduler to schedule buses but also helps people to schedule their travel time accordingly.


    This generation frequently uses public transportation, which makes it vital to give users the tools they need to maximize their trip times. Numerous studies on smart public transportation systems, crowd density estimation, and location prediction have been conducted during the past few years. To compute the number of passengers in the bus, authors have provided solutions. IOT, deep learning, WLAN-enabled mobile devices, and other technologies have all been employed to accomplish these tasks. In the

    survey paper [1], reviews of several crowd management and estimation systems along with methodology to predict current location. [2]. uses an off-the-shelf 802.11n Intel 5300 NIC receiver and a single Wi-Fi router to create an indoor crowd density prediction framework based on CSI. The Measured K-NN classification model exhibits the highest accuracy (99.8%) using the training dataset, according to the performance tests.[3] Developed a mobile app that allows administrators to track occupancy, humidity, and pressure inside the vehicle utilizing Wi-Fi-based standalone microcontrollers to read data from sensors and actuators placed at bus stops.[4] a system that senses the inward and outward movement of passengers and updates the passenger count in the cloud by using IR sensors attached to a Node MCU. A GPS module is added to track the buss arrival time. [5] Using cameras, YOLOV3 and CAE are utilized to identify crowd features and gauge the size of the throng inside the bus. The combined usage of these two deep learning models allowed for the prediction of the bus's passenger capacity. The system was put to the test in the morning, afternoon, and at night to examine the data at various times. The bus passenger dataset and the crowded dataset had MAEs of 1.35 and 1.98, respectively. [6] Each car had a tracking device built in, and a program using Google Maps was created to track the whereabouts of the vehicles, collect data in the field, and send data to visual display stations. A Raspberry Pi ARM Cortex A53 CPU with a universal modem was placed in the visual display station and used to facilitate communication between the base station and remote area. The in-vehicle tracking device's core controller, the Atmega 328P, was programmed in the Arduino Integrated Development Environment (AIDE) using the C programming language.

  3. PROPOSED METHODOLOGY Considering all the other literature, we have come up with our methodology. This includes hardware and software modules which plays a major role in better accuracy and flexibility in crowd density estimation and location prediction.

    Figure 1: Proposed Methodology

    The proposed methodology shown in Figure 1 is divided into three modules namely Internet of Things(IoT), Prediction and client user interface which is integrated using cloud server.

    Firstly, module IoT uses the Infrared(IR) Sensors, NodeMCU microcontroller which are connected to cloud to send the IR sensor data with the location where the latitude and longitude is retrieved from the satellite. The cloud server stores the IoT data in the form of JSON/CSV which acts as an input for time travel prediction from one place to another. These outputs are displayed in the custom website created for the client and the travel authorities. The website contains login pages for both passengers and admins/authorities. The passenger home page contains all the stations which connects to the details page that contains the graph and data of crowd inside the bus and crowd outside the bus, a source with destination with calculated travel time and an option for passengers to confirm the pickup. The admin page contains the all the details for their analysis with number of pickup request and an option to add bus according to the requirements. The login details and the credentials of the passengers and authorities are stored in Firebase cloud.


    The below Table 1 and Table 2 refers to the hardware and software requirements respectively.

    Table 1: Hardware Requirements


    Intel Core i3


    4gb or above


    50 gb or above

    Input Device

    Keyboard mouse and hardware ports


    XGA 1024*768 pixels




    IR Sensor


    USB interface and power adopter

    Operating System


    Programming Language

    Python, Embedded C




    Arduino IDE,

    GoogleCollab,Visual Studio

    Application Server



    Cloud,CSV file

    Table 2: Software Requirements


    The density of crowds as prcessed by crowd density estimator extract features directly and map them to different crowd density levels, such as very little, moderate, heavy, and extremely high in the form of graph. The number of persons in each range, as well as the total number of ranges, may vary depending on the application and local conditions.

    Figure 2: Crowd Density Estimation

    Crowd counting in real-world can be conducted by may means like census, using CNN algorithms etc. Another way crowd counting is done using IoT module. Here the IR sensors are connected to NodeMCU through jumper wires to the respective pins. Two IR sensors are used to get the inward and outward movement of the crowd. The sensors when get abstracted with a person will increment the counter by one. First IR sensor is used for inward movement of the crowd inside the bus, second IR sensor is used for outward movement of the crowd outside the bus. A Simple bi- directional counter algorithm is used to get the results of the movement of crowd so that the crowd density estimation is carried out. The data from the sensors is finally uploaded to the ThingSpeak cloud server from which it is displayed in real-time on the custom webpage designed.

  6. LOCATION AND TIME TRAVEL PREDICTION The location of bus using its API's can extract features directly and map them to cloud which helps in predicting travel trip duration which varies.

    Figure 3: Location and travel time prediction

    The Location API which is considered from the NodeMCU microcontroller is uploaded to the ThingSpeak Cloud Server using Wifi.This data is further converted to CSV file for the time travel prediction. The XG Boost classifier is used to predict the travel time from source to destination. The parameters and the attributes considered in the machine learning algorithm are latitude and longitude of the source and destination. The results of the XG boost model is then displayed on the website as shown in Figure 3.


The IoT module will be having hardware components cost analysis of the same and total cost of the model developed is shown in Table 1.


Jumper Wire




USB cable






Table 3: Cost Analysis of hardware components


Hardware components












IR sensor







The results of the proposed model are as follows

Figure 4: Design of the Layout

Figure 5: Working of IR Sensors (inward and outward movement)

Figure 6: Output on Serial Monitor

The following table summarizes the accuracy values for the trained model



MultiLinear Regression


Random Forest


ExtraTree Regressor


XG Boost


Table 4: Comparison of the trained models with their accuracy

Figure 7: Travel Time results using XG Boost

Figure 8: Admin Homepage

Figure 9: Passenger Homepage

Figure 10: Details from Cloud for passengers


Urban planning and development is necessary for country's development and reduces the complication of human activities using new technologies. These give a plethora of opportunities to the public for their travel and time management.

A new approach for crowd density estimation applying internet of things is carried out in respect to the implementation which address the problems of large crowd management. The proposed model can recognize movement of crowd in and out of bus, which in result increases the efficiency in performance.

Location prediction plays an important role in research as it is used in every application. An overview of location prediction ranging from source to destination and the evaluation of prediction of travel time is implemented. The different types of data sources and the location prediction framework are the important steps to consider for implementation.

Finally, future Works can be carried out by adding different resources and features to the existing working model which can be included with [i] Voice system for the specially challenged people [ii] Tracking system for kids and women [iii] Information on daily applications [iv] Conductor-less public transport system [v] Ticket-less travel [vi] Providing insights of the traffic and weather congestion.


[1] Deepthi V S, Venkat Chavan N, Sandhya Shanbhag, Sakshi S Dandappala, Study on Crowd Density Estimation and Location Prediction in Public Transport System, March 2022, IJIRT,

Volume 8 Issue 10 , ISSN: 2349-6002

[2] Chii Chang, Satish Narayana Srirama, Seng Wai Loke, (2018), Indoor people density sensing using Wi-Fi and channel state information, Article in Advances in Modelling and Analysis A · March 2018 DOI: 10.18280/ama_b.610107, March 2018

[3] Miraal Kamal, Manal Atif, Hafsa Mujahid, Tamer Shanableh, A.

R. Al-Ali and Ahmad Al Nabulsi, IoT Based Smart City Bus Stops, Future Internet 2019, 11, 227; doi:10.3390/fi11110227, 26 October 2019

[4] Paras Kadam, Akash Gharat, Manthan Damania, Naveen Vaswani, CROWD ESTIMATION USING SENSORS FOR PUBLIC

TRANSPORT (BUSES), ISO 9001:2008 Certified Journal,

Volume: 07 Issue: 04 Apr 2020

[5] Ya-Wen Hsu, Yen-Wei Chen and Jau-Woei Perng, Estimation of the Number of Passengers in a Bus Using Deep Learning, Sensors 2020, 20, 2178; doi:10.3390/s20082178, 12 April 2020

[6] Onemayin David Jimoh, Lukman Adewale Ajao, Oluwafemi Oyetunde Adeleke, And Stephen Sunday Kolo, (2020), A Vehicle Tracking System Using Greedy Forwarding Algorithms for Public Transportation in Urban Arterial, October 15, 2020.

[7] Arkadiusz Drabicki , Rafa Kucharski , Oded Cats and Andrzej Szarata, Modelling the effects of real-time crowding information in urban public transport systems, TRANSPORTMETRICA A: TRANSPORT SCIENCE, 3 August 2020. [8] Yerkezhan Seitbekova , Bakhytzhan Assilbekov , Iskander

Beisembetov, Alibek Kuljabekov Satbayev University, Almaty, Kazakhstan (2020)The bus arrival time prediction using LSTM neural network and location analysis, 16 November 2020

[9] Marcin Luckner Piotr Wawrzyniak, Izabella Krzeminska (2021) Estimating Population Density Without Contravening Citizen's Privacy: Warsaw Use Case

[10] Kanjo, Eiman; Ortega Anderez, Dario; Anwar, Amna; Al Shami, Ahmad; William, James (2021): CrowdTracing: Overcrowding Clustering and Detection System for Social Distancing,

[11] Adel Hafeezallap, Ahlam Al-Dhamari, And Syed Abd Rahman Abu-Bakar, U-ASD Net: Supervised Crowd Counting Based on Semantic Segmentation and Adaptive Scenario Discovery, 2021.

Digital Object Identifier 10.1109/ACCESS.2021.DOI

[12] Gouiaa, R.; Akhloufi, M.A.; Shahbazi, M. Advances in Convolution Neural Networks Based Crowd Counting and Density Estimation. Big Data Cogn. Comput. 2021, 5, 50. 10.3390/bdcc5040050

[13] Zhang, Y.; Zhao, H.; Duan, Z.; Huang, L.; Deng, J.; Zhang, Q. Congested Crowd Counting via Adaptive Multi-Scale Context Learning. Sensors 2021, 21, 3777. s21113777.

[14] Sultan Daud Khan Yasir Salih Basim Zafar Abdulfattah Noorwali A Dep-Fusion Network for Crowd Counting in High-Density Crowded Scenes, 28 September 2021

[15] Intelligent Transport Systems (ITS) and their benefits – iTS United Kingdom


[16] Transport System Engineering Course by NPTEL

[17] Fleet Management by NexCom, USA management

[18] Public Transport, Observer Research Foundation key-element-of-smartcities/

[19] Taqwa AlHadidi, Hesham A. Rakha, Modeling bus passenger boarding/alighting times: A stochastic approach, 2590-1982/© 2019

[20] Lina Li , A Crowd Density Detection Algorithm for Tourist Attractions Based on Monitoring Video Dynamic Information Analysis, Hindawi Complexity Volume 2020, Article ID 6635446