Traditional gable roof building plane texture automatic identification method and system
By using a cascaded architecture of instance segmentation model and key point detection model, along with a partitioned and customized architectural knowledge rule base, and a multi-model voting mechanism, the accuracy problem of traditional slope roof building planar texture recognition is solved, achieving high-precision and high-reliability automatic recognition.
Patent Information
- Application Number
- CN202511198816.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-08-26
AI Technical Summary
Existing technologies struggle to accurately identify the planar texture of traditional sloping roof buildings, which are often mixed with modern buildings and complex terrain features, leading to false positives and false negatives.
A cascaded architecture of instance segmentation model and key point detection model is adopted. The target detection model is dynamically selected by geographic partitioning. The roof outline is extracted by instance segmentation model and the direction is normalized. The key point detection model is used to identify the roof ridge feature points and their connection relationships. A partition-customized building knowledge rule base is introduced for verification and a multi-model voting mechanism is used for error correction.
It achieves high-precision identification of the planar texture of traditional sloping roof buildings, ensures the rationality of roof combination logic and the continuity of the ridge, improves the cultural rationality and structural accuracy of the identification results, and dynamically enhances the robustness of the system.
Smart Images

Figure CN120708075B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of remote sensing image analysis, and particularly relate to a traditional sloping roof building plane texture automatic identification method and system. BACKGROUND
[0002] Traditional areas in China's urban and rural settlements (such as historical and cultural blocks, historical and cultural towns, famous villages, traditional villages, and other historical sites) are one of the types of historical and cultural heritage. Among the spatial pattern components of these traditional areas, traditional sloping roof buildings occupy a core position. Such buildings are widely distributed throughout the country, and the plane texture of traditional sloping roof buildings includes but is not limited to information on the monomer plane of the building, such as the roof and ridge. Rapid identification of the plane texture of traditional sloping roof buildings is of great significance for efficient census and the construction of high-precision settlement three-dimensional digital models.
[0003] Existing technologies generally apply image segmentation algorithms to identify all building areas in the image or mark the approximate position bounding box of a single building.
[0004] However, traditional sloping roof buildings in traditional areas are identified by rectangular frames, often mixed with other types of buildings, such as modern flat-roofed houses, sheds, temporary structures, and even complex objects (such as vegetation of a specific form). It is difficult to accurately distinguish traditional sloping roof buildings based on image segmentation algorithms, resulting in false positives of non-traditional sloping roof buildings and missed detection of real traditional sloping roof buildings. SUMMARY
[0005] The present application provides a traditional sloping roof building plane texture automatic identification method and system to solve the problem of low accuracy in identifying the plane texture of traditional sloping roof buildings in the prior art.
[0006] In a first aspect, the present application provides a traditional sloping roof building plane texture automatic identification method, comprising:
[0007] Obtaining a remote sensing image of a target area, and parsing geographical coordinate features corresponding to the target area from the remote sensing image of the target area;
[0008] Using a target detection model corresponding to the geographical coordinate features partition, performing joint detection of the roof and ridge for the traditional sloping roof buildings in the target area to obtain a detection result, the target detection model comprising an instance segmentation model and a key point detection model, different partitions corresponding to different target detection models, and the target detection model being selected from a pre-set area adaptive identification model group; in the joint detection process, the instance segmentation model extracts the minimum circumscribed rotating rectangle of the roof contour, performs spatial projection transformation on the minimum circumscribed rotating 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 relationship, and connects them as the ridge;
[0009] extracting a roof ridge constraint rule of a corresponding partition of the geographical coordinate feature from a preset building texture feature knowledge base, and verifying the detection result according to the roof ridge constraint rule to verify the rationality of the roof combination and the continuity of the roof ridge, the roof ridge constraint rule including a positive ridge angle tolerance threshold, a roof lap ratio coefficient, and a fire wall spatial distribution feature;
[0010] In the case where the verification result does not meet the standard condition, 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 standard, obtaining a traditional gable roof building plane texture automatic identification result, the basic detection model being a general detection model generated by pre-training of the overall sample data set and being a base model for generating the target detection model of all partitions, the standard condition including that the positive ridge angle unqualified rate and the roof lap ratio unqualified rate are both less than or equal to the corresponding preset threshold, and the fire wall compliance rate and the roof ridge penetration rate are both greater than or equal to the corresponding preset threshold.
[0011] Preferably, the generation process of the preset regional adaptive recognition model group includes:
[0012] Obtaining a partition sample data set of each sample region, combining the partition sample data sets of all sample regions into an overall sample data set, the sample region being a region in units of province, city or county;
[0013] Constructing a double detection model, the double detection model adopting a cascade architecture of an instance segmentation model and a key point detection model, the instance segmentation model extracting a minimum enclosing rectangle of a roof outline, and the key point detection model identifying roof ridge feature points and connection relationships from the minimum enclosing rectangle;
[0014] Pre-training the double detection model based on the overall sample data set, and generating a basic detection model after the training is completed;
[0015] Based on each partition sample data set, the basic detection model is separately migrated and trained to obtain a preset regional adaptive recognition model group containing target detection models of each partition.
[0016] Preferably, the obtaining of the partition sample data set of each sample region includes:
[0017] For each sample region, a first remote sensing image of the sample region collected by a sensor on a satellite is obtained, and the first remote sensing image of the sample region is cropped to obtain a first cropped image containing a traditional area in an urban and rural settlement;
[0018] identify the roof layout information of each traditional gable roof building in the first cropped image, the roof layout information being single roof or continuous roof, the combination types of the continuous roof including: abutting type and overlapping type, the abutting type including: horizontal abutting, vertical abutting, oblique abutting and arc abutting, and the overlapping type including vertical overlapping and oblique overlapping;
[0019] adopt a decomposition method corresponding to the abutting type to identify whether the continuous roof has a split feature, if the split feature exists, decompose the continuous roof into multiple split roofs based on the split feature, the split feature including: material feature, height feature, misalignment feature and fire wall feature, or if the split feature does not exist, adopt a straight roof ridge fitting error method to decompose the continuous roof into multiple split roofs, or adopt a decomposition method corresponding to the overlapping type to decompose the continuous roof into multiple split roofs in units of roof ridges;
[0020] treat the single roof of the traditional gable roof building and the split roof of the traditional gable roof building as an independent traditional gable roof building, and generate the roof combination information of each independent traditional gable roof building based on the first cropped image;
[0021] use the roof combination information as annotation information, and generate the partition sample dataset of the sample region based on the annotation information and the first cropped image.
[0022] Preferably, the method for obtaining the partition sample dataset of each sample region comprises:
[0023] obtain a second remote sensing image of the sample region collected by multiple sensors on an unmanned aerial vehicle, crop the second remote sensing image of the sample region to obtain a second cropped image containing a traditional area in the urban and rural settlement;
[0024] based on the second remote sensing image, perform automatic segmentation of the roof and automatic extraction of the roof ridge to obtain the roof combination information of the independent traditional gable roof building;
[0025] use the roof combination information as annotation information, and use a transfer model to transfer the annotation information to the second cropped image to generate a sample dataset of the sample region.
[0026] Preferably, after obtaining the first remote sensing image of the sample region collected by the sensor on the satellite, the method further comprises:
[0027] use monocular depth estimation technology to generate depth information of each position in the first remote sensing image, and distinguish different roofs or distinguish roofs and ground through the depth information of different positions;
[0028] and correct the roof tilt distortion caused by the satellite imaging angle through the depth information.
[0029] Preferably, the generating roof combination information of each of the independent traditional gable roof building based on the first cropped image comprises:
[0030] Obtaining ridge information of the independent traditional gable roof building;
[0031] Obtaining first gable roof type information of the independent traditional gable roof building input by a user;
[0032] Obtaining a roof ridge determination method corresponding to the first gable roof type information, and determining eave information of the independent traditional gable roof building according to the roof ridge determination method corresponding to the first gable roof type information; wherein the first gable roof type information is single-eave single-pitch roof, single-eave double-pitch roof, double-eave double-pitch roof, single-eave four-pitch roof, double-eave four-pitch roof, half four-pitch roof, single-eave hip roof, double-eave hip roof or half hip roof, and different first gable roof type information corresponds to different roof ridge determination methods;
[0033] Performing quality detection on the ridge information, the first gable roof type information and the eave information to obtain an overall quality detection result;
[0034] In the case that the overall quality detection result is qualified, generating roof frame information and roof key point information of the independent traditional gable roof building based on the ridge information, the first gable roof type information and the eave information;
[0035] The ridge information, the first gable roof type information, the eave information, the roof frame information and the roof key point information jointly constitute the roof combination information of the independent traditional gable roof building.
[0036] Preferably, in the case that the overall quality detection result is qualified, the method further comprises:
[0037] Obtaining a third remote sensing image of a sample area; the obtaining time of the third remote sensing image is earlier than the obtaining time of the first remote sensing image;
[0038] Taking the ridge information, the first gable roof type information and the eave information as qualified annotations, and performing translation processing in combination with position information of the independent traditional gable roof building, so that the position of the qualified annotations in the first remote sensing image is aligned with the position of the qualified annotations in the third remote sensing image;
[0039] Determining differential information between the first remote sensing image and the third remote sensing image, and performing optimization processing on the qualified annotations according to the differential information to obtain optimized qualified annotations.
[0040] In a second aspect, the present application provides a traditional gable roof building plane texture automatic identification system, comprising:
[0041] The acquisition module is configured to acquire a remote sensing image of a target region, and parse a geographic coordinate feature corresponding to the target region from the remote sensing image of the target region.
[0042] The detection module is configured to use a target detection model corresponding to a partition of the geographic coordinate feature to perform joint detection of a roof and a ridge for a traditional pitched roof building in the target region, and obtain a detection result. 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 region adaptive recognition model group. During the joint detection, the instance segmentation model extracts a minimum circumscribed rectangle of a roof contour, performs spatial projection transformation on the minimum circumscribed rectangle, normalizes the minimum circumscribed rectangle to a standard direction, and inputs the normalized minimum circumscribed rectangle into the key point detection model. The key point detection model identifies ridge feature points and connection relationships, and connects the ridge feature points to form a ridge.
[0043] The extraction and verification module is configured to extract a roof-ridge constraint rule of a partition corresponding to the geographic coordinate feature from a preset building texture feature knowledge base, and verify the detection result according to the roof-ridge constraint rule to verify the rationality of a roof combination and the continuity of a ridge. The roof-ridge constraint rule includes a positive ridge angle tolerance threshold, a roof overlap ratio coefficient, and a fire wall spatial distribution feature.
[0044] The starting module is configured to start a multi-model voting mechanism to superimpose output results of the target detection model of the corresponding partition, a basic detection model, and a target detection model of an adjacent partition until a verification result meets a standard condition, to obtain a traditional pitched roof building plane texture automatic identification result, when the verification result does not meet the standard condition. The basic detection model is a general detection model generated by pre-training an overall sample data set, and is a base model for generating target detection models of all partitions. The standard condition includes that a positive ridge angle unqualified rate and a roof overlap ratio unqualified rate are both less than or equal to a corresponding preset threshold, and a fire wall compliance rate and a ridge penetration rate are both greater than or equal to a corresponding preset threshold.
[0045] In a third aspect, the present application provides a computing device, including 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 realize the traditional pitched roof building plane texture automatic identification method according to any one of the first aspect.
[0046] In a fourth aspect, the present application provides a computer storage medium, which stores a computer program. When the computer program is executed by a computer, the traditional pitched roof building plane texture automatic identification method according to any one of the first aspect is realized.
[0047] In the present application, a traditional sloping roof building plane texture automatic identification method is provided, comprising: acquiring remote sensing images of a target area, and parsing geographical coordinate features corresponding to the target area from the remote sensing images of the target area; using a target detection model corresponding to the geographical coordinate features, performing joint detection of a roof and a ridge for a traditional sloping roof building in the target area to obtain a detection result, the target detection model comprising 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 adaptive identification model group; in the joint detection process, the instance segmentation model extracts a minimum enclosing rotating rectangle of a roof contour, performs spatial projection transformation on the minimum enclosing rotating rectangle, normalizes it to a standard direction, and then inputs it into the key point detection model, the key point detection model identifies ridge feature points and connection relationships, and connects them into a ridge; extracting a roof-ridge constraint rule corresponding to the partition of the geographical coordinate features from a preset building texture feature knowledge base, and verifying the detection result according to the roof-ridge constraint rule to verify the rationality of the roof combination and the continuity of the ridge, the roof-ridge constraint rule comprising a positive ridge angle tolerance threshold, a roof lap ratio coefficient, and a fire wall spatial distribution feature; in the case where the verification result does not meet the standard condition, a multi-model voting mechanism is started to superimpose the output results of the target detection model corresponding to the partition, the basic detection model, and the target detection model of the adjacent partition until the verification result meets the standard, and the traditional sloping roof building plane texture automatic identification result is obtained, the basic detection model is a general detection model generated by overall sample data set pre-training, and is a base model for generating target detection models of all partitions, and the standard condition comprises: the positive ridge angle unqualified rate and the roof lap ratio unqualified rate are both less than or equal to the corresponding preset threshold, and the fire wall compliance rate and the ridge penetration rate are both greater than or equal to the corresponding preset threshold.
[0048] The present application has the following advantages: by acquiring remote sensing images of a target area and parsing geographical coordinate features corresponding to the target area, the target area can be accurately positioned, providing geographical basis for subsequent partition adaptive model selection, and avoiding recognition deviation caused by differences in building features across regions. The instance segmentation extracts the minimum enclosing rotating rectangle of the roof contour, and combines with the key point identification to improve the ridge positioning accuracy; based on joint detection, the roof-ridge constraint rule is used to filter modern flat-roofed houses, temporary structures and other non-traditional sloping roof buildings, solving the problem that traditional rectangular frames cannot accurately distinguish traditional sloping roof buildings, and ensuring the rationality of the plane texture of the traditional sloping roof building. The present application can realize dynamic error correction through the multi-model voting mechanism, and fuse the generalization ability of the basic detection model and the partition adaptive model; the preset threshold is used to force the output result to comply with the regional building specifications, and the topological correctness and cultural feature integrity of the texture structure are ensured.
[0049] Further, by integrating the data of the provincial, municipal and county sample areas to construct the overall sample data set, the double detection model is pre-trained to generate the basic detection model; and then the basic model is migrated and trained based on the sample data of each subarea, and finally the preset regional adaptive recognition model group covering different geographical subareas is formed. The balance between the generalization ability of the base model and the special accuracy of the subarea is realized, the repeated development cost of the model is reduced, and the accuracy of the traditional gable roof building plane texture recognition in different regions is ensured.
[0050] These aspects or other aspects of the present application will be more apparent in the following description of the embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0052] Figure 1 A flowchart of a traditional gable roof building plane texture automatic recognition method provided by an embodiment of the present application;
[0053] Figure 2 A schematic diagram of a sample area before cropping provided by an embodiment of the present application;
[0054] Figure 3 A schematic diagram of a sample area after cropping provided by an embodiment of the present application;
[0055] FIG. 4(a) is a schematic diagram of a lap type roof decomposition provided by an embodiment of the present application;
[0056] FIG. 4(b) is a schematic diagram of a joint type roof decomposition provided by an embodiment of the present application;
[0057] Figure 5 A display schematic diagram of eave information of a traditional gable roof building of nine gable roof types provided by an embodiment of the present application;
[0058] Figure 6 A display schematic diagram of ridge information and eave information in a cropped image provided by an embodiment of the present application;
[0059] Figure 7 A recognition principle schematic diagram of a preset automatic gable roof type recognition model provided by an embodiment of the present application;
[0060] Figure 8 A user operation interface schematic diagram of a sample inspection software provided by an embodiment of the present application;
[0061] Figure 9 A display schematic diagram of the overall quality detection result provided by the embodiment of the present application is shown in FIG. 1.
[0062] Figure 10 A display schematic diagram of the roof frame information and the roof key point information of the traditional sloping roof building of the nine types of sloping roof provided by the embodiment of the present application is shown in FIG. 2.
[0063] Figure 11 A display schematic diagram of the roof frame information provided by the embodiment of the present application is shown in FIG. 3.
[0064] Figure 12 A flow chart of a roof combination information processing method of a traditional sloping roof building of an urban and rural settlement provided by the embodiment of the present application is shown in FIG. 4.
[0065] Figure 13 A structural schematic diagram of a traditional sloping roof building plane texture automatic identification system provided by the embodiment of the present application is shown in FIG. 5.
[0066] Figure 14 A structural schematic diagram of a computing device provided by the embodiment of the present application is shown in FIG. 6. DETAILED DESCRIPTION
[0067] In order to make the personnel in the technical field better understand the present application scheme, the technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application.
[0068] In some of the descriptions in the specification and claims of the present application and the above-mentioned drawings, a plurality of operations appearing in a specific order are included, but it should be clearly understood that these operations can be executed or in parallel in the order appearing in the text or not. The serial numbers of the operations, such as S11, S12, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes can include more or fewer operations, and the operations can be executed in sequence or in parallel. It should be noted that the "first", "second", etc. in this paper are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence. "First" and "second" are different types.
[0069] The technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0070] To solve the problem of low identification accuracy of traditional sloping roof building plane texture and easy interference of non-traditional sloping roof building (such as modern flat roof, shed frame, vegetation) leading to false detection and missed detection of traditional sloping roof building in the prior art, the embodiment of the present application provides a kind of traditional sloping roof building plane texture automatic identification method, wherein the method adopts the following concept: first, by analyzing the geographical coordinate characteristics of the remote sensing image of the target area, accurate area positioning is realized, laying a foundation for subsequent partition adaptation;Second, the joint detection architecture of the instance segmentation model and the key point detection model is innovatively used, and a dedicated target detection model is dynamically selected based on geographical partition, the minimum circumscribed rectangle of the roof contour is extracted by the instance segmentation model and normalized in direction, and then input into the key point detection model to accurately identify the ridge feature point and its topological connection, so as to effectively distinguish the roof ridge structure unique to traditional sloping roof building, overcoming the drawbacks of traditional rectangular frame identification confusion;Then, the partition customized building knowledge rule base is introduced to automatically check the joint detection result, ensure the roof combination logic rationality and ridge spatial continuity, and improve the cultural rationality and structure accuracy of the identification result;Finally, for the case that the verification does not meet the standard, a multi-model voting error correction mechanism is designed, the target detection model output of the current partition target detection model, the basic detection model covering the global commonness and the target detection model output of the model of the adjacent partition are fused to perform result superposition and iterative optimization until the key quantitative indicators meet the preset threshold requirements, dynamically enhancing the robustness of the system, which can effectively cope with the challenges of complex scenes and sample sparse areas, and finally realize the automatic identification of traditional sloping roof building plane texture with high precision and high reliability.
[0071] Figure 1 The flow chart of the traditional sloping roof building plane texture automatic identification method provided by the embodiment of the present application is shown in Figure 1 The method comprises the following steps:
[0072] S11, obtaining the remote sensing image of the target area, and analyzing the geographical coordinate characteristics corresponding to the target area from the remote sensing image of the target area.
[0073] The target area can be an area to be automatically identified for traditional sloping roof building plane texture, and can be a spatial range in units of city, county or township administrative division. The area of the target area can be 0.1 square kilometers, 1 square kilometer, 10 square kilometers, etc. Therefore, the size of the target area is not limited in the embodiment of the present application. The remote sensing image of the target area can be obtained by satellite. The geographical coordinate characteristics can include the longitude and latitude coordinates of the four corner points of the remote sensing image, and the characteristics can be bound to the administrative partition code to which the target area belongs.
[0074] In the embodiments of the present application, the geographic information system tool is called to read the remote sensing image metadata, extract the four corner latitude and longitude coordinates, match the vector boundary data through spatial overlay analysis, generate the partition code, and if the remote sensing image spans multiple partitions, the sub-images corresponding to each partition are processed after grid division to ensure accurate adaptation of subsequent models and rules.
[0075] S12, using a target detection model corresponding to the partition of the geographic coordinate feature, performing joint detection of the roof and ridge for the traditional sloping roof building in the target area to obtain a detection result.
[0076] 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 adaptive recognition model group; in the joint detection process, the instance segmentation model extracts the minimum enclosing rectangle of the roof contour, performs spatial projection transformation on the minimum enclosing 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 relationship, and connects them as the ridge.
[0077] It should be understood that the composition of urban and rural settlement texture is complex, and it is different in different regions of China, such as northern quadrangles, Fujian ancestral temples, Hakka walled houses, and Yunnan one-dot stamps. If a target detection model is used to identify the planar texture of traditional sloping roof buildings in each partition, there is a possibility of missing detection of traditional sloping roof buildings. Therefore, in order to improve the identification of the planar texture of traditional sloping roof buildings in each partition, a target detection model corresponding to the partition is provided. For example, partition 1 corresponds to target detection model 1, partition 2 corresponds to target detection model 2, and partition 3 corresponds to target detection model 3.
[0078] And, after space projection transformation of the minimum circumscribed rotating rectangle and normalization to the standard direction, it is convenient to quickly identify the ridge. The ridge feature point refers to the spatial position point with key geometric and topological significance in the ridge structure of traditional pitched roof buildings. It can be understood as the intersection coordinates of the ridge line and the minimum circumscribed rotating rectangle, or the point on the middle broken line of the minimum circumscribed rotating rectangle, which is the reference of ridge line shape control and provides the minimum calculable unit for ridge continuity analysis. The ridge feature point includes three types of core points: end point, intersection point and turning point. The end point is the start and end position of the ridge line, usually located at the eave turning point or gable top end. The intersection point is the intersection of multiple ridges, such as the intersection of the hip roof ridge and the vertical ridge, which determines the topological relationship of the roof combination. The turning point is the position where the ridge direction changes abruptly, such as the curvature extreme point of the curved ridge, which is used to describe the complex shape of the non-straight ridge. The connection relationship can refer to the topological connection rules between the ridge feature points, reflecting the logical structure of traditional buildings. The connection relationship includes geometric connection, where the geometric connection is a straight / curved segment between feature points, such as the end points J1 and J2 forming the ridge baseline, and the connection type of geometric connection includes main ridge connection and vertical ridge connection.
[0079] S13, extracting the roof ridge constraint rules corresponding to the partition of the geographical coordinate feature from the preset building texture feature knowledge base, and verifying the detection result according to the roof ridge constraint rules to verify the rationality of the roof combination and the continuity of the ridge.
[0080] The roof ridge constraint rules include but are not limited to: ridge angle tolerance threshold, roof lap ratio coefficient and fire wall spatial distribution feature. And different partitions correspond to different roof ridge constraint rule contents. 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 rotating rectangle. For example, the ridge angle tolerance threshold of Huizhou architecture is ≤3°, and the ridge angle tolerance threshold of Minnan architecture is ≤5°. The roof lap ratio coefficient is the minimum ratio threshold of the width of the overlapping area of adjacent roofs to the width of the current roof. For example, the hard roof is ≥0.3, and the hip roof is ≥0.5. The fire wall spatial distribution feature is the position rule and form constraint of the fire wall (such as the horse head wall) in the building, including: position rule, form constraint and density threshold.
[0081] S14, in the case where the verification result does not meet the standard condition, starting a 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, to obtain the automatic identification result of the planar texture of the traditional pitched roof building.
[0082] The base detection model is a general detection model pre-trained by an overall sample data set, and is a base model for generating target detection models of all partitions, and the compliance condition can include: the unqualified rate of the positive ridge angle and the unqualified rate of the roof lap ratio are both less than or equal to the corresponding preset threshold, and the compliance rate of the fire wall and the roof ridge penetration rate are both greater than or equal to the corresponding preset threshold.
[0083] For example, the preset threshold corresponding to the unqualified rate of the positive ridge angle is 5%, the preset threshold corresponding to the unqualified rate of the roof lap ratio is 10%, the preset threshold corresponding to the compliance rate of the fire wall is 90%, and the preset threshold corresponding to the roof ridge penetration rate is 95%. It should be noted that the size of each of the above preset thresholds is not limited in the embodiments of the present application.
[0084] By performing the above steps S11-S15, the embodiments of the present application can realize accurate region positioning by analyzing the geographic coordinate characteristics of the remote sensing image of the target region, laying a foundation for subsequent partition adaptation; secondly, a joint detection architecture of cascading instance segmentation model and key point detection model is adopted, and a dedicated target detection model is dynamically selected based on geographic partitioning, the minimum enclosing rectangle of the roof profile is extracted by the instance segmentation model and normalized in direction, and then input into the key point detection model to accurately identify the ridge feature points and their topological connections, thereby effectively distinguishing the roof ridge structure unique to traditional roof-top buildings, overcoming the drawbacks of traditional rectangular frame recognition; then, a partition-customized building knowledge rule library is introduced to automatically verify the joint detection result, ensuring the logical reasonableness of the roof combination and the spatial continuity of the ridge, and improving the cultural reasonableness and structural accuracy of the recognition result; finally, for the case where the verification does not meet the standard, a multi-model voting error correction mechanism is designed, which fuses the target detection model output of the current partition target detection model, the base detection model covering the global commonality, and the target detection model output of the model of the adjacent partition, and performs result superposition and iterative optimization until the key quantitative indicators meet the preset threshold requirements, dynamically enhancing the robustness of the system, effectively addressing the challenges of complex scenes and sample sparse regions, and ultimately realizing high-precision and high-reliability automatic recognition of the planar texture of traditional roof-top buildings.
[0085] It should be noted that how to construct a target detection model of which architecture, and then construct a preset region adaptation recognition model group containing target detection models of each partition, provide technical support for improving the accuracy of roof and ridge recognition. In one possible embodiment, the generation process of the preset region adaptation recognition model group includes:
[0086] Step 21, obtaining the partition sample data set of each sample region, combining the partition sample data sets of all sample regions into an overall sample data set, and the sample region is a region in units of province, city or county.
[0087] It should be understood that the partition sample dataset can contain remote sensing images and annotation information of traditional sloping roof buildings in the region. The remote sensing images can be remote sensing images of each sample region collected by satellite, unmanned aerial vehicle and the like. In order to distinguish remote sensing images collected at different periods or by different devices, the remote sensing images can be distinguished by first, second, third and the like. The specific meaning of the annotation information is described in the subsequent process, which will not be described here. The embodiments of the present application can ensure that the partition sample dataset covers different regional building features such as Huizhou and Minnan by combining the partition sample dataset, and solve the regional adaptability problem of the "one-size-fits-all" model.
[0088] In addition, the whole sample dataset can train the basic detection model to learn the cross-regional common features of traditional sloping roof buildings, such as the basic roof ridge topology.
[0089] Step 22, constructing a double detection model, the double detection model adopts a cascade architecture of an instance segmentation model and a key point detection model, the instance segmentation model extracts the minimum enclosing rotating rectangle of the roof profile, and the key point detection model identifies the roof ridge feature points and connection relationship from the minimum enclosing rotating rectangle.
[0090] The double detection model can realize stage-by-stage processing, that is, first locating the roof profile, and then finely identifying the roof ridge topology. The minimum enclosing rotating rectangle can eliminate the difference in building orientation, provide direction normalization input for roof ridge identification, and based on the connection relationship, discrete points can be converted into roof ridge network.
[0091] Step 23, pre-training the double detection model based on the whole sample dataset, and generating a basic detection model after the training is completed.
[0092] It should be understood that in the training process, the parameters of the instance segmentation model and the key point detection model can be optimized at the same time, or the parameters of one model can be fixed and the other model can be optimized. The embodiments of the present application do not make specific limitation on the pre-training process. In addition, the loss functions of each model can be set differently, and the specific expression of the loss function is not limited in the embodiments of the present application.
[0093] Step 24, based on each partition sample dataset, the basic detection model is respectively migrated and trained to obtain a preset regional adaptive identification model group containing target detection models of each partition.
[0094] By executing the above steps 21-24, the embodiments of the present application construct a global data set by integrating provincial partition samples, pre-train a double detection model cascade architecture to form a basic detection model, so that the model learns the ridge topology, roof combination and other cross-regional common features of traditional sloping roof buildings; then the basic model is trained based on the partition samples to generate an adaptive model group covering multiple regions. This method has broken through the industry problem that "global universality and regional expertise cannot be achieved simultaneously". That is, the basic detection model guarantees the generalization recognition ability in plateau, mountainous, water town and other multi-terrain environments, and the target detection model corresponding to the partition improves the recognition accuracy of the characteristic structure. The cascade design of the double detection model improves the structure restoration rate of complex roof such as multi-eave hip roof through space normalization processing and topology reconstruction. The finally generated model group has dynamic expansion capability and realizes millisecond-level response recognition, providing engineering-landable technical support for provincial-scale historical settlement accurate census.
[0095] On the basis of the above embodiments, considering that labeling the traditional sloping roof buildings in the traditional area in the urban and rural settlements is the basis for training models such as double detection model and basic detection model. Moreover, the existing sample labeling method mostly processes roof combination information based on the outer contour of the traditional sloping roof building to realize sample labeling. However, due to the tortuous outer contour of the traditional sloping roof building, the labeling workload is huge, and because the roofs of the traditional sloping roof buildings in the traditional area in the urban and rural settlements are continuously overlapped, it is more difficult to label. How to improve the accuracy of the roof combination information labeling of the sample area with small workload under the condition of continuous roof, and then train an automatic labeling model of the roof combination information combined with the data set of the sample area, is a problem to be solved. In order to solve this problem, the embodiments of the present application can label samples through at least one of the following processes to obtain the partition sample data set of each sample area.
[0096] In order to refine the roof layout information, improve the accuracy of the labeling information and the diversity of the data set, enhance the representativeness of the data set and the generalization ability of the trained model, and thus improve the accuracy and efficiency of the roof combination information processing of the traditional sloping roof building, the first sample labeling process corresponding to step 21 includes the following steps 211-215:
[0097] Step 211, for each sample area, obtain a first remote sensing image of the sample area collected by a sensor on a satellite, and crop the first remote sensing image of the sample area to obtain a first cropped image containing the traditional area in the urban and rural settlements.
[0098] The sample area can include a traditional area in the urban and rural settlement, and can also include other areas outside the traditional area in the urban and rural settlement. The size of the sample area is not limited in the embodiment. The first remote sensing image is a remote sensing image with a geographic coordinate system, and the first remote sensing image can be a local or online remote sensing satellite image. In the embodiment, the remote sensing image is also called a remote sensing image base map. The image base map can be a high-resolution remote sensing image, which provides a geographic spatial reference framework as a background layer, is used to show the geographic position information of the traditional area in the urban and rural settlement, and is labeled and analyzed thereon to finally generate a training sample.
[0099] Specifically, the first remote sensing image is cropped to obtain a cropped area, and buildings in the first remote sensing image can be found by visual interpretation; and whether the buildings in the first remote sensing image are traditional pitched roof buildings is judged in combination with professional knowledge, if yes, the traditional pitched roof buildings are retained, and step 212 is continuously executed. For example, an online remote sensing satellite image is taken as a base map, and vector boundary data of the sample area carrying geographic coordinates are drawn by using a target software such as a geographic information system (GIS) software. The vector boundary data can be used to acquire and crop the first remote sensing image of a specified tile level (or a specified spatial resolution), or the first remote sensing image can be downloaded by using a target crawling technology or related software. The first remote sensing image of the sample area is cropped to obtain a cropped image including the traditional area in the urban and rural settlement, and unnecessary background information is removed, so that the purity and accuracy of the data are improved.
[0100] Figure 2 A plurality of sample areas before cropping are shown. 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 sample area after cropping includes a cropped image and a non-cropped area. The cropped image includes a traditional area in an urban and rural settlement, and the non-cropped area is a background color (such as 0).
[0101] Optionally, after step 211, the method further includes: generating depth information of each position in the first remote sensing image by using a monocular depth estimation technology, distinguishing different roofs or distinguishing roofs and ground through the depth information of different positions; and correcting roof tilt distortion caused by a satellite imaging angle through the depth information. Therefore, on the one hand, the depth information can distinguish height mutations, and the depth difference can be used to segment a sticking area and accurately distinguish independent roofs. On the other hand, a projection matrix is generated by using the depth information in the embodiment of the application, and then the tilt distortion is corrected reversely to restore the real roof shape.
[0102] Step 212, identifying the roof layout information of each traditional gable roof building in the first cropped image, the roof layout information being single roof or continuous roof.
[0103] In step 212, the combination type of continuous roof includes the overlapping type as shown in FIG. 4(a) and the abutting type as shown in FIG. 4(b). If the combination mode of the roof is the separated type, it means that the roof layout information is single roof. If the combination type of the roof is the abutting type or the overlapping type, it means that the roof layout information is continuous roof.
[0104] It should be understood that the composition of the urban and rural settlement texture is complex, and it is different in different regions of China. For example, the northern quadrangle, Fujian ancestral hall, Hakka walled house, Yunnan one dot, etc. The combination modes of the roofs of different building types of traditional gable roof buildings are different. In general, all the combination types of the roofs can be divided into the following categories: separated type, abutting type, overlapping type. Among them, the separated type is, for example, the northern quadrangle or the public building courtyard. The abutting type includes: horizontal abutting (i.e. tail-to-tail connection), vertical abutting, oblique abutting, arc abutting, etc. The overlapping type, also known as the overlapping type, includes vertical overlapping, oblique overlapping, etc.
[0105] The separated type is the combination type of single roof, and each roof can be clearly distinguished.
[0106] The abutting type and the overlapping type are the combination types of continuous roof, and each roof needs to be distinguished after decomposition. Therefore, step 213 can be performed.
[0107] Step 213, using the decomposition method corresponding to the abutting type to identify whether the continuous roof has a segmentation feature. If the segmentation feature exists, the continuous roof is decomposed into multiple segmented roofs based on the segmentation feature. The segmentation feature includes: material feature, height feature, misalignment feature and fire wall feature. Or, if the segmentation feature does not exist, the continuous roof is decomposed into multiple segmented roofs by using the method of linear ridge fitting error. Or, using the decomposition method corresponding to the overlapping type, the continuous roof is decomposed into multiple segmented roofs in units of ridge. Among them, decomposition or division, segmentation, etc. The decomposition method or division method, segmentation method, etc.
[0108] In order to effectively decompose the continuous roofs of different combination types such as the abutting type and the overlapping type, the embodiments of the present application can be specifically designed according to the characteristics of the combination type and the corresponding decomposition rules.
[0109] Specifically, for the horizontal connection, oblique connection, and arc connection in the abutment type, there is uncertainty in the decomposition of the continuous roof. Therefore, in order to overcome the uncertainty, the embodiment of the present application provides the following decomposition rules: for the continuous roof with clear segmentation features (such as 1, obvious material color difference, 2, height difference leading to shadow in remote sensing base map, 3, ridge misalignment, 4, fire wall, etc.), the embodiment of the present application can decompose the roof according to the clear segmentation features. For the continuous roof without obvious segmentation features but with certain turning points, the embodiment of the present application can use the straight ridge fitting error method to decompose the continuous roof.
[0110] In other words, the decomposition rule of the continuous roof in the abutment type is: identifying the continuous ridge of the traditional pitched roof building of the continuous roof, the roof where the ridges of different angles intersect and overlap in the continuous ridge can be regarded as different roofs; if there are obvious segmentation features on the first remote sensing image due to obvious height difference between the two roofs, fire wall segmentation, etc., the two roofs can be regarded as different roofs; or when there is a certain plane intersection angle between the two roofs, a line segment is formed from the endpoint of the continuous ridge as the starting point to the next turning point (i.e. the angle between the above two adjacent line segments), the next turning point is connected when the distance between the next turning point and the starting point is less than a certain threshold value (set as needed, such as setting the actual distance in space as 1 meter), otherwise the segmentation of the boundary is started from the last turning point, the line segment between the starting point and the last turning point is regarded as the same roof, and the line segment after the last turning point is regarded as another roof, and the segmentation operation is repeated from the last turning point as the starting point until the end point of the continuous ridge is segmented.
[0111] For example, the ridge at the highest point of the continuous roof is determined as the continuous ridge, and the continuous ridge can be used to realize the line connection, when the deviation degree between the adjacent two line segments is not greater than the preset deviation degree value x, the roofs where the adjacent two line segments are located are determined as the same roof, otherwise, when the deviation degree between the adjacent two line segments is greater than the preset deviation degree value x, the roofs where the adjacent two line segments are located are determined as different roofs.
[0112] In addition, the content of the straight ridge fitting error method is as follows: a roof polyline is fitted according to the turning points of the continuous roof from the first point to the fourth point, a preliminary ridge line is generated by connecting the first point and the third point, the distance between the second point and the ridge line is checked, if it is less than xx value, the ridge line is within the fitting error range, the fitting is continued, the preliminary ridge line is updated, the first point and the fourth point are connected, the distances between the second point and the third point and the preliminary ridge line are checked, if they are both less than xx value, the next step of fitting is continued, otherwise the fitting of this ridge line is completed. The end of the ridge is separated from this end and used as the starting point of the next round of ridge fitting, and the cycle fitting is performed.
[0113] However, for the overlapping type of roof overlap, different people have different decomposition methods, so the decomposition method has uncertainty, so in order to overcome this uncertainty, the embodiment of the application adopts a decomposition method taking the ridge as a unit.
[0114] In the embodiment of the application, steps 212-213 are used to identify the roof layout information of each traditional gable roof building in the cropped image, and a corresponding decomposition method is used to decompose the continuous roof into multiple segmented roofs. This step ensures that each independent traditional gable roof building has detailed roof layout information, improving the convenience and accuracy of the labeling information. By decomposing the continuous roof into multiple segmented roofs, the number and diversity of independent traditional gable roof buildings in the dataset are increased. This helps to cover more scenarios and situations when training the model, improving the generalization ability of the model. The generation of cropped images and labeling information ensures the representativeness of the dataset, which can better reflect the actual distribution and characteristics of traditional gable roof buildings. Simplifying complex continuous roofs into multiple independent segmented roofs simplifies subsequent data processing and analysis steps, making each independent traditional gable roof building easier to manage and process.
[0115] In other words, the embodiment has the following advantages: specific decomposition rules are applied to different types of continuous roofs to more accurately identify and segment independent traditional gable roof buildings. This high-precision data processing helps generate more accurate labeling information, thereby improving the quality of the entire dataset. Since the decomposition method can handle various complex continuous roof structures, it can produce more diverse single roof instances, which not only increases the number of the dataset but also ensures that its content covers more actual scenarios, making the trained model have better generalization ability. For complex structures with uncertainties (such as horizontal connection, diagonal connection, arc connection, etc.), define clear segmentation features or fitting error methods to overcome these uncertainties, ensuring that effective decomposition can be achieved even in more complex situations.
[0116] Step 214, the traditional gable roof building of the single roof and the traditional gable roof building of the segmented roof are both regarded as independent traditional gable roof buildings, and the roof combination information of each independent traditional gable roof building is generated based on the first cropped image.
[0117] It should be noted that the embodiment can directly generate roof combination information for single-roof traditional gable roof buildings, while for continuous-roof traditional gable roof buildings, segmentation can be performed first, and then roof combination information can be generated.
[0118] Step 215, taking the roof combination information as the labeling information, generating the partition sample dataset of the sample region based on the labeling information and the first cropped image.
[0119] By performing steps 211-215 above, the embodiments of this application achieve improved data accuracy, enhanced dataset diversity and representativeness, simplified subsequent processing, improved model training performance, and increased flexibility and scalability in the processing of roof combination information for traditional pitched roof buildings. These effects collectively improve the efficiency and quality of roof combination information processing for traditional pitched roof buildings.
[0120] In the above embodiment, in step 214, based on the first cropped image, roof combination information for each independent traditional pitched roof building is generated, including:
[0121] Step 2141: Obtain the ridge information of an independent traditional pitched roof building.
[0122] Specifically, this embodiment can manually identify the ridge of an independent traditional pitched roof building, and can also use two-point geographic coordinates to represent the two endpoints of the ridge. For example, in the developed annotation quality inspection software, line segments are used to display the ridge, and ridge information is recorded. The ridge information can be the coordinates of the two endpoints of the ridge, and the coordinates can exist in either geographic coordinates or image coordinates; this embodiment preferentially uses geographic coordinates. When needed later, this embodiment can calculate information such as the ridge length from the ridge information. For continuous roofs, this embodiment can generate the ridge information of an independent traditional pitched 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.
[0123] Step 2142: Obtain the first pitched roof type information of the independent traditional pitched roof building input by the user.
[0124] Step 2143: Determine the eaves information of the independent traditional pitched roof building based on the first pitched roof type information.
[0125] Specifically, as one possible implementation, step 2143, determining the eaves information of an independent traditional pitched roof building based on the first pitched roof type information, includes:
[0126] Step a1: Obtain the method for determining the eaves corresponding to the first slope roof type information.
[0127] like Figure 5 As shown, single-sloped roof, double-sloped roof, four-sloped roof, and hip roof are four progressively more complex types. Combined with single-eave, double-eave, and half-roof types, they can form nine types of traditional pitched roof buildings. Therefore, the first type of pitched roof information includes single-eave single-sloped roof, single-eave double-sloped roof, double-eave double-sloped roof, single-eave four-sloped roof, double-eave four-sloped roof, half-four-sloped roof (including hip roofs), single-eave hip roof, double-eave hip roof, or half-hip roof; and different first-sloped roof types correspond to different methods for determining the eaves.
[0128] Step a2, determining the eave information of the independent traditional sloping roof building according to the eave determination method corresponding to the first sloping roof type information. The first sloping roof type information is the manually determined sloping roof type information.
[0129] Wherein, in combination with Figure 5 It can be seen that the eave determination method corresponding to the single-eave single-pitch roof is to determine the coordinate information of an arbitrary point of the ridge of the independent traditional sloping roof building and the coordinate information of an arbitrary point of the eave as the eave information of the independent traditional sloping roof building.
[0130] The eave determination method corresponding to the single-eave double-pitch roof is to determine the coordinate information of an arbitrary point of each of the eaves on both sides of the ridge of the independent traditional sloping roof building as the eave information of the independent traditional sloping roof building.
[0131] The eave determination method corresponding to the double-eave double-pitch roof is to determine the coordinate information of an arbitrary point of each of the two eaves on both sides of the ridge of the independent traditional sloping roof building as the eave information of the independent traditional sloping roof building.
[0132] The eave determination method corresponding to the single-eave four-pitch roof is to determine the coordinate information of a specified point of the eave on one side of the ridge and a specified point of the eave on the other side of the ridge of the independent traditional sloping roof building as the eave information of the independent traditional sloping roof building; and the specified point of the eave on one side of the ridge and the specified point of the eave on the other side of the ridge form a roof diagonal. The specified point is the eave corner.
[0133] The eave determination method corresponding to the double-eave four-pitch roof is to determine the coordinate information of the lower eave corner on one side of the ridge, the lower end point of the upper vertical ridge, the lower eave corner on the other side of the ridge, and the lower end point of the upper vertical ridge of the independent traditional sloping roof building as the eave information of the independent traditional sloping roof building.
[0134] The eave determination method corresponding to the half four-pitch roof is to determine the coordinate information of the eave corner on one side of the ridge, an arbitrary point of the ridge of the independent traditional sloping roof building, and the eave corner on the other side of the ridge of the independent traditional sloping roof building as the eave information of the independent traditional sloping roof building.
[0135] The eave determination method corresponding to the single-eave hip roof is to determine the coordinate information of the two end points of the hip on one side of the ridge and the two end points of the hip on the other side of the ridge of the independent traditional sloping roof building as the eave information of the independent traditional sloping roof building.
[0136] The eave determination method corresponding to the double-eave hip roof is to determine the coordinate information of the lower eave corner on one side of the ridge, the two end points of the hip, the lower eave corner on the other side of the ridge, and the two end points of the hip of the independent traditional sloping roof building as the eave information of the independent traditional sloping roof building.
[0137] The method for determining the roof corresponding to the half hip roof is: determining the eave corner on one side of the ridge of the independent traditional gable roof building and the two end points of the hip ridge on the other side as the roof information of the independent traditional gable roof building. The position information of the points in all the roof information above can be referred to as the position information of the roof point.
[0138] Exemplarily, in a traditional area in a rural settlement, the most common one is the hard mountain (or suspended mountain) roof. The hip roof and the eaves temple roof are mostly public buildings, and the proportion in the traditional area in the rural settlement is small. First, the slope roof type is artificially judged to obtain the first slope roof type information. According to different slope roof type information, the corresponding roof information marking method is selected. If it is the most common hard mountain (or suspended mountain) roof (i.e. a variant of double slope roof), the width information of the roof is represented by any two points on the two sides of the roof, and if there are different widths on the same roof, the widest part is represented as the width. In the developed annotation quality detection software, it is also represented by a line segment. If the roof is other roof, there are other methods to represent. Figure 6 The display schematic diagram of the ridge information and the roof information provided by the embodiment of the present application in the cropped image.
[0139] From the above description, it can be known that the embodiment can identify the roof of the traditional gable roof building based on the ridge. If the width of the roof is different at different positions, the widest part is taken as the reference, and the roof information includes the coordinate information of a group of points. The number of points and the position of points can be designed according to different slope roof type information. Among them, the number of points corresponding to the complex and rare slope roof type is more than 2. The embodiment can further determine the roof width, shape, slope roof type and other information according to the roof information.
[0140] From the above description, it can be known that the embodiment adopts different roof determination methods according to different types of slope roofs (such as single-eave single-pitch roof, single-eave double-pitch roof, heavy-eave hip roof, etc.), ensuring that the roof information of each type can be accurately generated. This method can process various types of gable roof buildings, including common single-eave double-pitch roof and relatively complex heavy-eave hip roof, increasing the diversity and representativeness of gable roof buildings in the data set. Through different roof determination methods, detailed roof information is generated, including the coordinate information of multiple points, making the data set more rich and comprehensive. The diversity and representativeness of the data set improve the generalization ability of the model, making the model perform better when processing new and unknown data. Through the pre-set rules and methods, the ridge information and the roof information can be automatically generated, reducing manual intervention and improving processing efficiency. The generated roof combination information structure is clear, including the ridge information and the roof information, which is convenient for subsequent data management and analysis work.
[0141] Step 2144, quality detection is performed on the ridge information, the first slope roof type information and the eave information to obtain an overall quality detection result.
[0142] Specifically, as one possible implementation manner, the step 2144 of performing quality detection on the ridge information, the first slope roof type information and the eave information to obtain an overall quality detection result includes:
[0143] Step b1, it is judged whether there is an intersection point between a line segment formed by position information of two ridge end points included in the ridge information and a line segment formed by position information of an eave point included in the eave information.
[0144] Step b2, the quality detection result of the ridge information and the eave information is determined according to the existence result of the intersection point and the number of the intersection points.
[0145] Specifically, if there is an intersection point and the number of the intersection points is more than one, it indicates that the quality detection result of the mutual detection of the ridge information and the eave information is poor, and the correction can be made by manual correction. After the correction, the present embodiment can continue the intersection detection until the quality detection result of the ridge information and the eave information is fine.
[0146] Step b3, the second slope roof type information is obtained by applying a preset automatic slope roof type recognition model in combination with the eave information, and the quality detection result of the first roof type information is determined according to the comparison result of the second slope roof type information and the first slope roof type information. The second slope roof type information is also called the fourth roof information. Specifically, the relationship between the eave point and the ridge is judged to automatically generate the second slope roof type information. For example, an error distance is set, and if any point is less than the error distance, it is determined as a single slope roof, otherwise, it is determined as a double slope roof. When the slope roof type is compared, the present embodiment can compare the automatically judged second slope roof type information with the manually labeled first slope roof type information, and if the two kinds of slope roof type information of all traditional slope roof buildings are the same, the quality detection result of the first roof type information is fine. If there is one or more inconsistent cases, manual correction is performed.
[0147] Figure 7 The identification principle diagram of the preset automatic slope roof type recognition model provided by the present embodiment is shown. Specifically, as shown in FIG. 8, the identification principle diagram of the preset automatic slope roof type recognition model includes the following steps: Figure 7As shown, the number of points in the eave information is determined. If the number of points is 2, it is determined whether one point coincides with the ridge. If yes, the second roof type information is determined to be a single-pitched roof. Otherwise, it is determined whether the two points are within the width (i.e., the length of the ridge). If yes, it is a single-eave double-pitched roof. Otherwise, it is a single-eave four-pitched roof. If the number of points is 3, it is determined that the distance between the second point of the three points and the ridge. If the distance is 0, it is a half four-pitched roof. If the distance is greater than 0, it is a half hip roof. If the number of points is 4, it is determined that the number of points outside the width of the ridge. If the number is 0, it is a double-eave double-pitched roof. If the number is 2, it is a single-eave hip roof. If the number is 4, it is a double-eave four-pitched roof. If the number of points is 6, it is a double-eave hip roof.
[0148] Figure 8 A user operation interface schematic diagram of sample quality inspection software provided by the embodiment of the present application is shown. Figure 9 A display schematic diagram of the overall quality detection result provided by the embodiment of the present application is shown. As described above, after the ridge information, the first pitched roof type information and the eave information in the cropped area are labeled, the automatic detection of the labeling quality can be performed by the algorithm in the labeling quality detection software developed by the embodiment. Specifically, the ridge information and the eave information are cross-detected, that is, whether the line segment formed by the ridge and the line segment formed by the two points of the eave intersect each other is detected. If they intersect each other, it means that the labeling is correct. If there is a ridge without a corresponding eave or a ridge intersecting with multiple eaves, or there is an eave without a corresponding ridge or an eave intersecting with multiple ridges, it means that the labeling is incorrect. The embodiment can display the incorrect eave and ridge in a highlighted form, and then the manual judgment and correction are performed. The automatic cross-detection function can be realized by using a program such as python. The following is a method for two-by-two intersection detection. Each ridge information is traversed, each eave information is traversed, whether they intersect each other is calculated, and the result of non-intersection is stored in a list. If they intersect each other, the result is not recorded in the list, so as to reduce the calculation amount. Alternatively, in the case that the hardware resources are sufficient, the corresponding relationship between all eaves and ridges can be stored in a list.
[0149] Step b4, the quality detection results of the ridge information and the eave information and the quality detection result of the first roof type information are merged to obtain the overall quality detection result.
[0150] Step 2145, in the case that the overall quality detection result is qualified, the roof frame information and the roof key point information of the independent traditional pitched roof building are generated based on the ridge information, the first pitched roof type information and the eave information.
[0151] The embodiment can simplify the traditional complex all information labeling mode by point labeling mode according to the roof symmetry and right angle characteristics of the traditional gable roof building, and automatically calculate other information such as the ridge length by the ridge information and the roof width by the eave information through simple labeling and the geometric characteristics of the roof.
[0152] According to different gable roof types, the embodiment can use corresponding methods to automatically generate the roof frame (or roof rectangular frame) information. For example, the embodiment can use a program such as python to automatically extract the second gable roof type information, the roof frame information and the roof key point information. Specifically, the embodiment can take the ridge information as a unit to call the corresponding eave information. According to the ridge information and the eave information, the second gable roof type information, the roof frame information and the roof key point information are calculated. The roof key point information includes the turning point of the eave, the four point coordinates of the double eave, etc.
[0153] Figure 10 The embodiment provides a display schematic diagram of the roof frame information and the roof key point information of the traditional gable roof building of the nine gable roof types. Combined with Figure 10 It can be seen that different methods can be provided for the generation of the roof frame of different gable roof types. For example:
[0154] For single-eave single-pitch roof buildings, the embodiment 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 eave information and the line segment formed by the ridge (J1 and J2), and translating the ridge endpoints to one side by a distance d to form the four point coordinates (P1, P2, P3 and P4) of the roof frame, wherein J1 coincides with P4 and J2 coincides with P3.
[0155] For double-pitch roof buildings, such as hard mountain or suspended mountain buildings, the embodiment 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 eave information and the line segment formed by the ridge (J1 and J2), and translating the ridge endpoints to both sides by a distance d to form the four point coordinates (P1, P2, P3 and P4) of the roof frame.
[0156] For four-pitch roof buildings, the embodiment provides a method for generating four point coordinates, but is not limited to the following method: calculating the distance d1 between the position coordinates of the two points in the eave information and the perpendicular line, and then moving the ridge endpoints in the straight line direction by a distance d1-d / 2 to form the four point coordinates (Y1, Y2, Y3 and Y4) of the double eave. Move the ridge endpoints in the straight line direction by a distance d1 to form the four point coordinates (P1, P2, P3 and P4) of the roof frame.
[0157] The embodiment can store the roof frame information and the roof key point information in the following format, including a serial number identity (Identity, ID), a slope roof type, whether it is a traditional slope roof building, position coordinates of two points of a ridge, four-point coordinates of a roof frame, four-point coordinates of a heavy eave, four-point coordinates of two ridges (id, PWDtype, JZtype, P1, P2, P3, P4, J1, J2, Y1, Y2, Y3, Y4, Z1, Z2, Z3, Z4), and the like. If a certain type has no related coordinates, it is recorded as 0. Figure 11 The embodiment provides a display schematic diagram of the roof frame information. In addition to being used to indicate whether it is a traditional slope roof building, JZtype can also store other information of the roof of the traditional slope roof building, such as the material of the roof (including: traditional green tiles, traditional red tiles, machine-made tiles, color steel, plastic tiles, and the like), whether it is damaged, and the like.
[0158] Step 2146, the ridge information, the first slope roof type information, the eave information, the roof frame information, and the roof key point information jointly constitute the roof combination information of the independent traditional slope roof building.
[0159] The ridge information or the first roof information, the eave information or the second roof information, the roof frame information, and the roof key point information can constitute the third roof information. The embodiment is used for labeling the single roof, the split roof, and the like independent traditional slope roof building, and labeling the first slope roof type information, the building type (whether it is a traditional slope roof building), and the like information.
[0160] In the above embodiment, in the case that the overall quality detection result is qualified, the method further includes:
[0161] Step 2147, a third remote sensing image of a sample area is acquired; the acquisition time of the third remote sensing image is earlier than the acquisition time of the first remote sensing image. The third remote sensing image is also called a historical remote sensing image.
[0162] Step 2148, the ridge information, the first slope roof type information, and the eave information are used as qualified labels, and a translation process is performed in combination with the position information of the independent traditional slope roof building, so that the position of the qualified label in the first remote sensing image is aligned with the position of the qualified label in the third remote sensing image.
[0163] Step 2149, the difference information between the first remote sensing image and the third remote sensing image is determined, and the qualified label is optimized according to the difference information, to obtain an optimized qualified label.
[0164] By performing steps 2147-2149, this embodiment ensures the consistency of these key features in images at different time points by labeling the ridge information, the gable roof type information, and the eave information as qualified annotations, which helps to improve the accuracy and reliability of data labeling. The translation process can be achieved through automated algorithms, reducing human 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 the consistency and comparability of data. By determining the differential information between the two time points, changes in buildings such as new construction, demolition, and reconstruction can be accurately identified, providing important basis for urban management and planning. Optimizing the qualified annotations based on the differential information can remove invalid or incorrect annotations and retain valid information, improving the quality and usability of the data. Optimized data can be applied to more scenarios such as urban renewal planning, cultural heritage protection, and disaster assessment, improving the practical value of the data.
[0165] Furthermore, in order to refine the roof layout information, improve the accuracy of the labeling information and the diversity of the data set, enhance the representativeness of the data set and the generalization ability of the trained model, and thus improve the accuracy and efficiency of the roof combination information processing of the traditional gable roof building, step 21 corresponds to a second sample labeling process, including the following steps 221-223:
[0166] Step 221, obtaining a second remote sensing image of a sample area collected by multiple sensors on a UAV, and cropping the second remote sensing image of the sample area to obtain a second cropped image containing a traditional area in an urban and rural settlement. The second remote sensing image can be an orthographic image taken by a UAV.
[0167] Step 222, based on the second remote sensing image, performing automatic segmentation of the roof and automatic extraction of the ridge to obtain roof combination information of an independent traditional gable roof building.
[0168] Step 223, taking the roof combination information as labeling information, and using a transfer model to transfer the labeling information to the second cropped image to generate a sample data set of the sample area.
[0169] By performing the above steps 221-223, the embodiments 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 gable roof building.
[0170] It should be noted that the present embodiment can migrate the annotation information in the following two cases: one is to migrate the data set annotated on the high-definition unmanned aerial orthographic image to the satellite remote sensing image, in which case the purpose of 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 low, and it is difficult to directly annotate and visually interpret on satellite remote sensing images, and the accuracy is low. In the areas with high-definition unmanned aerial orthographic images, the samples can be annotated on the unmanned aerial orthographic images first, and the annotated samples are migrated to the satellite remote sensing images to improve the accuracy of annotation. The method of annotating based on unmanned aerial remote sensing images and then transferring to satellite remote sensing images for modification and checking is basically the same as the method of migration between different satellite remote sensing images, which will not be described here.
[0171] The other is that the workload of sample annotation is very large, and because the satellite remote sensing images of different years and different seasons are different in color, angle, ground object, etc. Therefore, the annotation samples of the traditional area in the same urban and rural settlement can be migrated to different satellite remote sensing images, which can save the workload and increase the diversity of samples, thereby enhancing the robustness of the to-be-trained model. Specifically, the historical remote sensing images of other years of the same place have a spatial coordinate system, so the approximate positions can basically correspond after being imported, but the following operations need to be performed for modification and checking. First, overall micro translation: analyze the average distance deviation of the existing annotation and the new remote sensing image, and move all the annotation information in the plane to make most of the annotation information align with the new remote sensing image. Second, individual position adjustment: for the annotation information that is not aligned due to different shooting angles and building heights, move and align piece by piece or individually. Third, building change analysis and adjustment: delete the buildings that have been demolished, modify the buildings that have been changed, and add the ridge information, eave information, etc. of the newly built buildings.
[0172] In summary, the present embodiment can import annotation information in the historical remote sensing images of other years in the same area, and perform overall micro translation on all the annotation information, change analysis, and addition of buildings, etc. The image of the corresponding building position in the historical remote sensing image is changed, and the annotation information such as the ridge information and eave information of the demolished buildings and newly built buildings is modified. Alternatively, the present embodiment can annotate based on unmanned aerial remote sensing images, and then transfer the annotation information to satellite remote sensing images and optimize them.
[0173] In the above embodiment, as one possible implementation manner, in S15, the data set is generated based on the annotation information and the first cropped image, including:
[0174] Step 151, the first cropped image is cropped according to a preset cropping frame to obtain a plurality of small images, and the label information is divided into label information corresponding to the plurality of small images; the size of the cropping frame is the size of the input image of the to-be-trained model. The preset cropping frame, also known as a tile frame, can be a square grid covering a small sample area, or a preset rectangular frame. The small image, also known as a remote sensing image tile.
[0175] Step 152, identifying complete independent traditional gable roof buildings in each small image, and adjusting the label information corresponding to each small image according to the complete independent traditional gable roof buildings in each small image to delete the roof combination information of the incomplete independent traditional gable roof buildings, to obtain adjusted label information.
[0176] Step 153, taking the small image and the adjusted label information as a training sample to generate a data set of the to-be-trained model.
[0177] In summary, the present embodiment can use the developed label quality detection software to export a geographic vector file, and crop the cropped image according to a preset cropping frame to obtain a small image. The present embodiment can judge whether the four points in the roof frame information of the small image are completely within the preset cropping frame, if yes, form a tile, if not, the corresponding traditional gable roof building is on the edge and needs to be removed. Further, the present embodiment can convert the training sample into a data set format required for each model training.
[0178] It should be understood that after the ridge information, eave information, roof frame information and roof key point information are labeled in the developed label quality detection software, a Shape format file (shp) vector file with a geographic coordinate system is exported, the picture boundary information is calculated according to the geographic coordinate information contained in the corresponding remote sensing image, and the coordinates in the shp vector file are converted into pixel coordinates of the picture.
[0179] Specifically, the large sample composed of the cropped image and the annotation information takes the traditional area in the urban and rural settlements as a whole, and the size is not uniform. However, the deep learning training model generally cannot input the large sample such as the cropped image. In order to solve this problem, the large sample is cropped into training samples with equal size in the embodiment. The sample marked in the developed annotation quality detection software is exported as a shp vector file. The small sample area vector boundary data is cropped to generate a sample base map with coordinate information. Python or other languages are used for programming to read the coordinates, spatial resolution and other information of the sample base map. The spatial coordinates of the shp vector file are converted into pixel coordinates of the sample base map by plane transformation. A preset cropping frame is generated with the required pixel length (1024 in the embodiment). The sample base map is cropped according to the size of the preset cropping frame. In the preset cropping frame, each four-point roof frame is traversed. If the four points are in the preset cropping frame, the four-point roof frame is retained. The retained four-point roof frame does not appear in the subsequent traversal to reduce the amount of calculation. If there is no annotation shape or less than the preset number (3 in the embodiment) in the preset cropping frame, the small image is not retained. Finally, the small image and the corresponding annotation information are stored in different data set formats required by different models.
[0180] The existing sample production workload is huge, resulting in slow annotation efficiency. Therefore, in order to improve the annotation efficiency, a small amount of samples produced in the early stage can be used for model training in the embodiment. After the model is trained, the pre-trained target detection model can be used to automatically generate annotation information. The automatically generated annotation information is converted into annotation information with geographic spatial coordinates. The accuracy of the automatically generated annotation information is determined by comparing the annotation information corresponding to the cropped image. New annotation information corresponding to other sample areas is generated, and new samples are formed.
[0181] Alternatively, the model trained in another area can be used to crop the remote sensing image that needs to be annotated. The remote sensing image is cropped to a size suitable for the model, and the cropped image is input into the model to generate annotation information. The automatically generated annotation information is converted into annotation information with geographic spatial coordinates according to the coordinate information of the small image. All the annotation information is spliced to form complete annotation information corresponding to the remote sensing image that needs to be annotated. The embodiment can also use manual methods to modify and check in GIS. After completion, the sample production can be performed according to the above steps, and a large amount of manual work can be saved.
[0182] Figure 12 A flowchart of a roof combination information processing method of a traditional sloping roof building in an urban and rural settlement provided by the embodiment of the present application. The method comprises the following steps:
[0183] S121, a first remote sensing image of a sample area is obtained, and the first remote sensing image of the sample area is cropped to obtain a cropped image containing a traditional area in an urban and rural settlement.
[0184] S122, determine the building in the cropped image as a traditional gable roof building.
[0185] S123, determine whether the roof layout information of the traditional gable roof building is a single roof. If yes, execute S125, otherwise, execute S124.
[0186] S124, decompose the traditional gable roof building with continuous roof into a plurality of traditional gable roof buildings with segmented roofs.
[0187] S125, generate ridge information. S126, obtain first gable roof type information. S127, determine eave information of the independent traditional gable roof building according to the first gable roof type information. S128, cross-detect the ridge information and the eave information. S129, automatically generate second gable roof type information. S130, compare types. S131, generate overall quality detection result. When the overall quality detection result is qualified, execute S132, otherwise, execute S138.
[0188] S132, obtain qualified annotation. S133, generate roof frame information and key point information. S134, convert coordinates and crop into tiles. S135, generate data set. S136, train model using the data set. S137, automatically generate roof combination information using the model. S138, manually correct. S139, crop remote sensing images of the same range in other periods or image sources. S140, perform translation alignment on the qualified annotation.
[0189] The flow of the automatic identification method for traditional gable roof building plane texture provided in the embodiment is similar to the specific description of the foregoing scheme, and will not be described again here. The embodiment has the following advantages:
[0190] (1) The embodiment can use professional knowledge of roof structure and roof combination rules to decompose continuous roofs that are continuous, overlapping, and combined with each other, thereby improving the convenience and accuracy of the labeled information, and thus improving the effect of subsequent model training and application. The embodiment simplifies the labeling method, and the decomposition labeling technology is beneficial to later analysis.
[0191] (2) The manual comparison with the calculated result realizes the inspection of the labeling accuracy of the roof combination information, and improves the correctness of the labeling.
[0192] (3) The labeled information has geographic location information, realizes the mutual conversion of geographic coordinates and sample coordinates, is helpful for the migration of remote sensing base maps of the same place but different times and seasons, increases the diversity of samples, and improves the utilization efficiency and accuracy of the labeling results.
[0193] (4) Using a pre-trained target detection model to identify the roof and ridge, and then converting the identification result into labeling information, and manually adjusting, greatly reducing the workload of labeling.
[0194] In order to solve the problems of multiple data annotators in different places and complex data management, the embodiment can build a database based on a cloud server, a relational database management system, and an extended function of a spatial database. 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. The sample range includes task allocation information. The GIS software platform allows task acceptors to perform online real-time labeling according to the tasks they receive. The labeled data is updated to the database in real time, and the data is backed up regularly. In this way, the database can perform functions such as data uploading, task distribution, real-time labeling, quality detection, regular backup, progress monitoring, and sample data management.
[0195] Figure 13 A structure diagram of a traditional sloping roof building plane texture automatic identification system provided by the embodiment of the application is shown in FIG. 1. Figure 13 As shown in FIG. 1, the system includes:
[0196] The acquisition module 131 is configured to acquire a remote sensing image of a target region, and parse geographical coordinate features corresponding to the target region from the remote sensing image of the target region.
[0197] The detection module 132 is configured to use a target detection model corresponding to a partition of the geographical coordinate features to perform joint detection of a roof and a ridge for a traditional sloping roof building in the target region, and obtain a detection result. 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 region adaptive identification model group. During the joint detection, the instance segmentation model extracts a minimum enclosing rotating rectangle of a roof contour, performs spatial projection transformation on the minimum enclosing rotating rectangle, normalizes the minimum enclosing rotating rectangle to a standard direction, and inputs the minimum enclosing rotating rectangle to the key point detection model. The key point detection model identifies ridge feature points and connection relationships, and connects the ridge feature points to form a ridge.
[0198] The extraction and verification module 133 is configured to extract a roof-ridge constraint rule corresponding to a partition of the geographical coordinate features from a preset building texture feature knowledge base, and verify the detection result according to the roof-ridge constraint rule to verify the rationality of a roof combination and the continuity of a ridge. The roof-ridge constraint rule includes a positive ridge angle tolerance threshold, a roof lap ratio coefficient, and a fire wall spatial distribution feature.
[0199] The starting module 134 is configured to 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, to obtain the automatic identification result of the traditional gable roof building plane texture, when the verification result does not meet the standard condition. The basic detection model is a general detection model pre-trained by the whole sample data set, and is a base model for generating the target detection model of all partitions. The standard condition includes that the unqualified rate of positive ridge angle and the unqualified rate of roof lap are less than or equal to the corresponding preset threshold, and the compliance rate of fire wall and the penetration rate of ridge are greater than or equal to the corresponding preset threshold.
[0200] Figure 13 The traditional gable roof building plane texture automatic identification system can perform Figure 1 The implementation principle and technical effects of the traditional gable roof building plane texture automatic identification method of the embodiments are not repeated. The specific operation modes of each module and unit of the traditional gable roof building plane texture automatic identification system in the above embodiments have been described in detail in the embodiments related to the method, and will not be described in detail here.
[0201] In one possible design, Figure 13 The traditional gable roof building plane texture automatic identification system of the embodiments can be implemented as a computing device, such as Figure 14 As shown in the figure, the computing device can include a storage component 141 and a processing component 142.
[0202] 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 configured to execute the specific process of the above traditional gable roof building plane texture automatic identification method.
[0203] The processing component 142 can 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 can also be one or more application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components, which are used to execute the above method.
[0204] The storage component 141 is configured to store various types of data to support the operation of the terminal. The storage component can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof, such as a random access memory (RAM), a static random access memory (SRAM), an electrically erasable programmable read only memory (EEPROM), an erasable programmable read only memory (EPROM), a programmable read only memory (PROM), a read only memory (ROM), a magnetic storage, a flash memory, a magnetic disk, or a compact disk.
[0205] Of course, the computing device can also include other components, such as an input / output interface, a display component, a communication component, etc.
[0206] The input / output interface provides an interface between the processing component and peripheral interface modules, which can be output devices, input devices, etc.
[0207] The communication component is configured to facilitate communication between the computing device and other devices in a wired or wireless manner, etc.
[0208] The computing device can be a physical device or an elastic computing host provided by a cloud computing platform, and the computing device can be a cloud server, and the processing component, the storage component, etc. can be basic server resources rented or purchased from the cloud computing platform.
[0209] The embodiment of the present application also provides a computer storage medium, which stores a computer program, and the computer program can implement the above-mentioned Figure 1 The traditional gable roof building plane texture automatic identification method of the embodiment shown.
[0210] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0211] The system embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0212] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and necessary universal hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software products, and the computer software products can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and include a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0213] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for automatic recognition of the planar texture of traditional sloping roof buildings, characterized in that, include: Acquire remote sensing images of the target area, and extract the geographic coordinate features corresponding to the target area from the remote sensing images of the target area; Using a target detection model that corresponds to a geographic coordinate feature partition, joint detection of the roof and ridge is performed on traditional sloping roof 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 partitions correspond to different target detection models, and the target detection models are selected from a preset area adaptation and recognition model group. During the joint detection process, the instance segmentation model extracts the minimum bounding rectangle of the roof outline, performs spatial projection transformation on the minimum bounding 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 their connection relationships, and connects them to form the ridge. The roof and ridge constraint rules of the corresponding zones of the geographic coordinate features are extracted from the preset architectural texture feature knowledge base. The detection results are verified according to the roof and ridge constraint rules to verify the rationality of the roof combination and the continuity of the ridge. The roof and ridge constraint rules include the ridge angle tolerance threshold, the roof overlap ratio coefficient and the spatial distribution characteristics of the firewall. If the verification result does not meet the compliance conditions, a multi-model voting mechanism is activated 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, thus obtaining the automatic recognition result of the planar texture of traditional sloping roof buildings. The basic detection model is a general detection model pre-trained through the overall sample dataset and is the base model for generating the target detection models of all partitions. The compliance conditions include: the failure rate of the ridge angle and the failure rate of the roof overlap ratio are both less than or equal to the corresponding preset thresholds, and the compliance rate of the firewall 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 process of generating the preset region adaptation and recognition model group includes: Obtain the partitioned sample datasets of each sample region, and combine the partitioned sample datasets of all sample regions into a whole sample dataset. The sample regions are regions based on provinces, cities, or counties. A dual detection model is constructed, which adopts a cascaded architecture of an instance segmentation model and a key point detection model. The instance segmentation model extracts the minimum bounding rectangle of the roof outline, and the key point detection model identifies the ridge feature points and their connection relationships from the minimum bounding rectangle. The dual detection model is pre-trained based on the overall sample dataset, and a basic detection model is generated after training. Based on the sample datasets of each partition, the basic detection model is transferred and trained to obtain a preset region adaptation and recognition model group that includes the target detection model of each partition.
3. The method according to claim 2, characterized in that, The process of obtaining the partitioned sample dataset for each sample region includes: For each sample area, the first remote sensing image of the sample area is acquired by the sensors on the satellite, and the first remote sensing image of the sample area is cropped to obtain the first cropped image containing traditional areas in urban and rural settlements. Identify the roof layout information of each traditional pitched roof building in the first cropped image. The roof layout information is either a single roof or a continuous roof. The combination types of the continuous roof include: connecting type and overlapping type. The connecting type includes: horizontal connection, vertical connection, diagonal connection and arc connection. The overlapping type includes vertical overlap and diagonal overlap. A decomposition method corresponding to the joint type is used to identify whether there are segmentation features in the continuous roof. If segmentation features exist, the continuous roof is decomposed into multiple segmented roofs based on these features. The segmentation features include: material features, height features, misalignment features, and firewall features. Alternatively, if there are no segmentation features, the continuous roof is decomposed into multiple segmented roofs using the straight ridge fitting error method. Or, a decomposition method corresponding to the overlapping type is used, with the ridge as the unit, to decompose the continuous roof into multiple segmented roofs. Both traditional pitched roof buildings with single roofs and traditional pitched roof buildings with segmented roofs are treated as independent traditional pitched roof buildings, and roof combination information of each independent traditional pitched roof building is generated based on the first cropped image. The roof combination information is used as annotation information, and a partitioned sample dataset of the sample region is generated based on the annotation information and the first cropped image.
4. The method according to claim 2, characterized in that, The process of obtaining the partitioned sample dataset for each sample region includes: Acquire second remote sensing images of the sample area collected by multiple sensors on the UAV, and crop the second remote sensing images of the sample area to obtain a second cropped image containing traditional areas in 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 independent traditional pitched roof buildings; The roof combination information is used as annotation information, and a transfer model is used to transfer the annotation information to the second cropped image to generate a sample dataset of the sample region.
5. The method according to claim 3, characterized in that, After acquiring the first remote sensing image of the sample area collected by sensors on the satellite, the method further includes: Monocular depth estimation technology is used to generate depth information for each location in the first remote sensing image. Different roofs or roofs and ground can be distinguished by the depth information at different locations. Furthermore, the depth information is used to correct the roof tilt distortion caused by the satellite imaging angle.
6. The method according to claim 3, characterized in that, The step of generating roof combination information for each of the independent traditional pitched roof buildings based on the first cropped image includes: Obtain information on the ridge of a standalone traditional pitched roof building; Obtain the first pitched roof type information of the independent traditional pitched roof building input by the user; A method for determining the eaves corresponding to the first pitched roof type information is obtained, and the eaves information of the independent traditional pitched roof building is determined according to the method for determining the eaves 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 semi-four-slope roof, a single-eave hip roof, a double-eave hip roof, or a semi-hip roof, and different first pitched roof type information corresponds to different eaves determination methods; The ridge information, the first pitched roof type information, and the eaves information are subjected to quality inspection to obtain the overall quality inspection result. If the overall quality inspection result is qualified, the roof frame information and key roof point information of the independent traditional pitched roof building are generated based on the ridge information, the first pitched roof type information and the eaves information. The ridge information, the first pitched 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 pitched roof building.
7. The method according to claim 6, characterized in that, If the overall quality inspection result is qualified, the method further includes: Acquire a third remote sensing image of the sample area; the acquisition time of the third remote sensing image is earlier than the acquisition time of the first remote sensing image; The ridge information, the first pitched roof type information, and the eaves information are used as qualified annotations. Combined with the location information of independent traditional pitched roof buildings, they are translated 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. The differential information between the first remote sensing image and the third remote sensing image is determined, and the qualified annotations are optimized based on the differential information to obtain optimized qualified annotations.
8. An automatic recognition system for the planar texture of traditional sloping roof buildings, characterized in that, include: The acquisition module is used to acquire remote sensing images of the target area and parse the geographic coordinate features corresponding to the target area from the remote sensing images of the target area. The detection module is used to perform joint detection of roofs and ridges of traditional sloping roof buildings within the target area using a target detection model corresponding to the geographic coordinate features. 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 models are selected from a preset group of regional adaptation and recognition models. During the joint detection process, the instance segmentation model extracts the minimum bounding rectangle of the roof outline, performs a spatial projection transformation on the minimum bounding rectangle, normalizes it to a standard direction, and then inputs it to the key point detection model. The key point detection model identifies the ridge feature points and their connection relationships, and connects them to form the ridge. The extraction and verification module is used to extract the roof ridge constraint rules of the corresponding partition of the geographic coordinate features from the preset building texture feature knowledge base, and to verify the detection results according to the roof ridge constraint rules in order 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 firewall. The startup module is used to initiate a multi-model voting mechanism when the verification result does not meet the compliance conditions. This mechanism superimposes 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, thus obtaining the automatic recognition result of the planar texture of traditional sloping roof buildings. The basic detection model is a general detection model pre-trained from the overall sample dataset and serves as the base model for generating the target detection models of all partitions. The compliance conditions include: the failure rate of the ridge angle and the failure rate of the roof overlap ratio are both less than or equal to the corresponding preset thresholds, and the compliance rate of the firewall 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 invoked and executed by the processing component to implement the automatic identification method for the planar 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, The system contains a computer program that, when executed by a computer, implements a method for automatic identification of the planar texture of a traditional sloping roof building as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Building top surface identification method and system based on remote sensing technology
CN115205711A
Roof type identification method and device based on multi-source geographic information and remote sensing image
CN117746247A