Abstract
Huizhou architectural heritage images are important visual materials for regional heritage documentation, digital archiving, and conservation support. However, Huizhou architecture shares many visual cues with Jiangnan white-walled and grey-tiled buildings and other visually similar Classical Chinese architectural forms. In practical image archiving, the critical risk is therefore not only whether a model can achieve high four-class accuracy, but also whether visually similar Classical Chinese buildings are incorrectly archived as Huizhou architecture. To address this problem, this study constructs the HuizhouStyle-4C image recognition task and proposes a reliability-oriented evaluation workflow for Huizhou architectural heritage image archiving. The workflow combines group-aware leakage control, hard-boundary diagnosis, and an out-of-fold (OOF)-safe fixed decision rule. A structure-aware baseline classifier, SAB-ResNet, is further used to incorporate architectural boundary and facade-structure cues into the recognition process. The evaluation includes group-aware five-fold cross-validation, an independent holdout subset from the curated dataset, and a hard-boundary test focused on the distinction between Huizhou architecture and visually similar Classical Chinese samples. Under this within-dataset held-out evaluation setting, the OOF-safe balanced point achieved an Independent Holdout Macro-F1 of 0.9501 and a Hard Binary F1 of 0.8182. The results indicate that Huizhou architectural heritage image archiving benefits from not only conventional four-class recognition, but also explicit diagnosis of near-neighbour misclassification risks and fixed decision rules selected without test-set labels. Additional stronger backbone comparisons further show that competitive held-out four-class performance does not eliminate the need for hard-boundary diagnosis.
1. Introduction
1.1. Research Background and Significance
Architectural heritage is not only the material remains of historical spaces, but also an important visual carrier of regional culture, construction knowledge, and collective memory [1]. In heritage research and conservation, many historical and vernacular buildings are widely distributed across villages, urban blocks, and archival image collections, making comprehensive manual documentation costly and time-consuming [2]. Traditional field surveys and expert assessments remain indispensable, but they often face limitations in efficiency, coverage, and consistency when large-scale image materials need to be organized and reviewed [3].
With the development of digital preservation, cultural resource surveys, historical building documentation, and image archive management, computer vision methods have become increasingly useful for assisting the organization, retrieval, and preliminary screening of architectural heritage images [4]. In this context, image recognition should not be understood only as a pursuit of higher classification scores. For architectural heritage archiving, its practical value lies in helping researchers and conservation practitioners organize dispersed visual materials, identify candidate heritage images, and prioritize samples that require expert verification [3]. Therefore, architectural heritage image recognition should be designed as an auxiliary and auditable tool within heritage documentation and digital preservation workflows [5].
Architectural style recognition differs from ordinary object or scene classification because its labels are often related to architectural typology, regional cultural attribution, and conservation interpretation [6]. The visual evidence used for style judgment may include roof outlines, gable forms, facade composition, material textures, component relationships, and settlement-scale spatial features [7,8]. For regional architectural heritage, misclassification may not only affect image retrieval results, but may also influence subsequent archival labeling and conservation management [9]. Therefore, recognition workflows for architectural heritage images with strong regional and stylistic similarities should include mechanisms for leakage control and boundary-risk diagnosis [10].
1.2. State of the Art
Recent studies have shown that deep learning, transfer learning, and deep feature extraction can support the classification, retrieval, and management of architectural heritage images [11]. Existing work has applied convolutional neural networks and related methods to historical buildings, cultural heritage structures, religious architecture, and regional architectural objects [12,13].
Two lines of research are particularly relevant to this study. The first focuses on the integration of recognition results into heritage management, GIS visualization, conservation assessment, and digital archival workflows. The second focuses on the recognition of fine-grained architectural semantics, such as decorative patterns, facade components, construction periods, regional styles, and settlement landscapes [14]. However, many existing studies mainly report whether target categories can be recognized effectively, while the reliability of model decisions near visually similar regional style boundaries is less frequently examined [6,9].
Architectural style discrimination is a multi-cue judgment process rather than a simple recognition of color, texture, or scene labels [9]. In practical image collections, UAV images, street-view images, online facade images, and open-access architectural images often contain variations in viewing angle, scale, occlusion, background context, and image quality [15]. These factors make it necessary to report not only model accuracy, but also image sources, screening criteria, annotation rules, data partitioning strategies, and validation protocols [16]. This requirement is especially important for architectural heritage tasks involving regional cultural attribution [10].
From an architectural semantic perspective, the recognition of Huizhou architecture should not rely only on broad visual impressions such as white walls and grey tiles. Structural and morphological cues, including boundary delineation, facade organization, roof forms, and component relationships, are also important for distinguishing regional architectural styles [17,18]. Related studies on facade parsing, component detection, architectural material recognition, and digital facade segmentation further indicate that architectural boundaries and component arrangements can provide meaningful evidence for building classification and information extraction [19,20]. Therefore, a recognition model for Huizhou architectural heritage should consider architectural form and facade-structure cues, rather than relying only on global color or background information [21,22].
The typical visual features of Huizhou architectural heritage are summarized in Figure 1.
Figure 1.
Typical visual features of Huizhou architectural heritage.
1.3. Problem Analysis
Huizhou architecture is a representative type of regional traditional architecture in China, commonly associated with white walls, dark tiled roofs, horse-head walls, carved wooden and stone components, compact courtyard layouts, and dense village fabrics [7]. However, these cues are not exclusive to Huizhou architecture [23]. Jiangnan white-walled and grey-tiled buildings, regional folk houses, temple and garden architecture, and other Classical Chinese architectural forms may share similar colors, materials, roof forms, and street-scale scenes with Huizhou architecture [24].
For this reason, the key challenge in Huizhou architectural image archiving is not only the general classification of Huizhou, Classical Chinese, Western, and Modern buildings. A more application-sensitive risk is whether visually similar Classical Chinese buildings are incorrectly archived as Huizhou architecture [9]. In this study, this near-neighbour confusion is referred to as the hard-boundary problem. In practical terms, the hard-boundary risk means that a model may assign a Huizhou label to a visually similar Classical Chinese sample, especially when the image contains white walls, grey tiles, narrow streets, or traditional settlement backgrounds, but lacks clear Huizhou-specific morphological evidence.
The visual boundary between Huizhou architecture and visually similar Chinese traditional architecture is illustrated in Figure 2.
Figure 2.
Visual boundary between Huizhou architecture and similar Chinese traditional architecture.
Based on this problem definition, three research gaps can be identified. First, existing architectural heritage recognition studies have rarely focused on the boundary between Huizhou architecture and visually similar Classical Chinese architectural forms, such as Jiangnan dwellings, regional folk houses, and temple or garden architecture [25,26]. Second, commonly reported metrics such as accuracy and macro-F1 may obscure asymmetric errors between critical classes, particularly the false-positive risk of classifying Classical Chinese architecture as Huizhou architecture [27]. Third, although generic visual models have strong representation capacity, they may still depend on color, texture, and background cues in small-scale specialized architectural datasets, which makes structure-aware evidence and explicit error diagnosis necessary [28].
These issues motivate a reliability-oriented workflow that combines four-class recognition, leakage control, hard-boundary diagnosis, and OOF-safe fixed decision-rule selection [29,30,31].
1.4. Research Objectives and Content
To address the above issues, this study constructs the HuizhouStyle-4C image recognition task and proposes a reliability-oriented workflow for Huizhou architectural heritage image archiving. The core contribution of this study is not the proposal of SAB-ResNet alone. Instead, the main contribution lies in combining group-aware leakage control, hard-boundary diagnosis, and out-of-fold (OOF)-safe fixed decision rules to evaluate and reduce near-neighbour misclassification risks in architectural heritage image archiving.
At the data and evaluation level, this study uses group-aware five-fold cross-validation, an independent holdout subset from the curated dataset, and a fixed hard-boundary test to separately examine internal validation performance, four-class held-out performance, and the Huizhou–Classical Chinese hard-boundary risk [31]. The independent holdout is used as a group-disjoint held-out subset from the curated dataset, rather than as a third-party external dataset. At the model level, SAB-ResNet is used as a structure-aware baseline classifier with ResNet50 as its backbone [32]. It incorporates fixed Sobel edge cues, an edge feature pyramid, structure-guided residual attention, architectural detail attention, and a Huizhou-versus-Classical Chinese boundary auxiliary head to strengthen the use of architectural boundary and facade-structure cues [33,34]. These modules are used to support the reliability-oriented workflow, rather than to replace the evaluation protocol itself [35].
The main contributions of this study are summarized as follows. First, in terms of dataset construction, HuizhouStyle-4C is constructed as a curated four-class architectural image recognition task for Huizhou architectural heritage archiving, with group_ids used to reduce the risk of same-building, near-duplicate, and multi-view leakage across data splits. Second, in terms of evaluation protocol, the study separates conventional four-class evaluation from hard-boundary diagnosis, making it possible to observe whether visually similar Classical Chinese samples are incorrectly absorbed into the Huizhou category. Third, in terms of model design, SAB-ResNet is used as a structure-aware baseline classifier to incorporate architectural boundary and facade-structure cues into the recognition process [33,34]. Fourth, in terms of decision rule selection, OOF-safe fixed decision rules are selected using out-of-fold predictions and then applied once to the independent holdout and hard-boundary test sets, reducing the risk of test-set tuning during operating-point selection [36,37].
2. Materials and Methods
2.1. Overall Research Design
This study is designed as a reliability-oriented recognition workflow for Huizhou architectural image archiving. The workflow contains five main steps. First, a curated four-class image dataset is constructed, including Huizhou, Classical Chinese, Western, and Modern architectural images. Second, visually related images, including the same building, similar scenes, and near-duplicate views, are organized by group_id to support group-aware partitioning. Third, standard four-class recognition and hard-boundary diagnosis are evaluated under separate test settings. Fourth, a structure-aware classifier is introduced to incorporate architectural form cues into the recognition process. Finally, the decision rule is fixed using out-of-fold predictions before being applied to the independent holdout and hard-boundary test sets.
The overall design is illustrated in Figure 3. The purpose of this arrangement is to make the relationship between architectural annotation, leakage control, model training, hard-boundary evaluation, and error interpretation explicit before the technical details are introduced.
Figure 3.
Overall reliability-oriented workflow for Huizhou architectural image archiving.
2.2. Dataset Construction and Data Partitioning
This study constructs the HuizhouStyle-4C dataset for the task of recognizing Huizhou architectural heritage images. To improve the auditability of dataset construction, the image sources were organized at the source-category level. Candidate images were collected from public or research-oriented architectural image sources, including Chinese traditional-settlement image sources, Kaggle Architectural Styles, Wikimedia Commons and similar public archive images, Unsplash, Pexels, and Chinese travel or review websites. The retrospective curation and final dataset split were completed before 24 May 2026. The auditable local source/intermediate pool contained 10,111 image files. After image-quality screening, architectural-subject verification, category review, duplicate/near-duplicate checking, and group-aware consolidation, 5025 images were retained and organized into 4185 visual/source groups. Overall, 5086 files were not included in the final manifest during the combined screening, architectural-subject verification, category review, duplicate/near-duplicate checking, and group-aware consolidation process. Detailed image and group counts by split and class/subclass are provided in Appendix A, Table A1. The dataset construction workflow is illustrated in Figure 4. The source categories and screening outcomes are summarized in Table 1.
Figure 4.
Workflow of image collection, quality audit, and group-aware data preparation.
Table 1.
Auditable summary of dataset sources and screening outcomes.
HuizhouStyle-4C employs four architectural style labels: Huizhou, Classical Chinese, Western, and Modern. The ‘Huizhou’ category signifies traditional Huizhou architecture or samples with distinct Huizhou architectural semantics. ‘Classical Chinese’ denotes traditional Chinese architecture lacking specific Huizhou regional characteristics. ‘Western’ comprises architectural samples predominantly featuring Western or Western-influenced exterior building vocabulary visible in the dataset. The main Kaggle-derived Western subset includes Georgian, Greek Revival, Tudor Revival, and Russian Revival architecture, supplemented by manually curated Western historical or Western-influenced buildings. ‘Modern’ represents architectural samples characterized by contemporary exterior materials, structures, and facade designs. Figure 5 illustrates sample examples for these four categories.
Figure 5.
Examples of the four architectural image categories in HuizhouStyle-4C.
To support routine four-class evaluation and diagnosis of challenging boundaries, the data is partitioned into three group-disjoint subsets: train_cv_pool, independent holdout, and hard-boundary test [30,31], with specific compositions detailed in Table 2. The term independent holdout corresponds to external_holdout_balanced in the project implementation. This set is a group-disjoint independent holdout separated from the curated dataset, rather than an external dataset independently constructed by a third-party entity. Consequently, it is employed to assess the four-class generalization performance of a fixed model on independent held-out samples, rather than being interpreted as a cross-institutional external generalization validation in a strict sense.
Table 2.
Data partitioning of HuizhouStyle-4C.
Specifically, train_cv_pool and independent holdout are employed for four-class classification evaluation, while hard-boundary test is utilized for supplementary diagnosis of potential misclassification between Huizhou architecture and similar traditional architectural styles.
2.3. Architectural Annotation and Subclass Metadata
Following the completion of data collection and the overall partitioning design, this section further elaborates on the label determination, subclass metadata recording, and group_id generation rules for HuizhouStyle-4C. This study adopts an annotation principle based on the dominant architectural style in the image, rather than solely relying on architectural period or geographical location. For each image, the annotation process prioritizes the judgment of visible stylistic features presented by the main building in the image, including architectural form, material characteristics, facade composition, spatial organization, and overall architectural semantics [7,24]. When multiple stylistic elements are present in an image, the main building and its dominant visual style serve as the basis for the final classification. The primary determination rules for the four classes of samples are presented in Table 3.
Table 3.
Annotation rules and major boundary risks for the four architectural style categories.
It should be noted that the four-class annotation in this study is based on exterior building images with identifiable architectural subjects. Images dominated by landscape, vegetation, open space, interior space, or urban-planning-scale information were excluded, irrespective of architectural style. Garden-related images were retained only when buildings or architectural structures, such as pavilions, halls, corridors, or built structures within traditional garden settings, constituted the main subject. Therefore, the garden-related samples mentioned under the Classical Chinese category refer to visible garden architecture rather than landscape or planting scenes alone. The Western and Modern categories are likewise defined according to visible exterior building morphology and facade vocabulary, not according to interior design, landscape design, or urban planning features.
Beyond the four primary labels, subclass metadata is retained to support sampling control and error diagnosis. For example, Jiangnan white-walled and grey-tiled buildings, regional traditional dwellings, and temple/garden/palace samples are all labeled as Classical Chinese in the four-class task, while their subclass metadata is preserved for hard-boundary analysis. The subclass metadata is not used as an additional training label and does not change the four-class task definition.
The hard-boundary test is not an additional training category but an independent diagnostic set constructed prior to experiments based on architectural semantic similarity and predefined subclass rules. Training and standard evaluation continue to utilize the four labels: Huizhou, Classical Chinese, Western, and Modern.
Data annotation combines initial label generation with manual review. Initially, labels are generated based on image source, filename semantics, collection keywords, and original class information. Subsequently, human inspectors examine the main architectural subject, style, and category boundaries according to the annotation rules detailed in Table 3. For ambiguous samples between Huizhou and Classical Chinese, a further boundary review is conducted. Images with unclear architectural subjects, insufficient image quality, inadequate architectural evidence, or unstable category assignments are excluded from the standard training and validation procedures. The manual review in this paper is primarily based on the visible architectural semantics in the images and the authors’ architectural expertise.
Manual review was conducted by two authors with architectural backgrounds. Ambiguous cases, especially those near the Huizhou–Classical Chinese boundary, were re-examined jointly, and final labels were assigned by consensus; samples without sufficient agreement or visible architectural evidence were excluded.
2.4. Group-Aware Partition and Leakage Control
After architectural annotation, the next methodological concern is whether the evaluation can truly reflect recognition ability rather than memorization of repeated buildings. In architectural image datasets, the same building may appear in multiple viewpoints, collection batches, or visually similar online images. If such images are split across training and testing, the model may learn the identity of a building or scene instead of learning transferable Huizhou-style evidence. Therefore, this study uses group_id as the minimal partitioning unit and audits potential leakage before model training and evaluation.
To mitigate the risk of data leakage stemming from identical buildings, near-duplicate images, or multi-view samples from the same source, group_ids are generated prior to data partitioning. The group_id serves not to introduce additional classification labels but to consolidate samples from the same building, scene, near-duplicates, multi-view perspectives from a single origin, or highly similar samples into a unified group. The group_id generation process is not based on fully automated clustering; rather, it uses a hybrid approach combining candidate retrieval and manual verification. Candidate near-duplicate samples are identified by integrating source information, filename continuity, acquisition batch, hash/perceptual hash, and visual embedding similarity from an ImageNet-pretrained ResNet50 [32,38]. These candidates are then manually confirmed before being assigned a group_id, thereby reducing the potential for data leakage.
Following partitioning, a further data audit is conducted. The audit encompasses checks for duplicate paths, duplicate image IDs, train-fold group leakage, and cross-split group leakage. The results indicate zero duplicate paths, zero duplicate image IDs, zero train-fold group leakage, and zero cross-split group leakage. These findings indicate that the train_cv_pool, independent holdout, and hard-boundary test employed in this study maintain mutual exclusivity at the group level, thus reducing the risk of information leakage arising from the same building or near-duplicate images across training and evaluation phases.
2.5. Evaluation Design: General Four-Class Recognition and Hard-Boundary Diagnosis
The evaluation design separates standard four-class recognition from hard-boundary diagnosis. The independent holdout evaluates the four-class task among Huizhou, Classical Chinese, Western, and Modern samples, while the hard-boundary test focuses on the Huizhou–Classical Chinese boundary. The evaluation protocol and data usage are illustrated in Figure 6.
Figure 6.
Evaluation protocol and data usage in the proposed workflow.
Based on the group-disjoint split defined above, the evaluation protocol consists of group-aware five-fold cross-validation, independent holdout testing, and hard-boundary testing [30,31].
2.5.1. Group-Aware Five-Fold Cross-Validation and OOF Prediction
Within the train_cv_pool, this paper implements group-aware five-fold cross-validation. Unlike standard random splits, group-aware splitting uses group_id as the minimal unit. All images within the same group are allocated to the same fold exclusively, preventing images of the same building, multiple viewpoints, or near-duplicates from appearing simultaneously in both the training and validation sets [30,31].
When constructing the five-fold splits, this paper considers both category distribution and group integrity. While preserving group integrity, it ensures that the image counts across the four categories—Huizhou, Classical Chinese, Western, and Modern—are as balanced as possible for each fold.
During the five-fold cross-validation process, each iteration utilizes four folds for training and the remaining fold for validation. Each image in the train_cv_pool is predicted only once by a model that has not seen that image or its group samples, occurring during its respective validation fold. The aggregated predictions from these five validation rounds yield the out-of-fold (OOF) predictions, which serve as the basis for subsequent OOF-safe fixed decision rules.
2.5.2. Independent Holdout Versus Hard-Boundary Test
After group-aware five-fold cross-validation, the fixed model is evaluated on the independent holdout and hard-boundary test sets. The independent holdout contains balanced four-class samples and is used only for held-out four-class evaluation. The hard-boundary test contains difficult Huizhou samples and visually similar Classical Chinese negatives, including Jiangnan white-walled and grey-tiled buildings, regional folk houses, and temple/garden/palace samples. This set is not used for training, early stopping, sampling ratio selection, threshold searching, or OOF-safe rule determination.
2.5.3. Evaluation Metrics
This study reports different metrics according to the evaluation objective: accuracy and macro-F1 are reported for the standard four-class task; metrics related to the Huizhou–Classical Chinese boundary are reported for the hard-boundary test [27].
On the hard-boundary test, this study treats hard Huizhou as the positive class and Classical Chinese hard negatives as the negative class; the core metrics are defined in Table 4.
Table 4.
Definitions and interpretations of hard-boundary evaluation metrics.
In the raw model ablation stage, CV macro-F1, independent holdout macro-F1, Hard Binary F1, Huizhou Recall, Classical Recall (4C), and Jiangnan FP are reported. In the OOF-safe stage, this study does not retrain the backbone network, but determines fixed decision rules based on the OOF predictions from the train_cv_pool and applies them once to the independent holdout and hard-boundary test sets.
2.6. Structure-Aware Classifier: SAB-ResNet
2.6.1. Motivation for Structure-Aware Recognition
Huizhou architecture and Jiangnan white-walled and grey-tiled architecture share several visible cues, including white walls, dark pitched roofs, narrow streets, and traditional settlement scenes. SAB-ResNet is introduced to incorporate architectural form evidence, such as roofline contours, wall turns, gable boundaries, facade rhythms, and local component relationships, before the results are evaluated under the hard-boundary protocol.
2.6.2. Overall Model Framework
SAB-ResNet is designed as a structure-aware classifier within the proposed reliability-oriented workflow, providing model outputs for subsequent cross-validation, hard-boundary diagnosis, and fixed decision-rule analysis under a unified data split and evaluation protocol. The model uses an ImageNet-pretrained ResNet50 as its backbone, augmented with a Sobel-guided structural branch, Structure-Guided Attention (SGA), Architectural Detail Attention (ADA), and a Huizhou-versus-Classical Chinese boundary auxiliary head. The overall framework is illustrated in Figure 7 [32,38].
Figure 7.
Framework of the SAB-ResNet structure-aware classifier and boundary auxiliary head. (a) is “Overall Architecture of the Proposed SAB-ResNet50”, (b) is “Structure-Guided Attention (SGA)”, (c) is “Architectural Detail Attention (ADA)”.
Rather than directly augmenting large-scale visual models, SAB-ResNet’s design prioritizes the explicit incorporation of architectural form-related cues such as edges, contours, and facade detail lines into mid-to-high level feature representations. For Huizhou architectural recognition, cues like the contours of horse-head walls, roofline boundaries, wall turns, window rhythms, and facade component relationships often carry more architectural semantics than mere color or background information [7,28].
2.6.3. Sobel-Guided Structural Branch
Given an input RGB image , the model is first preprocessed according to ImageNet normalization. To obtain low-cost structural boundary cues, the normalized image is approximated by recovering it to the pixel range and converting it to a grey-scale image . Subsequently, horizontal and vertical gradients are computed using fixed Sobel-x and Sobel-y convolution kernels [39]:
where and denote the Sobel horizontal and vertical convolution kernels, * represents the convolution operation, and is the edge strength map. This edge map does not rely on additional edge annotations nor introduce new supervision labels, serving solely as auxiliary structural cues for model input.
The Sobel edge map is subsequently encoded into multi-scale structural cues and injected into the backbone network at the mid-to-high level feature stages of ResNet [34]. Compared to directly concatenating the edge map with the RGB input, this approach prioritizes allowing the model to retain architectural form cues such as roof outlines, wall boundaries, gable lines, and facade turns during semantic feature formation, rather than augmenting low-level pixel information. Representative Sobel edge cues used by SAB-ResNet are shown in Figure 8.
Figure 8.
Examples of Sobel edge cues used by SAB-ResNet.
2.6.4. Structure-Guided Attention (SGA)
Structure-Guided Attention (SGA) is used to transform the structural features extracted by the edge branch into residual gating signals for the RGB backbone features. The core idea is that, after the edge cues are aligned with the RGB features at the same scale, the model generates gating weights according to the structural responses, thereby enhancing feature locations related to architectural boundaries [35]:
The output of SGA is formulated in a residual manner:
where ⊙ denotes element-wise multiplication, and is a learnable gate scale. This residual gating mechanism preserves the original RGB representation while improving the model’s sensitivity to structural information such as roof edges, wall junctions, and facade contours.
2.6.5. Architectural Detail Attention (ADA) and Boundary Auxiliary Head
Based on the SGA output , this study further introduces Architectural Detail Attention (ADA) to recalibrate architectural detail features along both channel and spatial dimensions. ADA first generates a channel gate through average pooling and max pooling, producing channel-enhanced features [35]:
Subsequently, ADA generates a spatial gate based on average pooling and max pooling along the spatial dimension, yielding the final output:
where is used to enhance feature channels that are more important for architectural style discrimination, while highlights spatial locations such as roof boundaries, wall transitions, window regions, eaves, gables, and local architectural components. The role of ADA is to help the model preserve more architectural detail cues in mid- and high-level semantic features.
In addition to the main four-class output, SAB-ResNet also includes a Huizhou-versus-Classical Chinese traditional boundary auxiliary head, which assists the model in learning the boundary differences between Huizhou architecture and Classical Chinese architecture. The main four-class head outputs predictions for Huizhou, Classical Chinese, Western, and Modern categories. The boundary auxiliary head is used only as auxiliary supervision during training and does not change the final four-class label system.
The overall loss function is defined as:
where denotes the four-class cross-entropy loss, denotes the loss of the boundary auxiliary head, and is the boundary loss weight. In the B4 full configuration, this study sets:
2.7. Training Strategy, Group-Hard-Boundary (GHB) Sampling, and OOF-Safe Fixed Decision Rule
The training strategy and the final decision rule are placed after the model description because they serve the reliability workflow rather than changing the architectural label system. Group-Hard-Boundary (GHB) Sampling increases the learning frequency of difficult Huizhou–Classical Chinese boundaries during training, while the OOF-safe fixed decision rule prevents the final operating point from being chosen by repeatedly inspecting the independent holdout or hard-boundary labels.
2.7.1. GHB Sampling
To increase the learning frequency of the decision boundary between Huizhou and visually similar Classical Chinese samples, this study adopts GHB sampling. This strategy adjusts the sampling probabilities of different sample groups within each training batch according to the four-class labels and subclass metadata in the train_cv_pool, allowing the model to encounter Huizhou and hard Classical Chinese samples more frequently while retaining Western and Modern samples to preserve the completeness of the four-class classification task [27].
In the B4 full configuration, the target sampling proportions are set as follows: Huizhou 0.30, hard Classical Chinese 0.30, base Classical Chinese 0.15, Western 0.125, and Modern 0.125. Here, visually similar Classical Chinese samples refer to samples marked by subclass metadata within the train_cv_pool, rather than samples from the hard-boundary test set. GHB sampling is applied only within the training split of each fold and does not use any samples, labels, or evaluation results from the independent holdout or hard-boundary test sets.
2.7.2. Training Settings and Implementation Details
To ensure comparability across the B0–B4 ablation experiments, this study adopts consistent basic training settings across all experimental groups and changes only the model structure, sampling strategy, or post-calibration rule according to the experimental definitions used in the B0–B4 ablation study. All models use a ResNet50 backbone pretrained on ImageNet, and the input image size is uniformly set to 384 × 384. Training is performed using the AdamW optimizer with an initial learning rate of 3 × 10−4, a weight decay of 0.05, a three-epoch warmup, and cosine learning-rate decay. The maximum number of training epochs is 50. Early stopping is based on validation macro-F1, with a patience of 10 [40].
During training, RandomResizedCrop, random horizontal flipping, and ImageNet normalization are applied. The scale range of RandomResizedCrop is set to 0.75–1.0, the aspect ratio range is set to 0.75–1.3333, and the probability of random horizontal flipping is 0.5. The B4 full configuration further adopts mixup regularization with α = 0.1, and sets the boundary auxiliary loss weight according to the setting reported above [38,41].
During validation and testing, no random augmentation is used. Instead, a fixed preprocessing pipeline is adopted: each image is first resized to 438, followed by a 384 × 384 center crop. On the independent holdout and hard-boundary test sets, B4 adopts a three-crop testing strategy, including center, top-left, and bottom-right crops, with weights of 0.5, 0.3, and 0.2, respectively. The logits from different crops are combined through weighted averaging. All test predictions are produced by the predefined training pipeline, without using labels from the independent holdout or hard-boundary test sets for model selection, threshold search, or post-processing rule adjustment.
2.7.3. OOF-Safe Fixed Decision Rule
To reduce the risk of test-set tuning, this study uses out-of-fold (OOF) predictions from the train_cv_pool to determine an OOF-safe fixed decision rule. The OOF predictions are generated through group-aware five-fold cross-validation. Each image in the train_cv_pool is predicted only once in its corresponding validation fold by a model that has not seen that image or any samples from the same group during training [30,31].
OOF-safe post-calibration determines the final decision rule using only OOF predictions. Specifically, this study searches class decision offsets on the OOF predictions and selects a fixed rule that satisfies the predefined constraints. Candidate offsets for the Huizhou and Classical Chinese classes were searched on a fixed grid from −0.12 to 0.12 with a step size of 0.005, while the offsets for the Western and Modern classes were fixed at 0. Three predefined operating points were considered before test-set evaluation: a recall-prior point, a balanced point, and an FP-prior point. The recall-prior point gives priority to Huizhou recall under an acceptable four-class OOF Macro-F1 constraint; the FP-prior point gives priority to suppressing Huizhou false positives among Classical Chinese samples; and the balanced point is selected as the operating point that maintains a compromise between OOF Macro-F1, Huizhou recall, and Classical Chinese recall. The final balanced point uses a temperature coefficient of T = 1.0, meaning that the probability scale of the four classes is not changed. During decision-making, the class scores are adjusted as follows:
and the final prediction is obtained by:
The offset is applied simultaneously to Huizhou and Classical Chinese and therefore does not directly change the relative ranking between the two categories. Its function is to suppress the excessive absorption tendency of Huizhou and Classical Chinese categories relative to Western and Modern categories, and to constrain the final output within the OOF-safe fixed decision rule determined by OOF predictions. The above offsets are determined solely from OOF predictions and are applied once to both the independent holdout and hard-boundary test sets. The labels of these two test sets are not involved in threshold search, rule selection, or model retraining [36].
2.7.4. Stronger Backbone Baseline Settings
To address whether the proposed workflow remains necessary when stronger modern backbones are used, this study further evaluates five widely used baseline architectures: ConvNeXt-Tiny, EfficientNet-B4, Swin-Tiny, ViT-B/16, and fine-tuned CLIP ViT-B/16. These baselines are trained and evaluated using the same dataset partition, the same group-aware five-fold cross-validation protocol, the same independent holdout subset, and the same hard-boundary test as the B0–B4 experiments.
For this stronger backbone comparison, the models are treated as standard baseline classifiers rather than as variants of SAB-ResNet. Therefore, they use the normal sampler and do not use GHB sampling, the boundary auxiliary head, boundary loss, SGA, ADA, Sobel/edge branches, mixup, multi-crop testing, or other proposed structural modules. For each stronger backbone, the OOF-safe fixed-rule parameters are determined only from the group-aware OOF predictions of the train_cv_pool and are then frozen before evaluation on the independent holdout and hard-boundary test sets. The independent holdout and hard-boundary labels are not used for fixed-rule selection.
3. Experimental Results and Analysis
3.1. Experimental Design and Evaluation Questions
This section reports the experimental results of the proposed reliability-oriented workflow for Huizhou architectural heritage image archiving.
The experimental analysis is organized around five questions. First, the B0–B4 ablation study examines how the ResNet50 baseline, GHB sampling, SAB-ResNet, and the complete B4 configuration affect standard four-class metrics and hard-boundary metrics. Second, based on the B4 raw output, OOF-safe fixed decision rules are evaluated to determine whether a predefined operating point can improve the final output without using independent holdout or hard-boundary labels for rule selection. Third, the independent holdout evaluation examines the fixed model under the four-class setting on a group-disjoint subset derived from the same curated dataset, rather than on a third-party external dataset. Fourth, the hard-boundary test evaluates the distinction between Huizhou architecture and visually similar Classical Chinese samples. Finally, subclass-level diagnosis and Grad-CAM visualization are used to interpret the remaining Huizhou false positives.
3.2. Ablation Study: From Baseline to Complete Configuration
To analyze the impact of different model components and training strategies on the recognition results of Huizhou architecture, five experimental groups (B0–B4) were configured under identical data splits and evaluation protocols. The results are presented in Table 5 and visualized in Figure 9. Specifically, B0 represents the ResNet50 baseline; B1 incorporates GHB sampling; B2 introduces the SAB-ResNet structural perception module; B3 combines both SAB-ResNet and GHB sampling; and B4 represents the output results from the complete training configuration without OOF-safe post-calibration.
Table 5.
Reliability-oriented workflow ablation.
Figure 9.
B0–B4 raw model ablation results.
This subsection analyzes the influence of each module on standard four-class performance and hard-boundary risk. The fixed decision-rule results are reported in Section 3.3.
As shown in Table 5, ResNet50 already provides a strong conventional four-class baseline, with a mean CV MF1 of 0.9272 and an Independent Holdout MF1 of 0.9116. However, its Jiangnan FP reaches 0.252, indicating that high overall four-class performance does not necessarily prevent visually similar Jiangnan white-walled and grey-tiled buildings from being misclassified as Huizhou architecture.
The B1–B3 results reveal a clear trade-off between standard four-class performance and hard-boundary control. GHB sampling reduces Jiangnan FP from 0.252 to 0.170, suggesting that increasing the exposure of Huizhou and visually similar Classical Chinese samples can suppress some near-neighbour false positives. However, this improvement is accompanied by a decrease in CV MF1 and Independent Holdout MF1. By contrast, SAB-ResNet alone improves Independent Holdout MF1 compared with ResNet50, but does not reduce Jiangnan FP. This result suggests that structure-aware representation can strengthen general four-class recognition, but hard-boundary reliability still requires explicit difficult-sample training and diagnostic evaluation.
When SAB-ResNet and GHB sampling are combined, B3 achieves better hard-boundary performance than either component alone, with a Hard Binary F1 of 0.7932 and a Classical Recall (4C) of 0.8940. The complete B4 raw configuration further improves the overall balance among CV MF1, Independent Holdout MF1, Hard Binary F1, Huizhou Recall, and Classical Recall (4C). Nevertheless, the Jiangnan FP of B4 raw remains 0.212, showing that the complete training configuration improves overall recognition but does not fully remove the near-neighbour false-positive risk.
Overall, the ablation results indicate three main patterns. First, conventional four-class performance and hard-boundary reliability should be evaluated separately. Second, GHB sampling is more directly related to suppressing Jiangnan false positives, whereas SAB-ResNet mainly strengthens structure-aware representation and four-class generalization. Third, the B4 raw configuration provides the strongest overall basis for the subsequent OOF-safe fixed decision-rule analysis, but post-calibration is still needed to select a more suitable operating point without tuning on the independent holdout or hard-boundary test labels.
3.3. OOF-Safe Fixed Decision Rules and Main Results
The results from the previous section indicate that B4 raw achieves a favorable comprehensive performance between standard four-class classification and hard-boundary identification. However, the Jiangnan FP diagnostic results also suggest that similar Jiangnan white-walled and grey-tiled Classical Chinese architecture may still be misclassified as Huizhou. To avoid repeatedly adjusting thresholds or calibration rules based on test-set results, this paper adopts OOF-safe decision rules [30,31] based on the output of B4 raw. These rules are determined solely by out-of-fold predictions from the train_cv_pool.
Table 6 reports the results of B4 raw alongside three OOF-safe decision rules. Among these, the balanced point serves as the main result of this paper. The recall-prior point and FP-prior point are utilized solely for sensitivity analysis and are not used for re-selecting the final model. Jiangnan FP also does not participate in the operating point selection, serving only as a diagnostic statistic for misclassification sources within the Classical Chinese negative subclass.
Table 6.
OOF-safe main result and sensitivity analysis.
Table 6 indicates that the B4 OOF-safe balanced point improved both independent holdout and hard-boundary performance compared to B4 raw. Specifically, the Independent Holdout MF1 improved from 0.9341 to 0.9501, and the Hard Binary F1 rose from 0.7980 to 0.8182. Concurrently, the Huizhou Recall remained at 0.7800, and the Classical Recall (4C) reached 0.9300. These findings suggest that, in this experiment, fixed decision rules determined from OOF predictions can improve the stability of the final outputs without retraining the model or tuning parameters on the independent holdout or hard-boundary test labels [36].
The recall-prior point and FP-prior point illustrate the trade-offs under different archival requirements. The recall-prior point prioritizes retaining Huizhou predictions, thereby increasing Huizhou Recall to 0.7867. Conversely, the FP-prior point emphasizes excluding visually similar Classical Chinese buildings, boosting Classical Recall (4C) to 0.9467, while lowering Jiangnan FP to 0.140. However, this comes at the cost of a decreased Huizhou Recall to 0.7400.
Consequently, the subsequent independent holdout evaluations and hard-boundary test analyses employ the balanced point as the primary result. This configuration does not aim for optimality in a single metric but rather seeks a relatively balanced outcome among Independent Holdout MF1, Hard Binary F1, Huizhou Recall, and Classical Recall (4C). Subsequent sections will further analyze the performance of this fixed rule on the independent four-class validation set and hard-boundary samples, utilizing Jiangnan FP as a sub-class diagnostic metric to elucidate remaining misclassification sources.
3.4. Comparison with Stronger Backbone Baselines Under the Fixed-Rule Setting
To ensure that the comparison is not limited to ResNet-derived models, this study additionally evaluates B4 against stronger modern CNN, Transformer, and CLIP-based backbones. All stronger baselines are evaluated under the same group-aware split, independent holdout, hard-boundary test, and OOF-safe fixed-rule protocol described above. Table 7 reports the fixed-rule results required for this comparison.
Table 7.
Stronger backbone baseline comparison under the same OOF-safe fixed-rule setting.
For each stronger backbone, the fixed-rule parameters are selected only from group-aware OOF predictions and then frozen before held-out and hard-boundary evaluation.
The stronger backbone results show that modern architectures provide competitive held-out four-class performance under the same fixed-rule setting. In particular, CLIP ViT-B/16 and ConvNeXt-Tiny reach fixed-rule Independent Holdout MF1 scores of 0.9469 and 0.9466, respectively, while the B4 OOF-safe balanced point reaches 0.9501.
However, the same fixed-rule evaluation also shows that stronger backbones still retain Huizhou–Classical Chinese boundary risk. Their fixed-rule Hard Binary F1 scores remain in the range of 0.7943–0.8123, and the Jiangnan FP rates remain between 0.1900 and 0.2400. The B4 OOF-safe balanced point remains comparable or higher on the same metrics, with a Hard Binary F1 of 0.8182 and a Jiangnan FP rate of 0.1900. These results support the need to evaluate modern backbones under hard-boundary diagnosis and OOF-safe fixed-rule protocols, rather than relying only on conventional held-out classification performance.
3.5. Independent Holdout Evaluation: General Four-Class Recognition
The B4 OOF-safe balanced point is first evaluated on the independent holdout set. The independent holdout is a balanced, group-disjoint validation set containing Huizhou, Classical Chinese, Western, and Modern samples. It is used to examine the held-out four-class performance of the fixed model on group-disjoint samples from the same curated dataset [30,31].
Table 8 presents the class-specific results on the independent holdout. The Macro-F1 score of the B4 OOF-safe balanced point reaches 0.9501, surpassing the 0.9341 achieved by B4 raw. Specifically, the F1 score for Huizhou improves from 0.9022 to 0.9273, and the F1 score for Classical Chinese increases from 0.8812 to 0.9097. In contrast, the Western and Modern categories already exhibit high recognition performance in B4 raw and remain stable under the fixed decision rule, with F1 scores of 0.9799 and 0.9835, respectively.
Table 8.
Per-class performance on the independent holdout.
3.6. Hard-Boundary Evaluation: Huizhou Versus Visually Similar Classical Chinese Architecture
This section evaluates the B4 OOF-safe balanced point on the hard-boundary test set, which contains difficult Huizhou samples and visually similar Classical Chinese negatives, including Jiangnan white-walled and grey-tiled buildings, regional folk houses, and temple/garden/palace architecture.
Figure 10 presents the binary confusion matrix for the B4 OOF-safe balanced point on the hard-boundary test. In this analysis, Huizhou_hard is treated as the positive class, while the three categories of Classical Chinese negatives—Jiangnan white-walled and grey-tiled, Regional folk houses, and Temple/garden/palace—are combined into the negative class. The results show that the model correctly identifies 117 Huizhou_hard samples and misclassifies 33 of them. Among the 300 hard negatives, 281 are not erroneously classified as Huizhou, while 19 are incorrectly assigned to the Huizhou category. Consequently, the Hard Binary F1 score reaches 0.8182, the Huizhou Recall is 0.7800, and the recall for non-Huizhou traditional architecture in the binary setting is 0.9367.
Figure 10.
Binary confusion matrix of the B4 OOF-safe balanced point on the hard-boundary test.
When further analyzed using the original four-class label space, 279 of the 300 hard negatives are predicted as Classical Chinese, corresponding to a Classical Recall (4C) of 0.9300. The remaining 2 samples are predicted as other non-Huizhou categories and therefore do not contribute to Huizhou false positives. This distinction is important: the binary evaluation focuses on whether a hard-negative sample is mistakenly included in the Huizhou category, whereas Classical Recall (4C) reflects whether hard negatives are still preserved within the Classical Chinese decision in the original four-class label space.
Overall, the B4 OOF-safe balanced point provides a usable but still imperfect boundary between Huizhou architecture and visually similar Classical Chinese architecture. The remaining Huizhou false positives and missed hard Huizhou samples are further examined in the following section.
3.7. Remaining Error Sources and Architectural Semantic Interpretation
To identify the sources of the remaining Huizhou false positives, the hard-negative samples are analyzed according to their original subclass metadata, as shown in Figure 11. This subclass analysis is used only for error diagnosis and does not change the four-class label system.
Figure 11.
Subclass-level confusion matrix on the hard-boundary test.
Table 9 and Figure 11 show that 19 of the 100 Jiangnan white-walled and grey-tiled samples were predicted as Huizhou, whereas no Huizhou false positives occurred in the Regional folk house or Temple/garden/palace subclasses. This indicates that, in the current hard-boundary test set, the remaining Huizhou false positives are concentrated in the Jiangnan subtype rather than broadly distributed across all Classical Chinese hard negatives. Jiangnan white-walled and grey-tiled architecture shares visual cues with Huizhou architecture, including white walls, dark pitched roofs, street-lane scale, courtyard ambience, and traditional settlement scenes [23]. When horse-head walls, fire-sealing gables, courtyard relationships, or Huizhou village textures are unclear, the model may over-interpret shared white-walled and grey-tiled cues as Huizhou evidence [7,23].
Table 9.
Huizhou false-positive rate by hard-negative subtype.
By contrast, the Regional folk house and Temple/garden/palace subclasses function more as control groups in the current test set, showing that the model does not simply assign all Classical Chinese architectural samples to the Huizhou category.
This pattern is useful for archival review because it suggests that manual verification should prioritize Jiangnan-like samples with visual proximity to Huizhou architecture, rather than all Classical Chinese samples equally.
To further examine whether confidence scores can separate reliable predictions from hard-boundary errors, the confidence score of each sample was calculated as the maximum softmax probability of the predicted class. The distributions of correct and incorrect predictions were then compared on the hard-boundary test.
As shown in Figure 12, the confidence distributions of correct and incorrect predictions overlap. This suggests that some visually ambiguous hard-boundary samples may still receive relatively high confidence and cannot be fully filtered by a simple confidence threshold. Therefore, confidence-score analysis is treated here as a diagnostic visualization, while the final decision rule remains fixed from the OOF predictions without using hard-boundary test labels for threshold tuning.
Figure 12.
Confidence score distributions.
By integrating representative misclassification samples and Grad-CAM visualizations, the aforementioned phenomena can be further elucidated [37]. For correctly identified Huizhou samples, the model typically focuses on regions associated with architectural form boundaries and facade organization, such as roof outlines, gable edges, wall turns, and facade components. Conversely, in Jiangnan false positives, the heatmaps tend to concentrate on white walls, dark roofs, street perspective, or large areas of traditional scene backgrounds. This suggests that while the model can utilize some architectural structural cues, it may still be influenced by shared colors, materials, and roof forms among similar regional traditional architectures. It is important to note that Grad-CAM serves solely as qualitative supporting evidence to aid in interpreting model attention regions and does not demonstrate that the model has developed a rigorous understanding of architectural components.
The false-negative cases show a different error pattern. In these samples, the true label is Huizhou, but the visible Huizhou-specific cues are weak, partially occluded, or not clearly represented by the image view. Horse-head walls, fire-sealing gables, courtyard relationships, or local decorative components may be absent, cropped, or visually ambiguous. As a result, the model tends to rely on more generic traditional architectural cues, such as grey tiled roofs, white walls, continuous eaves, or street-scale context, and assigns these difficult Huizhou samples to the Classical Chinese category. This indicates that missed Huizhou cases are mainly related to insufficiently visible regional morphological evidence, whereas Jiangnan false positives are mainly caused by over-interpreting shared white-wall and grey-tile cues as Huizhou evidence.
Overall, Figure 11, Figure 12 and Figure 13 indicate that, in the current hard-boundary test set, Huizhou false positives are not randomly distributed but are mainly concentrated in Jiangnan-like white-walled and grey-tiled samples. The confidence-score distribution and Grad-CAM visualizations further show that some hard-boundary errors cannot be fully identified by confidence thresholding alone and are related to visually similar architectural components and scene-level cues. This finding explains why reporting Macro-F1 solely on an independent holdout is insufficient for assessing the reliability of heritage image archiving. For practical applications, Jiangnan-like samples should be prioritized for manual review to prevent the model from over-classifying visually similar Classical Chinese architecture into the Huizhou category.
Figure 13.
Representative false-positive and false-negative cases with Grad-CAM explanations.
4. Discussion
4.1. Interpretation of the Main Findings
The experimental results show that conventional four-class recognition and hard-boundary reliability should be interpreted as related but different evaluation objectives. On the independent holdout subset, the B4 OOF-safe balanced point achieved a Macro-F1 of 0.9501, indicating that the proposed workflow maintained strong four-class recognition performance under the present curated dataset and evaluation setting. However, the hard-boundary test revealed a more difficult situation: the Huizhou Recall decreased to 0.7800, and the Hard Binary F1 was 0.8182. Within the present curated dataset and evaluation setting, this contrast indicates that high four-class performance alone is insufficient to evaluate whether a model can handle visually similar neighbouring architectural styles [27].
The subclass-level diagnosis further indicates that the remaining boundary risk is concentrated in Jiangnan white-walled and grey-tiled samples, rather than being broadly distributed across all Classical Chinese hard-negative subtypes.
These findings also help clarify the role of the proposed workflow. Group-aware splitting reduces the possibility that performance is inflated by repeated buildings, near-duplicates, or multi-view samples across different subsets [30,31]. The hard-boundary test makes near-neighbour misclassification visible rather than allowing it to be hidden behind aggregate four-class metrics. The OOF-safe fixed decision rule further reduces the risk of selecting an operating point by repeatedly inspecting the independent holdout or hard-boundary test labels. Therefore, the main value of the study lies not in SAB-ResNet alone, but in the reliability-oriented workflow that combines leakage control, hard-boundary diagnosis, structure-aware recognition, and test-label-safe decision-rule selection.
4.2. Practical Implications for Architectural Heritage Image Archiving
For potential practical use in architectural heritage image archiving, the model outputs should be regarded as auxiliary evidence rather than final architectural judgments. As illustrated in Figure 14, a possible application workflow can be organized into five steps: automatic pre-screening, boundary-risk warning, expert manual review, archive label confirmation, and conservation decision support.
Figure 14.
Practical workflow for architectural heritage image archiving.
In practical archive management, high-confidence non-boundary predictions may be used as preliminary indexing tags for image organization, retrieval, duplicate sorting, and review prioritization. However, these labels should still be treated as provisional archive labels rather than final heritage identification. Samples predicted as Huizhou with low confidence, samples located near the Huizhou–Classical Chinese boundary, Jiangnan-like white-walled and grey-tiled samples, and cases with unclear Huizhou-specific morphological evidence should be flagged for specialist review before final archive confirmation.
In the first step, large-scale architectural image collections are automatically pre-screened to generate preliminary four-class predictions. In the second step, samples located near the Huizhou–Classical Chinese boundary are flagged as boundary-risk cases, especially Jiangnan white-walled and grey-tiled samples with unclear Huizhou-specific morphological evidence. In the third step, experts review these uncertain or high-risk samples by combining the original image, model prediction, confidence information, and architectural knowledge. In the fourth step, the final archive label is confirmed under human supervision rather than determined solely by the model. In the final step, the confirmed labels and boundary-risk records may support candidate heritage image retrieval, manual inspection prioritization, and conservation-related decision support. Therefore, the proposed workflow should be understood as a human-in-the-loop auxiliary process rather than a fully automatic replacement for expert judgment.
In this workflow, Jiangnan-like samples with unclear Huizhou-specific morphological evidence should be prioritized for expert review. This practical workflow can further support heritage management aligned with the Sustainable Development Goals (SDGs). Built heritage constitutes a cross-domain resource for sustainable development, linking cultural conservation with local identity, community development, adaptive reuse, sustainable tourism, and long-term urban and rural revitalization [42]. Against this background, the image-archiving workflow proposed in this study may facilitate SDG-aligned practices by supporting the preliminary organization of dispersed architectural heritage photographs, highlighting image samples with ambiguous boundary risks, and helping specialists prioritize cases that require manual inspection. This is consistent with UNESCO’s view that cultural and World Heritage can contribute to sustainable development when heritage conservation is integrated with broader urban, social, economic, and environmental objectives [43]. Accordingly, the proposed approach should not be understood merely as a classification model, but as a digital auxiliary tool for sustainable heritage documentation and conservation-oriented decision-making.
4.3. Limitations and Future Work
This study still has several limitations. First, HuizhouStyle-4C is a curated research dataset constructed from multi-source architectural images. Although quality screening, annotation review, group-aware partitioning, and leakage auditing were performed, the dataset is still limited in scale, regional coverage, and source diversity. In addition, complete per-image source URLs were not retained for all publicly accessible web images during the early exploratory collection stage. Therefore, the raw image files are not redistributed as a public benchmark dataset. Future dataset construction should record per-image source URLs, acquisition time, license status, geographic metadata, and screening logs from the beginning of data collection.
Second, the independent holdout subset and hard-boundary test are both derived from the curated dataset. The independent holdout is a group-disjoint held-out subset for four-class evaluation, not a third-party external dataset or a cross-institutional validation set. Therefore, the reported results should be interpreted as within-dataset held-out performance under the present curated dataset and evaluation setting, rather than as evidence of cross-institutional or real-world external generalization. Future work should introduce additional independently collected datasets from different institutions, regions, collection platforms, and shooting conditions to further examine the generalizability of the proposed workflow.
Third, the current study focuses on image-level architectural style recognition. Although Sobel edge cues, attention modules, and Grad-CAM visualizations provide useful qualitative evidence, they do not prove that the model has learned explicit architectural components. Future work may incorporate component-level annotations, weakly supervised localization, facade parsing, or semantic segmentation to examine more specific elements such as horse-head walls, roof ridges, courtyards, doors, windows, and carved components [19,44].
Finally, the present model is designed for closed-set recognition among Huizhou, Classical Chinese, Western, and Modern categories. In real archival scenarios, images may include unknown regional styles, hybrid buildings, restoration projects, non-building scenes, or samples with insufficient architectural evidence. Future research may therefore combine the proposed hard-boundary evaluation with open-set recognition, uncertainty estimation, and human-in-the-loop review to improve its applicability in more complex architectural heritage archiving tasks [29].
These limitations suggest four priorities for future work: independently collected cross-regional datasets, more explicit component-level architectural evidence, open-set and uncertainty-aware recognition, and SDG-oriented human-in-the-loop archival workflows that combine automatic screening, boundary-risk warning, uncertainty-based prioritization, expert confirmation, archive management, and conservation decision support.
5. Conclusions
This study proposed a reliability-oriented workflow for archiving images of Huizhou architectural heritage. Instead of treating the task as conventional four-class recognition alone, the workflow combines group-aware leakage control, hard-boundary diagnosis, a structure-aware baseline classifier, and OOF-safe fixed decision-rule selection.
Under the present curated dataset and within-dataset held-out evaluation setting, the B4 OOF-safe balanced point achieved an Independent Holdout Macro-F1 of 0.9501 and a Hard Binary F1 of 0.8182. The results show that strong four-class recognition does not fully eliminate the risk of near-neighbour misclassification. In particular, the remaining Huizhou false positives were mainly observed in Jiangnan white-walled and grey-tiled samples, indicating that this subtype should be prioritized during expert manual review.
Overall, the study suggests that, within the present dataset and task setting, architectural heritage image archiving may benefit from leakage-aware data partitioning, explicit hard-boundary evaluation, and decision rules fixed without using test-set labels.
Future work should therefore focus on independently collected cross-regional datasets, Jiangnan-like boundary samples, component-level architectural annotations, open-set recognition, uncertainty estimation, and human-in-the-loop archival workflows to examine cross-institutional and real-world generalizability.
Author Contributions
Conceptualization, W.Q. and J.H.; methodology, W.Q. and J.H.; software, J.H.; validation, J.H.; formal analysis, W.Q. and J.H.; investigation, W.Q. and J.H.; data curation, J.H.; writing—original draft preparation, J.H.; writing—review and editing, W.Q. and J.H.; visualization, J.H.; supervision, W.Q.; Funding acquisition, W.Q. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by the Opening Fund of Liaoning Key Laboratory of Urban and Architectural Digital Technology under Grant No. 20NDJC052YB.
Data Availability Statement
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to copyright and source restrictions.
Conflicts of Interest
Author Wenqi Qiao was employed at the Postdoctoral Research Station of Liaoning Urban and Rural Construction Planning Design Institute Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Appendix A
This appendix provides detailed group-aware composition information for HuizhouStyle-4C. Table A1 reports both image counts and unique visual/source group counts by split and class. These counts supplement the dataset partitioning summary in Section 2.2 and support the reproducibility of the group-aware cross-validation, independent holdout, and hard-boundary evaluation settings.
Table A1.
Image and group counts by split and class/subclass in HuizhouStyle-4C.
References
- Cui, H.; Wu, J. How Architectural Heritage Is Moving to Smart: A Systematic Review of HBIM. Buildings 2025, 15, 2664. [Google Scholar] [CrossRef] [Scilit]
- Salah, R.; Géczy, N.; Ajtayné Károlyfi, K. Architectural Heritage Digitization: A Classification-Driven Semi-Automated Scan-to-HBIM Workflow. Buildings 2026, 16, 21. [Google Scholar] [CrossRef] [Scilit]
- Wang, S.; Zhang, J.; Tun, A.N.; Sein, K. Research on Identification, Evaluation, and Digitization of Historical Buildings Based on Deep Learning Algorithms: A Case Study of Quanzhou World Cultural Heritage Site. Buildings 2025, 15, 1843. [Google Scholar] [CrossRef] [Scilit]
- Ma, K.; Wang, B.; Li, Y.; Zhang, J. Image Retrieval for Local Architectural Heritage Recommendation Based on Deep Hashing. Buildings 2022, 12, 809. [Google Scholar] [CrossRef] [Scilit]
- Gao, L.; Wu, Y.; Yang, T.; Zhang, X.; Zeng, Z.; Chan, C.K.D.; Chen, W. Research on Image Classification and Retrieval Using Deep Learning with Attention Mechanism on Diaspora Chinese Architectural Heritage in Jiangmen, China. Buildings 2023, 13, 275. [Google Scholar] [CrossRef] [Scilit]
- Han, Q.; Yin, C.; Deng, Y.; Liu, P. Towards Classification of Architectural Styles of Chinese Traditional Settlements Using Deep Learning: A Dataset, a New Framework, and Its Interpretability. Remote Sens. 2022, 14, 5250. [Google Scholar] [CrossRef] [Scilit]
- Hong, T.; Zhang, G.; Zhang, W.; Feng, J.; Li, H.; Bai, X.; Wang, Q.; Yu, H. A Study on the Influence of Hui-Style Architectural on Architecture in West Anhui. Buildings 2026, 16, 1187. [Google Scholar] [CrossRef] [Scilit]
- Wang, Q.; Yuan, Q.; Li, Z.; Cheng, G.; Gao, X.; Li, M.; Ma, X. Study on the spatial relationships of traditional regional dwellings in Huizhou district. npj Herit. Sci. 2025, 13, 238. [Google Scholar] [CrossRef] [Scilit]
- Zhang, X.; Li, S.; Chen, C. Classification of architectural styles in Chinese traditional settlements using remote sensing images and building facade pictures. J. Geogr. Sci. 2024, 34, 2457–2476. [Google Scholar] [CrossRef] [Scilit]
- Luo, T.; Sun, X.; Zhao, W.; Li, W.; Yin, L.; Xie, D. Ethnic Architectural Heritage Identification Using Low-Altitude UAV Remote Sensing and Improved Deep Learning Algorithms. Buildings 2025, 15, 15. [Google Scholar] [CrossRef] [Scilit]
- Llamas, J.; Lerones, P.M.; Medina, R.; Zalama, E.; Gomez-Garcia-Bermejo, J. Classification of Architectural Heritage Images Using Deep Learning Techniques. Appl. Sci. 2017, 7, 992. [Google Scholar] [CrossRef] [Scilit]
- Siountri, K.; Anagnostopoulos, C.N. The Classification of Cultural Heritage Buildings in Athens Using Deep Learning Techniques. Heritage 2023, 6, 3673–3705. [Google Scholar] [CrossRef] [Scilit]
- Carvalho Ottoni, A.L.; Cordeiro Ottoni, L.T. A deep learning approach for cultural heritage building classification using transfer learning and data augmentation. J. Cult. Herit. 2025, 74, 214–224. [Google Scholar] [CrossRef] [Scilit]
- Zhou, J.; Xie, L.; Fricker, P.; Liu, K. ConvNeXt-L-Based Recognition of Decorative Patterns in Historical Architecture: A Case Study of Macau. Buildings 2025, 15, 3705. [Google Scholar] [CrossRef] [Scilit]
- Maskeliunas, R.; Katkevicius, A.; Plonis, D.; Sledevic, T.; Meskenas, A.; Damasevicius, R. Building Facade Style Classification from UAV Imagery Using a Pareto-Optimized Deep Learning Network. Electronics 2022, 11, 3450. [Google Scholar] [CrossRef] [Scilit]
- Liang, X.; Xie, J.; Zhao, T.; Stouffs, R.; Biljecki, F. OpenFACADES: An open framework for architectural caption and attribute data enrichment via street view imagery. ISPRS J. Photogramm. Remote Sens. 2025, 230, 918–942. [Google Scholar] [CrossRef] [Scilit]
- Zhang, L.; Wang, G.; Sun, W. Automatic identification of building structure types using unmanned aerial vehicle oblique images and deep learning considering facade prior knowledge. Int. J. Digit. Earth 2023, 16, 3348–3367. [Google Scholar] [CrossRef] [Scilit]
- Wang, S.; Han, J. Automated detection of exterior cladding material in urban area from street view images using deep learning. J. Build. Eng. 2024, 96, 110466. [Google Scholar] [CrossRef] [Scilit]
- Liu, H.; Xu, Y.; Zhang, J.; Zhu, J.; Li, Y.; Hoi, S.C.H. DeepFacade: A Deep Learning Approach to Facade Parsing with Symmetric Loss. IEEE Trans. Multimed. 2020, 22, 3153–3165. [Google Scholar] [CrossRef] [Scilit]
- Zhang, G.; Pan, Y.; Zhang, L. Deep learning for detecting building facade elements from images considering prior knowledge. Autom. Constr. 2022, 133, 104016. [Google Scholar] [CrossRef] [Scilit]
- Dai, M.; Ward, W.O.; Meyers, G.; Densley Tingley, D.; Mayfield, M. Residential building facade segmentation in the urban environment. Build. Environ. 2021, 199, 107921. [Google Scholar] [CrossRef] [Scilit]
- Maru, M.B.; Wang, Y.; Kim, H.; Yoon, H.; Park, S. Improved building facade segmentation through digital twin-enabled RandLA-Net with empirical intensity correction model. J. Build. Eng. 2023, 78, 107520. [Google Scholar] [CrossRef] [Scilit]
- Cheng, G.; Li, Z.; Cheng, Z.; Zhang, Y.; Wang, Q.; Shao, W.; Shi, T. Similarity and stability: A study on the color features of regional built spaces—Taking Chinese Hui-style architecture as an example. J. Asian Archit. Build. Eng. 2025, 24, 3625–3653. [Google Scholar] [CrossRef] [Scilit]
- Zou, H.; Ge, J.; Liu, R.; He, L. Feature Recognition of Regional Architecture Forms Based on Machine Learning: A Case Study of Architecture Heritage in Hubei Province, China. Sustainability 2023, 15, 3504. [Google Scholar] [CrossRef] [Scilit]
- Shao, L.; Sun, J. Identification of historic building genes based on deep learning: A case study on Chinese baroque architecture in Harbin, China. Herit. Sci. 2023, 11, 241. [Google Scholar] [CrossRef] [Scilit]
- Wu, J.; Ying, Y.; Tan, Y.; Liu, Z. Innovative Framework for Historical Architectural Recognition in China: Integrating Swin Transformer and Global Channel-Spatial Attention Mechanism. Buildings 2025, 15, 176. [Google Scholar] [CrossRef] [Scilit]
- Farhadpour, S.; Warner, T.A.; Maxwell, A.E. Selecting and Interpreting Multiclass Loss and Accuracy Assessment Metrics for Classifications with Class Imbalance: Guidance and Best Practices. Remote Sens. 2024, 16, 533. [Google Scholar] [CrossRef] [Scilit]
- Geirhos, R.; Rubisch, P.; Michaelis, C.; Bethge, M.; Wichmann, F.A.; Brendel, W. ImageNet-Trained CNNs Are Biased towards Texture; Increasing Shape Bias Improves Accuracy and Robustness. In Proceedings of the International Conference on Learning Representations 2019, New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
- Lang, N.; Snaebjarnarson, V.; Cole, E.; Mac Aodha, O.; Igel, C.; Belongie, S. From Coarse to Fine-Grained Open-Set Recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) 2024, Seattle, WA, USA, 16–22 June 2024; pp. 17804–17814. [Google Scholar] [CrossRef] [Scilit]
- Ramos, P.; Ramos, R.; Garcia, N. Data Leakage in Visual Datasets. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops (ICCVW) 2025, Honolulu, HI, USA, 19–20 October 2025; pp. 6368–6378. [Google Scholar] [CrossRef] [Scilit]
- Joeres, R.; Blumenthal, D.B.; Kalinina, O.V. Data splitting to avoid information leakage with DataSAIL. Nat. Commun. 2025, 16, 3337. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 2016, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef] [Scilit]
- Canny, J. A Computational Approach to Edge Detection. IEEE Trans. Pattern Anal. Mach. Intell. 1986, PAMI-8, 679–698. [Google Scholar] [CrossRef] [Scilit]
- Xie, S.; Tu, Z. Holistically-Nested Edge Detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV) 2015, Santiago, Chile, 7–13 December 2015; pp. 1395–1403. [Google Scholar] [CrossRef] [Scilit]
- Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.S. CBAM: Convolutional Block Attention Module. In Proceedings of the European Conference on Computer Vision (ECCV) 2018, Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
- Guo, C.; Pleiss, G.; Sun, Y.; Weinberger, K.Q. On Calibration of Modern Neural Networks. In Proceedings of the International Conference on Machine Learning 2017, Sydney, Australia, 6–11 August 2017; pp. 1321–1330. [Google Scholar]
- Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. In Proceedings of the IEEE International Conference on Computer Vision (ICCV) 2017, Venice, Italy, 22–29 October 2017; pp. 618–626. [Google Scholar] [CrossRef] [Scilit]
- Deng, J.; Dong, W.; Socher, R.; Li, L.-J.; Li, K.; Fei-Fei, L. ImageNet: A Large-Scale Hierarchical Image Database. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 2009, Miami, FL, USA, 20–25 June 2009; pp. 248–255. [Google Scholar] [CrossRef] [Scilit]
- Sobel, I.; Feldman, G. An Isotropic 3 × 3 Image Gradient Operator. 2014. [CrossRef]
- Loshchilov, I.; Hutter, F. Decoupled Weight Decay Regularization. In Proceedings of the International Conference on Learning Representations (ICLR) 2019, New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
- Zhang, H.; Cisse, M.; Dauphin, Y.N.; Lopez-Paz, D. mixup: Beyond Empirical Risk Minimization. In Proceedings of the International Conference on Learning Representations (ICLR) 2018, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Lerario, A. The Role of Built Heritage for Sustainable Development Goals: From Statement to Action. Heritage 2022, 5, 2444–2463. [Google Scholar] [CrossRef] [Scilit]
- UNESCO World Heritage Centre. World Heritage and Sustainable Development. Available online: https://whc.unesco.org/en/sustainabledevelopment/ (accessed on 7 July 2026).
- Kirillov, A.; Mintun, E.; Ravi, N.; Mao, H.; Rolland, C.; Gustafson, L.; Xiao, T.; Whitehead, S.; Berg, A.C.; Lo, W.-Y.; et al. Segment Anything. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) 2023, Paris, France, 2–3 October 2023; pp. 4015–4026. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.













