Unsupervised Clustering of Public Transport Vehicles Using Deep Morphological Features and Color Histograms
Organizations: Centro de Innovación y Desarrollo Tecnológico en Cómputo, Instituto Politécnico Nacional, Mexico City, Mexico
Abstract
Surveillance cameras along urban roads produce large volumes of unlabeled video that could support the monitoring of public transport, but grouping the observed vehicles into meaningful categories without manual annotation remains challenging, since buses from different routes often share the same body structure and differ mainly in their color schemes. This study presents an unsupervised clustering methodology for public transport vehicles that combines morphological features extracted with a frozen DINOv2 Vision Transformer and handcrafted HSV color histograms through weighted early fusion, followed by UMAP projection and K-Means clustering. The method was evaluated on 7,972 bus images extracted from about 1,460 hours of video of an arterial road in Mexico City, with the goal of isolating the buses of the city's public bus network (RTP) without supervision. With a fusion of 65% morphological and 35% color features, the pipeline produced 14 clusters that separate distinct routes and vehicle types, and it increased the precision of the target cluster with respect to morphological features alone. These results show that color complements self-supervised features for route-level clustering, provided that it does not dominate the representation.
Figures & tables
| Property | Value |
|---|---|
| Architecture | Vision Transformer (ViT-S/14) |
| Transformer blocks | 12 |
| Attention heads | 6 |
| Embedding dimension | 384 |
| Feed-forward network | MLP with GELU, ratio 4 (1536) |
| Patch size |
| Method | H | Acc. | Prec. | Rec. | F1 | |
|---|---|---|---|---|---|---|
| M.C. | 11 | 1.175 | 0.9326 | 0.7703 | 0.6022 | 0.6759 |
| E.F. ( ) | 3 | 0.012 | 0.6692 | 0.2606 | 0.9989 | 0.4133 |
| E.F. ( ) | 20 | 1.680 | 0.9328 | 0.8988 | 0.4774 | 0.6236 |
| E.F. ( ) | 14 | 1.059 | 0.9521 | 0.9507 | 0.6215 | 0.7516 |
Clustering
Clustering groups data points by shared structure, developing methods to discover, validate, and interpret groups across diverse data and constraints.
See all 345 papers