# Internet of Things (IoT)-Based Solutions for Uneven Roads and Balanced Vehicle Systems Using YOLOv8
## 4 Dataset and Preprocessing  
### Dataset Label Taxonomy and Configuration  
To enable road anomaly detection, we developed a dataset with nine fine-grained classes categorized by type (Pothole, Edge Cracking, Ravelling) and severity (Low, Medium, High). Organized using YOLO conventions and a custom YAML configuration, the dataset includes detailed labels, split ratios, and reproducibility metadata, as mentioned in Listing 4. This approach enhances traditional binary systems for severity-aware detection and prioritizes real-world maintenance. \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Component** & **Qty** & **Power (mW)** & **Unit Cost (BDT)** & **Total Cost (BDT)** & **Role** \\ \hline ESP32 Microcontroller & 1 & 250 & 510 & 510 & Central control; connectivity \\ GY-521 Sensor & 1 & 3 & 250 & 250 & Terrain sensing (IMU) \\ Ultrasonic Sensor & 2 & 30 & 100 & 200 & Obstacle/surface detection \\ Servo Motor (SG90) & 4 & 1000 & 130 & 520 & Suspension actuation \\ GPS Module & 1 & 50 & 450 & 450 & Geo-tracking \\ GSM Module & 1 & 1000 & 350 & 350 & Emergency alerts (SMS) \\ Battery Pack & 1 & — & 1300 & 1300 & Power source \\ Camera (OV2640) & 1 & 200 & 500 & 500 & Image capture \\ DC Motor & 4 & 1500 & 200 & 800 & Locomotion \\ Chassis + Misc. & — & — & — & 870 & Structural + wiring \\ \hline
**Total** & — & **7450 mW** & — & **BDT 5740** & — \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Energy and Cost Breakdown of the IoT-Based Suspension System. ```
``` data=\"\"\" train:../train/images val::../valid/images test:../test/images nc:9 names:['HighEdgeCracking','HighPothole','HighRavelling','LowEdgeCracking','LowPothole','LowRavelling','MediumEdgeCracking','MediumPothole','MediumRavelling']\"\"\"
```

Listing 4: Custom Dataset Configuration: YAML Definition for Nine-Class Road Anomaly Detection. ### Dataset Description

**Object Taxonomy:** The dataset defines 9 object classes across three core damage types--Pothole, Ravelling, and Edge Cracking--each subdivided into High, Medium, and Low severity. This structure improves model granularity and enables severity-aware predictions. Table 9 offers an overview of the YOLOv8 training dataset. Hosted on Roboflow, this public dataset comprises 2358 high-resolution images annotated in COCO format for common road anomalies. It includes diverse terrain types (urban, rural, snowy, and mountainous) under varied lighting and weather conditions--enhancing generalization. All annotations were manually reviewed to ensure high quality and label consistency [44]. **Code trigger:**roboflow:...workspace, project, url... This affirms that the model is trained on varied terrain and environmental scenarios, directly addressing generalization concerns. Figure 6 visually confirms the dataset's diversity. Multiple sample images include bounding boxes for all classes (e.g., potholes, cracks, travelling), providing transparency about label quality, object visibility, and class balance. Figure 7 shows the positional heatmap of labeled anomalies, helping uncover dataset bias (e.g., object concentration in certain image zones). This insight justifies design decisions like anchor box selection and augmentation strategies. Figure 8 illustrates a size-vs-location correlogram for bounding boxes. It reveals scale variations and placement trends of anomalies. These patterns validate anchor-free detection in YOLOv8 and motivate preprocessing steps such as adaptive resizing.