Rethinking Infrastructure Inspection as Image Difference Classification: A Traffic Sign Case Study

Ching Yau Fergus Mok
University of Cambridge
Cambridge, UK
cym23@cam.ac.uk

,

Lavindra de Silva
University of Cambridge
Cambridge, UK
lpd25@cam.ac.uk

,

Varun Kumar Reja
IIT Bombay
Mumbai, India
varunreja@iitb.ac.in

,

Ioannis Brilakis
University of Cambridge
Cambridge, UK
ib340@cam.ac.uk


Abstract

Digital twins (DTs) allow the digitalization of road infrastructure inspection, though this is hindered by limited annotated data. This work exploits the relational nature of continuous asset condition monitoring to reformulate image-based defect detection as image difference classification (IDC) to reduce data reliance. This was evaluated in a case study on low-resource traffic sign inspection with different IDC classifiers using a newly-curated, high quality dataset. Results indicate that the instruction-based classifier outperforms encoder-based ones and gains from comparison with reference images. This shows that IDC can be an effective task modeling for tackling data constraints in infrastructure inspection and DT asset condition updating.

1 Introduction↩︎

Maintaining road infrastructure requires manual visual condition inspection. The proposal of a Road Digital Twin (DT) [1], coinciding with increasing road imagery capturing from smart vehicles, presents an opportunity to digitalize this process. Particularly, the Road DT framework tracks the evolving condition of road assets through successive updating steps each involving classifying an image into different condition labels specified by asset-specific data requirements [2].

Annotated data for road maintenance is scarce like in many Architecture, Engineering, and Construction (AEC) fields. To reduce data dependency, this work exploits the relational nature of the DT updating step by rethinking defect identification as an image difference classification (IDC) task where an inspection image is compared against a reference image of the same asset taken previously to produce a grounded output. Asset images over time already exist in real road asset management systems (AMSs), and this task formulation uses them as references without needing additional annotation. Due to the wide range of assets, this work focuses on traffic signs as they are both critical to road safety and contain a large number of failure modes.

The contributions of this paper are: (1) Curating a high quality and versatile traffic sign imagery dataset with condition annotation. (2) Experimenting with IDC pipelines on traffic sign inspection tasks and quantifying the effects of adding a reference image in reducing data-dependency in low-resource settings.

2 Related Work↩︎

Vision models are increasingly capable due to large-scale pre-training which uses large data sources to inject general knowledge to models. They have been used in various IDC and traffic sign maintenance related work.

2.1 Vision models and IDC↩︎

A notable pre-trained family is CLIP [3] which performs image-text and image-image comparisons with embeddings similarly to Sentence Transformers for text [4]. State-of-the-art vision-encoders include DINOv3 [5], SigLIP2 [6], and MetaCLIP2 [7]. Extending from Large Language Models, increasingly popular generative vision language models (VLMs) allow for instruction-tuning. The most sophisticated close-source models are unsuitable for privacy-sensitive AEC tasks like road maintenance which use government data, so this work only considers open-sourced families like Qwen VL [8] and Gemma [9].

Vision models have been used for image difference tasks. [10] enforced orthogonality to improve IDC for subtle changes. [11] improved difference reasoning with CLIP by aligning image embedding differences with texts. [12] adapted CLIP for difference captioning by designing an image-image-text fusion architecture, while [13] introduced a difference captioning VLM with learned delta tokens.

2.2 Computer vision in traffic sign maintenance↩︎

Traffic sign imagery datasets with condition annotations are scarce. [14] annotated the Mapillary sign dataset [15] with five condition labels and augmented them to form 20,000 examples while [16] labeled 4,000 sign images from dashboard cameras into four conditions. [17] synthetically added graffiti to signs from the GTSDB dataset [18]. [19] annotated signs into binary condition labels and augmented them to form 2164 damaged and 4330 undamaged signs. For task modeling, [19] created a binary classifier for defect presence, [16] classified for defect types, while [20] and [17] classified for severity modeled by occlusion amount.

