Deep Learning-Based Traffic Prediction System Using RNN, GRU, and LSTM in a Django Web Framework

Authors

  • CHITTULURI SAI KIRAN,V.Sarala Author

DOI:

https://doi.org/10.64751/

Keywords:

Traffic Prediction, Deep Learning, RNN, GRU, LSTM, Time Series Forecasting, Smart Transportation, Machine Learning, Django Web Application, Neural Networks

Abstract

Traffic congestion is a growing concern in urban environments, leading to increased
travel time, fuel consumption, and environmental pollution. Accurate traffic prediction
plays a crucial role in intelligent transportation systems by enabling better planning and
management of road networks. This project presents a deep learning-based traffic
prediction system implemented using Recurrent Neural Network (RNN), Gated Recurrent
Unit (GRU), and Long Short-Term Memory (LSTM) models within a Django web
framework.The system utilizes historical traffic data containing timestamps and vehicle
counts to train predictive models. The dataset is preprocessed by extracting temporal
features such as year, month, day, and hour from datetime values. These features are
normalized using MinMaxScaler to improve model performance. A sliding window
approach is applied to transform the data into sequences suitable for time-series
forecasting.Three deep learning models—Simple RNN, GRU, and LSTM—are
implemented and trained using Keras. Each model learns temporal dependencies in traffic
flow patterns. The trained models are saved and reused for prediction to improve
efficiency. The performance of each model is evaluated using Mean Squared Error
(MSE), allowing comparison of prediction accuracy.
The Django web interface provides functionality to train models, visualize predictions,
and generate traffic forecasts for different time intervals. The system predicts hourly
traffic levels and categorizes them into Low, Mild, and High congestion levels. Graphical
visualizations using Matplotlib enhance interpretability by comparing actual and
predicted traffic values.Among the models, LSTM demonstrates superior performance
due to its ability to capture long-term dependencies and handle vanishing gradient
problems effectively. The system enables users to interactively predict traffic conditions
for different areas and time slots, supporting better decision-making

Additional Files

Published

2026-04-04

How to Cite

CHITTULURI SAI KIRAN,V.Sarala. (2026). Deep Learning-Based Traffic Prediction System Using RNN, GRU, and LSTM in a Django Web Framework. International Journal of Data Science and IoT Management System, 5(2), 496-507. https://doi.org/10.64751/

Similar Articles

1-10 of 579

You may also start an advanced similarity search for this article.