Abstract
Traditional roof inspection methods rely heavily on manual labour, which poses challenges in efficiency and safety. In this paper, we propose an overall approach and four specific methods for slate detection in orthophotos of building roof panels, using edge detection by Canny detector (Method 1), SAM (Segment Anything Model) (Method 2), SAM with bounding box prompt (Method 3), and edge detection on original SAM masks (Method 4). The methods are developed using a dataset composed of 4 sample roof segments and 3 complete orthophotos from real roof panels. Method 4 reaches the best results (overall results for all slates: mIoU = 0.67, Recall = 0.81) with Method 1 also performing well (mIoU = 0.57, Recall = 0.74). Such performance demonstrates the potential of the proposed approach and these methods to provide a robust foundation for slate detection and subsequently classification tasks.
Introduction
Inspecting pitched roofs, particularly historic ones, is a dangerous, labor-intensive, and costly process. Unlike flat roofs, where defects often appear as large, continuous areas, damage to slated roofs is usually localized to individual units. A single cracked or missing slate can lead to significant water damage, yet replacing an entire roof section is often unnecessary and wasteful.
While AI has made strides in detecting defects on flat roofs, pitched roofs present unique challenges: slates are small, arranged in complex overlapping patterns, and their appearance varies wildly due to lighting, weathering, and biological growth. To automate maintenance, a precise "map" of every single slate on a roof from a top-down aerial image (an orthophoto) is required.
Methodology
The proposed detection pipeline consists of a three-stage process designed to handle high-resolution aerial imagery efficiently:
- Patch Extraction: Large orthophotos are broken down into manageable 200x200 pixel squares.
- Patch Processing: Individual slates are detected within each patch using one of the four proposed methods.
- Patch Merging: Results from individual patches are combined, and duplicate detections at patch boundaries are removed to create a final roof map.
Detection Methods
Four distinct methods were compared for the patch processing stage:
- Method 1 (Traditional): Employs Canny edge detection and a Probabilistic Hough Transform to identify the rows and columns of the slate grid.
- Method 2 (Zero-shot AI): Utilizes the "Segment Anything Model" (SAM) in its default state to generate masks automatically.
- Method 3 (Prompted AI): Uses bounding boxes generated by Method 1 as prompts to guide SAM's segmentation.
- Method 4 (Hybrid): Applies Canny edge detection directly to the segmentation masks produced by SAM, rather than the raw image.
Results and Discussion
The study utilized a custom dataset of high-resolution orthophotos provided by Historic Environment Scotland, containing 5,386 individual slates. Performance was evaluated using mean Intersection over Union (mIoU) and Recall.
| Method | mIoU | Recall |
|---|---|---|
| Method 4 (Hybrid) | 0.67 | 0.81 |
| Method 1 (Canny) | 0.57 | 0.74 |
| Method 2 (SAM) | Lower | Lower |
Key Insights
- SAM Limitations: While powerful, SAM struggles with the repetitive, tight-knit grid of a slate roof in its default state, often merging multiple slates into a single mask.
- The Hybrid Advantage: Method 4 proved superior because SAM produces cleaner, more distinct boundaries than raw image pixels. Running edge detection on AI-generated masks filters out visual noise like slate texture or dirt, focusing purely on the geometry of the units.
- Edge Resilience: Traditional edge detection (Method 1) remains surprisingly effective because it targets the physical gaps between slates, though it produces noisier boundaries than the hybrid approach.
- Boundary Challenges: Slates at roof edges or near chimneys are harder to detect due to irregular shapes and occlusions.
Conclusion
This research demonstrates that a hybrid approach combining modern segmentation models with traditional geometric constraints provides a robust foundation for automated roof maintenance. Future work will focus on moving from detection to classification—automatically identifying which specific slates are cracked, displaced, or missing. Challenges remain regarding biological growth (moss/lichen) and extreme lighting conditions that can obscure slate boundaries.
Summary updated