To the best of the authors’ knowledge, existing work misaligns with real sign inspection needs and there remain large gaps in research. Firstly for datasets, many only contain close-ups of the sign face (without post or background) [[14]][16] or very coarse condition labeling (binary or one defect) [[17]][19][20], and none allows for condition tracking over time. Secondly for task modeling, none treats defect identification as a multi-class multi-label task (different defects often occur simultaneously), none leverages multiple images for detection (simulating Road DT updating and condition tracking), with all using only single-images and most relying solely on augmentation to tackle data scarcity [[14]][17].

3 Methodology↩︎

To cover the gaps, this section introduces a new dataset and discusses the objectives and experiments performed.

3.1 Dataset↩︎

Traffic sign images were collected from a real road AMS used by National Highways, the UK highway authority. This dataset fills the gap by providing: (1) Real inspection imagery showing all parts of a sign (sign face, post, and background) to capture more failure modes. (2) Two images per unique sign (undamaged reference + inspection) to track conditions. (3) Fine-grained multi-label condition annotation to match real maintenance needs.

The dataset (available here1) contains 970 image pairs along with annotations into nine condition categories (sign post tilted or fallen, sign post deformed, sign post rotten, sign face detached or insecure, sign face deformed, sign face aged, sign face vandalized, sign face dirty, and a no defect flag), extending from at most five in other work [14]. Note that significant class imbalance exists between categories, with counts from 20 (sign face vandalized) to 184 (sign face detached or insecure). However, the numbers of damaged and undamaged signs are balanced (\(\sim\)​4:6).

3.2 Objective and experiments↩︎

The objective of this work is to investigate whether reference images can improve traffic sign defect classification performance through image-image comparison and reduce data-dependency in low-resource settings. The authors hypothesize that asset images over time can be used as references to supplement training data.

Two tasks were studied: binary defect presence detection and multi-class multi-label defect classification. The former is relevant to filtering systems for prioritizing images for manual review, while the latter can be directly applicable to Road DT asset condition updating. Both tasks were modeled as a combined multi-class multi-label IDC problem with an additional flag for defect presence. Data constraints were simulated by fine-tuning classifiers using different numbers of examples per class (shot). The performance of IDC pipelines was then compared with the best performing equivalent single-image pipelines that do not use reference images.

Experiments used an RTX 4080 with 16GB VRAM, using libraries including Transformers, Pytorch, and Unsloth. All training-set reference images were used during fine-tuning as pseudo “no defect" examples to ensure models see the same images irrespective of whether classification uses references. Every experiment was repeated with five different data splits to mitigate few-shot learning instability (similarly to [21]), with averaged results reported.

Classifier pipelines are divided into encoder-based and instruction-based. They are described in detail below.

3.2.1 Encoder Based Pipelines↩︎

Four encoder-based pipelines were proposed. Two IDC classifiers are purely vision-based: one simply uses a linear classifier to fuse the two concatenated image embeddings while the other adds an image-image cross attention layer (modeled after the cross attention block in the original transformer) prior to the linear layer to allow explicit interaction. Two more IDC classifiers also use textual class descriptions: one adds an image-image-text cross attention layer prior to the linear classifier, while the other uses similarity between image embedding difference and class texts as classification logits (similarly to [11]). The equivalent single-image pipeline for purely vision-based IDC classifiers was chosen as a linear classifier on the single-image embedding, while those for the text-enhanced classifiers were chosen as image-text cross attention prior to the linear classifier and single-image embedding similarity with class texts. MetaCLIP2 was chosen as the backbone as it outperformed other models tested (e.g.SigLIP2).

3.2.2 Instruction Based Pipeline↩︎

Instruction-based VLMs have shown strong performance in comparative reasoning [11]. The inspection and reference images are inserted into the user prompt where it is instructed to use the latter as a classification guide. Textual class descriptions are provided in the system prompt. Structured classification outputs are collected from model response in json. Primary investigations focused on fine-tuning the model based on example interactions. Qwen3 8B was chosen as the model as it outperformed other models tested (e.g.Gemma 3).

