Road Type Classification of Driving Data Using Neural Networks
Abstract
:1. Introduction
Literature Review
- We suggest a data logging method that works in all internal combustion engines or hybrid vehicles and can provide labeled data to verify the accuracy of the methods;
- We propose a neural network-based road type classification method for universal driving data that outperforms existing state-of-the-art methods on our dataset;
- We have shown that different techniques can be used to improve accuracy further and reduce the number of undesired misclassifications;
- Our proposed method classifies only by speed so that it can be applied to speed profiles recorded by arbitrary methods in arbitrary vehicles.
2. Data Logging
2.1. Hardware and Software
- Road type: none, city, rural, or highway coded as integer from 0 to 3, respectively.
- Traffic: binary, indicates slow driving sections, for example, traffic jam on a highway.
- Rain: binary, indicates slow driving sections due to precipitation.
- Night: binary, indicates slow driving sections due to limited visibility.
2.2. Logging Results
3. Methods
3.1. Data Cleaning
- 0: Undefined (initial state; indicates special cases)
- 1: City
- 2: Rural
- 3: Highway
3.2. Conventional Method
Algorithm 1. The algorithm of the first phase of the conventional method | |
1: | D: set of the measured driving cycles splitting_time = 40 s |
2: | S ← Split the elements of D into segments of length splitting_time |
3: | S’← Delete the whole zero speed elements of S’ |
4: | M ← Maximum speed for each element of S’ |
5: | N ← Average non-idle speed for each element of S’ |
6: | G ← Average speed gradient for each element of S’ |
7: | L ← Modus of the labels for each element of S’ |
8: | |
9: | C ← Calculate the classes |
3.3. Proposed Method
3.3.1. Data Preprocessing
3.3.2. Neural Networks
- Metric: accuracy
- Loss: categorical cross-entropy
- Optimizer: adam
- Epoch number: 5000
- Batch size: 5
- Train–Validation ratio: 80–20%
4. Results
4.1. Conventional Method
4.2. Base NN Model
4.3. Cross-Validation
4.4. Weighted Loss Function
4.5. Cross-Validation and Weighted Loss Function
5. Discussion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
ADAS | Advanced Driver-Assistance System |
ELKS | Emergency Lane Keeping Systems |
MCU | Motor Control Unit |
EV | Electric Vehicle |
ANN | Artificial Neural Network |
CAN | Controller Area Network |
k-NN | k-Nearest Neighbor |
SVM | Support Vector Machine |
CNN | Convolutional Neural Network |
GMM | Gaussian Mixture Model |
OBD | On-board Diagnosis |
GBM | Gradient Boosting Machine |
ICE | Internal Combustion Engine |
AI | Artificial Intelligence |
ECU | Electronic Control Unit |
MAP | Mass Air Pressure |
MAF | Mass Air Flow |
References
- Boltachev, E. Potential cyber threats of adversarial attacks on autonomous driving models. J. Comput. Virol. Hacking Tech. 2024, 20, 363–373. [Google Scholar] [CrossRef]
- Council Regulation (EC). Commission Implementing Regulation (EU) 2021/646 of 19 April 2021 laying down rules for the application of Regulation (EU) 2019/2144 of the European Parliament and of the Council as regards uniform procedures and technical specifications for the type-approval of motor vehicles with regard to their emergency lane-keeping systems (ELKS). Off. J. Eur. Union 2021, 64, 31–54. [Google Scholar]
- Zöldy, M.; Baranyi, P.; Török, Á. Trends in Cognitive Mobility in 2022. Acta Polytech. Hung. 2024, 21, 189–202. [Google Scholar] [CrossRef]
- Doniec, R.; Piaseczna, N.; Li, F.; Duraj, K.; Pour, H.H.; Grzegorzek, M.; Mocny-Pachońska, K.; Tkacz, E. Classification of Roads and Types of Public Roads Using EOG Smart Glasses and an Algorithm Based on Machine Learning While Driving a Car. Electronics 2022, 11, 2960. [Google Scholar] [CrossRef]
- Hanine, M.; Boutkhoum, O.; El Barakaz, F.; Lachgar, M.; Assad, N.; Rustam, F.; Ashraf, I. An Intuitionistic Fuzzy Approach for Smart City Development Evaluation for Developing Countries: Moroccan Context. Mathematics 2021, 9, 2668. [Google Scholar] [CrossRef]
- Horvath, P.; Nyerges, A. Design aspects for in-vehicle IPM motors for sustainable mobility. Cogn. Sustain. 2022, 1, 1–14. [Google Scholar] [CrossRef]
- Li, Y.; Zhao, W.; Fan, H. A Spatio-Temporal Graph Neural Network Approach for Traffic Flow Prediction. Mathematics 2022, 10, 1754. [Google Scholar] [CrossRef]
- Apanaviciene, R.; Vanagas, A.; Fokaides, P.A. Smart Building Integration into a Smart City (SBISC): Development of a New Evaluation Framework. Energies 2020, 13, 2190. [Google Scholar] [CrossRef]
- Jneid, M.S.; Harth, P. Radial Flux In-Wheel-Motors for Vehicle Electrification. Cogn. Sustain. 2024, 3, 16–33. [Google Scholar] [CrossRef]
- Ruggieri, R.; Ruggeri, M.; Vinci, G.; Poponi, S. Electric Mobility in a Smart City: European Overview. Energies 2021, 14, 315. [Google Scholar] [CrossRef]
- Salmeron-Manzano, E.; Manzano-Agugliaro, F. The Electric Bicycle: Worldwide Research Trends. Energies 2018, 11, 1894. [Google Scholar] [CrossRef]
- Lim, H.S.M.; Taeihagh, A. Autonomous Vehicles for Smart and Sustainable Cities: An In-Depth Exploration of Privacy and Cybersecurity Implications. Energies 2018, 11, 1062. [Google Scholar] [CrossRef]
- Bianchi, D.; Epicoco, N.; Di Ferdinando, M.; Di Gennaro, S.; Pepe, P. Physics-Informed Neural Networks for Unmanned Aerial Vehicle System Estimation. Drones 2024, 8, 716. [Google Scholar] [CrossRef]
- Ficzere, P. The role of artificial intelligence in the development of rail transport. Cogn. Sustain. 2023, 2, 1–5. [Google Scholar] [CrossRef]
- Pleshakova, E.; Osipov, A.; Gataullin, S.; Gataullin, T.; Vasilakos, A. Next gen cybersecurity paradigm towards artificial general intelligence: Russian market challenges and future global technological trends. J. Comput. Virol. Hacking Tech. 2024, 20, 429–440. [Google Scholar] [CrossRef]
- Jansen, P.; van der Mark, W.; van den Heuvel, J.C.; Groen, F.C.A. Colour based off-road environment and terrain type classification. In Proceedings of the 8th International IEEE Conference on Intelligent Transportation Systems, Vienna, Austria, 13–16 September 2005; pp. 216–221. [Google Scholar]
- Rahi, A.; Elgeoushy, O.; Syed, S.H.; El-Mounayri, H.; Wasfy, H.; Wasfy, T.; Anwar, S. Deep Semantic Segmentation for Identifying Traversable Terrain in Off-Road Autonomous Driving. IEEE Access 2024, 12, 162977–162989. [Google Scholar] [CrossRef]
- Shon, H.; Choi, S.; Huh, K. Real-Time Terrain Condition Detection for Off-Road Driving Based on Transformer. IEEE Trans. Intell. Transp. Syst. 2024, 25, 11726–11738. [Google Scholar] [CrossRef]
- Paraphantakul, C. Review of Worldwide Road Classification Systems. In Proceedings of the 9th National Transportation Conference, Bangkok, Thailand, 20–21 November 2014. [Google Scholar]
- Tang, I.; Breckon, T.P. Automatic Road Environment Classification. IEEE Trans. Intell. Transp. Syst. 2011, 12, 476–484. [Google Scholar] [CrossRef]
- Slavkovikj, V.; Verstockt, S.; De Neve, W.; Van Hoecke, S.; Van De Walle, R. Image-Based Road Type Classification. In Proceedings of the 22nd International Conference on Pattern Recognition, Stockholm, Sweden, 24–28 August 2014; pp. 2359–2364. [Google Scholar] [CrossRef]
- Seeger, C.; Müller, A.; Schwarz, L.; Manz, M. Towards Road Type Classification with Occupancy Grids. In Proceedings of the IEEE Intelligent Vehicles Symposium 2016 Workshop: DeepDriving—Learning Representations for Intelligent Vehicles, Gothenburg, Sweden, 19–22 June 2016. [Google Scholar]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. In Proceedings of the Advances in Neural Information Processing Systems, Lake Tahoe, NV, USA, 3–6 December 2012. NIPS 25. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. In Proceedings of the 3rd International Conference on Learning Representations, San Diego, CA, USA, 7–9 May 2015. ICLR 2015. [Google Scholar]
- Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015. CVPR 2015. [Google Scholar]
- Saleh, Y.; Otoum, N. Road-Type Classification through Deep Learning Networks Fine-Tuning. J. Inf. Knowl. Manag. 2020, 19, 2040020. [Google Scholar] [CrossRef]
- Mohammad, M.A.; Kaloskampis, I.; Hicks, Y. Evolving GMMs for road-type classification. In Proceedings of the IEEE International Conference on Industrial Technology (ICIT), Seville, Spain, 17–19 March 2015; pp. 1670–1673. [Google Scholar] [CrossRef]
- Brostow, G.J.; Fauqueur, J.; Cipolla, R. Semantic object classes in video: A high-definition ground truth database. Pattern Recognit. Lett. 2009, 30, 88–97. [Google Scholar] [CrossRef]
- Zheng, Q.; Tian, X.; Yang, M.; Su, H. CLMIP: Cross-layer manifold invariance based pruning method of deep convolutional neural network for real-time road type recognition. Multidimens. Syst. Signal Process. 2021, 32, 239–262. [Google Scholar] [CrossRef]
- Murphey, Y.L.; Chen, Z.; Kiliaris, L.; Park, J.; Kuang, M.; Masrur, A.; Phillips, A. Neural learning of driving environment prediction for vehicle power management. In Proceedings of the 2008 IEEE International Joint Conference on Neural Networks (IEEE World Congress on Computational Intelligence), Hong Kong, China, 1–8 June 2008; pp. 3755–3761. [Google Scholar] [CrossRef]
- Carlson, T.R.; Austin, R.C. Development of Speed Correction Cycles; Report SR97-04-01; U.S. Environmental Protection Agency: Washington, DC, USA, 1997. [Google Scholar]
- Daniel, R.; Brooks, T.; Pates, D. Analysis of US and EU Drive Styles to Improve Understanding of Market Usage and the Effects on OBD Monitor IUMPR; SAE Technical Papers; SAE International: Warrendale, PA, USA, 2009; p. 2009-01-0236. [Google Scholar] [CrossRef]
- Taylor, P.; Anand, S.S.; Griffiths, N.; Adamu-Fika, F.; Dunoyer, A.; Popham, T. Road Type Classification through Data Mining. In Proceedings of the 4th International Conference on Automotive User Interfaces and Interactive Vehicular Applications, New York, NY, USA, 17–19 October 2012; AutomotiveUI ’12. pp. 233–240. [Google Scholar] [CrossRef]
- Lee, C.; Öberg, P. Classification of Road Type and Driving Style Using OBD Data; SAE Technical Papers; SAE International: Warrendale, PA, USA, 2015; p. 2015-01-0979. [Google Scholar] [CrossRef]
- Hadrian, A.; Vainshtein, R.; Shapira, B.; Rokach, L. DeepCAN: Hybrid Method for Road Type Classification Using Vehicle Sensor Data for Smart Autonomous Mobility. IEEE Trans. Intell. Transp. Syst. 2023, 24, 11756–11772. [Google Scholar] [CrossRef]
- Hungarian Central Statistical Office. 24.1.1.25. Passenger Car Fleet by Make and Fuel Consumption. Available online: https://www.ksh.hu/stadat_files/sza/en/sza0025.html (accessed on 2 December 2024).
- ISO 15031-5; Road Vehicles—Communication Between Vehicle and External Equipment for Emissions-Related Diagnostics—Part 5: Emissions-Related Diagnostic Services. International Organization for Standardization: Geneva, Switzerland, 2006.
- Council Directive (EC). DIRECTIVE 98/69/EC OF THE EUROPEAN PARLIAMENT AND OF THE COUNCIL of 13 October 1998 relating to measures to be taken against air pollution by emissions from motor vehicles and amending Council Directive 70/220/EEC. Off. J. Eur. Communities 1998, 23, 126–181. [Google Scholar]
- Tollner, D.; Zöldy, M. Investigating the Energetics of Electric Vehicles, based on Real Measurements. Acta Polytech. Hung. 2024, 21, 235–252. [Google Scholar] [CrossRef]
- Tollner, D.; Nyerges, Á.; Jneid, M.S.; Geleta, A.; Zöldy, M. How Do We Calibrate a Battery Electric Vehicle Model Based on Controller Area Network Bus Data? Sensors 2024, 24, 4637. [Google Scholar] [CrossRef] [PubMed]
- Han, J.; Kamber, M.; Pei, J. 3.3 Data integration and transformation. In Data Mining: Concepts and Techniques; Morgan Kaufmann Publishers Inc.: San Francisco, CA, USA, 2006; pp. 8–10. [Google Scholar]
Data Type | Method | Classes | Authors and Year |
---|---|---|---|
Image | ANN k-NN | off-road, urban road, trunk road, motorway | Tang et al. [20] 2011 |
Image | k-means SVM | paved, unpaved | Slavkovikj et al. [21] 2014 |
Image | SVM CNN | parking area, urban, highway, freeway | Seeger et al. [22] 2016 |
Image | CNN | concrete, rough, sandy roads | Saleh et al. [26] 2020 |
Image | GMM | off-road, urban road, trunk road, motorway | Mohammad et al. [27] 2015 |
Image | CNN | off-road, urban road, trunk road, motorway | Zheng et al. [28] 2021 |
Driving data (unique) | ANN | local, arterial, freeway ramp, freeway | Murphey et al. [30] 2008 |
Driving data (unique) | Random forest | car park, local roadway, main roads, motorway | Taylor et al. 2012 [33] |
Driving data (unique) | GBM CNN | residential road, secondary road, motorway | Hadrian et al. [35] 2023 |
Driving data (universal) | Conventional | city road, rural road, highway | Daniel et al. 2009 [32] |
Driving data (universal) | Conventional | city road, rural road, highway | Lee et al. [34] 2015 |
Driving data (universal) | ANN | city road, rural road, highway | Tollner et al. 2025 |
Parameter | Parameter ID | Unit | Resolution |
---|---|---|---|
Speed | 13 | km/h | 1 |
Engine speed | 12 | rpm | 1/4 |
Engine load | 4 | % | 1/2.55 |
Throttle position | 17 | % | 1/2.55 |
Engine run time | 31 | s | 1 |
Ambient temperature | 70 | °C | 1 |
Engine coolant temperature | 5 | °C | 1 |
Mass air pressure (MAP) | 11 | kPa | 1 |
Mass air flow (MAF) | 16 | g/s | 1/100 |
Total | Number of cycles | 266 |
Distance | 6557 km | |
Duration | 119.96 h | |
Average | Speed | 54.6 km/h |
Distance | 24.65 km | |
Duration | 26.78 min | |
Road Type | City | 55.9% |
Rural | 23.9% | |
Highway | 20.2% | |
Environment | Traffic | 3.22% |
Rain | 2.42% | |
Night | 6.59% |
Road Type | Full Dataset | Reduced Dataset | ||
---|---|---|---|---|
Number of Subcycles | Ratio | Number of Subcycles | Ratio | |
City | 1147 | 51% | 527 | |
Rural | 575 | 26% | 527 | |
Highway | 527 | 23% | 527 | |
Total | 2249 | 100% | 1581 | 100% |
Run | Reduced Dataset | Full Dataset | |
---|---|---|---|
Train Accuracy | Validation Accuracy | Evaluation Accuracy | |
1 | 100% | 86.35% | 93.44% |
2 | 100% | 84.76% | 93.62% |
3 | 99.84% | 86.03% | 92.69% |
Average: | 99.95% | 85.71% | 93.25% |
Run | Reduced Dataset | Full Dataset | ||
---|---|---|---|---|
Cross-Validation | Final Model | Evaluation Acc. | ||
Avg Train Acc. | Avg Validation Acc. | Train Acc. | ||
1 | 99.94% | 83.65% | 99.94% | 95.95% |
2 | 99.92% | 85.42% | 99.81% | 95.51% |
3 | 99.92% | 84.60% | 99.87% | 95.86% |
Average: | 99.93% | 84.56% | 99.87% | 95.77% |
Prediction | ||||
---|---|---|---|---|
City | Rural | Highway | ||
Ground Truth | City | 1077 47.40% | 71 3.13% | 13 0.57% |
Rural | 17 0.75% | 542 23.86% | 20 0.88% | |
Highway | 16 0.70% | 8 0.35% | 508 22.36% |
Prediction | ||||
---|---|---|---|---|
City | Rural | Highway | ||
Ground Truth | City | 499 44.40% | 24 2.14% | 11 0.98% |
Rural | 32 2.85% | 260 23.13% | 19 1.69% | |
Highway | 5 0.44% | 19 1.69% | 255 22.68% |
1 | 1 | 1 |
10 | 1 | 1 |
50 | 10 | 1 |
Run | Reduced Dataset | Full Dataset | |
---|---|---|---|
Train Accuracy | Validation Accuracy | Evaluation Accuracy | |
1 | 98.89% | 85.40% | 92.21% |
2 | 98.97% | 86.30% | 92.75% |
3 | 98.57% | 86.67% | 93.31% |
Average: | 98.81% | 86.12% | 92.76% |
Prediction | ||||
---|---|---|---|---|
City | Rural | Highway | ||
Ground Truth | City | 1074 42.27% | 91 4.01% | 12 0.53% |
Rural | 14 0.62% | 541 23.81% | 23 1.01% | |
Highway | 6 0.26% | 6 0.26% | 505 22.23% |
Run | Reduced Dataset | Full Dataset | ||
---|---|---|---|---|
Cross-Validation | Final Model | Evaluation Acc. | ||
Avg Train Acc. | Avg Validation Acc. | Train Acc. | ||
1 | 98.84% | 86.38% | 98.67% | 96.21% |
2 | 99.03% | 84.67% | 98.73% | 95.60% |
3 | 99.07% | 85.61% | 99.24% | 95.69% |
Average: | 98.98% | 85.55% | 98.88% | 95.83% |
Prediction | ||||
---|---|---|---|---|
City | Rural | Highway | ||
Ground Truth | City | 1112 48.94% | 47 2.07% | 4 0.18% |
Rural | 10 0.44% | 563 24.78% | 13 0.57% | |
Highway | 4 0.18% | 8 0.35% | 511 22.49% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tollner, D.; Zöldy, M. Road Type Classification of Driving Data Using Neural Networks. Computers 2025, 14, 70. https://doi.org/10.3390/computers14020070
Tollner D, Zöldy M. Road Type Classification of Driving Data Using Neural Networks. Computers. 2025; 14(2):70. https://doi.org/10.3390/computers14020070
Chicago/Turabian StyleTollner, Dávid, and Máté Zöldy. 2025. "Road Type Classification of Driving Data Using Neural Networks" Computers 14, no. 2: 70. https://doi.org/10.3390/computers14020070
APA StyleTollner, D., & Zöldy, M. (2025). Road Type Classification of Driving Data Using Neural Networks. Computers, 14(2), 70. https://doi.org/10.3390/computers14020070