Link to this sectionCrack Segmentation Dataset#
The Ultralytics Crack Segmentation Dataset provides 4,029 annotated images of cracks on roads and walls for training instance segmentation models on a single crack class. Captured across diverse pavement and structural scenarios, it pairs directly with Ultralytics YOLO for use cases ranging from transportation safety and self-driving car perception to infrastructure maintenance and structural computer vision inspection.
Watch: How to Train a Crack Segmentation Model using Ultralytics YOLO26 | AI in Construction 🎉
Link to this sectionDataset Structure#
The Crack Segmentation Dataset splits its 4,029 images as follows:
- Training set: 3,717 images used for training the deep learning model.
- Validation set: 200 images used during training to tune hyperparameters and prevent overfitting.
- Testing set: 112 images held out to evaluate the model after training.
- Classes: a single
crackclass covering every annotated crack on roads and walls. - Download size: ~91.6 MB.
Link to this sectionApplications#
Crack segmentation supports infrastructure maintenance by identifying and assessing structural damage in buildings, bridges, and roads. It also enhances road safety by letting automated systems detect pavement cracks for timely repairs.
In industrial settings, crack detection with models like Ultralytics YOLO26 helps verify building integrity in construction, prevents costly downtime in manufacturing, and makes road inspections safer. Automatically classifying cracks lets maintenance teams prioritize the most urgent repairs.
The complete Crack Segmentation Dataset can also be browsed and managed on Ultralytics Platform.
Link to this sectionDataset YAML#
A YAML file defines the dataset configuration. It includes details about the dataset's paths, classes, and other relevant information. For the Crack Segmentation dataset, the crack-seg.yaml file is maintained at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/crack-seg.yaml.
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# Crack-seg dataset by Ultralytics
# Documentation: https://docs.ultralytics.com/datasets/segment/crack-seg
# Example usage: yolo train data=crack-seg.yaml
# parent
# ├── ultralytics
# └── datasets
# └── crack-seg ← downloads here (91.6 MB)
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: crack-seg # dataset root dir
train: images/train # train images (relative to 'path') 3717 images
val: images/val # val images (relative to 'path') 200 images
test: images/test # test images (relative to 'path') 112 images
# Classes
names:
0: crack
# Download script/URL (optional)
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/crack-seg.zipLink to this sectionUsage#
To train the Ultralytics YOLO26n-seg model on the Crack Segmentation dataset for 100 epochs with an image size of 640, use the following Python or CLI snippets. Refer to the model Training documentation page for a comprehensive list of available arguments and configurations like hyperparameter tuning.
from ultralytics import YOLO
# Load a model
# Using a pretrained model like yolo26n-seg.pt is recommended for faster convergence
model = YOLO("yolo26n-seg.pt")
# Train the model on the Crack Segmentation dataset
# Ensure 'crack-seg.yaml' is accessible or provide the full path
results = model.train(data="crack-seg.yaml", epochs=100, imgsz=640)
# After training, the model can be used for prediction or exported
# results = model.predict(source='path/to/your/images')Link to this sectionSample Data and Annotations#
Below is an example from the Crack Segmentation Dataset with its instance segmentation masks overlaid, outlining identified cracks on road and wall surfaces:

The dataset spans varied locations, surfaces, and lighting conditions, so models trained on it see the range of real-world scenes they need to generalize across. Data augmentation can broaden that variety further — see our instance segmentation and tracking guide for related workflows.
Link to this sectionCitations and Acknowledgments#
If you use the Crack Segmentation dataset in your research or development work, please cite the source appropriately:
@misc{ crack-bphdr_dataset,
title = { crack Dataset },
type = { Open Source Dataset },
author = { University },
url = { https://universe.roboflow.com/university-bswxt/crack-bphdr },
year = { 2022 },
month = { dec },
note = { visited on 2024-01-23 },
}We acknowledge the team at Roboflow for making the Crack Segmentation dataset available, providing a valuable resource for the computer vision community, particularly for projects related to road safety and infrastructure assessment. For more datasets, visit the Ultralytics Datasets collection.
Link to this sectionFAQ#
Link to this sectionWhat is the Crack Segmentation Dataset, and how is it used in Ultralytics YOLO26?#
The Crack Segmentation Dataset is a collection of 4,029 annotated images of cracks on roads and walls for training and evaluating instance segmentation models on a single crack class. It's built for transportation-safety and infrastructure applications like structural inspection and pavement assessment, and is used directly with Ultralytics YOLO26 via the crack-seg.yaml configuration file.
Link to this sectionHow many images and classes does the Crack Segmentation Dataset contain?#
The dataset totals 4,029 images — 3,717 for training, 200 for validation, and 112 for testing — all annotated for a single crack class. The full archive downloads automatically as a ~91.6 MB .zip on first use.
Link to this sectionHow do I train an Ultralytics YOLO26 model on the Crack Segmentation Dataset?#
Load a pretrained segmentation model (e.g., yolo26n-seg.pt) and train it with the crack-seg.yaml configuration using the Python or CLI snippets in the Usage section above. See the Training guide for the full list of available arguments.
Link to this sectionWhy use the Crack Segmentation Dataset for self-driving car and infrastructure projects?#
Its diverse images of cracks across roads and walls cover many real-world scenarios, improving the robustness of models trained for crack detection. Accurate segmentation supports road safety and infrastructure-assessment systems that must identify potential hazards reliably — see the Applications section above and our model training tips for best practices.
Link to this sectionWhere can I find the dataset configuration file for Crack Segmentation?#
The crack-seg.yaml file, which defines the dataset paths and the single crack class, is located in the Ultralytics GitHub repository: crack-seg.yaml.