← All Use Cases

Detecting concrete cracks to the pixel: 97% true positive rate

A crack in concrete is not a state but a progression: what matters is not that it exists, but whether it is getting wider. We developed a tool that detects surface cracks at pixel level – with a 97% true positive rate – making width, length and change measurable.

Detecting concrete cracks to the pixel: 97% true positive rate

The situation

Structural inspection today is mostly visual inspection followed by documentation. The result is qualitative: a crack is described, photographed, placed in a category. Whether it has changed since the last inspection is hard to answer from that, because there is no measure that is comparable across inspections.

That is exactly what the assessment hangs on. A stable crack is a different matter from a growing one. Without measurement, the distinction remains a judgement call.

The data

A dataset of 458 high-resolution RGB images with various concrete cracks.

That is a small data basis for a segmentation model – and the reason data preparation carried particular weight in this project.

Challenges

Little training data for a hard task. A neural network for pixel-accurate segmentation normally needs far more examples. What makes it harder still is that the structures to be detected look very different from one application to the next: a hairline crack in exposed concrete and a crack in a weathered bridge cap have little in common.

Lighting is a key interfering factor. A crack appears in the image as a dark line. Shadows, edges and soiling appear the same way. What distinguishes a crack from a shadow is not the contrast but the course it takes – and a model trained on evenly lit images confuses the two reliably.

Detection alone is not yet measurement. For inspection practice, marking crack pixels is not enough. What is needed are count, width and length – and those only emerge once the individual predictions are assembled into a complete picture.

Approach

Augmentation against the lighting effect. The training images were varied systematically to simulate different lighting conditions and structural variation. That is the most effective lever with a small data basis: instead of sourcing more images, the existing variety is increased artificially – deliberately in the dimensions that cause the problems in the field.

Segmentation with DeepLab v3, implemented in PyTorch. The architecture was state of the art in image segmentation at the time of the project.

Two metrics instead of one. Performance was assessed via the Dice coefficient – the agreement of the predicted crack pixels with the reference – and via the true positive rate, the share of crack pixels actually detected. Both together are necessary: a model with a high true positive rate and a low Dice coefficient finds all the cracks but paints them too wide.

Post-processing and assembly. Morphological opening denoises the predictions. The image tiles are then assembled so that crack count, crack width and crack length can be evaluated across the complete picture.

Outcome

On the validation dataset, the model reached a Dice coefficient of 88% and a true positive rate of 97% – suitable for automated crack inspection.

The practical value lies in repetition: with a consistent capture setup, the tool detects changes to existing cracks and new cracks early. A description of condition thereby becomes an observation of progression.

Transferability

Pixel-accurate segmentation of fine, line-shaped structures under strong lighting differences is a class of task in its own right – and it occurs far outside structural inspection: cracks in road surfaces and coatings, weld seam defects, material flaws in surfaces, fine structures in microscopy images. Exactly this methodological closeness is why this project also serves as evidence for image-based analysis in our pharma field: small objects in large images, uneven lighting, overlapping structures.

Today

On the architecture side, DeepLab v3 is no longer the reference point; for fine structures we work with transformer-based segmentation models, and annotation effort can be lowered substantially through promptable pre-segmentation. With 458 images, a foundation model that gets by with a few examples would also be the obvious starting point today. The bigger leap is in the capture. Where cracks on structures are to be measured, drone flights with a fixed route and photogrammetric processing deliver a capture setup that stays comparable over years – and comparability is the precondition for crack widths becoming a progression. Without it, every measurement remains a single value.

Last updated: 6 August 2026