Village building style determination method and device, electronic equipment and storage medium
By using a building recognition model to automatically identify village images, the accuracy and efficiency issues in determining village building style information in existing technologies have been resolved, achieving efficient and accurate acquisition of village building information and determination of style information.
Patent Information
- Application Number
- CN202311518840.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-11-14
AI Technical Summary
Existing technologies suffer from low accuracy and inefficiency in determining the architectural style information of villages. In particular, qualitative, quantitative, and interdisciplinary methods all have limitations and cannot accurately obtain architectural information.
A building recognition model is used to automatically identify images of villages to be identified. Feature extraction and fusion are performed through a feature pyramid network optimized by residual network, hollow space pyramid pooling and neural architecture search-feature pyramid network. The building recognition model is trained by combining data increment and transfer learning strategies to obtain the building information of each village.
This improved data processing efficiency, yielded more accurate village building information, and thus determined more accurate village landscape information, saving on-site survey costs and reducing environmental interference.
Smart Images

Figure CN117475336B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, and storage medium for determining the architectural style of a village. Background Technology
[0002] Traditional methods for determining the architectural style of villages initially focused on descriptive qualitative summarization of information such as architectural form, cultural connotation, and site layout. After a stage of quantitative analysis of architectural style characteristics, they have gradually developed into methods for determining style information in the context of multidisciplinary integration.
[0003] However, regardless of whether it is a qualitative method, a quantitative method, or a method for determining the landscape information in the context of interdisciplinary studies, all of them have certain limitations in determining the landscape information of buildings in villages, resulting in inaccurate and inefficient final landscape information. Summary of the Invention
[0004] This invention provides a method, apparatus, electronic device, and storage medium for determining the architectural style of villages. It addresses the shortcomings of existing methods for determining architectural style information, which suffer from limitations, resulting in inaccurate and inefficient final determinations. By employing a building recognition model, the invention can automatically identify images of villages to be identified. This improves data processing efficiency and yields highly accurate architectural information for each village, thereby providing highly accurate architectural style information for each village.
[0005] This invention provides a method for determining the architectural style of a village, comprising:
[0006] Acquire images of the village to be identified;
[0007] The village image to be identified is input into the building recognition model to obtain the building information of each village in the village image to be identified, which is output by the building recognition model. The building recognition model is trained based on village image samples and building information samples.
[0008] For each village among all the villages, the architectural style information of the buildings in the village is determined based on the village's architectural information.
[0009] According to a method for determining the architectural style of a village provided by the present invention, the architectural recognition model is trained based on the following steps: acquiring village image samples and architectural information samples, wherein the village image samples are training data and the architectural information samples are training labels; using the residual network in the original architectural recognition model to extract features from the village image samples to obtain a first feature sample; using the feature pyramid network in the original architectural recognition model optimized by hollow spatial pyramid pooling and neural architecture search-feature pyramid network to extract features from the first feature sample to obtain a second feature sample, and performing feature fusion on the second feature sample to obtain a third feature sample; and training the original architectural recognition model based on the third feature sample and the architectural information samples to obtain a trained architectural recognition model.
[0010] According to a method for determining the architectural style of a village provided by the present invention, the style information includes at least one of the following: building scale, average building area, building area proportion, building area diversity, building distribution clustering degree, and building distribution disorder degree. The step of determining the architectural style information of the buildings in the village based on the village's architectural information includes: when the style information is the building area proportion, determining the total building area of any one of all style categories and the total building area of all styles based on the village's architectural information; determining the building area proportion of any one style category based on the total building area and the total building area; and determining the building area diversity of the village when the style information is the building area diversity. Based on the building information of the village, the average area of buildings under any one of the various landscape types is determined; based on the average area, the building area diversity of any one of the landscape types in the village is determined; when the landscape information represents the building distribution clustering degree, the average observed spacing and the predicted average spacing of all buildings are determined based on the building information of the village; based on the average observed spacing and the predicted average spacing, the building distribution clustering degree of the village is determined; when the landscape information represents the building distribution disorder degree, the average observed spacing of all buildings is determined based on the building information of the village; based on the average observed spacing, the building distribution disorder degree of the village is determined.
[0011] According to a method for determining the architectural style of a village provided by the present invention, the step of determining the proportion of building area of any architectural style in the village based on the total building area and the total area of all buildings includes: obtaining the proportion of building area of any architectural style in the village according to a proportion formula; wherein, the proportion formula is: P represents the percentage of building area for any of the aforementioned architectural styles; S represents the total building area. B represents the total area of all the buildings; n represents the total number of buildings in the village; i This represents the area of the i-th building among all the buildings.
[0012] According to a method for determining the architectural style of a village provided by the present invention, the step of determining the architectural area diversity of any architectural style in the village based on the average area includes: obtaining the architectural area diversity of any architectural style in the village according to a diversity formula; wherein, the diversity formula is: A represents the diversity of building area; n represents the total number of buildings in the village; B i S represents the area of the i-th building among all the buildings; b This represents the average area.
[0013] According to a method for determining the architectural style of a village provided by the present invention, the step of determining the building distribution clustering degree of the village based on the observed average spacing and the predicted average spacing includes: obtaining the building distribution clustering degree of the village according to a clustering degree formula; wherein, the clustering degree formula is: R represents the building distribution density; This represents the average spacing between the observations. This represents the predicted average spacing.
[0014] According to a method for determining the architectural style of a village provided by the present invention, the step of determining the disorder degree of the building distribution in the village based on the average observation spacing includes: obtaining the disorder degree of the building distribution in the village according to a disorder degree formula; wherein, the disorder degree formula is: C represents the disorder of the building distribution; n represents the total number of buildings in the village; L j This represents the distance between the j-th building and its adjacent buildings. This represents the average spacing between the observations.
[0015] The present invention also provides a device for determining the architectural style of a village, comprising:
[0016] The acquisition module is used to acquire images of the villages to be identified.
[0017] The processing module is used to input the village image to be identified into the building recognition model to obtain the building information of each village in the village image to be identified, which is output by the building recognition model. The building recognition model is trained based on village image samples and building information samples. For each village in the village, the architectural style information of the buildings in the village is determined according to the building information of the village.
[0018] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the village architectural style determination method as described above.
[0019] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the village architectural style determination method as described above.
[0020] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the village architectural style determination method as described above.
[0021] The present invention provides a method, apparatus, electronic device, and storage medium for determining the architectural style of villages. The method involves acquiring an image of a village to be identified; inputting the image into a building recognition model to obtain architectural information for each village within the image, where the model is trained based on village image samples and building information samples; and determining the architectural style information of each village based on its architectural information. This method, employing a building recognition model, can automatically identify images of villages, improving data processing efficiency while obtaining highly accurate architectural information for each village, thus yielding highly accurate architectural style information for each village. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating the method for determining the architectural style of villages provided by the present invention;
[0024] Figure 2a This is a schematic diagram of the structure of the building recognition model provided in an embodiment of the present invention;
[0025] Figure 2b This is a schematic diagram of a scenario for the method of determining the architectural style of villages provided by the present invention;
[0026] Figure 3 This is a schematic diagram of the structure of the village architectural style determination device provided by the present invention;
[0027] Figure 4This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0029] To better understand the embodiments of the present invention, the background technology can be described in detail first:
[0030] Traditional methods for determining the architectural style of villages can include: qualitative methods, quantitative methods, and methods for determining architectural style information in the context of interdisciplinary studies.
[0031] Regarding qualitative methods: early descriptive methods, such as field surveys, inductive summarization, and empirical analysis, revealed the architectural elements, cultural characteristics, and differentiation features of buildings in villages. This information was then summarized to update architectural renovation strategies, providing historical data and a theoretical foundation for later research. However, this qualitative method involves expert scoring, which relies heavily on subjective judgment. It fails to reveal the objective laws governing the architectural features of villages through mathematical statistics, thus lacking highly accurate information.
[0032] Regarding quantitative methods: The method of constructing evaluation indicators based on morphological indices is widely used. This method mainly focuses on constructing evaluation indicators for various morphological or spatial attributes of buildings in villages to obtain architectural style information. For example, based on attributes such as site selection, axis, scale, and viewing angle, it compares and analyzes the morphological characteristics of villages with "regular" and "organic" attributes; based on five morphological indices—visibility, fragmentation, clustering, interface density, and uniformity—it comprehensively characterizes the morphological characteristics of window openings on the facades of historical buildings; and based on fractal geometric indices, it analyzes the facade symmetry and material texture distribution characteristics of historical buildings. However, this quantitative method cannot extract accurate architectural information, and therefore cannot obtain highly accurate architectural style information.
[0033] Regarding methods for determining architectural style information in a post-interdisciplinary context: This mainly involves determining architectural style information based on 3D reality modeling technology, computer vision technology, and remote sensing information extraction technology. In this method for determining architectural style information in a post-interdisciplinary context:
[0034] (1) 3D Real-Scene Modeling Technology
[0035] 3D real-scene modeling technology can achieve high-precision reproduction of the overall environment of a village, obtain multi-faceted information about the buildings in the village, and, combined with survey analysis, summarize and generalize the architectural style information of the village.
[0036] (2) Computer vision technology
[0037] Existing supervised vision models can quickly detect relevant information in images based on presets. By combining this computer vision technology with spatial attribute image data taken in villages, cross-regional retrieval and comparison of village architectural decoration styles and features can be achieved. In addition, based on the Swim-transformer deep learning model, combined with real-life image data of village buildings, the image data is divided into five style features: building type, building materials, roof shape, gable type, and roof face form, to achieve automatic identification and classification of traditional architectural features of settlements.
[0038] (3) Remote sensing information extraction technology
[0039] Remote sensing information extraction technology, employing a top-view perspective, facilitates data acquisition and, combined with machine learning models, enables highly efficient information extraction. Current applications primarily integrate traditional machine learning models, object detection models, and semantic segmentation models. Based on traditional machine learning models and multispectral remote sensing imagery, object-based image analysis (OBIA) and machine learning classifiers were used to extract traditional village building distribution data, allowing for the analysis of distance characteristics in building distribution. Based on object detection models, the introduction of Fast Region-Convolutional Neural Networks (Fast R-CNN) successfully detected 14,952 traditional residential buildings on an island. Based on semantic segmentation models and combined with remote sensing imagery data from a website, features such as village buildings, water systems, roads, and vegetation can be automatically extracted, and the shape index can be used to quantify the village boundary morphology on an island.
[0040] However, in the later interdisciplinary background of landscape information determination methods, although the 3D real scene modeling technology and computer vision technology have improved the speed and accuracy of obtaining village building information, there are still limitations such as difficulty in data acquisition in dataset construction and practical application, cumbersome data processing methods, and difficulty in quantifying indicators. Secondly, the existing technologies that combine remote sensing images for village building extraction are mostly based on traditional machine learning models, object detection models and semantic segmentation models, which cannot comprehensively extract accurate building information, and thus cannot obtain highly accurate landscape information.
[0041] In summary, whether it is a qualitative method, a quantitative method, or a method for determining the architectural style information in a later interdisciplinary context, all have certain limitations in determining the architectural style information of villages, resulting in inaccurate final determination of the architectural style information.
[0042] To address the aforementioned technical problems, embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for determining the architectural style of villages. This method utilizes an architectural recognition model to automatically identify images of villages to be identified. While improving data processing efficiency, it can obtain highly accurate architectural information for each village, thereby obtaining highly accurate architectural style information for each village.
[0043] It should be noted that the execution subject involved in the embodiments of the present invention can be a village architectural style determination device or an electronic device. Optionally, the electronic device may include: a computer, a mobile terminal, and a wearable device, etc.
[0044] The embodiments of the present invention will be further described below using an electronic device as an example.
[0045] like Figure 1 The diagram shown is a flowchart illustrating the method for determining the architectural style of villages provided by this invention, which may include:
[0046] 101. Obtain images of the villages to be identified.
[0047] The village image to be identified is an orthophoto containing at least one village, and the number of such village images is unlimited.
[0048] Optionally, the image of the village to be identified can be collected by an electronic device, or it can be collected by other devices and then transmitted to the electronic device; no specific limitation is made here.
[0049] Optionally, other devices may be satellites, drones, etc. In this case, the other devices can be connected to the electronic devices via wireless communication technology, which may include, but is not limited to, one of the following: the 4th generation mobile communication technology (4G), the 5th generation mobile communication technology (5G), and Wireless Fidelity (WiFi).
[0050] For example, if other equipment is a drone, this drone could be a DJI drone, model M3XXRTK. This drone can collect low-altitude remote sensing images of the village, i.e., images of the village to be identified. During image acquisition, to minimize the impact of meteorological conditions such as solar radiation and wind speed on the quality of the acquired image data, the drone can select a sunny and slightly windy day (between 9:00 AM and 3:00 PM) and collect images of the village to be identified based on the flight parameters in Table 1.
[0051] Table 1:
[0052]
[0053]
[0054] As shown in Table 1, flight parameters can include aircraft parameters, camera parameters, and flight plan parameters. Based on these flight parameters, electronic equipment can acquire images of the village to be identified with relatively high image quality.
[0055] Optionally, the electronic device acquiring the image of the village to be identified may include: the electronic device acquiring an initial image of the village to be identified; the electronic device performing super-resolution reconstruction on the image of the village to be identified to obtain the image of the village to be identified.
[0056] Since the resolution of the initial village image to be identified acquired by the electronic device may be low, resulting in poor image quality, in order to improve the image quality of the initial village image to be identified, the electronic device can use image processing (Context Capture) software to perform super-resolution reconstruction on the village image to be identified, thereby obtaining a village image to be identified with better image quality.
[0057] It should be noted that drones can quickly acquire initial images of villages to be identified. During the acquisition process, there is no need to consider the village environment, overcoming the limitations of traditional data acquisition methods that are easily constrained by the environment. Secondly, after super-resolution reconstruction, the initial images of villages to be identified can present the fine features of the buildings in the village, avoiding the blurriness of small-scale targets such as buildings in traditional high-resolution images. This can effectively improve the image quality of the initial images of villages to be identified, making it easier to accurately determine the building information of the village in the image.
[0058] 102. Input the village image to be identified into the building recognition model to obtain the building information of each village in the village image to be identified output by the building recognition model.
[0059] The building recognition model is trained based on village image samples and building information samples.
[0060] Building information is used to characterize the building type, building scale, and building pattern of a village. The building information of any two villages can be the same or different, and no specific restrictions are imposed here.
[0061] After acquiring an image of a village to be identified, the electronic device can obtain a pre-trained building recognition model and input the village image into it. The building recognition model can then process the image to obtain the building information of each village within it. In other words, the electronic device will ultimately acquire the building information of the number of villages in the image. The entire building information acquisition process does not require on-site surveys, effectively saving significant economic costs and being less affected by external environmental constraints. This allows for the rapid determination of the architectural features of the villages. Furthermore, compared to existing methods based on manual visual inspection, this method effectively avoids issues such as missed detections, misjudgments, and boundary noise that frequently lead to inaccurate building information, thus significantly improving the accuracy of the building information.
[0062] Optionally, the sample library can be constructed based on a typological approach, and the sample library may include village image samples and building information samples.
[0063] Optionally, the electronic equipment can classify buildings from all villages to obtain building categories, i.e., building types, and determine scale and pattern characteristics from all villages to determine style types. Building categories may include: traditional gray-tiled buildings, terracotta roof buildings, resin roof buildings, cement roof buildings, red corrugated steel roof buildings, and blue corrugated steel roof buildings; style types may include: traditional style buildings, style-harmonious buildings, and style-inharmonious buildings.
[0064] The relationship between building classification and style type is as follows: traditional style buildings correspond to traditional gray tile buildings and terracotta roof buildings; style-harmonious buildings correspond to resin roof buildings and cement roof buildings; style-inharmonious buildings correspond to red color steel roof buildings and blue color steel roof buildings.
[0065] Specifically, the electronic device selects the six most representative roof types from all roof forms as the basic building classification. These six roof types are traditional gray tile buildings, terracotta roof buildings, resin roof buildings, cement roof buildings, red color steel roof buildings, and blue color steel roof buildings. Then, according to the pre-set village protection plan, based on the roof form, roof material, and color, these six roof types are categorized into three major style types: traditional style buildings, style-harmonious buildings, and style-inharmonious buildings.
[0066] Specifically, the electronic device uses partial image samples from eight villages (A, B, C, D, E, F, G, and H) to construct a training sample set. Based on the above classification, the size of these village image samples is detected, and those that do not meet the preset size threshold are cropped. This ensures that the current size of each of the final village image samples meets the preset size threshold, facilitating subsequent fine annotation using data annotation software (such as Labelme). Furthermore, various data augmentation strategies, such as color gamut transformation and random dithering, are employed to expand the data. This data preprocessing improves the robustness and generalization ability of the building recognition model.
[0067] In some embodiments, the building recognition model can be trained based on the following steps: an electronic device acquires village image samples and building information samples, where the village image samples are training data and the building information samples are training labels; the electronic device uses the residual network in the original building recognition model to extract features from the village image samples to obtain a first feature sample; the electronic device uses the feature pyramid network in the original building recognition model, which has been optimized by hollow spatial pyramid pooling and neural architecture search-feature pyramid network, to extract features from the first feature sample to obtain a second feature sample, and performs feature fusion on the second feature sample to obtain a third feature sample; the electronic device trains the original building recognition model based on the third feature sample and the building information samples to obtain a trained building recognition model.
[0068] In the process of training the original building recognition model, after acquiring village image samples and building information samples, the electronic device can use the residual network in the original building recognition model to extract features from the village image samples, obtaining a first feature sample containing building information. Then, the improved hollow spatial pyramid pooling network in the original building recognition model is used to perform a pooling operation on the first feature sample, obtaining a second feature sample containing more scale building information. Finally, the optimized neural architecture search-feature pyramid network in the original building recognition model is used to perform feature fusion on the second feature sample, improving the connection between features at different scales, obtaining a third feature sample containing more comprehensive information. Then, based on the third feature sample and the building information samples, the original building recognition model is trained by combining classification, localization, segmentation specific tasks, optimizers, backpropagation, and other networks to obtain a trained building recognition model.
[0069] The original building recognition model is an instance segmentation model in the field of remote sensing information, used for building information extraction. It can be represented by the hollow space pyramid pooling-neural architecture search-feature pyramid network-mask-region-convolutional neural network (AN-Mask R-CNN).
[0070] The original building recognition model can be composed of four parts: a backbone network, a Region Proposal Network (RPN), an Area of Interest Alignment (RoI Align) network, and a Full Convolutional Network (FCN). The main principle of this original building recognition model is as follows: the backbone network extracts features from village image samples and building information samples to obtain feature maps; these feature maps are then input into the RPN to obtain proposal boxes containing the target (e.g., village) output by the RPN; subsequently, the proposal boxes are adjusted to a uniform size using bilinear interpolation in the ROI Align network; and the model incorporates segmentation, detection, and classification regression calculations, backpropagating to optimize parameters. After at least one training epoch, the optimal solution (e.g., predicting building information) is obtained.
[0071] It should be noted that, when dealing with village building targets of multiple scales, types, and temporalities, and addressing the limitation of existing network feature extraction mechanisms with their single scale, a hollow spatial pyramid pooling network can be introduced into the original building recognition model. This hollow spatial pyramid pooling network uses dilated convolution instead of general convolution, and controls the shape and size of the holes through multi-branch dilated convolution to simulate human visual perception, thereby increasing the receptive field for complex feature extraction. This enhances the discrimination ability and robustness, while reducing computational resource consumption. In other words, the hollow spatial pyramid pooling network performs pooling operations on the first feature sample, resulting in a highly accurate second feature sample.
[0072] To address the unidirectional path limitations of existing network feature fusion strategies, a neural architecture search-feature pyramid network can be integrated into the original building recognition model. This neural architecture search and feature pyramid network reduce the loss of low-level features during the fusion process through an automatic search mechanism for multi-scale feature fusion strategies. Simultaneously, by combining multiple feedback iterations with a controller (such as an RNN) and an evaluator, the optimal connection method and fusion strategy are selected, achieving an optimal trade-off between feature fusion accuracy and speed. In other words, the neural architecture search-feature pyramid network performs feature fusion on the second feature sample to obtain a superior third feature sample.
[0073] In addition, before training the original building recognition model, a transfer learning strategy can be introduced into the original building recognition model. This strategy utilizes the existing knowledge structure in the ImageNet dataset to improve the efficiency of the original building recognition model in learning new knowledge. At this time, training data can be input into the original building recognition model that has been introduced with the transfer learning strategy. The optimal parameters of the model can be obtained through a preset number of cycles (such as 150), and then the original building recognition model can be trained to obtain a trained building recognition model.
[0074] It should be noted that, in the face of the diversity and complexity of the built environment in traditional villages, the main strategies of hollow space pyramid pooling and neural architecture search-feature pyramid network can effectively improve the backbone network’s performance in extracting and fusing multi-scale features with a small increase in computing resources. This enhances the ability to distinguish complex objects and improves robustness, while mitigating issues such as missed detections, misjudgments, and boundary noise in multi-scale building targets. Furthermore, the use of data increment and transfer learning strategies as auxiliary means overcomes the problem of insufficient labeled data.
[0075] For example, such as Figure 2a The diagram shown is a structural schematic of the building recognition model provided in an embodiment of the present invention. Figure 2a As can be seen, the building recognition model can include: a backbone network, a proposal network (RPN), a RoI Align network, and an FCN; the backbone network can include: a Feature Parymid Network (NAS-FPN) based on the Automatic Search structure and an Atrous Spatial Pyramid Pooling (ASPP) network. This building recognition model combines the advantages of semantic segmentation models and object detection models to comprehensively extract architectural information such as building type, building scale, and building layout of villages.
[0076] The ASPP network consists of a residual network (ResNet) and five stages: Stage 1, Stage 2, Stage 3, Stage 4, and Stage 5, which are used to extract features from the input of the residual network.
[0077] The accuracy of building information determined by the aforementioned building recognition model for electronic devices is significantly better than that of existing advanced semantic segmentation models such as the Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation (DeeplabV3+), Pyramid Scene Parsing Network (PspNet), and Convolutional Networks for Biomedical Image Segmentation (U-Net). The final evaluation parameters of this building recognition model, namely Intersection over Union (IOU), F1-score, Average Precision (AP), and Recall, reach 79.8%, 79.1%, 77.6%, and 81.2%, respectively. Specifically, the recognition accuracy for traditional and harmoniously styled buildings reaches over 91%, achieving high-precision extraction of village buildings. Furthermore, the building extraction accuracy and generalization ability of this building recognition model are significantly improved.
[0078] All simulation experiments were deployed on the Windows 10 system using the Tensorflow 2.2 deep learning library, with Python 3.7 as the language and an NVIDIA 2080S (8GB) graphics card and an i9-9900K processor as the hardware environment.
[0079] 103. For each village in all villages, determine the architectural style information of the buildings in the village based on the village's architectural information.
[0080] Among them, landscape information is used to characterize the building types, building scales, and building layouts of villages.
[0081] After acquiring the architectural information of each village in the image of the building to be identified, the electronic device can process the architectural information of each village to obtain the architectural style information of the village. That is, the electronic device can ultimately determine how many architectural style information are available for each village.
[0082] In other words, electronic devices can analyze the building information of the village and construct a quantitative evaluation index system from three perspectives: building type, building scale, and building pattern, thereby obtaining the architectural style information of the village.
[0083] Among them, based on building type, the two indicators of building scale and building area ratio can be determined; based on building scale, in order to highlight the traditional overall architectural scale characteristics of villages, the two indicators of average building area and building area diversity can be determined; based on building pattern, the two indicators of building distribution clustering degree and building distribution disorder degree can be determined according to the building distribution characteristics, so as to achieve a quantitative evaluation of the overall architectural style of villages from a spatial perspective.
[0084] In summary, the architectural style information in a village can include at least one of the following: building scale, average building area, building area ratio, building area diversity, building distribution clustering, and building distribution disorder.
[0085] Among them, building scale is used to characterize the total number of buildings in a village.
[0086] The proportion of building area is used to characterize the overall architectural style of a village.
[0087] The average area of buildings is used to characterize the differences in scale characteristics of buildings under a certain style. The larger the average area, the worse the overall style harmony of the village's buildings; conversely, the smaller the average area, the better the overall style harmony of the village's buildings.
[0088] Building area diversity is used to characterize the scale heterogeneity of buildings under a certain style in a village. The greater the building area diversity, the worse the overall architectural style coordination of the village is, and vice versa.
[0089] Building distribution clustering is used to characterize the degree of clustering of buildings in a village. If the building distribution clustering is greater than a clustering threshold, it indicates that the buildings in the village are weakly clustered and loosely distributed; if the building distribution clustering is less than or equal to the clustering threshold, it indicates that the buildings in the village are strongly clustered and densely distributed. Optionally, the clustering threshold can be set before the electronic device leaves the factory or it can be customized by the user according to the actual situation; no specific limitation is made here. For example, the above clustering threshold is set to 1.
[0090] Building distribution disorder is an index of the disorder of the spacing between adjacent buildings in a village. It is used to characterize the regularity of building distribution. The higher the building distribution disorder, the more irregular the building distribution in the village, and vice versa.
[0091] In some embodiments, the electronic device determines the architectural style information of buildings in a village based on the village's architectural information, which may include at least one of the following implementation methods:
[0092] Implementation Method 1: When the landscape information is the proportion of building area, the electronic device determines the total building area of any landscape category and the total building area of all landscape categories based on the building information of the village; the electronic device determines the proportion of building area of any landscape category in the village based on the total building area and the total building area.
[0093] The total building area is used to characterize the overall architectural style of the village.
[0094] The electronic device can analyze the building information of a village to obtain all types of architectural styles and the buildings within each style, with no limit on the number or area of buildings under each style. Then, after determining the area of each building under any given style, the device sums all areas to obtain the total area of buildings within that style. This summation is repeated to obtain the total area of all buildings across all styles. Finally, combining this total area with the total area of buildings within a style, the device determines the percentage of building area for that style. Based on this, the electronic device obtains the percentage of building area corresponding to the number of architectural styles in the village.
[0095] Among all categories of architectural styles, the larger the total building area of the traditional architectural style, the better the overall architectural style of the village; and among all building area proportions, the higher the proportion of the traditional architectural style building area, the better the overall architectural style of the village.
[0096] It should be noted that there is no time limit on the electronic device determining the total building area and the electronic device determining the total area of all buildings.
[0097] In some embodiments, the electronic device determines the proportion of building area of any type of village based on the total building area and the total area of all buildings. This may include the electronic device obtaining the proportion of building area of any type of village based on a proportion formula.
[0098] The formula for the percentage is:
[0099] P represents the percentage of building area for any type of architectural style; S represents the total building area. B represents the total area of all buildings; n represents the total number of buildings in the village; i This represents the area of the i-th building among all buildings.
[0100] Electronic devices can be based on Determine the total area of n buildings in the village, and then, using the above proportion formula, accurately determine the proportion of building area for any type of architectural style in the village.
[0101] Optionally, the total building area S can be calculated using formula (1). Calculated.
[0102] Among them, T k This represents the area of the k-th building in any given style category; n≥m≥1, where m represents the number of buildings in any style category within the village.
[0103] Implementation Method 2: When the landscape information is characterized by building area diversity, the electronic device determines the average area of buildings under any landscape category based on the building information of the village; the electronic device then determines the building area diversity of any landscape category in the village based on the average area.
[0104] Electronic devices can analyze village building information to obtain all types of landscape features and the buildings within each feature. Then, after determining the area of each building within any given landscape feature, the electronic device calculates the average area of all buildings within that feature, thus determining the building area diversity for any given landscape feature in the village. Based on this, the electronic device acquires as many average areas as there are landscape features in the village, thereby determining the number of building area diversity patterns.
[0105] In some embodiments, the electronic device determines the building area diversity of any type of landscape in a village based on the average area, which may include: the electronic device obtaining the building area diversity of any type of landscape in a village based on a diversity formula.
[0106] The diversity formula is as follows:
[0107] A represents the diversity of building area; n represents the total number of buildings in the village; B i S represents the area of the i-th building among all buildings; b This represents the average area.
[0108] Electronic devices can accurately determine the proportion of building area of any type of style in a village based on the above diversity formula.
[0109] Optional, the average area S of buildings under any style category. b Formula (2) can be used. The calculation shows that k∈{1,…,m}, m≥2, and m represents the total number of buildings under any style.
[0110] Implementation Method 3: When the landscape information is the building distribution clustering degree, the electronic device determines the observed average spacing and predicted average spacing of all buildings based on the building information of the village; the electronic device determines the building distribution clustering degree of the village based on the observed average spacing and predicted average spacing.
[0111] The electronic device can analyze the building information of a village to obtain all the buildings in the village. Then, the electronic device can determine the distance between any two adjacent buildings to obtain multiple distances. These multiple distances are then averaged to obtain the observed average distance for all buildings. The electronic device then determines the predicted average distance for all buildings, and then combines the observed average distance to determine the building distribution clustering degree of the village.
[0112] It should be noted that there is no time limit on the timing of the electronic device determining the average observation spacing and the electronic device determining the average prediction spacing.
[0113] In some embodiments, the electronic device determines the building distribution clustering degree of a village based on the observed average spacing and the predicted average spacing, which may include: the electronic device obtaining the building distribution clustering degree of the village according to a clustering degree formula.
[0114] The formula for the degree of aggregation is:
[0115] R represents the building distribution density; Indicates the average interval between observations. This represents the predicted average spacing.
[0116] Electronic devices can accurately determine the clustering degree of building distribution in a village based on the above clustering formula.
[0117] Optional, average observation spacing Formula (3) can be used. Calculated; predicted average spacing Formula (4) can be used. Calculated.
[0118] Where j∈{1,…,n}, n≥2, and n represents the total number of buildings in the village; L j α represents the distance between the j-th building and its adjacent buildings; α represents a constant, usually 0.5; G represents the total area of the village.
[0119] Implementation Method 4: When the landscape information is the degree of disorder in building distribution, the electronic device determines the average observation spacing of all buildings based on the building information of the village; the electronic device determines the degree of disorder in building distribution of the village based on the average observation spacing.
[0120] The electronic device can analyze the building information of a village to obtain all the buildings in the village; then, based on the total area of the village and the total number of buildings in the village, the electronic device determines the predicted average spacing of all buildings, and thus determines the disorder of the building distribution in the village.
[0121] In some embodiments, the electronic device determines the disorder of the building distribution in a village based on the average observation interval, which may include: the electronic device obtaining the disorder of the building distribution in a village according to a disorder formula.
[0122] The formula for disorder is:
[0123] C represents the disorder of building distribution; n represents the total number of buildings in the village; L j This represents the distance between the j-th building and its adjacent buildings. This represents the average distance between observations.
[0124] Electronic devices can accurately determine the disorder of building distribution in a village based on the above disorder formula.
[0125] It should be noted that the above implementation methods 1-4 can incorporate various types of building information into traditional morphological index methods to construct a traditional village architectural style evaluation index system. Based on building type, building scale, and building pattern, combined with extracted building information, a quantitative evaluation of the traditional village architectural style can be achieved. The entire process can effectively realize the transformation of architectural style from qualitative analysis to quantitative evaluation, overcome the subjective dependence of traditional qualitative methods, and achieve an effective connection between technical tools and practical analysis.
[0126] Optionally, after step 103, the method may further include: the electronic device determining the type characteristics of the village architectural style based on the style information of each of the various style types.
[0127] Electronic devices can employ clustering algorithms to determine the type characteristics of village architectural styles based on the individual architectural information of each style type. This clustering algorithm is a type of unsupervised learning used to mine the type characteristics of traditional village architectural styles. This algorithm is typically the K-means clustering algorithm, which continuously optimizes the loss value corresponding to the clustering results by calculating the Euclidean distance between the sample size (e.g., multiple architectural information points) and a preset center value, thereby determining the optimal k clusters. In specific implementation, firstly, different k values are selected for clustering, and the fitting results are visualized for subjective judgment to select the optimal k value; secondly, based on the Python 3.7 language, the K-means clustering algorithm of the sklearn machine learning library is used to cluster the architectural information of 14 traditional villages, and the type characteristics are summarized based on the distribution characteristics of the cluster centers, thus obtaining the type characteristics of the village architectural styles.
[0128] Based on the above process, the method for determining the architectural style of villages can be simulated. Based on the determination of architectural style information in 14 villages within the target area, the final architectural style information can be clustered into four types based on the architectural style characteristics of these 14 villages: traditional architectural style dominance with highly concentrated distribution, traditional architectural style and architectural style incongruity dominance with loose distribution and large-scale architectural style incongruity, architectural style harmony dominance with highly concentrated distribution, and architectural style type without dominance with highly concentrated distribution.
[0129] Based on the landscape information of each of the multiple landscape types in step 103, the electronic device uses the K-means clustering algorithm to extract useful information about the architectural landscape from an objective perspective, quickly obtaining the type characteristics of the traditional village architectural landscape in the target area, overcoming the limitation of traditional typology relying on subjective judgment.
[0130] In summary, for example, such as Figure 2b The image shown is a schematic diagram illustrating a scenario using the village architectural style determination method provided by this invention. From... Figure 2b As can be seen, the process of determining the architectural style of villages mainly includes: data collection, sample library construction, training and evaluation of the building recognition model, and practical application of style information. Data collection mainly includes: UAV image acquisition and high-resolution orthophoto reconstruction; sample library construction includes field surveys, literature reviews, typological analysis, and image annotation; building recognition model training and evaluation includes performance improvement, model training, and performance evaluation; practical application of style information includes automatic building extraction, vectorization of detection data, index calculation, and style type feature mining. This entire process effectively overcomes the disadvantages of traditional methods for determining the architectural style of villages, such as low accuracy, low efficiency, subjective dependence, and intervention in the village environment, while improving the accuracy of style information.
[0131] In this embodiment of the invention, an image of a village to be identified is acquired; the image is then input into a building recognition model to obtain the building information of each village in the image, output by the building recognition model. The building recognition model is trained based on village image samples and building information samples. For each village, the architectural style information of the buildings in the village is determined based on the village's building information. This method uses a building recognition model to automatically identify the image of the village to be identified, improving data processing efficiency while obtaining highly accurate building information for each village, and thus highly accurate architectural style information for each village.
[0132] The following describes the village architectural style determination device provided by the present invention. The village architectural style determination device described below and the village architectural style determination method described above can be referred to in correspondence.
[0133] like Figure 3The diagram shown is a structural schematic of the village architectural style determination device provided by the present invention, which may include:
[0134] The acquisition module 301 is used to acquire images of the village to be identified;
[0135] The processing module 302 is used to input the image of the village to be identified into the building recognition model to obtain the building information of each village in the image of the village to be identified output by the building recognition model. The building recognition model is trained based on village image samples and building information samples. For each village in the village, the architectural features of the buildings in the village are determined according to the building information of the village.
[0136] Optionally, the building recognition model is trained based on the following steps: acquiring village image samples and building information samples, where the village image samples are training data and the building information samples are training labels; using the residual network in the original building recognition model to extract features from the village image samples to obtain a first feature sample; using the feature pyramid network in the original building recognition model, which has been optimized by hollow spatial pyramid pooling and neural architecture search-feature pyramid network, to extract features from the first feature sample to obtain a second feature sample, and then performing feature fusion on the second feature sample to obtain a third feature sample; and training the original building recognition model based on the third feature sample and the building information samples to obtain a trained building recognition model.
[0137] Optionally, the landscape information includes at least one of the following: building scale, average building area, building area percentage, building area diversity, building distribution clustering, and building distribution disorder. Processing module 302 is specifically used to, when the landscape information is the building area percentage, determine, based on the village's building information, the total building area of any one of all landscape categories and the total building area of all buildings in all landscape categories; determine, based on the total building area and the total building area, the building area percentage of any one of the landscape categories in the village; and, when the landscape information is the building area diversity, determine, based on the village's building information, the building area percentage of any one of the landscape categories. Determine the average area of buildings under any one of the various landscape types in the village; based on this average area, determine the building area diversity under any one of the landscape types in the village; if the landscape information represents the building distribution clustering degree, determine the observed average spacing and predicted average spacing of all buildings based on the village's building information; determine the building distribution clustering degree of the village based on the observed average spacing and predicted average spacing; if the landscape information represents the building distribution disorder degree, determine the observed average spacing of all buildings based on the village's building information; determine the building distribution disorder degree of the village based on the observed average spacing.
[0138] Optionally, processing module 302 is specifically used to obtain the proportion of building area for any type of architectural style in the village according to the proportion formula; wherein, the proportion formula is: P represents the percentage of building area for any given architectural style; S represents the total building area. B represents the total area of all buildings; n represents the total number of buildings in the village; i This represents the area of the i-th building among all the buildings.
[0139] Optionally, processing module 302 is specifically used to obtain the diversity of building area for any type of landscape in the village according to the diversity formula; wherein, the diversity formula is: A represents the diversity of building area; n represents the total number of buildings in the village; B i S represents the area of the i-th building among all buildings; b This represents the average area.
[0140] Optionally, processing module 302 is specifically used to obtain the clustering degree of the building distribution in the village according to the clustering degree formula; wherein, the clustering degree formula is: R represents the density of the building distribution; This indicates the average spacing between the observations. This indicates the average spacing of the prediction.
[0141] Optionally, processing module 302 is specifically used to obtain the disorder degree of the building distribution in the village according to the disorder degree formula; wherein, the disorder degree formula is: C represents the disorder of the building distribution; n represents the total number of buildings in the village; L j This represents the distance between the j-th building and its adjacent buildings. This indicates the average spacing of the observations.
[0142] like Figure 4The diagram shows the structure of the electronic device provided by the present invention. The electronic device may include a processor 410, a communication interface 420, a memory 430, and a communication bus 440. The processor 410, communication interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a method for determining the architectural style of villages. This method includes: acquiring an image of a village to be identified; inputting the image of the village to be identified into a building recognition model to obtain the building information of each village in the image of the village to be identified, output by the building recognition model, wherein the building recognition model is trained based on village image samples and building information samples; and determining the architectural style information of the buildings in each village based on the building information.
[0143] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0144] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the village architectural style determination method provided by the above methods. The method includes: acquiring an image of a village to be identified; inputting the image of the village to be identified into a building recognition model to obtain the building information of each village in the image of the village to be identified output by the building recognition model, wherein the building recognition model is trained based on village image samples and building information samples; and determining the architectural style information of the buildings in each village according to the building information of the village.
[0145] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for determining the architectural style of villages provided by the above methods. The method includes: acquiring an image of a village to be identified; inputting the image of the village to be identified into a building recognition model to obtain architectural information of each village in the image of the village to be identified output by the building recognition model, wherein the building recognition model is trained based on village image samples and building information samples; and determining the architectural style information of the buildings in each of the villages based on the architectural information of the village.
[0146] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0147] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for determining the architectural style of a village, characterized in that, include: Acquire images of the village to be identified; The village image to be identified is input into the building recognition model to obtain the building information of each village in the village image to be identified, which is output by the building recognition model. The building recognition model is trained based on village image samples and building information samples. Building information is used to characterize building type, building scale, and building layout; The building recognition model includes a residual network, ASPP, and NAS-FPN. The building information of each village is obtained through the following steps: feature extraction is performed on the image of the village to be identified using the residual network to obtain a first feature containing building information; pooling is performed on the first feature using ASPP to obtain a second feature containing multi-scale building information; feature fusion is performed on the second feature using NAS-FPN to obtain a third feature containing comprehensive information; and the building information of each village is obtained based on the third feature. For each village among all the villages, the architectural style information of the buildings in the village is determined based on the village's architectural information; in particular, the architectural information of the village is analyzed, and a quantitative evaluation index system is constructed from three perspectives: architectural type, architectural scale, and architectural pattern, so as to obtain the architectural style information of the village. The method further includes: determining the type characteristics of village architectural style based on the style information of each style type; The aforementioned architectural style information includes: building scale, average building area, building area percentage, building area diversity, building distribution clustering, and building distribution disorder. Architectural style types include traditional style buildings, harmonious style buildings, and disharmonious style buildings. Determining the architectural style information of buildings in the village based on the village's architectural information includes: Based on the architectural information of the village, determine the total building area of any one of the various architectural styles and the total building area of all buildings in all architectural styles; based on the total building area and the total building area, use the formula... Determine the percentage of building area of any type of architectural style in the village, where, Indicates the percentage of building area. Indicates the total building area. This represents the total area of all buildings. This indicates the total number of buildings in the village. Indicates the first of all buildings The area of each building; Based on the architectural information of the village, determine the average area of buildings under any one of the various architectural styles; based on the average area, use the formula... Determine the diversity of building area for any type of architectural style in the village, where, , , Indicating diversity in building area, This indicates the total number of buildings in the village. Indicates the first of all buildings The area of each building, This represents the average building area. Based on the building information of the village, determine the observed average spacing and the predicted average spacing for all buildings; based on the observed average spacing and the predicted average spacing, use the formula... Determine the building distribution density of the village, wherein, Indicates the degree of clustering of building distribution. Indicates the average interval between observations. Indicates the predicted average spacing; Based on the building information of the village, determine the average observation spacing corresponding to all buildings; based on the average observation spacing, use the formula... Determine the disorder of the building distribution in the village, wherein, , , Indicates the degree of disorder in building distribution. This indicates the total number of buildings in the village. Indicates the first of all buildings The building and the first The spacing between adjacent buildings of a building. This represents the average distance between observations.
2. The method according to claim 1, characterized in that, The building recognition model is trained based on the following steps: Obtain village image samples and building information samples, wherein the village image samples are training data and the building information samples are training labels; The residual network in the original building recognition model is used to extract features from the village image samples to obtain the first feature sample; The first feature sample is extracted using the feature pyramid network optimized by void space pyramid pooling and neural architecture search-feature pyramid network in the original building recognition model to obtain the second feature sample. The second feature sample is then fused to obtain the third feature sample. The original building recognition model is trained based on the third feature sample and the building information sample to obtain a trained building recognition model.
3. A device for determining the architectural style of a village, characterized in that, include: The acquisition module is used to acquire images of the villages to be identified. The processing module is used to input the village image to be identified into the building recognition model to obtain the building information of each village in the village image to be identified, which is output by the building recognition model. The building recognition model is trained based on village image samples and building information samples. Building information is used to characterize building type, building scale, and building layout; For each village among all the villages, the architectural style information of the buildings in the village is determined based on the village's architectural information. Specifically, the architectural information of the village is analyzed, and a quantitative evaluation index system is constructed from three perspectives: building type, building scale, and building pattern, thereby obtaining the architectural style information of the village. The building recognition model includes residual networks, ASPP, and NAS-FPN. The architectural information of each village is obtained through the following steps: feature extraction is performed on the image of the village to be identified using the residual network to obtain a first feature containing architectural information; pooling is performed on the first feature using ASPP to obtain a second feature containing multi-scale architectural information; feature fusion is performed on the second feature using NAS-FPN to obtain a third feature containing comprehensive information; and the architectural information of each village is obtained based on the third feature. The village architectural style determination device is also used to: determine the type characteristics of village architectural style based on the style information of each of the various style types; The landscape information includes: building scale, average building area, building area percentage, building area diversity, building distribution clustering, and building distribution disorder. Landscape types include traditional landscape buildings, harmonious landscape buildings, and disharmonious landscape buildings. The processing module is specifically used to determine the total building area of any one of the landscape categories and the total area of all buildings in all landscape categories based on the village's building information; and based on the total building area and the total area of all buildings, using a formula... Determine the percentage of building area of any type of architectural style in the village, where, Indicates the percentage of building area. Indicates the total building area. This represents the total area of all buildings. This indicates the total number of buildings in the village. Indicates the first of all buildings The area of each building; based on the building information of the village, determine the average area of buildings under any one of the various architectural styles; based on the average area, use the formula... Determine the diversity of building area for any type of architectural style in the village, where, , , Indicating diversity in building area, This indicates the total number of buildings in the village. Indicates the first of all buildings The area of each building, This represents the average building area; based on the building information of the village, the observed average spacing and predicted average spacing corresponding to all buildings are determined; based on the observed average spacing and the predicted average spacing, a formula is used... Determine the building distribution density of the village, wherein, , , Indicating diversity in building area, This indicates the total number of buildings in the village. Indicates the first of all buildings The area of each building, This represents the average building area; based on the building information of the village, the average observation spacing corresponding to all buildings is determined; based on the average observation spacing, a formula is used... Determine the disorder of the building distribution in the village, wherein, , , Indicates the degree of disorder in building distribution. This indicates the total number of buildings in the village. Indicates the first of all buildings The building and the first The spacing between adjacent buildings of a building. This represents the average distance between observations.
4. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for determining the architectural style of villages as described in any one of claims 1 to 2.
5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for determining the architectural style of villages as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Method for realizing village style and appearance management based on oblique photography and image recognition technology
CN115984721A