A lightweight hybrid machine and deep learning framework via contrastive learning for audio-based multiclass vehicle counting
• Accurate and privacy-preserving audio-based vehicle counting for edge deployment. • Contrastive one-vs-one framework converts imbalanced to balanced binary tasks. • Engine harmonics and tire–road friction noise as primary cues for heavy-vehicle detection. • Lightweight machine learning achieving superior performance with reduced complexity. • First cross-dataset validation identifies generalization challenges for future work. Traditional multiclass vehicle counting relies on inductive loop detectors and camera-based systems, which present limitations including invasive installation, high maintenance costs, privacy concerns, weather vulnerability, and computational demands that hinder edge deployment. Audio-based methods offer cost-effective, privacy-preserving, all-weather and computationally lightweight alternative. However, existing approaches face significant challenges in handling class imbalance, resulting in poor performance on minority classes, particularly for heavy vehicles, which have a substantial impact on traffic management due to their disproportionate road impact. This study proposes a lightweight machine-learning-based pairwise classification framework that employs the CatBoost algorithm with optional diffusion-based augmentation to address class imbalance. The framework trains multiple binary classifiers with adaptive feature selection across six domains, incorporating synthetic samples for class pairs with insufficient or imbalanced data. This enables the training of high-performance binary classifiers, which are then aggregated into the final multiclass framework. Evaluation on three benchmark datasets, each with manually annotated ground truth labels, demonstrates consistent improvements over state-of-the-art methods under the same evaluation metrics: IDMT achieves an overall F1-score of 89.58% (+10.2 percentage points (pp) from a Transformer), with bus class improving from 42.86% to 77.78%; MELAUDIS achieves +4.5pp recall over VGGNet, and MAVD achieves an F1-score of +7.3pp over Random Forest.The proposed framework deploys only lightweight CatBoost classifiers, with the smallest model at 51 KB and ensemble inference latency of 26–127 ms on Raspberry Pi 4, enabling cost-effective and privacy-preserving vehicle monitoring across diverse road environments from highways to local roads that have lacked systematic surveillance. This provides the granular traffic data needed for road safety planning, infrastructure maintenance, and both short and long-term transportation management.
Authors
- Saeed Asadi Bagloee (ORCID: https://orcid.org/0000-0001-6078-6314)
- Hailey Hyosun Yoo
- Majid Sarvi
Institutions
- The University of Melbourne (AU)
- Australian Urban Research Infrastructure Network (AU)
Publication Details
- Journal
- Transportation Research Part C Emerging Technologies
- Published
- 2026-03-17
- DOI
- https://doi.org/10.1016/j.trc.2026.105631
- Primary Topic
- Traffic Prediction and Management Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00