Multicategory detection and interactive annotation system for ancient building components based on YOLO26n
Abstract
To address the low efficiency, high cost, and inconsistent labeling of manual detection of ancient building components, this study fine-tunes a YOLO26n detector and builds an accompanying graphical system for automatic detection and interactive annotation. A dataset of about 1,300 images covering 14 component categories (seven roof types and seven individual components) is compiled through a two-stage procedure: automatic conversion of semantic segmentation masks into bounding boxes, followed by manual refinement. YOLO26n is then fine-tuned on this dataset and deployed in a PyQt5 system supporting single-image and batch detection, interactive refinement, ground-truth overlay, and annotation export. On the validation set it achieves a precision of 0.897, a recall of 0.807, an mAP50 of 0.859, and an mAP50-95 of 0.711. By combining automatic detection with manual refinement, the system reduces repetitive annotation effort and offers practical support for the digital preservation of ancient architectural heritage.