Embedded Non-Imaging Near-Miss Detection for Road Users: ToF–IMU Sensor Fusion, TinyML Deployment, and Temporal Benchmarking

Published: 3 November 2026| Version 1 | DOI: 10.17632/5nd2tksg2b.1
Contributor:
Kaveendran Balasubramaniam

Description

This dataset presents sensor measurements collected using ProxiTof, a multi-sensor proximity detection system developed to identify potential near-miss events involving cyclists. The system combines a Time-of-Flight (ToF) distance sensor and an inertial measurement unit (IMU) to monitor surrounding objects and device movement. The collected data are intended to support research on cyclist safety, proximity monitoring, and machine learning-based event detection. The sensing system consists of an ESP32-S3 microcontroller, a VL53L8CX ToF sensor, and a BNO08x IMU. The ToF sensor provides 16 distance measurements from a 4 × 4 detection grid, while the IMU records nine measurements representing orientation, acceleration, and angular velocity. Data are recorded continuously at a configurable interval of approximately 16 ms and stored in CSV format on a microSD card. Each recording includes timestamps, sensor measurements, calculated movement parameters, and manually assigned event labels. Potential near-miss events are identified during data collection using a manual input button. These annotations distinguish flagged events from unflagged observations and provide labels for supervised machine learning. The recorded measurements are subsequently processed using Python to extract 25 sensor features, normalize the data, and prepare training and testing datasets. The processed data can be used to train and evaluate classification models, including neural networks, for distinguishing potential near-miss events from normal riding conditions. The dataset provides a basis for studying relationships between distance measurements, device movement, and potential cyclist safety events. It can also support the development, evaluation, and comparison of alternative machine learning methods for real-time proximity detection and embedded sensing applications.

Files

Steps to reproduce

Data Collection The data are collected using a proximity detection device built around an ESP32-S3 microcontroller, a VL53L8CX Time-of-Flight (ToF) sensor, and a BNO08x inertial measurement unit (IMU). Additional components include a DS3231 real-time clock module for timekeeping, a microSD card for data storage, and a push button for manual event labeling. Before data collection, the sensors are connected to the microcontroller and initialized using the device firmware. The microSD card is formatted using the FAT32 file system, and the system time is synchronized to maintain consistent recording timestamps. The device configuration allows adjustment of the recording interval and detection parameters. Once initialized, the system automatically records measurements from the ToF sensor and IMU. The ToF sensor captures distance measurements across 16 detection zones, while the IMU provides orientation, acceleration, and angular velocity measurements. Data are continuously recorded at a configured interval of approximately 16 ms and saved as timestamped CSV files on the microSD card. During experimental operation, the device is used to monitor surrounding objects and movement conditions. Potential near-miss events are manually identified by pressing the designated button when an event is observed. The system records these annotations in the `flag_manual` column, where 1 represents a manually flagged event and 0 represents an unflagged observation. These labels are subsequently used to prepare the classification dataset. Data Processing After data collection, the recorded CSV files are transferred to a computer for processing and analysis. The data are processed using Python, with 16 distance measurements and nine IMU measurements selected as the 25 input features for machine learning. The documented processing procedure prepares the classification labels, applies feature normalization, and divides the dataset into training and testing subsets using an 80:20 ratio. The resulting feature arrays and labels are stored in NumPy format (`.npy`), while the normalization parameters are saved separately to maintain consistency during subsequent analysis. The processed dataset can then be used to train and evaluate machine learning models for binary classification of manually flagged near-miss events and unflagged observations. Model performance can be examined using classification metrics and graphical representations, including confusion matrices. Researchers may use the original CSV recordings for independent data processing or the prepared datasets for developing and comparing alternative classification models. The same collection procedure can also be repeated using a comparable sensor configuration to obtain additional measurements under different experimental conditions.

Institutions

Categories

Signal Processing, Algorithms, Machine Learning, Road Traffic Safety

Licence