4 Results↩︎

IDC results of the two experimented tasks are explored in this section, with metric values reported being the averages over five data splits to mitigate few-shot instability.

4.1 Defect presence detection performance↩︎

Defect presence detection was modeled as a binary classification task with a dedicated defect presence flag. 1 shows the IDC \(f1\) scores for this task along with the improvements over the best equivalent single-image pipelines that do not use reference images. Most pipelines perform this task well, with many attaining \(\sim\)​0.9 \(f1\) even when trained with very few examples per class (shot). This is expected as detecting whether a sign contains a defect is a simple binary task with only two possible outcomes. With the exception of embedding difference similarity, all encoder-based pipelines attain comparable results with none having a significant and consistent lead. However, the instruction-based pipeline consistently outperforms all encoder-based ones, with \(f1\) reaching above 0.9 at just 1-shot.

Table 1: Binary defect presence detection \(f1\) of IDC pipelines along with improvements over the best equivalent single-image pipelines ( \(f1_{\pm \text{improvement}}\), \(+\) means IDC is better). Shots represent minimum number of examples per class. LC stands for Linear Classifier. First four rows are encoder-based classifiers with MetaCLIP2 (2B), final row is an instruction-based classifier with Qwen3-VL-8B.
IDC \(_{\textit{Best Equivalent Single-Image}}\) 0-shot 1-shot 2-shot 4-shot 8-shot
LC \(_{\textit{LC}}\) N/A \(0.679_{-0.142}\) \(0.767_{-0.102}\) \(0.870_{-0.020}\) \(0.884_{+0.013}\)
Attn.(im-im) + LC \(_{\textit{LC}}\) N/A \(0.800_{-0.020}\) \(0.864_{-0.005}\) \(0.877_{-0.013}\) \(0.897_{+0.026}\)
Attn.(im-txt&im) + LC \(_{\textit{Attn. (im-txt) + LC}}\) N/A \(0.790_{-0.035}\) \(0.851_{+0.007}\) \(0.885_{+0.007}\) \(0.891_{-0.007}\)
Emb.Diff.Sim.\(_{\textit{Attn. (im-txt) + LC}}\) N/A \(0.589_{-0.236}\) \(0.625_{-0.218}\) \(0.681_{-0.198}\) \(0.687_{-0.211}\)
Instruction \(_{\textit{Instruction}}\) \(0.007_{-0.222}\) \(0.905_{+0.009}\) \(0.935_{+0.017}\) \(0.938_{+0.012}\) \(0.940_{+0.031}\)

Encoder-based models (first four rows) do not appear to benefit from the addition of a reference image, with IDC pipelines shifting between being better and worse than the single-image pipelines evidenced by the constantly changing signs. The instruction-based IDC pipeline, however, is able to consistently improve over the single-image pipeline, with every training scenario showing improvements between 0.009 and 0.031. Interestingly though, the untrained instruction-based IDC pipeline classifies almost all images as having a defect, much more so than when not using reference images, resulting in an almost 0 score. This suggests that fine‑tuning on just one example per class already effectively “calibrates” the model, showing what a defect is and how to use the reference image.

4.2 Defect classification performance↩︎

The second task goes further than simply detecting defect presence by classifying the defect type(s), modeling this as a multi-class multi-label classification task. 2 shows the \(macro\) \(f1\) scores (averaged over classes) of different IDC pipelines along with the improvements over the best equivalent single-image pipelines that do not use reference images. Scores for this task are lower than the first task due to the increased complexity, with none of the encoder-based pipelines (first four rows) exceeding 0.5 and the instruction-based one achieving just over 0.6. As before, the instruction-based pipeline has a consistent lead over all encoder-based ones, with its 1-shot score exceeding even the 8-shot scores of encoder-based pipelines.

