arXiv:2610.22270cs.CVOct 2026

Manuscript Offprint

arXiv:2610.22270

Unsupervised Clustering of Public Transport Vehicles Using Deep Morphological Features and Color Histograms

Juan Irving Vasquez

Juan Irving Vasquez

Centro de Innovación y Desarrollo Tecnológico en Cómputo

Instituto Politécnico Nacional

Mexico City, Mexico

jvasquezg@ipn.mx

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. The dataset is available under MIT license at: https://www.kaggle.com/datasets/irvingvasquez/public-bus-images

Keywords—Unsupervised clustering, vehicle identification, DINOv2, color histograms, early fusion, public transport.

I. INTRODUCTION

Public transport is the backbone of mobility in large cities, and its efficient management requires continuous information about which vehicles operate on each corridor, how often they pass, and whether they follow their assigned routes. Intelligent Transportation Systems (ITS) increasingly obtain this information from the surveillance cameras already installed along urban roads. These cameras generate thousands of hours of video, far more than can be inspected or annotated manually, so methods that extract useful information from such footage without human supervision are of great practical value.

In this work, we address the problem of grouping public transport vehicles captured by a fixed surveillance camera into semantically meaningful categories, such as transit routes and operators, without using labeled data. The problem is challenging for two complementary reasons. First, buses operating on different routes often share the same body structure and differ mainly in their paint schemes. Second, vehicles of different types, such as full-size buses, microbuses (small buses), and vans, may share similar colors while differing substantially in shape. A useful representation must therefore capture both morphology and color.

Most vision-based vehicle classification systems are supervised and rely on large, site-specific annotated datasets with fixed taxonomies in which “bus” is a single class [1]–[3]. Self-supervised learning has reduced the need for labels during representation learning [4], but in the vehicle domain it has mainly been used as pre-training for a supervised classifier [5]. Unsupervised clustering, on the other hand, has been applied mainly to vehicle re-identification, which groups images of the same physical vehicle rather than different vehicles that share a category [6]. Self-supervised Vision Transformers such as DINOv2 [7] now provide general-purpose descriptors that capture image structure well without fine-tuning. However, their features may under-represent pure chromatic information, which is crucial for distinguishing transit routes.

To address this problem, we propose a hybrid unsupervised clustering pipeline for public transport vehicles. Buses are first detected and tracked in the video, and a single crop is stored per vehicle. Each crop is then described by two complementary descriptors: a morphological descriptor given by the class token of a frozen DINOv2 model, and a color descriptor given by hue and saturation histograms computed in the HSV color space. Both descriptors are normalized and combined through weighted early fusion, and the fused vectors are projected with UMAP and grouped with K-Means, as illustrated in Fig. 1. We apply the pipeline to images of buses operating on one of the main arterial roads of Mexico City, and evaluate whether it can isolate the buses of the Red de Transporte de Pasajeros (RTP), the city's public bus network, as a coherent cluster.

The main contributions of this paper are as follows:

• An unsupervised pipeline that fuses frozen self-supervised morphological features with handcrafted color histograms to cluster public transport vehicles captured

XXX-X-XXXX-XXXX-X/XX/$XX.00 © 20XX IEEE

Figure

Fig. 1. Overview of the proposed unsupervised clustering pipeline. Buses are detected and tracked in surveillance video, each crop is described by frozen DINov2 morphological features and HSV color histograms, both descriptors are combined through weighted early fusion, and the fused vectors are projected with UMAP and grouped with K-Means. Bus illustrations were generated with AI.

by a surveillance camera, without requiring labels at any stage of feature extraction or clustering.

  • A dataset of 7,972 bus images extracted from about 1,460 hours of video of a Mexico City arterial road, manually annotated for evaluation and publicly available at https://www.kaggle.com/datasets/irvingvasquez/public-bus-images.

  • An ablation study on the fusion weight showing that a moderate color contribution increases the precision of the target cluster with respect to morphological features alone, whereas an excessive color weight leads to over-segmentation or to the collapse of the clustering space.

The remainder of this paper is organized as follows. Section II reviews related work on vehicle classification, self-supervised learning, and clustering. Section III describes the dataset and the proposed clustering pipeline. Section IV presents the quantitative and qualitative results. Finally, Section V concludes the paper and outlines future work.