1. Introduction
The Qinba Mountainous Region is characterized by its steep terrain, deep valleys, and scarce flat land, with limited and scattered arable land. It is a typical mountainous agricultural area in China, and terraced fields are one of the most representative agricultural measures in this region. As the core form of slope farmland management, terraced fields reduce the risk of geological disasters such as landslides and debris flows, expand the area of cultivated land, increase crop yields, protect forest vegetation, and enhance the water conservation capacity of mountains. They play a crucial role in the economic development, agricultural security, and ecological security of the Qinba Mountainous Region [
1]. However, over the past 20 years, the spatial pattern of terraced fields in the Qinba Mountainous Region has undergone significant changes due to the combined effects of returning farmland to forests, urban expansion, and the outflow of the mountain population. Accurately grasping the spatial distribution and changes of terraced fields is conducive to the effective protection and scientific development of the characteristic agricultural areas in the Qinba Mountainous Region.
Due to the immaturity of early remote sensing imaging technology and the low resolution of remote sensing images, the extraction technology of terraced fields from remote sensing images was not mature and remained at the stage of manual statistics for a long time. With the popularization and application of high-resolution remote sensing images, the extraction of terraced fields has begun to attract attention from the academic community and has gradually become a research hotspot [
2]. There have been certain studies on extracting terraced field information using remote sensing images. Currently, there are mainly four types of methods for extracting terraced fields, including visual interpretation, texture spectrum information-based methods, object-oriented classification, and machine learning [
3]. Visual interpretation is the main method for extracting terraced field information, which is based on the spectral, texture, and shape information of the images. Yang Lei extracted terraced fields and other soil and water conservation information through visual interpretation of Spot5 images. The results showed that the effect of extracting terraced fields through visual interpretation was poor [
4]. With the continuous development of satellite sensors, the unique spatial frequency, texture features, and spectral differences of terraced fields can be utilized to achieve automatic interpretation through threshold segmentation, texture filtering, and other means. Wang Qing used high-resolution remote sensing images to extract terraced fields through the Fourier transform and compared this method with traditional supervised and unsupervised classification methods [
5]. Zhao Xin et al. analyzed the feasibility of extracting terraced field information using the Fourier transform based on GF-1 images. The results showed that a large number of terraced fields with indistinct texture features were missed or misinterpreted, and the Fourier transform algorithm was difficult to widely apply for extracting terraced field information [
6]. With the rapid development of high-resolution satellite sensors, object-oriented classification methods have also been applied to the extraction of terraced field information. This method segments remote sensing images into object units with semantic meaning and classifies them based on multi-dimensional features such as spectral, shape, and texture. Zhang Yugu, based on Spot5 images, used object-oriented classification, traditional supervised classification, and unsupervised classification methods to extract terraced field information. The results showed that the accuracy of extracting terraced fields using the object-oriented classification method was significantly higher than that of the traditional two classification methods [
7]. With the development of computing power and algorithms, machine learning methods have been widely applied. These methods still rely on manually designed features and use statistical learning classifiers such as support vector machines, random forests, and decision trees to automatically construct the mapping relationship between input features and output categories [
8,
9]. Li Wanyuan et al. used random forest and other algorithms to classify terraced fields in the Guyuan area of Ningxia and compared them with SVM and decision trees. The results showed that the recognition accuracy of random forest was the highest [
10]. In addition, some studies have combined terrain data and image features to extract terraced fields. By using the unique spatial frequency, shape, and other parameters of terraced fields to assist in segmentation, good results have been achieved. Among them, BP neural networks do not require manual setting of corresponding rules based on terraced field features, avoiding the interference of subjective factors. Support vector machines provide a classification standard for distinguishing terraced fields from non-terraced fields [
11,
12].
According to the current research status on terraced field extraction. The efficiency of extracting terraced field information based on visual interpretation methods is low, with high human and material costs, and the interpretation accuracy varies greatly, with low repeatability. The extraction of terraced fields based on texture spectral information is disturbed by the textures of non-terraced field objects and different terraced fields, resulting in a large number of false and missed areas, leading to unsatisfactory extraction accuracy. The extraction of terraced fields based on object-oriented methods requires manual adjustment of various parameter values, which is highly subjective. The extraction of terraced fields based on machine learning, such as BP neural networks, has limited information and cannot effectively eliminate interference objects on terraced fields, thus affecting the extraction accuracy.
In recent years, deep learning technology has become mainstream in image recognition. Compared with traditional machine learning, the advantage of deep learning is that it does not require manual feature extraction. The remote sensing image analysis method based on convolutional neural networks can significantly improve the recognition accuracy by automatically learning multi-level features from the original image and has been widely used in high-resolution remote sensing image classification tasks [
13]. Common network structures include fully convolutional networks (FCN), U-Net, DeepLab series, etc., for pixel classification, and Faster R-CNN, Mask R-CNN, YOLO, SSD, etc., for object detection [
14]. For terraced field interpretation research, Zhao et al. proposed the NLDF-Net model, which introduces a non-local attention module and a dual fusion module on the basis of U-Net, achieving better extraction results than other deep models [
15]. Xie et al. proposed the JAM-R-CNN model based on Mask R-CNN, combining skip networks and convolutional attention mechanisms, effectively improving the accuracy of terraced field recognition [
16]. Tian et al. optimized the structure of the classic segmentation network DeepLabv3 and weighted the loss to adapt to the fragmented characteristics of terraced fields, achieving higher accuracy and better recognition of field ridges and roads [
17].
Although convolutional neural networks are widely used in remote sensing image interpretation, there are still problems such as poor multi-scale adaptability, severe loss of detailed information, and insufficient handling of inter-class differences in the application of terraced field interpretation, which affect the actual interpretation effect [
18]. To address these issues, DeepLabV3 uses dilated spatial pyramid pooling to extract multi-scale features in parallel with different dilation rates, enhancing the adaptability to targets of diverse scales such as building clusters and farmlands, making it suitable for terraced field extraction [
19]. Chen proposed to use the core dilated convolution of the DeepLab series to expand the receptive field of the convolution kernel, integrate more feature information, and extract the segmented image where the foreground and background can be clearly distinguished, making the edges of different attributes clearer [
20]. Vijay et al. proposed the SegNet model in 2017, which has the advantage of reducing model running time and memory consumption [
21]. Based on this, models such as Bayesian SegNet and U-Net series have been developed [
22]. U-Net enhances feature extraction and reduces information loss during downsampling by strengthening detail recovery, improving the accuracy of road and river boundaries, making it suitable for fine tasks with small samples and high resolution, and more suitable for terraced field extraction [
23]. Lu et al. used an improved U-Net deep learning model to extract the spatial distribution of terraced fields in the Loess Plateau of China [
24]. Zhao H proposed the Pyramid Scene Analysis Network (PSPNet) model, which, compared with other models, integrates context information from different regions to identify and extract targets for all pixels in the image [
25]. This deep learning model can capture global and local contexts through multi-scale pooling for modeling, and capture global scenes, regional structures and local details through multi-level pooling [
26].
Among the deep learning models for land object recognition, DeepLabV3 represents the technical route of “dilated convolution + global context modeling”, UNet represents the technical route of “encoder-decoder + detail recovery”, and PSPNet represents the technical route of “multi-scale pooling + global scene capture”. These three routes basically cover the core technical directions of current semantic segmentation, and have all been verified in a large number of practices in remote sensing land object extraction, and have mature backbone networks. Therefore, this study adopts these three classic and widely used networks in the field of remote sensing land object extraction, which makes the research have a clear technical orientation and comparable basis [
27].
Generally speaking, the higher the resolution of remote sensing images used for interpretation, the higher the accuracy. However, due to the low resolution of remote sensing images before 2010, it is difficult to use deep learning models trained with high-precision images for recognition. When making remote sensing slices through visual interpretation with low-precision images, there are problems of low accuracy and unclear edge recognition. Therefore, this study selects the highest resolution historical images available (15 m resolution), uses ArcGISPro 3.0.1 to make remote sensing interpretation slices, and then uses Retnet-34 as the backbone, and respectively uses DeepLabV3, U-Net, and PSPNet models for deep learning training. After comparing the results, the deep learning model with the highest accuracy is used to finely extract terraced fields in the Qinba Mountain Area, and analyze the spatio-temporal distribution change rules of terraced fields in the Qinba Mountain Area from 2000 to 2020.
3. Results
3.1. Dataset Creation
The characteristics of terraced fields in Landsat-8 remote sensing imagery are shown in
Figure 3b. Based on the experimental requirements for terraced field extraction, visual interpretation was applied to assign corresponding categories and labels to the imagery. Since this study only requires the extraction of terraced field geographic features, they are classified as terraced fields (1) and non-terraced fields (0).
The Qinba Mountains exhibit diverse terraced field types with complex structures and varying morphological characteristics, complicating their extraction from remote sensing imagery. To extract terraced field information using deep learning, the training samples must contain rich terraced field features to ensure the deep learning model accurately learns these characteristics.
The first category exhibits distinct morphological characteristics, featuring pronounced three-dimensional terraced structures with clearly defined strip-like features (
Figure 3c). The second category is embedded within valleys, showing significant shadow occlusion and indistinct boundaries (
Figure 3d).
3.2. Comparison of Terrace Training Results
Using visual interpretation results as validation samples, three improved network models were trained for 50 epochs each. The trained models were then applied to validate the test set. Representative image blocks from the test set were selected for result demonstration, with predictions shown in
Figure 4. Visually, all three deep learning models exhibit high accuracy in interpreting terraced fields in the Qinba Mountains, accurately representing most sub-regions with clear boundaries.
To further investigate the performance disparities revealed by the quantitative metrics, a qualitative visual assessment was performed.
Figure 4 presents a comparative visualization of the segmentation results from the three deep learning models on a single,. The map illustrates prediction outcomes by overlaying True Positives, False Positives, and False Negatives on the original imagery, allowing for a direct analysis of each model’s behavior and typical error patterns.
PSPNet exhibited the least satisfactory performance. Its result is marked by a significant number of FN. This indicates that the model failed to identify a large portion of the actual terraces, particularly smaller patches, those with indistinct boundaries, or those situated in terrain shadow. U-Net performance was intermediate. In comparison to PSPNet, U-Net achieved a notable reduction in FN, producing more complete and contiguous terrace segments. DeepLabV3 demonstrated superior and more robust performance; its output shows the best equilibrium, achieving the lowest rates of both FN and FP.
3.3. Accuracy Assessment of the Dataset
The training loss curves (blue represents training set loss, orange represents validation set loss) allow us to compare the training processes and performance differences among U-Net, PSPNet, and DeepLabV3 as follows (
Figure 5). DeepLabV3 converges most rapidly among the three models, with training loss dropping below 0.2 after approximately 2000 batches and validation loss converging simultaneously. This demonstrates its superior fitting efficiency for the Qinba Mountain terraced field dataset. U-Net’s training loss stabilizes around 5000 batches, converging slower than DeepLabV3+ but faster than PSPNet. PSPNet exhibited the slowest convergence, with loss values only gradually stabilizing after 5000 batches. Notably, its training loss remained below validation loss, indicating significant overfitting. Consequently, its generalization capability was relatively weak, demonstrating insufficient adaptation to the complex features of the Qinba Mountain terraced field dataset.
The accuracy matrix for the different models is shown in
Table 1. Based on the comprehensive performance of core metrics, DeepLabV3 demonstrated the best performance among the three models, followed by U-Net, while PSP-Net showed relatively weaker performance. The accuracy matrix (
Table 1) shows that the DeepLab model achieved the highest recall (73.70%), precision (83.50%), IoU (77.26%), and F1 (80.98%) for the terraced field category among the three models. It also achieved the highest MPA (79.42%) and Kappa coefficient (71.48%), indicating superior classification accuracy between terraced and non-terraced fields, overall consistency, and minimal false negatives for terraced fields. The PSPNet model suffers from local detail loss due to pooling operations and employs a relatively simple fusion method for multi-scale features. In the fragmented terrain of the Qinba Mountains, where small-scale terraces are prevalent, it exhibits significant underclassification of small plots and misclassification of non-terraced areas. This model struggles to accurately identify individual terraces, often misclassifying large areas of scattered terraces as a single entity. The U-Net model relies on an encoder-decoder + skip-connection architecture, preserving more local details. This provides advantages in restoring terrace boundaries and identifying small plots. However, its lack of multi-scale global feature fusion results in weaker semantic discrimination between terraces and non-terraces compared to DeepLabV3, leading to slightly lower precision and recall rates. DeepLabV3’s structural design best aligns with the extraction requirements for Qinba Mountain terraces, delivering optimal performance in accuracy, stability, and consistency. U-Net serves as a lightweight alternative. PSP-Net, constrained by its structural limitations, demonstrates weaker performance in interpreting Qinba Mountain terraces.
3.4. Terrain-Level Uncertainty
As crucial factors in terrace classification, terrain has a major impact on classification accuracy. Terraces with obvious terrain features, specific slope and elevation, are easier to identify. The terrain-related uncertainty of our data is shown in
Figure 6.
The model exhibits its lowest accuracy in the low-altitude zone. River valleys and basins at lower elevations are often mosaics of various land cover types, including fragmented agricultural plots, expanding urban settlements, and infrastructure, which creates significant spectral confusion and complicates the identification of traditional terraced fields. Model performance steadily increases with altitude, peaking in the 1000–2000 m and 2000–3000 m ranges. In these areas, terraces are often the dominant form of agriculture, creating large, contiguous, and well-defined features that align perfectly with what the model has learned. A slight decrease in performance is observed at the highest elevations. This can be attributed to the transition to alpine and sub-alpine environments, where terraces become smaller, more fragmented, and are often interspersed with alpine meadows, shrubs, or bare rock, increasing classification ambiguity. The model achieves its highest accuracy in the 15–20° and particularly the 20–25° slope categories. This is the ideal range where terraces are most necessary and, consequently, most distinct. The topographic signature of a flat tread and a steep riser is maximized in this range, providing strong, unambiguous geometric and spectral features for the model to correctly classify.
3.5. Application of Multi-Channel Input Fusion in Mountain Terraces Identification
The RGB model, relying solely on spectral information, successfully identifies the general presence of terraced fields but the recognition accuracy varies among different DEMs. The predictions within large, contiguous terrace areas are fraught with internal voids and fragmentation. This indicates that when variations in spectral signatures occur within a terrace the model erroneously classifies these patches as non-terrace, thereby failing to preserve the semantic integrity of the geographic feature. In addition, the model exhibits a tendency to misclassify landforms with similar linear or curvilinear textures, such as contour farming strips or erosional gullies, as terraced fields. By learning from 2D texture alone, the model struggles to differentiate the true step-like structure of terraces from visually similar patterns on sloped terrain.
The fusion model, which incorporates DEM-derived topographic data, demonstrates improvement across these aspects (
Figure 7). The voids and fragmentation that plagued the baseline model’s predictions are effectively filled, resulting in complete and coherent terrace patches. And the fusion model accurately discriminates between terraced fields and the surrounding sloped terrain, significantly reducing the false positives observed in the baseline result.
Table 2 demonstrates that the fusion model (RGB+DEM) significantly outperforms the baseline model (RGB-Only) in the task of terrace extraction. The IoU increases from 77.26% to 78.38%, and the Kappa coefficient increases from 71.48% to 73.53%, which signifies a meaningful improvement in the model’s overall classification accuracy and reliability. The standard deviation of the IoU and Kappa score was reduced, indicating that the inclusion of DEM data makes the model not only more accurate but also more robust and generalizable across different geographic scenes within the Qinba Mountains.
3.6. Terrace Distribution Change in Qinba Mountain
Using the most accurate DeepLabV3 model to interpret the distribution of terraced fields in the Qinba Mountains from 2000 to 2020, the results are shown in
Figure 8.
From 2000 to 2010, the total area of terraced fields increased from 57.834 km2 to 59,668 km2, representing a net increase of 2844 km2 over the decade. The average annual growth rate was approximately 0.44%, indicating relatively stable expansion. 2010–2020: The total area expanded from 59,668 km2 to 63,742 km2. Over the decade, the net increase was 3074 km2, with an average annual growth rate of approximately 0.51%, indicating a significantly accelerated growth rate. The trend over the 20-year period showed a pattern of initially slow growth followed by accelerated expansion.
Analysis of terrace area changes and spatial distribution across provinces (
Figure 8a–c) reveals pronounced regional heterogeneity in terrace expansion. Sichuan consistently maintained the largest terrace area, growing from 24,032 km
2 to 25,729 km
2 between 2000 and 2020. Its net increase of 1697 km
2 accounted for 55.2% of the regional total, establishing Sichuan as the core growth area. Its spatial distribution is concentrated in the Daba Mountains of northern Sichuan. Shaanxi, Gansu, and Chongqing exhibit relatively balanced growth in terraced field area, with southern Shaanxi, southern Gansu, and northeastern Chongqing being the primary growth areas. Henan and Hubei provinces have the smallest terraced field areas and the slowest growth rates.
The changes in area across elevation gradients (
Figure 9) reveal a pronounced vertical shift in terraced field distribution, with continuous reduction in low-elevation terraced areas. The 0–500 m zone decreased from 17,058.96 km
2 in 2000 to 13,529.52 km
2 in 2020, representing a net loss of 3529.44 km
2. The 500–1000 m zone decreased from 19,411.92 km
2 to 14,117.76 km
2, a net reduction of 5294.16 km
2. Conversely, terraced fields expanded significantly in the mid-to-high altitude zones. The 1000–2000 m zone increased from 10,000.08 km
2 to 13,529.52 km
2, a net gain of 3529.44 km
2. This pattern of contraction at lower elevations and expansion at medium-to-high elevations reflects the vertical migration of terraced fields’ distribution center from lower to medium-to-high elevations.