Table 2: Multi-class multi-label defect classification \(macro\) \(f1\) of IDC pipelines along with improvements over the best equivalent single-image pipelines ( \(f1_{\pm \text{improvement}}\), \(+\) means IDC is better). Shots represent minimum number of examples per class. LC stands for Linear Classifier. First four rows are encoder-based classifiers with MetaCLIP2 (2B), final row is an instruction-based classifier with Qwen3-VL-8B.
IDC \(_{\textit{Best Equivalent Single-Image}}\) 0-shot 1-shot 2-shot 4-shot 8-shot
LC \(_{\textit{LC}}\) N/A \(0.266_{-0.080}\) \(0.327_{-0.033}\) \(0.402_{-0.023}\) \(0.449_{+0.005}\)
Attn.(im-im) + LC \(_{\textit{LC}}\) N/A \(0.321_{-0.025}\) \(0.371_{+0.011}\) \(0.388_{-0.037}\) \(0.470_{+0.026}\)
Attn.(im-txt&im) + LC \(_{\textit{Attn. (im-txt) + LC}}\) N/A \(0.164_{-0.071}\) \(0.324_{+0.008}\) \(0.410_{-0.002}\) \(0.479_{-0.010}\)
Emb.Diff.Sim.\(_{\textit{Attn. (im-txt) + LC}}\) N/A \(0.206_{-0.029}\) \(0.216_{-0.099}\) \(0.214_{-0.197}\) \(0.219_{-0.269}\)
Instruction \(_{\textit{Instruction}}\) \(0.346_{-0.007}\) \(0.544_{+0.033}\) \(0.536_{+0.012}\) \(0.568_{+0.008}\) \(0.601_{+0.038}\)

The addition of reference images again does not improve the encoder-based scores, while the instruction-based pipeline benefits from it at every shot, with gains ranging from 0.008 to 0.038. The only exception is at 0-shot where providing the reference image to the untrained model degrades performance, again demonstrating that “calibration" through fine-tuning is needed to take advantage of the extra input. Statistical significance of the gains from reference images in the fine-tuned instruction-based pipeline was evaluated through a two-sided paired t-test across data splits, with statistics shown in 3. 1 and 8-shots see statistically significant improvements with very low p-values while 2 and 4-shots do not, despite all settings still showing a consistently positive trend. This is likely due to instability from training with very few examples in few-shot learning, with the standard deviation being especially big at 2-shot.

Table 3: Statistics of improvements in defect classification \(macro\) \(f1\) of instruction-based IDC over the single-image pipeline.
Statistics 1-shot 2-shot 4-shot 8-shot
standard deviation \(0.012\) \(0.035\) \(0.015\) \(0.014\)
p-value \(0.006\) \(0.543\) \(0.366\) \(0.006\)

5 Ablations↩︎

The following ablation studies were carried out.

5.1 Bigger encoder backbone↩︎

To investigate whether using a bigger vision-encoder comparable to the size of the instruction-based backbone can bridge the gap in performance between the encoder-based and instruction-based pipelines, the 7B DINOv3 was tested in addition to the 2B MetaCLIP2. 4 shows \(macro\) \(f1\) scores of the two vision-only pipelines with the two backbones. MetaCLIP2 significantly outperforms DINOv3 in every training shot despite being smaller in size. Pure number of model parameters does not seem to be the sole determinant of the difference in performance between encoder-based and instruction-based pipelines.

Table 4: Multi-class multi-label defect classification \(macro\) \(f1\) of IDC pipelines for MetaCLIP2 (2B) and DINOv3 (7B).
CLIP2 (2B) DINOv3 (7B)
Pipeline 1-shot 8-shot 1-shot 8-shot
LC \(0.266\) \(0.449\) \(0.125\) \(0.360\)
Attn.(im-im) + LC \(0.321\) \(0.470\) \(0.168\) \(0.327\)

5.2 Pseudo defects↩︎

In the main setup, reference images were used as “no defect" pseudo defect images to keep training data identical between pipelines to avoid unintended gains from an effective increase in data availability when using reference images. Experiments without pseudo defect images were performed for the instruction-based pipeline to understand their effects on performance. Results show that their use improves performance across all training scenarios (e.g.+0.016 for 8-shot IDC), and that the IDC pipeline maintains its lead over the single-image pipeline even without pseudo defects (e.g.+0.053 for 8-shot).

