Method and system for automatically identifying plane texture of traditional slope crest building
Through the cascade architecture of instance segmentation model and key point detection model and multi-model voting mechanism, the accuracy problem of traditional slope-roof building plane texture recognition is solved, high-precision and reliable automatic recognition is achieved, and the disadvantages of traditional rectangular frame recognition confusion are overcome.
Patent Information
- Application Number
- CN202511198816.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-08-26
AI Technical Summary
Existing technologies have difficulty accurately identifying the plane texture of traditional slope-roof buildings, which are often mixed with modern buildings and complex terrain, resulting in false detections and missed detections.
A cascade architecture of instance segmentation model and key point detection model is adopted, combined with geographic partitioning to dynamically select target detection model. The instance segmentation model is used to extract roof contours and perform direction normalization. The key point detection model is used to identify roof ridge feature points and connection relationships, and a partition-customized architectural knowledge rule base is introduced for verification. Finally, a multi-model voting mechanism is used to optimize the recognition results.
It achieves high-precision and reliable recognition of the plane texture of traditional slope-roofed buildings, ensures the logical rationality of roof combination and the continuity of ridges, dynamically enhances the robustness of the system, and can cope with the challenges of complex scenes and sparse sample areas.
Smart Images

Figure CN120708075A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of remote sensing image analysis, and in particular to a method and system for automatically identifying the plane texture of a traditional sloping roof building. Background Art
[0002] Traditional areas within my country's urban and rural settlements (such as historical and cultural blocks, famous historical and cultural towns, famous villages, traditional villages, and other historic areas) are a type of historical and cultural heritage. Traditional sloping-roof buildings occupy a central position in the spatial structure of these traditional areas. These buildings are widespread throughout China. The planar texture of traditional sloping-roof buildings includes, but is not limited to, information on individual building surfaces, such as the roof and ridge. Rapidly identifying the planar texture of traditional sloping-roof buildings is crucial for efficient surveys and the construction of high-precision three-dimensional digital models of settlements.
[0003] Existing technologies generally use image segmentation algorithms to identify all building areas in an image or mark the approximate location boundary box of a single building.
[0004] However, traditional slope-roof buildings in traditional areas are identified using rectangular frames and are often mixed with other types of buildings, such as modern flat-roofed houses, sheds, temporary structures, and even complex terrain features (such as specific forms of vegetation). It is difficult to accurately distinguish traditional slope-roof buildings based on image segmentation algorithms, resulting in false detection of non-traditional slope-roof buildings and missed detection of real traditional slope-roof buildings. Summary of the Invention
[0005] The present application provides a method and system for automatically identifying the plane texture of a traditional sloping roof building, so as to solve the problem of low accuracy in identifying the plane texture of a traditional sloping roof building in the prior art.
[0006] In a first aspect, the present application provides a method for automatically identifying the plane texture of a traditional sloping roof building, comprising: Acquire a remote sensing image of a target area, and parse the geographical coordinate features corresponding to the target area from the remote sensing image of the target area; Using a target detection model partitioned according to geographic coordinate features, a joint detection of roofs and ridges is performed for traditional slope-roofed buildings within the target area to obtain detection results. The target detection model includes an instance segmentation model and a key point detection model. Different target detection models correspond to different partitions, and the target detection models are selected from a preset regional adaptation recognition model group. During the joint detection process, the instance segmentation model extracts the minimum circumscribed rotated rectangle of the roof outline, performs a spatial projection transformation on the minimum circumscribed rotated rectangle, normalizes it to a standard direction, and then inputs it into the key point detection model. The key point detection model identifies the ridge feature points and connection relationships, and connects the lines to form the ridge. Extracting roof ridge constraint rules for the partition corresponding to the geographic coordinate feature from a preset building texture feature knowledge base, and verifying the detection results according to the roof ridge constraint rules to verify the rationality of the roof combination and the continuity of the ridge, wherein the roof ridge constraint rules include a positive ridge angle tolerance threshold, a roof overlap ratio coefficient, and a fire wall spatial distribution feature; When the verification result fails to meet the compliance conditions, a multi-model voting mechanism is started to superimpose the output results of the target detection model of the corresponding partition, the basic detection model and the target detection model of the adjacent partition until the verification result meets the standards, thereby obtaining the automatic recognition result of the plane texture of the traditional sloping roof building. The basic detection model is a universal detection model generated by pre-training of the overall sample data set, and is the base model for generating the target detection models of all partitions. The compliance conditions include: the ridge angle failure rate and the roof overlap ratio failure rate are both less than or equal to the corresponding preset thresholds, and the fire wall compliance rate and the ridge penetration rate are both greater than or equal to the corresponding preset thresholds.
[0007] Preferably, the generation process of the preset region adaptation recognition model group includes: Obtaining a partitioned sample data set for each sample area, and combining the partitioned sample data sets of all sample areas into an overall sample data set, wherein the sample area is an area based on a province, city, or county; Constructing a dual detection model that uses a cascaded architecture of an instance segmentation model and a key point detection model. The instance segmentation model extracts the minimum circumscribed rotated rectangle of the roof outline, and the key point detection model identifies roof ridge feature points and connection relationships from the minimum circumscribed rotated rectangle. Pre-training the dual detection model based on the overall sample data set, and generating a basic detection model after the training is completed; Based on the sample data sets of each partition, the basic detection model is respectively transferred and trained to obtain a preset region adaptation recognition model group including the target detection model of each partition.
[0008] Preferably, obtaining the partitioned sample data set of each sample area includes: For each sample area, a first remote sensing image of the sample area collected by a sensor on a satellite is obtained, and the first remote sensing image of the sample area is cropped to obtain a first cropped image including a traditional area in an urban and rural settlement; Identifying roof layout information of each traditional pitched roof building in the first cropped image, wherein the roof layout information is a single roof or a continuous roof, and the combination types of the continuous roof include: a connected type and an overlapped type; the connected types include: horizontal connection, vertical connection, oblique connection, and arc connection; and the overlapped types include: vertical overlap and oblique overlap; A decomposition method corresponding to the connection type is used to identify whether the continuous roof has segmentation features. If segmentation features exist, the continuous roof is decomposed into multiple segmented roofs based on the segmentation features, and the segmentation features include: material features, height features, offset features, and fire wall features. Alternatively, if no segmentation features exist, the continuous roof is decomposed into multiple segmented roofs using a straight ridge fitting error method. Alternatively, a decomposition method corresponding to the overlap type is used to decompose the continuous roof into multiple segmented roofs based on the ridge. Treating both a single-roof traditional pitched-roof building and a split-roof traditional pitched-roof building as independent traditional pitched-roof buildings, and generating roof combination information of each independent traditional pitched-roof building based on the first cropped image; The roof combination information is used as labeling information, and a partitioned sample data set of a sample area is generated based on the labeling information and the first cropped image.
[0009] Preferably, obtaining the partitioned sample data set of each sample area includes: Acquiring a second remote sensing image of the sample area collected by multiple sensors on the UAV, cropping the second remote sensing image of the sample area to obtain a second cropped image that includes a traditional area in the urban and rural settlements; Based on the second remote sensing image, the roof is automatically segmented and the ridge is automatically extracted to obtain the roof combination information of an independent traditional pitched roof building; The roof combination information is used as annotation information, and a migration model is used to migrate the annotation information to the second cropped image to generate a sample data set of the sample area.
[0010] Preferably, after acquiring the first remote sensing image of the sample area collected by the sensor on the satellite, the method further includes: Using monocular depth estimation technology to generate depth information of each position in the first remote sensing image, different roofs can be distinguished or the roof and the ground can be distinguished by the depth information of different positions; Furthermore, the roof tilt distortion caused by the satellite imaging angle is corrected using the depth information.
[0011] Preferably, generating the roof combination information of each of the independent traditional pitched roof buildings based on the first cropped image includes: Obtain ridge information for independent traditional pitched roof buildings; Obtain the first slope roof type information of the independent traditional slope roof building input by the user; Obtaining an eaves determination method corresponding to the first pitched roof type information, and determining the eaves information of the independent traditional pitched roof building according to the eaves determination method corresponding to the first pitched roof type information; wherein the first pitched roof type information is a single-eave single-slope roof, a single-eave double-slope roof, a double-eave double-slope roof, a single-eave four-slope roof, a double-eave four-slope roof, a half-four-slope roof, a single-eave hip roof, a double-eave hip roof, or a half-hip roof, and different first pitched roof type information corresponds to different eaves determination methods; Performing quality inspection on the ridge information, the first slope roof type information, and the eaves information to obtain an overall quality inspection result; If the overall quality inspection result is qualified, generating roof frame information and roof key point information of an independent traditional pitched roof building based on the ridge information, the first pitched roof type information and the eaves information; The ridge information, the first slope roof type information, the eaves information, the roof frame information and the roof key point information together constitute the roof combination information of the independent traditional slope roof building.
[0012] Preferably, when the overall quality test result is qualified, the method further includes: Acquire a third remote sensing image of the sample area; wherein the third remote sensing image is acquired earlier than the first remote sensing image; The ridge information, the first pitched roof type information, and the eaves information are used as qualified annotations, and translation processing is performed in combination with the position information of the independent traditional pitched roof building, so that the position of the qualified annotation in the first remote sensing image is aligned with the position of the qualified annotation in the third remote sensing image; Differential information between the first remote sensing image and the third remote sensing image is determined, and the qualified annotation is optimized according to the differential information to obtain an optimized qualified annotation.
[0013] In a second aspect, the present application provides a system for automatically identifying the plane texture of a traditional sloping roof building, comprising: An acquisition module is used to acquire a remote sensing image of a target area and parse the geographical coordinate features corresponding to the target area from the remote sensing image of the target area; A detection module is configured to utilize a target detection model partitioned according to geographic coordinate features to perform joint detection of roofs and ridges for traditional sloped-roof buildings within the target area, thereby obtaining a detection result. The target detection model includes an instance segmentation model and a key point detection model. Different target detection models correspond to different partitions, and the target detection models are selected from a preset group of regional adaptive recognition models. During the joint detection process, the instance segmentation model extracts the minimum circumscribed rotated rectangle of the roof outline, performs a spatial projection transformation on the minimum circumscribed rotated rectangle, normalizes it to a standard orientation, and then inputs it into the key point detection model. The key point detection model identifies ridge feature points and connectivity relationships, and connects them as ridges. An extraction and verification module is used to extract the roof ridge constraint rules of the partition corresponding to the geographic coordinate feature from a preset building texture feature knowledge base, and verify the detection results according to the roof ridge constraint rules to verify the rationality of the roof combination and the continuity of the ridge. The roof ridge constraint rules include the ridge angle tolerance threshold, the roof overlap ratio coefficient, and the spatial distribution characteristics of the fire wall; A startup module is used to start a multi-model voting mechanism when the verification result does not meet the compliance conditions, so as to superimpose the output results of the target detection model of the corresponding partition, the basic detection model and the target detection model of the adjacent partition until the verification result meets the standards, thereby obtaining the automatic recognition result of the plane texture of the traditional slope-roofed building. The basic detection model is a universal detection model generated by pre-training of the overall sample data set, and is the base model for generating the target detection models of all partitions. The compliance conditions include: the ridge angle failure rate and the roof overlap ratio failure rate are both less than or equal to the corresponding preset thresholds, and the fire wall compliance rate and the ridge penetration rate are both greater than or equal to the corresponding preset thresholds.
[0014] In a third aspect, the present application provides a computing device comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement a method for automatically identifying the plane texture of a traditional sloping roof building as described in any one of the first aspects.
[0015] In a fourth aspect, the present application provides a computer storage medium storing a computer program, which, when executed by a computer, implements a method for automatically identifying the plane texture of a traditional sloping roof building as described in any one of the first aspects.
[0016] In the present application, a method for automatically identifying the plane texture of traditional sloping roof buildings is provided, comprising: acquiring a remote sensing image of a target area, parsing the geographic coordinate features corresponding to the target area from the remote sensing image of the target area; utilizing a target detection model partitioned corresponding to the geographic coordinate features, for traditional sloping roof buildings in the target area, performing joint detection of the roof and the ridge to obtain a detection result, wherein the target detection model comprises an instance segmentation model and a key point detection model, different partitions correspond to different target detection models, and the target detection model is selected from a preset area adaptation recognition model group; in the joint detection process, the instance segmentation model extracts the minimum circumscribed rotated rectangle of the roof contour, performs a spatial projection transformation on the minimum circumscribed rotated rectangle, normalizes it to a standard direction, and inputs it into the key point detection model, the key point detection model identifies the ridge feature points and connection relationships, and connects the lines as the ridge; extracts the geographic coordinate features from a preset building texture feature knowledge base The detection results are verified according to the roof ridge constraint rules of the partition corresponding to the physical coordinate characteristics to verify the rationality of the roof combination and the continuity of the ridge. The roof ridge constraint rules include the ridge angle tolerance threshold, the roof overlap ratio coefficient and the spatial distribution characteristics of the fire wall. When the verification result does not meet the compliance conditions, the multi-model voting mechanism is started to superimpose the output results of the target detection model of the corresponding partition, the basic detection model and the target detection model of the adjacent partition until the verification result meets the standards, and the automatic recognition result of the plane texture of the traditional slope roof building is obtained. The basic detection model is a universal detection model generated by pre-training the overall sample data set, and is the base model for generating the target detection model of all partitions. The compliance conditions include: the ridge angle unqualified rate and the roof overlap ratio unqualified rate are both less than or equal to the corresponding preset thresholds, and the fire wall compliance rate and the ridge penetration rate are both greater than or equal to the corresponding preset thresholds.
[0017] The present application has the following advantages: by acquiring remote sensing images of the target area and analyzing the geographic coordinate features corresponding to the target area, the target area can be accurately located, providing a geographic basis for the subsequent selection of the zoning adaptation model, and avoiding recognition bias caused by differences in architectural features across regions. Instance segmentation extracts the minimum circumscribed rotated rectangle of the roof outline, and combined with key point recognition, it can improve the accuracy of ridge positioning; on the basis of joint detection, through the roof ridge constraint rules, non-traditional slope-roofed buildings such as modern flat-roofed houses and temporary structures are filtered out, solving the problem that traditional rectangular frames are difficult to accurately distinguish traditional slope-roofed buildings, and can ensure the rationality of the plane texture of traditional slope-roofed buildings. The present application can achieve dynamic error correction through a multi-model voting mechanism, integrating the generalization capabilities of the basic detection model and the zoning adaptation model; using a preset threshold to force the output results to comply with regional building specifications, ensuring the topological correctness of the texture structure and the integrity of cultural characteristics.
[0018] Furthermore, by integrating data from sample areas at the provincial, municipal, and county levels to construct an overall sample dataset, the dual detection model was pre-trained to generate a base detection model. This base model was then transferred and trained based on the sample data from each subarea, ultimately forming a set of pre-defined regional adaptation recognition models that cover different geographical regions. This approach achieved a balance between the generalization capabilities of the base model and the precision of specific subareas, reducing the cost of repetitive model development while ensuring the accuracy of the plane texture recognition of traditional sloped roof buildings in different regions.
[0019] These and other aspects of the present application will become more readily apparent from the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 A flow chart of a method for automatically identifying the plane texture of a traditional sloping roof building provided in an embodiment of the present application; Figure 2 A schematic diagram of a sample area before cropping provided in an embodiment of the present application; Figure 3 A schematic diagram of a cropped sample area provided in an embodiment of the present application; FIG4 (a) is a schematic diagram of an exploded lap roof provided in an embodiment of the present application; FIG4 ( b ) is a schematic diagram of an exploded view of a connected roof provided in an embodiment of the present application; Figure 5 Schematic diagram showing eaves information of traditional sloping roof buildings of nine types of sloping roofs provided in the embodiments of the present application; Figure 6 A schematic diagram showing ridge information and eaves information in a cropped image provided by an embodiment of the present application; Figure 7 A schematic diagram of the recognition principle of the preset automatic slope roof type recognition model provided in an embodiment of the present application; Figure 8 A schematic diagram of the user interface of the sample quality inspection software provided in an embodiment of the present application; Figure 9 A schematic diagram showing the overall quality test results provided in the embodiment of the present application; Figure 10 Schematic diagram showing the roof frame information and roof key point information of traditional sloping roof buildings of nine types of sloping roofs provided in the embodiments of this application; Figure 11 A schematic diagram showing the roof frame information provided in an embodiment of the present application; Figure 12 A flowchart of a method for processing roof combination information of traditional pitch-roof buildings in urban and rural settlements provided in an embodiment of the present application; Figure 13 A schematic diagram of the structure of a traditional sloping roof building plane texture automatic recognition system provided in an embodiment of the present application; Figure 14 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0023] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The serial numbers of the operations, such as S11, S12, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this document are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to be different types.
[0024] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0025] In order to solve the problems in the prior art of low accuracy in plane texture recognition of traditional sloping roof buildings and susceptibility to interference from non-traditional sloping roof buildings (such as modern flat-roofed houses, scaffolding, and vegetation), which may lead to false detection or missed detection of traditional sloping roof buildings, the embodiment of the present application provides a method for automatic plane texture recognition of traditional sloping roof buildings, wherein the method adopts the following ideas: first, by analyzing the geographic coordinate features of the remote sensing image of the target area, accurate regional positioning is achieved, laying the foundation for subsequent zoning adaptation; secondly, an innovative joint detection architecture of a cascade of instance segmentation model and key point detection model is adopted, and a dedicated target detection model is dynamically selected based on geographic zoning, and the minimum circumscribed rotated rectangle of the roof contour is extracted through the instance segmentation model and direction normalized, and then input into the key point detection model to accurately identify the ridge feature points and their topological connections, thereby It effectively distinguishes the roof ridge structure unique to traditional slope-roofed buildings, overcoming the drawbacks of mixed recognition in traditional rectangular frames. Then, a partition-customized architectural knowledge rule base is introduced to automatically verify the joint detection results, ensuring the logical rationality of the roof combination and the spatial continuity of the ridge, and improving the cultural rationality and structural accuracy of the recognition results. Finally, for the situation where the verification fails to meet the standards, a multi-model voting error correction mechanism is designed to integrate the target detection model of the current partition, the basic detection model covering the commonality of the entire domain, and the target detection model output of the model of the adjacent partition to perform result superposition and iterative optimization until the key quantitative indicators all meet the preset threshold requirements. This dynamically enhances the robustness of the system, can effectively cope with the challenges of complex scenes and sparse sample areas, and ultimately achieves high-precision and high-reliability automatic recognition of the plane texture of traditional slope-roofed buildings.
[0026] Figure 1 This is a flow chart of a method for automatically identifying the plane texture of a traditional sloped roof building provided in an embodiment of the present application, such as Figure 1 As shown, the method includes: S11. Acquire a remote sensing image of the target area, and parse the geographical coordinate features corresponding to the target area from the remote sensing image of the target area.
[0027] Among them, the target area can be an area to be automatically identified by the plane texture of a traditional slope-roofed building, and can be a spatial range based on the administrative divisions of a city, county or township. The area of the target area can be 0.1 square kilometers, 1 square kilometer, 10 square kilometers, etc. Therefore, the embodiment of the present application does not specifically limit the size of the target area. The remote sensing image of the target area can be obtained by satellite. The geographic coordinate feature can include the latitude and longitude coordinates of the four corner points of the remote sensing image, and this feature can be bound to the administrative division code to which the target area belongs.
[0028] In an embodiment of the present application, a geographic information system tool is called to read the remote sensing image metadata, extract the longitude and latitude coordinates of the four corners, match the vector boundary data through spatial overlay analysis, and generate partition codes. If the remote sensing image spans multiple partitions, the sub-images corresponding to each partition are processed separately after grid segmentation to ensure that subsequent models and rules are accurately adapted.
[0029] S12. Using the target detection model partitioned according to the geographic coordinate features, perform joint detection of the roof and ridge for traditional slope-roofed buildings in the target area to obtain detection results.
[0030] Among them, the target detection model includes an instance segmentation model and a key point detection model. Different partitions correspond to different target detection models, and the target detection model is selected from the preset area adaptation recognition model group; in the joint detection process, the instance segmentation model extracts the minimum circumscribed rotated rectangle of the roof contour, performs spatial projection transformation on the minimum circumscribed rotated rectangle, normalizes it to the standard direction, and inputs it into the key point detection model. The key point detection model identifies the ridge feature points and connection relationships, and connects the lines as the ridge.
[0031] It should be understood that the composition of urban and rural settlement textures is complex and varies across my country, from east to west and from north to south. Examples include the northern courtyard house, the Fujian mansion, the Hakka walled house, and the Yunnan "yikeyin" (a seal). Using a single object detection model to identify the planar texture of traditional sloping-roof buildings in each subarea could lead to missed detections. Therefore, to improve the recognition of the planar texture of traditional sloping-roof buildings in each subarea, object detection models corresponding to the subareas are provided. For example, subarea 1 corresponds to object detection model 1, subarea 2 corresponds to object detection model 2, and subarea 3 corresponds to object detection model 3.
[0032] Furthermore, performing a spatial projection transformation on the minimum circumscribed rotated rectangle and normalizing it to a standard orientation facilitates rapid identification of roof ridges. Ridge feature points are spatial locations with key geometric and topological significance within the ridge structure of traditional pitched roof buildings. These can be understood as the coordinates of the intersection between the ridge segment and the minimum circumscribed rotated rectangle, or as points on the midline of the minimum circumscribed rotated rectangle. These serve as the benchmark for ridge line shape control and provide the smallest computable unit for ridge continuity analysis. Ridge feature points include three core types: endpoints, intersections, and turning points. Endpoints are the starting and ending points of the ridge line, typically located at the eaves bend or at the top of the gable. Intersections are the intersections of multiple ridges, such as the intersection of the main ridge and the vertical ridge of a hip roof, and determine the topological relationships of the roof. Turning points are locations where the ridge direction suddenly changes, such as the extreme curvature of a curved ridge, and are used to describe the complex morphology of non-straight ridges. Connectivity refers to the topological connection rules between ridge feature points, reflecting the structural logic of traditional buildings. The connection relationship includes geometric connection, wherein the geometric connection is a straight line / curve segment between feature points, such as the endpoints J1 and J2 forming the main ridge baseline. The connection types of the geometric connection include main ridge connection and vertical ridge connection.
[0033] S13. Extract the roof ridge constraint rules of the partition corresponding to the geographic coordinate feature from the preset building texture feature knowledge base, and verify the detection results according to the roof ridge constraint rules to verify the rationality of the roof combination and the ridge continuity.
[0034] Among them, the roof ridge constraint rules include but are not limited to: ridge angle tolerance threshold, roof overlap ratio coefficient and fire wall spatial distribution characteristics. In addition, different partitions correspond to different roof ridge constraint rule contents. Among them, the ridge angle tolerance threshold is the maximum angle deviation value allowed between the ridge line and the long axis direction of the minimum circumscribed rotated rectangle. For example, the ridge angle tolerance threshold of Hui-style architecture is ≤3°, and the ridge angle tolerance threshold of southern Fujian architecture is ≤5°. The roof overlap ratio coefficient is the minimum ratio threshold of the width of the overlapping area of adjacent roofs to the current roof width. For example, the gable roof is ≥0.3 and the hip roof is ≥0.5. Spatial distribution characteristics of fire walls The position rules and morphological constraints of fire walls (such as horse head walls) in buildings include: position rules, morphological constraints and density thresholds.
[0035] S14. If the verification result does not meet the standard conditions, start the multi-model voting mechanism to superimpose the output results of the target detection model of the corresponding partition, the basic detection model and the target detection model of the adjacent partition until the verification result meets the standard, and obtain the automatic recognition result of the plane texture of the traditional slope roof building.
[0036] Among them, the basic detection model is a universal detection model generated through pre-training of the overall sample data set, and is the base model for generating target detection models of all partitions. In addition, the compliance conditions may include: the ridge angle failure rate and the roof overlap ratio failure rate are both less than or equal to the corresponding preset thresholds, and the fire wall compliance rate and the ridge penetration rate are both greater than or equal to the corresponding preset thresholds.
[0037] For example, the preset threshold corresponding to the ridge angle unqualified rate is 5%, the preset threshold corresponding to the roof overlap ratio unqualified rate is 10%, the preset threshold corresponding to the fire wall compliance rate is 90%, and the preset threshold corresponding to the ridge penetration rate is 95%. It should be noted that the embodiments of the present application do not make specific restrictions on the size of the above preset thresholds.
[0038] By executing the above steps S11 to S15, the embodiment of the present application can achieve accurate regional positioning by analyzing the geographic coordinate features of the remote sensing image of the target area, laying the foundation for subsequent partition adaptation; secondly, a joint detection architecture of the instance segmentation model and the key point detection model cascade is adopted, and a dedicated target detection model is dynamically selected based on the geographic partition, and the minimum circumscribed rotated rectangle of the roof contour is extracted by the instance segmentation model and the direction is normalized, and then the key point detection model is input to accurately identify the ridge feature points and their topological connections, thereby effectively distinguishing the roof ridge structure unique to traditional slope-roofed buildings, overcoming the disadvantage of the traditional rectangular frame recognition confusion; then, the partition customization is introduced. The architectural knowledge rule base is used to automatically verify the joint detection results, ensure the logical rationality of the roof combination and the spatial continuity of the ridge, and improve the cultural rationality and structural accuracy of the recognition results; finally, for the situation where the verification fails to meet the standards, a multi-model voting error correction mechanism is designed to integrate the target detection model of the current partition, the basic detection model covering the commonality of the entire domain, and the target detection model output of the model of the adjacent partition to perform result superposition and iterative optimization until the key quantitative indicators all meet the preset threshold requirements, dynamically enhancing the robustness of the system, and being able to effectively cope with the challenges of complex scenes and sparse sample areas, and ultimately achieving high-precision and high-reliability automatic recognition of the plane texture of traditional sloping roof buildings.
[0039] It should be noted that how to construct the target detection model with the right architecture, and then constructing the preset region adaptive recognition model group containing the target detection models of each partition, provides technical support for improving the accuracy of roof and ridge recognition. In one possible embodiment, the process of generating the preset region adaptive recognition model group includes: Step 21: Obtain the partitioned sample data set of each sample area, and combine the partitioned sample data sets of all sample areas into an overall sample data set. The sample area is an area based on a province, city, or county.
[0040] It should be understood that the partitioned sample data set may include remote sensing images and annotation information of traditional slope-roof buildings in the area, wherein the remote sensing images may be remote sensing images of each sample area collected by satellites, drones and other equipment, and in order to distinguish remote sensing images collected in different periods or by different equipment, they can be distinguished by first, second, third, etc. The specific meaning of the annotation information is specifically described in the subsequent process and will not be repeated here. The embodiment of the present application can adopt a combination of partitioned sample data sets to ensure that the partitioned sample data sets cover different regional architectural features, such as the Anhui style, the Minnan style, etc., to solve the regional adaptability problem of the "one size fits all" model.
[0041] Moreover, the overall sample dataset can be used to train the basic detection model to learn the cross-regional common features of traditional slope-roofed buildings, such as the basic roof ridge topology.
[0042] Step 22: Build a dual detection model. The dual detection model adopts a cascade architecture of an instance segmentation model and a key point detection model. The instance segmentation model extracts the minimum circumscribed rotated rectangle of the roof contour, and the key point detection model identifies the ridge feature points and connection relationships from the minimum circumscribed rotated rectangle.
[0043] The dual-detection model enables phased processing, first locating the roof outline and then fine-tuning the roof ridge topology. The minimum enclosing rotated rectangle eliminates differences in building orientation, providing directional normalized input for roof ridge identification. Based on this connectivity, discrete points can be converted into a roof ridge network.
[0044] Step 23: Pre-train the dual detection model based on the entire sample data set, and generate a basic detection model after the training is completed.
[0045] It should be understood that during the training process, this application can simultaneously optimize the parameters of the instance segmentation model and the keypoint detection model, or it can fix the parameters of one model and optimize the other model. The embodiments of this application do not specifically limit the pre-training process. In addition, the loss function of each model can be set differently, and the embodiments of this application do not specifically limit the specific expression of the loss function.
[0046] Step 24: Based on the sample data sets of each partition, the basic detection model is respectively transferred and trained to obtain a preset region adaptation recognition model group including the target detection model of each partition.
[0047] By executing the above steps 21 to 24, the embodiment of the present application constructs a global data set by integrating provincial partition samples, pre-trains a dual-detection model cascade architecture to form a basic detection model, so that the model can learn the cross-regional common characteristics of traditional slope-roofed buildings, such as the ridge topology and roof combination; then, the basic model is transferred and trained based on the partition samples to generate an adaptation model group covering multiple regions. This method has solved the industry problem of "global universality and regional specialization cannot be achieved at the same time", that is, the basic detection model ensures the generalization recognition ability in multiple landform environments such as plateaus, mountains, and water towns, and the target detection model corresponding to the partition improves the recognition accuracy of characteristic structures; the cascade design of the dual detection model improves the structural restoration rate of complex roofs such as double-eaved hip roofs through spatial normalization processing and topological reconstruction; the finally generated model group has the ability to dynamically expand and achieve millisecond-level response recognition, providing technical support for the accurate survey of historical settlements at the provincial level that can be engineered and implemented.
[0048] On the basis of the above embodiments, it is considered that the labeling of traditional sloping roof buildings in traditional areas in urban and rural settlements is the basis for model training such as dual detection models and basic detection models. In addition, most of the existing sample labeling methods process roof combination information based on the outer contour of traditional sloping roof buildings to achieve sample labeling. However, due to the tortuous outer contour of traditional sloping roof buildings, the labeling workload is huge, and due to the overlapping and continuous roofs of traditional sloping roof buildings in traditional areas in urban and rural settlements, it is even more difficult to label. How to improve the accuracy of the labeling of the roof combination information of the sample area with less workload when the roof is continuous, so as to train an automatic labeling model for the roof combination information in combination with the data set of the sample area, is a problem that needs to be solved urgently. In order to solve this problem, the embodiment of the present application can perform sample labeling through at least one of the following processes to obtain a partitioned sample data set for each sample area.
[0049] In order to refine the roof layout information, improve the accuracy of the labeled information and the diversity of the data set, enhance the representativeness of the data set and the generalization ability of the training model, thereby improving the accuracy and efficiency of the roof combination information processing of traditional pitched roof buildings, the first sample labeling process corresponding to step 21 includes the following steps 211 to 215: Step 211: For each sample area, a first remote sensing image of the sample area collected by a sensor on a satellite is obtained, and the first remote sensing image of the sample area is cropped to obtain a first cropped image including a traditional area in an urban and rural settlement.
[0050] The sample area may include traditional areas in urban and rural settlements, and may also include other areas outside traditional areas in urban and rural settlements. This embodiment does not specifically limit the size of the sample area. The first remote sensing image is a remote sensing image with a geographic coordinate system, and the first remote sensing image may be a local or online remote sensing satellite image. In this embodiment, the above-mentioned remote sensing image may be referred to as a remote sensing image base map. The image base map may be a high-resolution remote sensing image, which serves as a background layer to provide a geographic spatial reference framework for displaying the geographic location information of traditional areas in urban and rural settlements, and performing annotation and analysis thereon to ultimately generate training samples.
[0051] Specifically, this embodiment crops the first remote sensing image to obtain a cropped area. Visual interpretation can be used to locate buildings in the first remote sensing image. Furthermore, professional knowledge can be used to determine whether the buildings in the first remote sensing image are traditional pitched roof buildings. If so, the traditional pitched roof buildings are retained and step 212 is continued. For example, this embodiment uses an online remote sensing satellite image as a base map and uses target software, such as Geographic Information System (GIS) software, to draw vector boundary data containing geographic coordinates for the sample area. This vector boundary data can be used to acquire and crop the first remote sensing image at a specified tile level (or a specified spatial resolution). Alternatively, this embodiment can download the first remote sensing image using target crawling technology or related software. By cropping the first remote sensing image of the sample area, a cropped image containing traditional areas within urban and rural settlements is obtained, removing unnecessary background information and improving data purity and accuracy.
[0052] Figure 2 A plurality of examples of sample areas before cropping are given. The first remote sensing image of the sample area includes at least one cropped image, such as Figure 3 As shown in the figure, the cropped sample area includes the cropped image and the non-cropped area. The cropped image includes a traditional area in an urban and rural settlement, and the non-cropped area is the background color (e.g., the value is 0).
[0053] Optionally, after step 211, the method further includes: using monocular depth estimation technology to generate depth information for each position in the first remote sensing image, distinguishing different roofs or distinguishing between the roof and the ground through the depth information at different positions; and correcting the roof tilt distortion caused by the satellite imaging angle through the depth information. Therefore, it can be seen that, on the one hand, depth information can distinguish elevation mutations, and depth differences can be used to segment adhesion areas and accurately distinguish independent roofs. On the other hand, the embodiment of the present application generates a projection matrix through depth information, and then inversely corrects the tilt distortion to restore the true roof shape.
[0054] Step 212: Identify the roof layout information of each traditional pitched roof building in the first cropped image, where the roof layout information is a single roof or a continuous roof.
[0055] In step 212, the combination type of the continuous roof includes the overlapping type as shown in FIG4 (a) and the connected type as shown in FIG4 (b). If the combination type of the roof is the separated type, it indicates that the roof layout information is a single roof. If the combination type of the roof is the connected type or the overlapping type, it indicates that the roof layout information is a continuous roof.
[0056] It should be understood that the composition of urban and rural settlements is complex, varying across my country, from east to west and from north to south, such as the northern courtyard house, the Fujian dacuo, the Hakka walled house, and the Yunnan Yikeyin. Different architectural types of traditional sloping roofs employ different roof combinations. Generally speaking, all roof combinations can be categorized as follows: separated, connected, and overlapped. Separate roofs are exemplified by northern courtyard houses and public building courtyards. Connected roofs include horizontal (i.e., end-to-end), vertical, diagonal, and curved connections. Overlapping, or overlapping roofs, include vertical and diagonal overlaps.
[0057] The separated type is a combination type of single roof, which can clearly distinguish each roof.
[0058] The connected type and the overlapped type are combination types of continuous roofs, and each roof needs to be decomposed to distinguish it, so step 213 can be executed.
[0059] Step 213: Use a decomposition method corresponding to the connection type to identify whether the continuous roof has segmentation features. If so, decompose the continuous roof into multiple segmented roofs based on the segmentation features, which include material features, height features, offset features, and fire wall features. Alternatively, if no segmentation features exist, decompose the continuous roof into multiple segmented roofs using a linear ridge fitting error method. Alternatively, use a decomposition method corresponding to the overlap type to decompose the continuous roof into multiple segmented roofs based on the ridge. Decomposition may also be referred to as division, segmentation, etc., and a decomposition method may also be referred to as division method, segmentation method, etc.
[0060] In order to achieve effective decomposition of continuous roofs of different combination types, such as the connected type and the overlapped type, the embodiment of the present application can be specifically designed according to the characteristics of the combination type and the corresponding decomposition rules.
[0061] Specifically, there is uncertainty in the decomposition method for continuous roofs with different types of connections, such as horizontal, diagonal, and curved connections. To overcome this uncertainty, the present embodiment provides the following decomposition rules: For continuous roofs with clear segmentation features (such as 1. obvious material color differences, 2. height differences resulting in shadows in the remote sensing base map, 3. ridge misalignment, 4. fire walls, etc.), the present embodiment can decompose the roof based on the clear segmentation features. For continuous roofs without clear segmentation features but with certain transitions, the present embodiment can use the linear ridge fitting error method to decompose the continuous roof.
[0062] In other words, the decomposition rule for connected continuous roofs is as follows: identify the continuous ridges of traditional sloping roof buildings with continuous roofs, and the roofs where the ridges overlap at different angles in the continuous ridges can be regarded as different roofs; if the two roofs have obvious segmentation features on the first remote sensing image due to reasons such as obvious height difference or fire wall separation, the two roofs can be regarded as different roofs; or, when there is a certain plane intersection angle between the two roofs, starting from the endpoint of the continuous ridge, connect the next turning point (that is, the angle between the two adjacent line segments above) to form a line segment, and connect the next turning point when the distance between the next turning point and the starting point is less than the set threshold (set as needed, such as setting the actual spatial distance to 1 meter), otherwise, start boundary segmentation from the previous turning point, and the line segment between the starting point and the previous turning point is regarded as the same roof, and the line segment after the previous turning point is regarded as another roof, and repeat the segmentation operation starting from the previous turning point until the end point of the continuous ridge is segmented.
[0063] Exemplarily, the ridge located at the highest point of the continuous roof is determined as the continuous ridge. Based on the continuous ridge, points can be connected into lines. When the deviation between two adjacent line segments is not greater than the preset deviation value x, the roofs where the two adjacent line segments are located are determined to be the same roof. Conversely, when the deviation between two adjacent line segments is greater than the preset deviation value x, the roofs where the two adjacent line segments are located are determined to be different roofs.
[0064] The method for fitting a straight ridge error is as follows: A roof polyline is fitted to the continuous roofs at the turning points. Starting from the first point, the third point is connected to generate a preliminary ridge line. The distance between the second point and the ridge line is checked. If it is less than the value xx, the ridge line is within the fitting error range. The fitting process continues, the preliminary ridge line is updated, and the first and fourth points are connected. The distance between the second and third points and the preliminary ridge line is checked. If both are less than the value xx, the next step of fitting is continued; otherwise, the current ridge line fitting is completed. The ridge is separated from this end and used as the starting point for the next round of ridge fitting, and the fitting process is repeated.
[0065] However, for the overlapping type of roofs, different people have different decomposition methods, so the decomposition method is uncertain. Therefore, in order to overcome this uncertainty, the embodiment of the present application adopts a decomposition method based on the ridge.
[0066] In an embodiment of the present application, steps 212 to 213 are used to identify the roof layout information of each traditional sloping roof building in the cropped image, and the corresponding decomposition method is used to decompose the continuous roof into multiple segmented roofs. This step ensures that each independent traditional sloping roof building has detailed roof layout information, which improves the convenience and accuracy of the annotation information. By decomposing the continuous roof into multiple segmented roofs, the number and diversity of independent traditional sloping roof buildings in the dataset are increased. This helps to cover more scenarios and situations when training the model and improves the generalization ability of the model. The generation of cropped images and annotation information ensures the representativeness of the dataset and can better reflect the actual distribution and characteristics of traditional sloping roof buildings. Simplifying the complex continuous roof into multiple independent segmented roofs simplifies the subsequent data processing and analysis steps, making each independent traditional sloping roof building easier to manage and process.
[0067] In other words, this embodiment has the following advantages: by applying specific decomposition rules to different types of continuous roofs, independent traditional pitched roof buildings can be more accurately identified and segmented. This high-precision data processing helps to generate more accurate annotation information, thereby improving the quality of the entire data set. Since the decomposition method can handle a variety of complex continuous roof structures, it can generate more diverse single roof instances, which not only increases the number of data sets, but also ensures that its content covers more actual scenarios, so that the trained model has better generalization capabilities. For complex structures with uncertainties (such as horizontal connections, oblique connections, arc connections, etc.), these uncertainties are overcome by defining clear segmentation features or fitting errors, ensuring that effective decomposition can be achieved even in more complex situations.
[0068] Step 214 : Treat both the single-roof traditional sloping roof building and the split-roof traditional sloping roof building as independent traditional sloping roof buildings, and generate roof combination information of each independent traditional sloping roof building based on the first cropped image.
[0069] It should be noted that this embodiment can directly generate roof combination information for traditional pitched roof buildings with single roofs, while for traditional pitched roof buildings with continuous roofs, they can be segmented first and then the roof combination information can be generated.
[0070] Step 215: Use the roof combination information as labeling information, and generate a partitioned sample data set of the sample area based on the labeling information and the first cropped image.
[0071] By executing steps 211-215 above, the present embodiment achieves improved data accuracy, enhanced dataset diversity and representativeness, simplified subsequent processing, enhanced model training effectiveness, and improved method flexibility and scalability in processing roof combination information for traditional pitched roof buildings. These effects collectively improve the efficiency and quality of processing roof combination information for traditional pitched roof buildings.
[0072] In the above embodiment, in step 214, based on the first cropped image, roof combination information of each independent traditional pitched roof building is generated, including: Step 2141: Obtain the ridge information of an independent traditional sloping roof building.
[0073] Specifically, this embodiment can manually identify the ridge of an independent traditional sloping roof building, and can also use two-point geographic coordinates to represent the two endpoints of the ridge. For example, a line segment is used to display the ridge in the developed annotation quality detection software, and the ridge information is recorded. The ridge information can be the coordinate information of the two endpoints of the ridge, and the coordinates exist in the form of geographic coordinates or image coordinates. This embodiment gives priority to the use of geographic coordinates. When needed later, this embodiment can calculate information such as the ridge length through the ridge information. For continuous roofs, this embodiment can generate the ridge information of an independent traditional sloping roof building during the decomposition process, ensuring the accuracy of the ridge information. The accurate recording of the ridge information provides a reliable benchmark for the subsequent generation of eaves information.
[0074] Step 2142: Obtain the first slope roof type information of the independent traditional slope roof building input by the user.
[0075] Step 2143: Determine the eaves information of the independent traditional sloping roof building according to the first sloping roof type information.
[0076] Specifically, as a possible implementation, step 2143, determining the eaves information of the independent traditional pitched roof building according to the first pitched roof type information, includes: Step a1: Obtain the eaves determination method corresponding to the first slope roof type information.
[0077] like Figure 5 As shown, single-slope, double-slope, four-slope, and hip roofs are four increasingly complex types. Combined with single-eave, double-eave, and half-slope roofs, these roofs can form nine different types of traditional sloping roofs. Therefore, the first-slope roof type information can be single-eave single-slope, single-eave double-slope, double-eave double-slope, single-eave four-slope, double-eave four-slope, half-slope (e.g., with a gabled roof), single-eave hip roof, double-eave hip roof, or half-slope. Different first-slope roof type information corresponds to different eave determination methods.
[0078] Step a2: Determine the eaves information of the independent traditional sloping roof building according to the eaves determination method corresponding to the first sloping roof type information. The first sloping roof type information is manually determined sloping roof type information.
[0079] Among them, combined Figure 5 It can be seen that the method for determining the eaves corresponding to the single-eaved single-slope roof is: the coordinate information of an arbitrary point on the ridge of an independent traditional sloping roof building and the coordinate information of an arbitrary point on the eaves are determined as the eaves information of the independent traditional sloping roof building.
[0080] The method for determining the eaves corresponding to the single-eaved double-slope roof is: determining the coordinate information of an arbitrary point of the eaves on both sides of the main ridge of the independent traditional slope roof building as the eaves information of the independent traditional slope roof building.
[0081] The method for determining the eaves corresponding to the double-eaved double-slope roof is: determining the coordinate information of an arbitrary point of each of the two eaves on both sides of the main ridge of the independent traditional sloping roof building as the eaves information of the independent traditional sloping roof building.
[0082] The eaves corresponding to a single-eaved hip roof are determined by taking the coordinates of a designated point on the eaves on one side of the ridge and a designated point on the eaves on the other side of the ridge as the eaves information for the independent traditional hip roof building. The designated points on the eaves on the ridge and the other side form a roof diagonal. These designated points are called eaves corners.
[0083] The method for determining the eaves corresponding to the double-eaved four-slope building is: the coordinate information of the lower eaves corner, the lower end point of the upper gable ridge on one side of the main ridge of the independent traditional sloping roof building, and the lower eaves corner and the lower end point of the upper gable ridge on the other side are determined as the eaves information of the independent traditional sloping roof building.
[0084] The method for determining the eaves corresponding to the semi-hip roof is: the coordinate information of the eaves corner on one side of the main ridge of the independent traditional sloping roof building, an arbitrary point on the main ridge of the independent traditional sloping roof building, and the eaves corner on the other side of the main ridge of the independent traditional sloping roof building are determined as the eaves information of the independent traditional sloping roof building.
[0085] The method for determining the eaves corresponding to the single-eaved hip roof is: determining the coordinate information of the two end points of the gable ridge on one side of the main ridge of the independent traditional sloping roof building and the two end points of the gable ridge on the other side as the eaves information of the independent traditional sloping roof building.
[0086] The method for determining the eaves corresponding to the double-eaved hip roof is: the coordinate information of the lower eaves corner and the two end points of the gabled ridge on one side of the main ridge of the independent traditional sloping roof building and the lower eaves corner and the two end points of the gabled ridge on the other side are determined as the eaves information of the independent traditional sloping roof building.
[0087] The method for determining the eaves corresponding to a half-gable roof is to determine the eaves angle on one side of the main ridge of an independent traditional pitched roof building and the two endpoints of the gabled ridge on the other side as the eaves information of the independent traditional pitched roof building. The position information of all points in the above eaves information can be referred to as the position information of the eaves point.
[0088] For example, in a traditional area of an urban and rural settlement, the most common roof is a gable roof (or hip roof). Hipped roofs and hipped roofs are mostly public buildings and account for a relatively small proportion of traditional areas in urban and rural settlements. First, manually determine the type of sloping roof to obtain the first sloping roof type information. Select the corresponding eaves information marking method based on the different sloping roof type information. If it is the most common gable roof (or hip roof) (that is, a variant of a double-slope roof), any two points on the eaves on both sides are used to represent the width information of the roof. If the same roof has different widths, the widest point is used as the width. In the developed annotation quality inspection software, a line segment is also used to represent it. If the roof is other roof types, there are other methods to represent it. Figure 6 A schematic diagram showing the ridge information and eaves information in a cropped image provided in an embodiment of the present application.
[0089] As can be seen from the above description, this embodiment can identify the eaves of traditional sloping roof buildings using the ridge as a reference. If the eaves width varies at different locations, the widest point is used as the reference. Eaves information includes coordinate information for a set of points. The number and location of these points can be tailored to the type of sloping roof. Complex and uncommon sloping roof types may correspond to more than two points. This embodiment can subsequently determine roof width, shape, sloping roof type, and other information based on this eaves information.
[0090] As can be seen from the above description, this embodiment utilizes different eaves determination methods based on different types of sloping roofs (such as single-eaved single-slope roofs, single-eaved double-slope roofs, and double-eaved double-slope roofs), ensuring accurate generation of eaves information for each type. This method can handle a wide range of sloping roof types, including common single-eaved double-slope roofs and more complex double-eaved hip roofs, increasing the diversity and representativeness of sloping roof buildings in the dataset. By using different eaves determination methods, detailed eaves information, including coordinate information for multiple points, is generated, making the dataset richer and more comprehensive. The diversity and representativeness of the dataset improves the model's generalization capabilities, enabling it to perform better when processing new and unknown data. Pre-set rules and methods enable the automatic generation of ridge and eaves information, reducing manual intervention and improving processing efficiency. The generated roof combination information is clearly structured, including ridge and eaves information, facilitating subsequent data management and analysis.
[0091] Step 2144: Perform quality inspection on the ridge information, first slope roof type information, and eaves information to obtain an overall quality inspection result.
[0092] Specifically, as a possible implementation, step 2144 performs quality inspection on the ridge information, the first slope roof type information, and the eaves information to obtain an overall quality inspection result, including: Step b1: Determine whether there is an intersection between a line segment formed by the position information of two ridge endpoints included in the ridge information and a line segment formed by the position information of the eaves point included in the eaves information.
[0093] Step b2: Determine the quality inspection results of the ridge information and the eaves information based on the existence and number of intersections.
[0094] Specifically, if there are multiple intersections, it indicates that the quality test results of the ridge information and eaves information detection are poor, which can be corrected manually. After the correction, this embodiment can continue to perform cross-checks until the quality test results of the ridge information and eaves information are correct.
[0095] Step b3, in combination with the eaves information, apply the preset automatic slope roof type recognition model to obtain the second slope roof type information, and determine the quality inspection result of the first roof type information based on the comparison result of the second slope roof type information and the first slope roof type information. Among them, the second slope roof type information may be called the fourth roof information. Specifically, the relationship between the eaves point and the ridge can be judged to automatically generate the second slope roof type information. For example, an error distance is set. When any point is less than the error distance, it is determined to be a single-slope roof, otherwise it is a double-slope roof. When checking the slope roof type, this embodiment can compare the automatically determined second slope roof type information with the manually marked first slope roof type information. If the two slope roof type information of all traditional slope roof buildings are the same, the quality inspection result of the first roof type information is fine. If there are one or more inconsistencies, manual corrections are made.
[0096] Figure 7 Schematic diagram of the recognition principle of the preset automatic slope roof type recognition model provided in the embodiment of the present application. Figure 7As shown, the number of points in the eaves information is determined. If the number of points is 2, whether any point overlaps with the ridge is determined. If so, the second roof type is determined to be a single-slope roof. Otherwise, the two points are determined to be within the width (i.e., the length of the ridge). If so, it is a single-eaved double-slope roof; otherwise, it is a single-eaved four-slope roof. If the number of points is 3, the distance between the second of the three points and the ridge is determined. If the distance is 0, it is a semi-slope roof; if the distance is greater than 0, it is a semi-gable roof. If the number of points is 4, the number of points outside the ridge width is determined. If the number is 0, it is a double-eaved double-slope roof; if it is 2, it is a single-eaved hip roof; if it is 4, it is a double-eaved four-slope roof. If the number of points is 6, it is a double-eaved hip roof.
[0097] Figure 8 Schematic diagram of the user interface of the sample quality inspection software provided in an embodiment of the present application. Figure 9 A schematic diagram showing the overall quality inspection results provided for the embodiment of the present application. It can be seen from the above description that after the ridge information, first slope roof type information and eaves information of the cropped area are marked, the present embodiment can automatically detect the marking quality, which is automatically completed by the algorithm in the developed marking quality detection software. Specifically, the ridge information and the eaves information are cross-checked, that is, whether the line segment formed by the ridge intersects with the line segment formed by the two points of the eaves. If they intersect, it means that there is no problem with the marking. If there is a ridge without a corresponding eave, or a ridge intersects with multiple eaves; or there is an eave without a corresponding ridge, or an eave intersects with multiple ridges, it means that there is an error in the marking. The present embodiment can highlight the wrong eaves and ridges, and then perform manual judgment and correction. This example can use programs such as python to implement the automatic cross-check function. The following is a method for two-by-two intersection detection. Each ridge information and each eave information are traversed to calculate whether they intersect and store the unintersected results in a list. If they intersect, they are no longer recorded in the list to reduce the amount of calculation. Alternatively, if hardware resources are sufficient, this embodiment may store the correspondence between all eaves and ridges in a list.
[0098] Step b4: Merge the quality inspection results of the ridge information and the eaves information and the quality inspection result of the first roof type information to obtain an overall quality inspection result.
[0099] Step 2145: If the overall quality inspection result is qualified, generate the roof frame information and roof key point information of the independent traditional slope roof building based on the ridge information, the first slope roof type information and the eaves information.
[0100] This embodiment utilizes the roof symmetry and right-angle characteristics of traditional sloping roof buildings, and can simplify the traditional complex information labeling method through point labeling. Other information can be automatically calculated through simple labeling and the geometric characteristics of the roof. For example, the ridge length can be calculated through the ridge information, and the roof width can be calculated through the eaves information.
[0101] Depending on the type of pitched roof, this embodiment can employ corresponding methods to automatically generate roof frame (or roof rectangular frame) information. For example, this embodiment can employ a program such as Python to automatically extract secondary pitched roof type information, roof frame information, and roof key point information. Specifically, this embodiment can retrieve corresponding eaves information based on ridge information. Based on the ridge and eaves information, the secondary pitched roof type information, roof frame information, and roof key point information are calculated. Roof key point information includes the eaves turning point and the four-point coordinates of the double eaves.
[0102] Figure 10 Schematic diagram showing the roof frame information and roof key point information of 9 types of traditional sloping roof buildings provided in the embodiment of this application. Figure 10 It can be seen that, for the generation of roof frames of different slope roof types, the embodiments of the present application can provide different methods, exemplarily: For single-eaved and single-slope roof buildings, an embodiment of the present application provides a method for generating four-point coordinates, but is not limited to the following method: calculating the distance d between the two points (P1, P2) contained in the eaves information and the ridge (the line segment formed by J1 and J2), and translating the ridge endpoint to one side by a distance d to form the four-point coordinates of the roof frame (P1, P2, P3 and P4), where J1 coincides with P4, and J2 coincides with P3.
[0103] For double-slope roof buildings, such as gable roof or hip roof buildings, the embodiment of the present application provides a method for generating four-point coordinates, but is not limited to the following method: calculating the distance d between the two points (P1, P2) contained in the eaves information and the ridge (the line segment formed by J1 and J2), and translating the ridge endpoints to both sides by a distance d to form the four-point coordinates of the roof frame (P1, P2, P3 and P4).
[0104] For buildings with hip roofs, this embodiment provides a method for generating four-point coordinates, but is not limited to the following method: Calculate the distance d1 between the coordinates of two points in the eaves information and the perpendicular bisector, then linearly shift the ridge endpoint by a distance d1-d / 2 to generate the four-point coordinates of the double-eaves (Y1, Y2, Y3, and Y4). Shift the ridge endpoint linearly by a distance d1 to generate the four-point coordinates of the roof frame (P1, P2, P3, and P4).
[0105] In this embodiment, roof frame information and roof key point information can be stored in the following format, including a serial number identity (ID), pitch roof type, whether it is a traditional pitch roof building, the coordinates of the two points of the main ridge, the four-point coordinates of the roof frame, the four-point coordinates of the double eaves, and the four-point coordinates of the two ridges (id, PWDtype, JZtype, P1, P2, P3, P4, J1, J2, Y1, Y2, Y3, Y4, Z1, Z2, Z3, Z4). If a certain type has no related coordinates, it is recorded as 0. Figure 11 A schematic diagram showing roof frame information provided in an embodiment of the present application. In addition to indicating whether a building is a traditional pitched roof, JZtype can also store other information about the roof, such as the roof material (including traditional grey tiles, traditional red tiles, machine-made tiles, color-coated steel tiles, plastic tiles, etc.) and whether it is damaged.
[0106] Step 2146: The ridge information, the first slope roof type information, the eaves information, the roof frame information, and the roof key point information are combined to form the roof combination information of the independent traditional slope roof building.
[0107] Among them, the ridge information is also called the first roof information, the eaves information is also called the second roof information, the roof frame information and the roof key point information can constitute the third roof information. This embodiment marks independent traditional sloping roof buildings such as single roofs and split roofs, and marks the first sloping roof type information, building type (that is, whether it is a traditional sloping roof building) and other information.
[0108] In the above embodiment, when the overall quality inspection result is qualified, the method further includes: Step 2147: Acquire a third remote sensing image of the sample area. The third remote sensing image is acquired earlier than the first remote sensing image. The third remote sensing image is also called a historical remote sensing image.
[0109] Step 2148: Use the ridge information, the first slope roof type information, and the eaves information as qualified annotations, and perform translation processing in combination with the position information of the independent traditional slope roof building, so that the position of the qualified annotation in the first remote sensing image is aligned with the position of the qualified annotation in the third remote sensing image.
[0110] Step 2149: Determine differential information between the first remote sensing image and the third remote sensing image, and optimize the qualified annotation according to the differential information to obtain optimized qualified annotation.
[0111] By executing steps 2147 to 2149, this embodiment uses ridge information, slope roof type information, and eaves information as qualified annotations to ensure that these key features remain consistent in images at different time points, which helps to improve the accuracy and reliability of data annotation. Translation processing can be achieved through automated algorithms, reducing manual intervention and improving processing efficiency and accuracy. By aligning the positions of qualified annotations in images at different time points, errors caused by changes in geographical location or differences in coordinate systems can be eliminated, ensuring data consistency and comparability. By determining the differential information between images at two time points, changes in buildings, such as new construction, demolition, and reconstruction, can be accurately identified, providing an important basis for urban management and planning. By optimizing qualified annotations based on the differential information, invalid or erroneous annotations can be removed, valid information can be retained, and the quality and availability of the data can be improved. The optimized data can be applied to more scenarios, such as urban renewal planning, cultural heritage protection, disaster assessment, etc., to improve the practical value of the data.
[0112] Furthermore, in order to refine the roof layout information, improve the accuracy of the labeled information and the diversity of the dataset, enhance the representativeness of the dataset and the generalization ability of the training model, thereby improving the accuracy and efficiency of the roof combination information processing of traditional pitched roof buildings, the second sample labeling process corresponding to step 21 includes the following steps 221 to 223: Step 221: Acquire a second remote sensing image of the sample area captured by multiple sensors on the drone, and crop the second remote sensing image of the sample area to obtain a second cropped image that includes the traditional area in the urban and rural settlement. The second remote sensing image can be an orthophoto image taken by the drone.
[0113] Step 222: Based on the second remote sensing image, automatically segment the roof and automatically extract the ridge to obtain roof combination information of the independent traditional pitched roof building.
[0114] Step 223: Use the roof combination information as annotation information, and use the migration model to migrate the annotation information to the second cropped image to generate a sample data set of the sample area.
[0115] By executing the above steps 221 to 223, the embodiment of the present application can refine the roof layout information, thereby improving the accuracy and efficiency of the roof combination information processing of the traditional pitch roof building.
[0116] It should be noted that this embodiment can migrate annotation information in the following two situations: one is to migrate the dataset annotated on high-definition drone orthophotos to satellite remote sensing images. The purpose of this migration is that due to the complex roof combination information of traditional sloping roof buildings in urban and rural settlements, the clarity of satellite remote sensing images in some areas is relatively low. Direct annotation and visual interpretation on satellite remote sensing images is difficult and has low accuracy. In areas with high-definition drone orthophotos, annotation can be performed on the drone orthophotos first, and the annotated samples can be migrated to the satellite remote sensing images to improve the accuracy of the annotation. The method of annotating based on drone remote sensing images and then transferring them to satellite remote sensing images for modification and verification is basically the same as the method of migrating between different satellite remote sensing images and will not be repeated here.
[0117] Another approach is to address the significant workload of sample annotation. Since satellite remote sensing images from different years and seasons vary in color, angle, and features, it's possible to migrate annotated samples from traditional districts within the same urban and rural settlement to different satellite remote sensing images. This reduces workload while increasing sample diversity and enhancing the robustness of the model being trained. Specifically, historical remote sensing images from different years of the same location, since they all have spatial coordinate systems, can roughly align after import. However, the following operations are required for modification and verification. First, perform a global micro-translation: Analyze the average distance deviation between existing annotations and the new remote sensing imagery, and shift all annotations in the same direction to align the majority of them with the new remote sensing imagery. Second, perform individual position adjustments: For annotations that are misaligned due to different shooting angles or building heights, perform a piece-by-piece or individual alignment. Third, perform architectural change analysis and adjustments: Delete demolished buildings, modify relocated buildings, and add information such as ridges and eaves for newly built buildings.
[0118] In summary, this embodiment can import annotation information from historical remote sensing images of the same area from other years and perform a micro-translation of all annotation information to conduct change analysis. For demolished buildings and newly added buildings, the image of the corresponding building location in the historical remote sensing image is changed, and the annotation information such as the ridge information and eaves information of the demolished and newly added buildings is modified. Alternatively, this embodiment can perform annotation based on drone remote sensing imagery, then transfer the annotation information to satellite remote sensing imagery and perform optimization.
[0119] In the above embodiment, as a possible implementation, in S15, generating a data set based on the annotation information and the first cropped image includes: Step 151: Cropping the first cropped image according to a preset cropping frame to obtain multiple small images, and decomposing the annotation information into the annotation information corresponding to the multiple small images. The size of the cropping frame is the same as the input image size of the model to be trained. The preset cropping frame, also known as a tile frame, can be a square grid covering the small sample area or a preset rectangular frame. The small images are also called remote sensing image tiles.
[0120] Step 152: Identify the complete independent traditional sloping roof buildings in each small image, and adjust the labeling information corresponding to each small image based on the complete independent traditional sloping roof buildings in each small image to delete the incomplete roof combination information of the independent traditional sloping roof buildings to obtain adjusted labeling information.
[0121] Step 153: Use the small image and the adjusted annotation information as training samples to generate a data set for the model to be trained.
[0122] In general, this embodiment can use the developed annotation quality inspection software to export a geographic vector file, then crop the cropped image according to a preset cropping frame to obtain a small image. This embodiment can determine whether the four points in the roof frame information of the small image are completely within the preset cropping frame. If so, they are retained, forming a tile. If the four points are not completely within the preset cropping frame, it indicates that the corresponding traditional pitched roof building is at the edge and needs to be eliminated. Furthermore, this embodiment can convert training samples into the dataset format required for each model training.
[0123] It should be understood that after the ridge information, eaves information, roof frame information and roof key point information are marked in the developed marking quality inspection software, it is exported as a Shape format file (shp) vector file with a geographic spatial coordinate system. The image boundary information is calculated based on the geographic coordinate information contained in the corresponding remote sensing image, and the coordinates in the shp vector file are converted into the pixel coordinate system of the image.
[0124] Specifically, the large sample consisting of cropped images and annotation information is based on traditional urban and rural settlements and varies in size. Deep learning training models generally cannot input overly large samples such as cropped images. To address this issue, this embodiment crops large samples into training samples of equal size. The samples marked in the developed annotation quality inspection software are exported as .shp vector files. These files are cropped using the vector boundary data of the small sample area to generate a sample base map with coordinate information. Programming is performed using Python or other languages to read the coordinates, spatial resolution, and other information of the sample base map. A plane transformation is used to convert the spatial coordinates of the .shp vector file into pixel coordinates of the sample base map. A preset cropping frame is generated with the required pixel length (which can be set to 1024 in this embodiment). The sample base map is cropped to the size of the preset cropping frame. Using the preset cropping frame as a unit, each four-point roof frame is traversed. If all four points are within the preset cropping frame, they are retained. The retained points are not reappeared in subsequent iterations to reduce computational complexity. If there are no annotated shapes within the preset cropping frame or the number of annotated shapes is less than a preset number (set to 3 in this example), the small image is not retained. Finally, the small images and corresponding annotation information are stored in the dataset format required by different models.
[0125] The existing sample production workload is enormous, resulting in slow labeling efficiency. Therefore, to improve labeling efficiency, this embodiment can utilize a small number of pre-produced samples for model training. After the model is trained, this embodiment can automatically generate labeling information using a pre-trained object detection model. This automatically generated labeling information is converted into labeling information with geospatial coordinates, and compared with the labeling information corresponding to the cropped image to determine the accuracy of the automatically generated labeling information. New labeling information corresponding to other sample areas is then generated to form new samples.
[0126] Alternatively, this embodiment can utilize a pre-trained model from another region to crop the remote sensing imagery requiring sample annotation to a size suitable for the model. This cropping process is then placed into the model to generate annotation information. Based on the coordinate information of the small image, the automatically generated annotation information is converted into annotation information with geospatial coordinates. All the annotation information is then concatenated to create the complete annotation information corresponding to the remote sensing imagery requiring sample annotation. Furthermore, this embodiment can manually perform modifications and verification within a GIS. Once completed, sample production can proceed as described above, saving significant manual effort.
[0127] Figure 12 This is a flowchart of a method for processing roof combination information of traditional pitched roof buildings in urban and rural settlements provided in an embodiment of the present application. The method includes the following steps: S121. Acquire a first remote sensing image of a sample area, and crop the first remote sensing image of the sample area to obtain a cropped image including a traditional area in an urban and rural settlement.
[0128] S122: Determine that the building in the cropped image is a traditional sloping roof building.
[0129] S123: Determine whether the roof layout information of the traditional pitched roof building is a single roof. If yes, execute S125; otherwise, execute S124.
[0130] S124. Decompose a traditional sloping roof building with a continuous roof into a plurality of traditional sloping roof buildings with segmented roofs.
[0131] S125. Generate ridge information. S126. Obtain first-slope roof type information. S127. Determine eaves information for the standalone traditional pitched roof building based on the first-slope roof type information. S128. Perform a cross-check on the ridge and eaves information. S129. Automatically generate second-slope roof type information. S130. Compare types. S131. Generate overall quality inspection results. If the overall quality inspection result is qualified, execute S132; otherwise, execute S138.
[0132] S132. Obtain qualified annotations. S133. Generate roof frame information and key point information. S134. Convert coordinates and crop into tiles. S135. Generate a dataset. S136. Use the dataset to train a model. S137. Use the model to automatically generate roof assembly information. S138. Manually correct the data. S139. Crop remote sensing images from different periods or sources within the same area. S140. Perform translation alignment on the qualified annotations.
[0133] The specific description of the process of the method for automatically identifying the plane texture of a traditional sloping roof building provided in the embodiment of the present application is similar to the specific description of the aforementioned solution and will not be repeated here. In addition, this embodiment has the following advantages: (1) This embodiment can utilize professional knowledge of roof structures and roof combination rules to decompose continuous, overlapping, and combined roofs, thereby improving the convenience and accuracy of labeling information, thereby improving the effectiveness of subsequent model training and application. In addition, this embodiment simplifies the labeling method, and this decomposition and labeling technology is conducive to later analysis.
[0134] (2) Compare the results obtained manually with the calculated results to verify the accuracy of the marking of the roof combination information and improve the accuracy of the marking.
[0135] (3) The annotation information carries geographic location information, which enables the mutual conversion between geographic coordinates and sample coordinates, helps to migrate remote sensing base maps of the same location at different times and seasons, increases sample diversity, and improves the utilization efficiency and accuracy of annotation results.
[0136] (4) Use the pre-trained target detection model to identify the roof and ridge, and then convert the recognition results into annotation information and manually adjust them, which greatly reduces the workload of annotation.
[0137] In order to cope with the problems of multiple data annotators working in different locations and complex data management, this embodiment can build a database based on cloud servers, relational database management systems, and spatial database extension functions. A GIS software platform is used to control, manage, and distribute data. The GIS software platform allows data uploaders to upload remote sensing base maps, sample ranges, and other data to the database, where the sample range includes task assignment information. The GIS software platform allows task recipients to perform online real-time annotation according to the tasks they receive. The annotated data is updated to the database in real time, and the data is backed up regularly. In this way, functions such as data uploading, task distribution, real-time annotation, quality inspection, scheduled backup, progress monitoring, and sample data management can be performed in the database.
[0138] Figure 13 This is a schematic diagram of a traditional slope roof building plane texture automatic recognition system provided in an embodiment of the present application, as shown in FIG. Figure 13 As shown, the system includes: The acquisition module 131 is used to acquire a remote sensing image of a target area and parse the remote sensing image of the target area to obtain geographic coordinate features corresponding to the target area.
[0139] The detection module 132 is used to use the target detection model of the partition corresponding to the geographic coordinate features to perform joint detection of the roof and ridge for traditional slope-roofed buildings in the target area to obtain detection results. The target detection model includes an instance segmentation model and a key point detection model. Different partitions correspond to different target detection models, and the target detection model is selected from a preset area adaptation recognition model group; in the joint detection process, the instance segmentation model extracts the minimum circumscribed rotated rectangle of the roof contour, performs spatial projection transformation on the minimum circumscribed rotated rectangle, normalizes it to the standard direction, and inputs it into the key point detection model. The key point detection model identifies the ridge feature points and connection relationships, and connects the lines as the ridge.
[0140] The extraction and verification module 133 is used to extract the roof ridge constraint rules of the partition corresponding to the geographic coordinate features from the preset building texture feature knowledge base, and verify the detection results according to the roof ridge constraint rules to verify the rationality of the roof combination and the continuity of the ridge. The roof ridge constraint rules include the ridge angle tolerance threshold, the roof overlap ratio coefficient and the spatial distribution characteristics of the fire wall.
[0141] The startup module 134 is used to start the multi-model voting mechanism when the verification result does not meet the compliance conditions, so as to superimpose the output results of the target detection model of the corresponding partition, the basic detection model and the target detection model of the adjacent partition until the verification result meets the standards, thereby obtaining the automatic recognition result of the plane texture of the traditional slope-roofed building. The basic detection model is a universal detection model generated by pre-training of the overall sample data set, and is the base model for generating the target detection models of all partitions. The compliance conditions include: the ridge angle failure rate and the roof overlap ratio failure rate are both less than or equal to the corresponding preset thresholds, and the fire wall compliance rate and the ridge penetration rate are both greater than or equal to the corresponding preset thresholds.
[0142] Figure 13 The traditional slope roof building plane texture automatic recognition system can perform Figure 1 The implementation principle and technical effects of the traditional sloping roof building plane texture automatic recognition method described in the illustrated embodiment will not be elaborated on here. The specific manner in which each module and unit performs operations in the traditional sloping roof building plane texture automatic recognition system in the above embodiment has been described in detail in the embodiment of the method and will not be elaborated on here.
[0143] In one possible design, Figure 13 The traditional slope roof building plane texture automatic recognition system of the embodiment shown can be implemented as a computing device, such as Figure 14 As shown, the computing device may include a storage component 141 and a processing component 142 .
[0144] The storage component 141 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 142. The processing component 142 is used to execute the specific process of the above-mentioned traditional slope roof building plane texture automatic recognition method.
[0145] The processing component 142 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above method.
[0146] The storage component 141 is configured to store various types of data to support operations on the terminal. The storage component can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as random access memory (RAM), static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0147] Of course, a computing device may also include other components, such as input / output interfaces, display components, communication components, etc.
[0148] The input / output interface provides an interface between the processing component and the peripheral interface module, which can be an output device, an input device, etc.
[0149] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.
[0150] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.
[0151] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The embodiment shown is a method for automatically identifying the plane texture of a traditional sloping roof building.
[0152] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0153] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0154] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion 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, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for automatically identifying the plane texture of a traditional sloping roof building, characterized in that: include: Acquire a remote sensing image of a target area, and parse the geographical coordinate features corresponding to the target area from the remote sensing image of the target area; Using a target detection model partitioned according to geographic coordinate features, a joint detection of roofs and ridges is performed for traditional slope-roofed buildings within the target area to obtain detection results. The target detection model includes an instance segmentation model and a key point detection model. Different target detection models correspond to different partitions, and the target detection models are selected from a preset regional adaptation recognition model group. During the joint detection process, the instance segmentation model extracts the minimum circumscribed rotated rectangle of the roof outline, performs a spatial projection transformation on the minimum circumscribed rotated rectangle, normalizes it to a standard direction, and then inputs it into the key point detection model. The key point detection model identifies the ridge feature points and connection relationships, and connects the lines to form the ridge. Extracting roof ridge constraint rules for the partition corresponding to the geographic coordinate feature from a preset building texture feature knowledge base, and verifying the detection results according to the roof ridge constraint rules to verify the rationality of the roof combination and the continuity of the ridge, wherein the roof ridge constraint rules include a positive ridge angle tolerance threshold, a roof overlap ratio coefficient, and a fire wall spatial distribution feature; When the verification result fails to meet the compliance conditions, a multi-model voting mechanism is started to superimpose the output results of the target detection model of the corresponding partition, the basic detection model and the target detection model of the adjacent partition until the verification result meets the standards, thereby obtaining the automatic recognition result of the plane texture of the traditional sloping roof building. The basic detection model is a universal detection model generated by pre-training of the overall sample data set, and is the base model for generating the target detection models of all partitions. The compliance conditions include: the ridge angle failure rate and the roof overlap ratio failure rate are both less than or equal to the corresponding preset thresholds, and the fire wall compliance rate and the ridge penetration rate are both greater than or equal to the corresponding preset thresholds.
2. The method according to claim 1, characterized in that The generation process of the preset region adaptation recognition model group includes: Obtaining a partitioned sample data set for each sample area, and combining the partitioned sample data sets of all sample areas into an overall sample data set, wherein the sample area is an area based on a province, city, or county; Constructing a dual detection model that uses a cascaded architecture of an instance segmentation model and a key point detection model. The instance segmentation model extracts the minimum circumscribed rotated rectangle of the roof outline, and the key point detection model identifies roof ridge feature points and connection relationships from the minimum circumscribed rotated rectangle. Pre-training the dual detection model based on the overall sample data set, and generating a basic detection model after the training is completed; Based on the sample data sets of each partition, the basic detection model is respectively transferred and trained to obtain a preset region adaptation recognition model group including the target detection model of each partition.
3. The method according to claim 2, characterized in that The step of obtaining a partitioned sample data set for each sample area includes: For each sample area, a first remote sensing image of the sample area collected by a sensor on a satellite is obtained, and the first remote sensing image of the sample area is cropped to obtain a first cropped image including a traditional area in an urban and rural settlement; Identifying roof layout information of each traditional pitched roof building in the first cropped image, wherein the roof layout information is a single roof or a continuous roof, and the combination types of the continuous roof include: a connected type and an overlapped type; the connected types include: horizontal connection, vertical connection, oblique connection, and arc connection; and the overlapped types include: vertical overlap and oblique overlap; A decomposition method corresponding to the connection type is used to identify whether the continuous roof has segmentation features. If segmentation features exist, the continuous roof is decomposed into multiple segmented roofs based on the segmentation features, and the segmentation features include: material features, height features, offset features, and fire wall features. Alternatively, if no segmentation features exist, the continuous roof is decomposed into multiple segmented roofs using a straight ridge fitting error method. Alternatively, a decomposition method corresponding to the overlap type is used to decompose the continuous roof into multiple segmented roofs based on the ridge. Treating both a single-roof traditional pitched-roof building and a split-roof traditional pitched-roof building as independent traditional pitched-roof buildings, and generating roof combination information of each independent traditional pitched-roof building based on the first cropped image; The roof combination information is used as labeling information, and a partitioned sample data set of a sample area is generated based on the labeling information and the first cropped image.
4. The method according to claim 2, characterized in that The step of obtaining a partitioned sample data set for each sample area includes: Acquiring a second remote sensing image of the sample area collected by multiple sensors on the UAV, cropping the second remote sensing image of the sample area to obtain a second cropped image that includes a traditional area in the urban and rural settlements; Based on the second remote sensing image, the roof is automatically segmented and the ridge is automatically extracted to obtain the roof combination information of an independent traditional pitched roof building; The roof combination information is used as annotation information, and a migration model is used to migrate the annotation information to the second cropped image to generate a sample data set of the sample area.
5. The method according to claim 3, characterized in that After acquiring a first remote sensing image of the sample area collected by a sensor on the satellite, the method further includes: Using monocular depth estimation technology to generate depth information of each position in the first remote sensing image, different roofs can be distinguished or the roof and the ground can be distinguished by the depth information of different positions; Furthermore, the roof tilt distortion caused by the satellite imaging angle is corrected using the depth information.
6. The method according to claim 3, characterized in that Generating roof combination information of each of the independent traditional pitched roof buildings based on the first cropped image includes: Obtain ridge information for independent traditional pitched roof buildings; Obtain the first slope roof type information of the independent traditional slope roof building input by the user; Obtaining an eaves determination method corresponding to the first pitched roof type information, and determining the eaves information of the independent traditional pitched roof building according to the eaves determination method corresponding to the first pitched roof type information; wherein the first pitched roof type information is a single-eave single-slope roof, a single-eave double-slope roof, a double-eave double-slope roof, a single-eave four-slope roof, a double-eave four-slope roof, a half-four-slope roof, a single-eave hip roof, a double-eave hip roof, or a half-hip roof, and different first pitched roof type information corresponds to different eaves determination methods; Performing quality inspection on the ridge information, the first slope roof type information, and the eaves information to obtain an overall quality inspection result; If the overall quality inspection result is qualified, generating roof frame information and roof key point information of an independent traditional pitched roof building based on the ridge information, the first pitched roof type information and the eaves information; The ridge information, the first slope roof type information, the eaves information, the roof frame information and the roof key point information together constitute the roof combination information of the independent traditional slope roof building.
7. The method according to claim 6, characterized in that When the overall quality test result is qualified, the method further includes: Acquire a third remote sensing image of the sample area; wherein the third remote sensing image is acquired earlier than the first remote sensing image; The ridge information, the first pitched roof type information, and the eaves information are used as qualified annotations, and translation processing is performed in combination with the position information of the independent traditional pitched roof building, so that the position of the qualified annotation in the first remote sensing image is aligned with the position of the qualified annotation in the third remote sensing image; Differential information between the first remote sensing image and the third remote sensing image is determined, and the qualified annotation is optimized according to the differential information to obtain an optimized qualified annotation.
8. An automatic recognition system for the plane texture of traditional sloping roof buildings, characterized by: include: An acquisition module is used to acquire a remote sensing image of a target area and parse the geographical coordinate features corresponding to the target area from the remote sensing image of the target area; A detection module is configured to utilize a target detection model partitioned according to geographic coordinate features to perform joint detection of roofs and ridges for traditional sloped-roof buildings within the target area, thereby obtaining a detection result. The target detection model includes an instance segmentation model and a key point detection model. Different target detection models correspond to different partitions, and the target detection models are selected from a preset group of regional adaptive recognition models. During the joint detection process, the instance segmentation model extracts the minimum circumscribed rotated rectangle of the roof outline, performs a spatial projection transformation on the minimum circumscribed rotated rectangle, normalizes it to a standard orientation, and then inputs it into the key point detection model. The key point detection model identifies ridge feature points and connectivity relationships, and connects them as ridges. An extraction and verification module is used to extract the roof ridge constraint rules of the partition corresponding to the geographic coordinate feature from a preset building texture feature knowledge base, and verify the detection results according to the roof ridge constraint rules to verify the rationality of the roof combination and the continuity of the ridge. The roof ridge constraint rules include the ridge angle tolerance threshold, the roof overlap ratio coefficient, and the spatial distribution characteristics of the fire wall; A startup module is used to start a multi-model voting mechanism when the verification result does not meet the compliance conditions, so as to superimpose the output results of the target detection model of the corresponding partition, the basic detection model and the target detection model of the adjacent partition until the verification result meets the standards, thereby obtaining the automatic recognition result of the plane texture of the traditional slope-roofed building. The basic detection model is a universal detection model generated by pre-training of the overall sample data set, and is the base model for generating the target detection models of all partitions. The compliance conditions include: the ridge angle failure rate and the roof overlap ratio failure rate are both less than or equal to the corresponding preset thresholds, and the fire wall compliance rate and the ridge penetration rate are both greater than or equal to the corresponding preset thresholds.
9. A computing device, characterized in that It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement a method for automatically identifying the plane texture of a traditional sloping roof building as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that A computer program is stored, and when the computer program is executed by a computer, a method for automatically identifying the plane texture of a traditional sloping roof building as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Building facade edge feature key point extraction method
CN113705582A
Building top surface identification method and system based on remote sensing technology
CN115205711A
Remote sensing image vector contour extraction method and system, storage medium and equipment
CN117496183A
Roof type identification method and device based on multi-source geographic information and remote sensing image
CN117746247A
Supervised automatic roof modeling
US20190188337A1