## 6 Conclusions  
To address the problems of insufficient samples and large regional differences faced by existing rural building extraction techniques, this study constructed a dataset of building images from typical rural areas across China to provide sample support for model training. Meanwhile, an improved rural building extraction network called AGSC-Net was proposed by integrating attention mechanisms and multiscale contextual feature extraction modules, which significantly enhanced the model's ability to recognize and represent buildings in complex rural scenes. Experiments showed that, compared with other models, AGSC-Net achieved the optimal metrics on two representative rural building datasets, validating the accuracy of its extraction effects. Ablation experiments also proved that the introduction of AG and CC-Net modules can improve the model's robustness in complex environments. The innovations of this study are as follows: (1) constructing a dataset of rural building images from typical areas in China to compensate for the lack of samples; and (2) designing the AGSC-Net model that integrates attention mechanisms and multiscale modeling to enhance feature expression capabilities and validate the model's generalization ability on multiple datasets. This study provides new ideas for developing rural building automated extraction techniques by constructing datasets and designing improved models. However, this study has some limitations: (1) the dataset covers a wide area but has fewer examples for some regions, and (2) the model's extraction effects for buildings with complex textures need to be improved. Future studies could continue to expand the scale and diversity of the dataset and explore methods to introduce texture features to further enhance model adaptability.  
Conceptualization, M.Y. and F.Z.; methodology, F.Z.; software, F.Z.; validation, S.X., M.Y. and H.X.; formal analysis, H.X.; investigation, F.Z.; resources, M.Y.; data curation, H.X.; writing--original draft preparation, F.Z. and M.Y.; writing--review and editing, M.Y.; visualization, F.Z.; supervision, M.Y.; project administration, M.Y.; funding acquisition, M.Y. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the China National Key R and D Program during the 13 th Five-year Plan Period, grant number 2019 YED1100800, and the National Natural Science Foundation of China, grant number 41801308.  
Not applicable.  
**Data Availability Statement:** China Rural Building UAV Imagery Dataset available at [[https://www.scidb.cn/en/detail?dataSetId=807518619180204032&version=V1](https://www.scidb.cn/en/detail?dataSetId=807518619180204032&version=V1)]([https://www.scidb.cn/en/detail?dataSetId=807518619180204032&version=V1](https://www.scidb.cn/en/detail?dataSetId=807518619180204032&version=V1)) (accessed on 8 May 2023). Varied Drone Dataset available at [[https://vddvdd.com/download/](https://vddvdd.com/download/)]([https://vddvdd.com/download/](https://vddvdd.com/download/)) (accessed on 13 November 2023). The source code is released at [[https://github.com/Yihyzzzzz/AGSCNet](https://github.com/Yihyzzzzz/AGSCNet)]([https://github.com/[PERSON]/AGSCNet](https://github.com/[PERSON]/AGSCNet)) (accessed on 13 November 2023). The rest of the data and code of this study can be obtained from the corresponding authors according to requirements.  
**Conflicts of Interest:** The authors declare no conflict of interest.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **OA** & **P** & **R** & **F1** & **IoU** \\ \hline (a) UNet & 0.8969 & 0.8425 & 0.8567 & 0.8495 & 0.7384 \\ (b) UNet + AG & 0.8973 & 0.8442 & 0.8565 & 0.8503 & 0.7396 \\ (c) AGSC-Net & 0.9012 & 0.8506 & 0.8613 & 0.8559 & 0.7481 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Accuracy statistics of ablation experiment in Building Image Dataset of Typical Rural Areas in China.