6 Conclusion↩︎

The Road DT aims to digitalize road asset condition monitoring. This work exploits the relational nature of continuous asset tracking to reduce data dependency by rethinking defect identification as IDC. This uses already-existing asset images over time as references for grounded classification through image comparison. Using a newly curated dataset of real inspection images, this task formulation was tested in a case study on low-resource traffic sign inspection. Results show that the instruction-based classifier consistently outperforms encoder-based ones, and that with a small fine-tuning dataset of as few as one example per class, it is able to leverage the additional reference inputs for performance gains. Therefore, IDC can be an effective task modeling for reducing data reliance in continuous infrastructure inspection and DT condition updating.

Future work includes testing larger datasets to eliminate few-shot fluctuations and experimenting with using more than one reference images per sign.

References↩︎

[1]
“Introduction to digital roads,” National Highways, Aug. 2021, [Online]. Available: https://nationalhighways.co.uk/media/fkrpu1mn/introducing-digital-roads.pdf.
[2]
V. K. Reja et al., “Establishing & fulfilling information requirements for computer vision enabled digital-twin based control of roadside vegetation,” Journal of Construction Engineering and Management, 2026, doi: 10.17863/CAM.127496.
[3]
A. Radford et al., “Learning transferable visual models from natural language supervision,” 2021 , editor = {Meila, Marina and Zhang, Tong}, vol. 139 , series = Proceedings of Machine Learning Research, pp. 8748–8763, [Online]. Available: https://proceedings.mlr.press/v139/radford21a.html.
[4]
N. Reimers, editor =. "Inui. Gurevych Iryna", J. Jiang, V. Ng, booktitle =. "Proceedings. of the 2019. C. on E. M. in N. L. P. Wan Xiaojun", and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), “Sentence-BERT: Sentence embeddings using Siamese BERT-networks,” 2019", address = "Hong Kong, China, pp. 3982–3992, doi: 10.18653/v1/D19-1410.
[5]
O. Sim?oni et al., “DINOv3.” 2025 , eprint={2508.10104}, archivePrefix={arXiv}, primaryClass={cs.CV}, [Online]. Available: https://arxiv.org/abs/2508.10104.
[6]
M. Tschannen et al., “SigLIP 2: Multilingual vision-language encoders with improved semantic understanding, localization, and dense features.” 2025 , eprint={2502.14786}, archivePrefix={arXiv}, primaryClass={cs.CV}, [Online]. Available: https://arxiv.org/abs/2502.14786.
[7]
Y.-S. Chuang et al., “Meta CLIP 2: A worldwide scaling recipe.” 2025 , eprint={2507.22062}, archivePrefix={arXiv}, primaryClass={cs.CV}, [Online]. Available: https://arxiv.org/abs/2507.22062.
[8]
S. Bai et al., “Qwen3-VL technical report.” 2025 , eprint={2511.21631}, archivePrefix={arXiv}, primaryClass={cs.CV}, [Online]. Available: https://arxiv.org/abs/2511.21631.
[9]
G. Team et al., “Gemma 3 technical report.” 2025 , eprint={2503.19786}, archivePrefix={arXiv}, primaryClass={cs.CL}, [Online]. Available: https://arxiv.org/abs/2503.19786.
[10]
F. Dou, J. Lu, T. Zhu, and J. Bi, “LOCAL: Latent orthonormal contrastive learning for paired image classification , booktitle = Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops,” 2025, pp. 6467–6476.
[11]
D. Sam, D. Willmott, J. D. Semedo, and J. Z. Kolter, 2025 , eprint={2409.09721}, archivePrefix={arXiv}, primaryClass={cs.LG}, [Online]. Available: https://arxiv.org/abs/2409.09721.
[12]
Z. Guo et al., “CLIP 4IDC: CLIP for image difference captioning,” 2022", address = "Online only, vol. 2: Short Papers), pp. 33–42, doi: 10.18653/v1/2022.aacl-short.5.
[13]
E. Hu, L. Guo, T. Yue, Z. Zhao, S. Xue, and J. Liu, “OneDiff: A generalist model for image difference captioning,” 2024 , isbn = {978-981-96-0907-9}, p. 114?130, doi: 10.1007/978-981-96-0908-6_7 , booktitle = {Computer Vision ? ACCV 2024: 17th Asian Conference on Computer Vision, Hanoi, Vietnam, December 8?12, 2024, Proceedings, Part III}.
[14]
H. Sandhu, J. K?hne, O. Sawade, M. Stellmacher, E. Matthes, and book Hellwich Olaf, “2023 IEEE symposium series on computational intelligence (SSCI) , title=A novel Traffic Sign Dataset with Condition Annotations,” 2023, pp. 194–199, keywords=Training;Annotations;Neural networks;Transportation;Detectors;Maintenance engineering;Safety;Deep Learning;Image Processing;Transportation and Vehicle Systems, doi: 10.1109/SSCI52147.2023.10371993.
[15]
C. Ertler et al., “The mapillary traffic sign dataset for detection and classification on a global scale", booktitle="computer vision – ECCV 2020,” 2020, pp. 68–84", isbn="978-3-030-58592-1.
[16]
A. M. Nagy and book Cz?ni L?szl?, “2021 11th IEEE international conference on intelligent data acquisition and advanced computing systems: Technology and applications (IDAACS) , title=Deep Neural Network Models for the Recognition of Traffic Signs Defects,” 2021, vol. 2, pp. 725–729, keywords=Support vector machines;Visualization;Scholarships;Neural networks;Graphics processing units;Maintenance engineering;Convolutional neural networks;Visual Inspection;defect detection;traffic signs;deep learning, doi: 10.1109/IDAACS53288.2021.9660936.
[17]
K. Rado?, J. Downes, D.-S. Pham, and book Krishna Aneesh, “2022 international conference on digital image computing: Techniques and applications (DICTA) , title=End-to-End Traffic Sign Damage Assessment,” 2022, pp. 1–8, keywords=Deep learning;Computer vision;Digital images;Pipelines;Training data;Object detection;Detectors;Safety;Task analysis;Monitoring;object detection;damage assessment;synthetic image generation;EfficientDet, doi: 10.1109/DICTA56598.2022.10034587.
[18]
S. Houben, J. Stallkamp, J. Salmen, M. Schlipsing, and book Igel Christian, “The 2013 international joint conference on neural networks (IJCNN) , title=Detection of traffic signs in real-world images: The German traffic sign detection benchmark,” 2013, pp. 1–8, keywords=Benchmark testing;Detectors;Image color analysis;Training;Shape;Image edge detection;Feature extraction, doi: 10.1109/IJCNN.2013.6706807.
[19]
T. Chen and J. Ren, “MFL-YOLO: An object detection model for damaged traffic signs.” 2023 , eprint={2309.06750}, archivePrefix={arXiv}, primaryClass={cs.CV}, [Online]. Available: https://arxiv.org/abs/2309.06750.
[20]
C. Ers?, K. Janson, E. Petlenkov, and book Reinsalu Uljana, “2024 18th international conference on control, automation, robotics and vision (ICARCV) , title=Automatic Visual Traffic Sign Damage Detection and Measurement of Damaged Area,” 2024, pp. 505–510, keywords=YOLO;Visualization;Sensitivity;Machine learning algorithms;Autoencoders;Maintenance engineering;Road safety;Maintenance;Quality assessment;Standards, doi: 10.1109/ICARCV63323.2024.10821546.
[21]
L. Tunstall et al., 2022 , eprint={2209.11055}, archivePrefix={arXiv}, primaryClass={cs.CL}, [Online]. Available: https://arxiv.org/abs/2209.11055.

  1. Provisional release, full dataset with additional annotations like sign attributes will be released later.↩︎