Building roof type remote sensing recognition method using residual capsule network
By combining residual capsule networks with convolutional neural networks and capsule neural networks, the shortcomings of convolutional neural networks in identifying the spatial relationships of building rooftops are overcome, and accurate identification of complex roof types is achieved.
Patent Information
- Application Number
- CN202511099932.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-08-07
AI Technical Summary
In existing technologies, convolutional neural networks have difficulty accurately identifying the spatial relationships of the eaves, ridges, and waistlines of building roofs, resulting in insufficient accuracy in recognizing complex roofs.
By employing a residual capsule network combined with convolutional neural networks and capsule neural networks, remote sensing images of rooftops are acquired through drone cameras. The residual capsule neural network is then trained to identify the quantity and spatial relationships of eaves lines, ridge lines, and waist lines, and matched with a pre-built rooftop type library to achieve rooftop type recognition.
It improves the accuracy of identifying complex roof types, and can more accurately identify the spatial relationship between eaves, ridges, and waistlines, thereby accurately identifying the roof type of a building.
Smart Images

Figure CN120599508B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, specifically a remote sensing method for identifying building roof types using residual capsule networks. Background Technology
[0002] In the field of building remote sensing identification, accurately acquiring roof type information is crucial for applications such as urban planning, solar energy potential assessment, and low-altitude aircraft flight path planning. Building roof types are primarily distinguished based on their structural characteristics, such as the number of eaves, ridge lines, and waistlines, as well as their spatial relationships (e.g., the angles between them). Currently, using high-resolution cameras mounted on drones to acquire remote sensing images and automatically identifying roof types based on deep learning technology has become a major research direction. Existing technologies mainly employ convolutional neural networks for image recognition.
[0003] Using convolutional neural networks (CNNs) to identify roof features is a feasible approach. However, while CNNs excel at identifying local features—for example, they can be used to identify eaves, ridges, and waistlines—they struggle to capture the spatial relationships between these features, leading to insufficient accuracy in identifying complex roofs.
[0004] With the rapid development of image recognition technology, capsule neural network models are finding increasing applications. The advantage of capsule neural networks lies in their ability to accurately identify the spatial relationships between the overall and local parts of an image, thus overcoming the limitations of convolutional neural networks in recognizing the spatial relationships of eaves, ridgelines, and waistlines. Therefore, there is an urgent need to combine convolutional neural networks with capsule neural networks to achieve accurate identification of building roof categories. Summary of the Invention
[0005] (1) Technical problems to be solved
[0006] The purpose of this invention is to provide a remote sensing identification method for building roof types using residual capsule networks, so as to achieve the detection of complex roof categories.
[0007] (2) Technical solution
[0008] To achieve the above objectives, this invention provides a remote sensing identification method for building roof types using residual capsule networks, the method comprising the following steps:
[0009] S1, remote sensing images of sample roofs are acquired using a camera fixed to the bottom of the drone to obtain a roof sample library; the number of roof remote sensing images in the roof sample library is... M These are respectively denoted as the first image to the second image. M image.
[0010] S2, acquire the first image up to the... M The actual number of eaves lines, ridge lines, and waist lines of the roof corresponding to the image, as well as the actual included angles between each pair of eaves lines, ridge lines, and waist lines, are used to obtain the first data group to the second. M Data group; from the first image to the second M Images, first data set to the first M The data set is input to a pre-constructed initial residual capsule neural network, and the parameters of the initial residual capsule neural network are trained to obtain the first residual capsule neural network. The input of the first residual capsule neural network is the remote sensing image of the roof to be measured, and the output is the number of eaves lines, the number of ridge lines, the number of waist lines of the roof to be measured, and the angle between each pair of eaves lines, ridge lines, and waist lines.
[0011] S3 acquires remote sensing images of the roof under test using a camera fixed to the bottom of the drone.
[0012] S4, input the remote sensing image of the roof to be tested into the first residual capsule neural network, and output the number of eaves lines, the number of ridge lines, the number of waist lines, and the angle between each pair of eaves lines, ridge lines, and waist lines of the roof to be tested; match the number of eaves lines, the number of ridge lines, the number of waist lines, and the angle between each pair of eaves lines, ridge lines, and waist lines of the roof to be tested with a pre-obtained roof type library to obtain the roof type to be tested.
[0013] Furthermore, the initial residual capsule neural network includes a standard convolutional layer, a capsule layer, and a feedback iteration layer.
[0014] Furthermore, the standard convolutional layer uses a convolutional neural network algorithm to extract the first image to the second... M Local images of the eaves, ridge, and waistline in the image; using a convolutional neural network algorithm to extract the first image to the second... M The parameters used in the process of obtaining partial images of eaves, ridges, and waistlines in an image are denoted as standard convolutional layer parameters; the standard convolutional layer parameters include convolution kernel, kernel width, number of input channels, number of output channels, and offset peak; the number of standard convolutional layer parameters obtained is... H Relabel the standard convolutional layer parameters with the first standard convolutional layer parameters up to the 1st standard convolutional layer parameters. H Standard convolutional layer parameters.
[0015] Furthermore, the capsule layer is based on the first image to the... M The partial images of the eaves, ridge, and waistline in the imagery were extracted from the first image to the second image using a dynamic routing algorithm. M The number of eaves lines, ridge lines, and waist lines in the image, as well as the angles between any two eaves lines, ridge lines, and waist lines, are used to obtain the first set of recognition data. M Identify data groups; based on the first image to the...M The partial images of the eaves, ridge, and waistline in the imagery were extracted from the first image to the second image using a dynamic routing algorithm. M The number of eaves lines, ridge lines, and waist lines in the image, as well as the angles between any two eaves lines, ridge lines, and waist lines, are used to obtain the first set of recognition data. M The parameters used in the process of identifying data groups are denoted as capsule layer parameters; the capsule layer parameters include the number of input capsules, the number of output capsules, the output capsule dimension, the input capsule dimension, and the coupling coefficient; the number of capsule layer parameters is obtained. L Re-mark the capsule layer parameters as the first capsule layer parameters up to the second. L Capsule layer parameters.
[0016] Furthermore, the first identification data group to the first M The identification data group is represented as follows:
[0017] ;
[0018] in, Indicates the first Identify data groups; Indicates the first Number of roof lines in the image; Indicates the first Number of ridge lines in the image; Indicates the first Number of waistlines in the image; It is a data set, representing the first... The set of angles between each pair of the eaves line, ridge line, and waist line in the image; For values from 1 to M Integer variables between [a certain range].
[0019] Furthermore, the feedback iteration layer uses a particle swarm optimization algorithm to optimize the standard convolutional layer parameters and capsule layer parameters to obtain the optimal standard convolutional layer parameters and optimal capsule layer parameters; the optimal standard convolutional layer parameters and optimal capsule layer parameters are used as the standard convolutional layer parameters and capsule layer parameters of the first residual capsule neural network, respectively.
[0020] Furthermore, the method for optimizing the standard convolutional layer parameters and capsule layer parameters using the particle swarm optimization algorithm to obtain the optimal standard convolutional layer parameters and optimal capsule layer parameters is as follows:
[0021] Construct an optimization objective function; the optimization objective function is expressed as:
[0022] ;
[0023] in, This represents the objective function to be optimized. Indicates the parameters of a standard convolutional layer; Indicates capsule layer parameters; Indicates the first The actual number of eaves lines on the roof corresponding to the image; Indicates the first The actual number of ridge lines on the roof corresponding to the image; Indicates the first The actual number of roofline lines corresponding to the image; Indicates the first The actual included angles between any two of the eaves line, ridge line, and waist line of the roof corresponding to the image are related to the first... The first in the identification data group The sum of the absolute values of the differences in the angles between any two of the eaves line, ridge line, and waist line in the image, expressed in radians.
[0024] Construct optimization constraints.
[0025] Using optimization constraints as constraints and minimizing the value of the objective function as the objective, the optimal values of the standard convolutional layer parameters and the optimal values of the capsule layer parameters are calculated using the particle swarm optimization algorithm, and are denoted as the optimal standard convolutional layer parameters and the optimal capsule layer parameters, respectively.
[0026] Furthermore, the optimization constraints are as follows:
[0027] ;
[0028] in, Indicates the first t Standard convolutional layer parameters; Indicates the pre-set first t Lower bound of standard convolutional layer parameters; Indicates the pre-set first t Upper limit of standard convolutional layer parameters; Indicates the first c Capsule layer parameters; Indicates the pre-set first c Lower limit of capsule layer parameters; Indicates the pre-set first c Upper limit of capsule layer parameters; t The value is 1 to H Integers between; c The value is 1 to L Integers between [a certain range].
[0029] Furthermore, the method for matching the number of eaves lines, ridge lines, and waist lines of the roof to be tested, as well as the included angles between any two eaves lines, ridge lines, and waist lines, with a pre-obtained roof type library to obtain the roof type to be tested is as follows:
[0030] The roof type library includes pre-defined roof types and the corresponding number of pre-defined eaves lines, ridge lines, and waist lines, as well as pre-defined angles between any two eaves lines, ridge lines, and waist lines; the pre-defined roof types include types one through several. G Type; Type 1 to Type 2 G The number of preset eaves lines, preset ridge lines, preset waist lines, and the preset included angles between any two eaves lines, ridge lines, and waist lines corresponding to the type are respectively denoted as the first type feature parameters up to the [number missing]. G Type characteristic parameters.
[0031] Calculate the number of eaves lines, ridge lines, and waist lines of the roof to be measured, as well as the angles between any two eaves lines, ridge lines, and waist lines, and the first type of characteristic parameters up to the [number missing]. G The weighted Euclidean distance of the type characteristic parameters is calculated; the roof type corresponding to the minimum weighted Euclidean distance is recorded as the roof type to be measured; in the calculation of the weighted Euclidean distance, a pre-set first weight is assigned to the number of ridge lines, a pre-set second weight is assigned to the number of eaves lines, a pre-set third weight is assigned to the number of waist lines, and a pre-set fourth weight is assigned to the angle between each pair of eaves lines, ridge lines, and waist lines; the first weight is greater than the second weight, the second weight is greater than the third weight, the third weight is greater than the fourth weight, and the sum of the first weight, the second weight, the third weight, and the fourth weight is 1.
[0032] (3) Beneficial effects
[0033] Compared with the prior art, the beneficial effects of the present invention are:
[0034] By inputting the remote sensing image of the roof to be tested into a first residual capsule neural network, the output obtains the number of eaves lines, ridge lines, and waist lines of the roof, as well as the angles between any two eaves lines, ridge lines, and waist lines, and then matches them to determine the type of the roof. This method uses the angles between any two eaves lines, ridge lines, and waist lines as image features for recognition, thus enabling more accurate identification of complex roof types. Attached Figure Description
[0035] Figure 1 This is a flowchart of a remote sensing identification method for building roof type using residual capsule networks according to Embodiment 1 of the present invention. Detailed Implementation
[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] Before providing examples, it is necessary to describe the application scenarios of this invention. This embodiment is applied to achieve accurate identification of building roof categories, taking into account the complex spatial relationships of eaves, ridge lines, and waistlines during the identification process.
[0038] Example 1: As Figure 1 As shown, this embodiment provides a remote sensing identification method for building roof type using residual capsule networks. The method includes the following steps:
[0039] S1, remote sensing images of sample roofs are acquired using a camera fixed to the bottom of the drone to obtain a roof sample library; the number of roof remote sensing images in the roof sample library is... M These are respectively denoted as the first image to the second image. M image.
[0040] S2, acquire the first image up to the... M The actual number of eaves lines, ridge lines, and waist lines of the roof corresponding to the image, as well as the actual included angles between each pair of eaves lines, ridge lines, and waist lines, are used to obtain the first data group to the second. M Data group; from the first image to the second M Images, first data set to the first M The data set is input to a pre-constructed initial residual capsule neural network, and the parameters of the initial residual capsule neural network are trained to obtain the first residual capsule neural network. The input of the first residual capsule neural network is the remote sensing image of the roof to be measured, and the output is the number of eaves lines, the number of ridge lines, the number of waist lines of the roof to be measured, and the angle between each pair of eaves lines, ridge lines, and waist lines.
[0041] S3 acquires remote sensing images of the roof under test using a camera fixed to the bottom of the drone.
[0042] S4, input the remote sensing image of the roof to be tested into the first residual capsule neural network, and output the number of eaves lines, the number of ridge lines, the number of waist lines, and the angle between each pair of eaves lines, ridge lines, and waist lines of the roof to be tested; match the number of eaves lines, the number of ridge lines, the number of waist lines, and the angle between each pair of eaves lines, ridge lines, and waist lines of the roof to be tested with a pre-obtained roof type library to obtain the roof type to be tested.
[0043] For example, data preparation begins first. Specifically, a camera fixed to the bottom of a drone is used to perform vertical aerial photography of building rooftops within the target area, acquiring high-resolution rooftop remote sensing images. These collected rooftop images are then processed to form a rooftop sample library for training the recognition model. This sample library contains a total of [number missing] rooftop images. M These images of rooftops, collected in the order they were collected or according to specific rules, are sequentially named from image number one to image number two. M Imagery. The core purpose of this step is to provide a sufficient and representative foundation of raw image data for subsequent construction and training of recognition models.
[0044] Then, the model is built and trained. For each image in the rooftop sample library (i.e., the first image to the second image),... M Images require manual interpretation or other high-precision measurement methods to accurately obtain the key geometric parameters of the corresponding roof structure. These key parameters specifically include: the actual number of eaves lines, ridge lines, and waist lines of the roof, as well as the actual angles between each pair of eaves lines, ridge lines, and waist lines. Each image and its corresponding complete structural parameters, namely quantity information and angle information, together constitute a data unit, referred to as the first data group to the second. M Data set. Subsequently, the first image to the second... M Images and corresponding first data group to the first M The data set is input into a pre-designed network framework, namely the initial residual capsule neural network. The parameters of the initial residual capsule neural network are obtained through pre-setting. Then, the model is trained, allowing the network to learn the complex mapping relationship between the input roof image and its actual structural parameters (number of eaves lines, number of ridge lines, number of waist lines, and the angles between each pair of eaves lines, ridge lines, and waist lines). By optimizing the parameters inside the network, a well-trained and stable network model is finally obtained, called the first residual capsule neural network. The first residual capsule neural network has the following functions: when a new, unknown roof image (i.e., the remote sensing image of the roof to be measured) is input, it can automatically analyze and output the number of eaves lines, number of ridge lines, number of waist lines, and the angles between each pair of eaves lines, ridge lines, and waist lines.
[0045] Next, data collection is performed on the actual objects to be identified. When it is necessary to identify the roof type of a specific building, the target building is photographed again using a camera fixed to the bottom of the drone to obtain high-resolution images of its roof.
[0046] Finally, the acquired remote sensing image of the roof to be tested is used as input and fed into the trained first residual capsule neural network. Based on the learned features and patterns, the network performs calculations and analysis, and outputs the number of eaves, ridges, and waistlines of the roof to be tested, as well as the angles between any two eaves, ridges, and waistlines. After obtaining these specific structural parameters, they are matched and compared with a pre-built roof type library. The roof type library stores the standard structural parameter ranges (including the standard number of eaves, ridges, waistlines, and the standard angle range between any two) corresponding to various known standard roof types (including flat roofs, gable roofs, hip roofs, and folded roofs). By comparing the similarity between the output parameters and the standard parameters of each type in the library using a specific matching algorithm, the known roof type that best matches the structural characteristics of the roof to be tested is found, and finally, the specific type of the roof to be tested, i.e., the roof type under test, is determined.
[0047] Furthermore, the initial residual capsule neural network includes a standard convolutional layer, a capsule layer, and a feedback iteration layer.
[0048] For example, a standard convolutional layer is used to identify the first image to the second image. M The image contains partial images of the eaves, ridges, and waistlines, but it cannot identify the angles between any two eaves, ridges, or waistlines, i.e., their spatial relationships. The capsule layer is used to identify the first image to the second... M The image contains the number of eaves lines, ridge lines, and waist lines, as well as the angles between any two eaves lines, ridge lines, and waist lines. The feedback iteration layer is used to iteratively optimize the parameters of the standard convolutional layer and capsule layer, thereby achieving better recognition results.
[0049] Furthermore, the standard convolutional layer uses a convolutional neural network algorithm to extract the first image to the second... M Local images of the eaves, ridge, and waistline in the image; using a convolutional neural network algorithm to extract the first image to the second... M The parameters used in the process of obtaining partial images of eaves, ridges, and waistlines in an image are denoted as standard convolutional layer parameters; the standard convolutional layer parameters include convolution kernel, kernel width, number of input channels, number of output channels, and offset peak; the number of standard convolutional layer parameters obtained is... H Relabel the standard convolutional layer parameters with the first standard convolutional layer parameters up to the 1st standard convolutional layer parameters. H Standard convolutional layer parameters.
[0050] Furthermore, the capsule layer is based on the first image to the... M The partial images of the eaves, ridge, and waistline in the imagery were extracted from the first image to the second image using a dynamic routing algorithm. M The number of eaves lines, ridge lines, and waist lines in the image, as well as the angles between any two eaves lines, ridge lines, and waist lines, are used to obtain the first set of recognition data.M Identify data groups; based on the first image to the... M The partial images of the eaves, ridge, and waistline in the imagery were extracted from the first image to the second image using a dynamic routing algorithm. M The number of eaves lines, ridge lines, and waist lines in the image, as well as the angles between any two eaves lines, ridge lines, and waist lines, are used to obtain the first set of recognition data. M The parameters used in the process of identifying data groups are denoted as capsule layer parameters; the capsule layer parameters include the number of input capsules, the number of output capsules, the output capsule dimension, the input capsule dimension, and the coupling coefficient; the number of capsule layer parameters is obtained. L Re-mark the capsule layer parameters as the first capsule layer parameters up to the second. L Capsule layer parameters.
[0051] Furthermore, the first identification data group to the first M The identification data group is represented as follows:
[0052] ;
[0053] in, Indicates the first Identify data groups; Indicates the first Number of roof lines in the image; Indicates the first Number of ridge lines in the image; Indicates the first Number of waistlines in the image; It is a data set, representing the first... The set of angles between each pair of the eaves line, ridge line, and waist line in the image; For values from 1 to M Integer variables between [a certain range].
[0054] Furthermore, the feedback iteration layer uses a particle swarm optimization algorithm to optimize the standard convolutional layer parameters and capsule layer parameters to obtain the optimal standard convolutional layer parameters and optimal capsule layer parameters; the optimal standard convolutional layer parameters and optimal capsule layer parameters are used as the standard convolutional layer parameters and capsule layer parameters of the first residual capsule neural network, respectively.
[0055] Furthermore, the method for optimizing the standard convolutional layer parameters and capsule layer parameters using the particle swarm optimization algorithm to obtain the optimal standard convolutional layer parameters and optimal capsule layer parameters is as follows:
[0056] Construct an optimization objective function; the optimization objective function is expressed as:
[0057] ;
[0058] in, This represents the objective function to be optimized. Indicates the parameters of a standard convolutional layer; Indicates capsule layer parameters; Indicates the first The actual number of eaves lines on the roof corresponding to the image; Indicates the first The actual number of ridge lines on the roof corresponding to the image; Indicates the first The actual number of roofline lines corresponding to the image; Indicates the first The actual included angles between any two of the eaves line, ridge line, and waist line of the roof corresponding to the image are related to the first... The first in the identification data group The sum of the absolute values of the differences in the angles between any two of the eaves line, ridge line, and waist line in the image, expressed in radians.
[0059] Construct optimization constraints.
[0060] Using optimization constraints as constraints and minimizing the value of the objective function as the objective, the optimal values of the standard convolutional layer parameters and the optimal values of the capsule layer parameters are calculated using the particle swarm optimization algorithm, and are denoted as the optimal standard convolutional layer parameters and the optimal capsule layer parameters, respectively.
[0061] For example, for Further explanation is provided. The roof corresponding to the first image has 4 eaves lines and 1 ridge line. The 4 eaves lines are renumbered as Actual Eaves Line 1, Actual Eaves Line 2, Actual Eaves Line 3, and Actual Eaves Line 4. The 1 ridge line is designated as Actual Ridge Line 1. The actual angle between Actual Eaves Line 1 and Actual Ridge Line 1 is 0 radians. The actual angle between Actual Eaves Line 2 and Actual Ridge Line 1 is... Radius. The actual angle between actual eaves line #3 and actual ridge line #1 is 0 radians. The actual angle between actual eaves line #4 and actual ridge line #1 is... Radius. Since the first image contains 4 eaves lines and 1 ridge line in the first identification data group, the 4 eaves lines are renumbered as Eaves Line 1, Eaves Line 2, Eaves Line 3, and Eaves Line 4. The 1 ridge line is designated as Ridge Line 1. The actual angle between Eaves Line 1 and Ridge Line 1 is 0.143 radians. The actual angle between Eaves Line 2 and Ridge Line 1 is 1.52 radians. The actual angle between Eaves Line 3 and Ridge Line 1 is 0.156 radians. The actual angle between Eaves Line 4 and Ridge Line 1 is 1.53 radians. Therefore, the calculated... The angle is 0.391 radians. The second image corresponds to a roof with 4 eaves lines and 1 ridge line. The 4 eaves lines are renumbered as Actual Eaves Line 1, Actual Eaves Line 2, Actual Eaves Line 3, and Actual Eaves Line 4. The 1 ridge line is designated as Actual Ridge Line 1. The actual angle between Actual Eaves Line 1 and Actual Ridge Line 1 is 0 radians. The actual angle between Actual Eaves Line 2 and Actual Ridge Line 1 is... Radius. The actual angle between actual eaves line #3 and actual ridge line #1 is 0 radians. The actual angle between actual eaves line #4 and actual ridge line #1 is... Radius. Since the second image contains 3 eaves lines and the first image contains 1 ridge line, the 3 eaves lines are renumbered as Eaves Line 1, Eaves Line 2, and Eaves Line 3. The 1 ridge line is designated as Ridge Line 1. The actual angle between Eaves Line 1 and Ridge Line 1 is 0.133 radians. The actual angle between Eaves Line 2 and Ridge Line 1 is 1.48 radians. The actual angle between Eaves Line 3 and Ridge Line 1 is 0.126 radians. Since there is no Eaves Line 4 in the second image, a virtual Eaves Line 4 is constructed to make the calculation results more robust. The angle between the virtual Eaves Line 4 and Ridge Line 1 is artificially determined. Radius. Therefore, the calculation yields... The value is 1.921 radians. The actual included angle between any two of the eaves line, ridge line, and waist line ranges from 0 to... Radians; the range of the included angles between any two of the eaves line, ridge line, and waistline is 0 to... radian.
[0062] Furthermore, the optimization constraints are as follows:
[0063] ;
[0064] in, Indicates the first t Standard convolutional layer parameters; Indicates the pre-set first t Lower bound of standard convolutional layer parameters; Indicates the pre-set first t Upper limit of standard convolutional layer parameters; Indicates the first c Capsule layer parameters; Indicates the pre-set first c Lower limit of capsule layer parameters; Indicates the pre-set first c Upper limit of capsule layer parameters; t The value is 1 to H Integers between; c The value is 1 to LIntegers between [a certain range].
[0065] Furthermore, the method for matching the number of eaves lines, ridge lines, and waist lines of the roof to be tested, as well as the included angles between any two eaves lines, ridge lines, and waist lines, with a pre-obtained roof type library to obtain the roof type to be tested is as follows:
[0066] The roof type library includes pre-defined roof types and the corresponding number of pre-defined eaves lines, ridge lines, and waist lines, as well as pre-defined angles between any two eaves lines, ridge lines, and waist lines; the pre-defined roof types include types one through several. G Type; Type 1 to Type 2 G The number of preset eaves lines, preset ridge lines, preset waist lines, and the preset included angles between any two eaves lines, ridge lines, and waist lines corresponding to the type are respectively denoted as the first type feature parameters up to the [number missing]. G Type characteristic parameters.
[0067] Calculate the number of eaves lines, ridge lines, and waist lines of the roof to be measured, as well as the angles between any two eaves lines, ridge lines, and waist lines, and the first type of characteristic parameters up to the [number missing]. G The weighted Euclidean distance of the type characteristic parameters is calculated; the roof type corresponding to the minimum weighted Euclidean distance is recorded as the roof type to be measured; in the calculation of the weighted Euclidean distance, a pre-set first weight is assigned to the number of ridge lines, a pre-set second weight is assigned to the number of eaves lines, a pre-set third weight is assigned to the number of waist lines, and a pre-set fourth weight is assigned to the angle between each pair of eaves lines, ridge lines, and waist lines; the first weight is greater than the second weight, the second weight is greater than the third weight, the third weight is greater than the fourth weight, and the sum of the first weight, the second weight, the third weight, and the fourth weight is 1.
[0068] For example, in the process of roof type identification, the number of ridge lines explains the roof type more than the number of eaves lines, the number of eaves lines explains the roof type more than the number of waist lines, and the number of waist lines explains the roof type more than the angle between any two eaves lines, ridge lines, and waist lines.
[0069] Finally, it should be noted that although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A remote sensing method for identifying building roof types using residual capsule networks, characterized in that, The method includes the following steps: S1, remote sensing images of sample roofs are acquired using a camera fixed to the bottom of the drone to obtain a roof sample library; the number of roof remote sensing images in the roof sample library is... M These are respectively denoted as the first image to the second image. M image; S2, acquire the first image up to the... M The actual number of eaves lines, ridge lines, and waist lines of the roof corresponding to the image, as well as the actual included angles between each pair of eaves lines, ridge lines, and waist lines, are used to obtain the first data group to the second. M Data group; from the first image to the second M Images, first data set to the first M The data group is input to a pre-constructed initial residual capsule neural network, and the parameters of the initial residual capsule neural network are trained to obtain the first residual capsule neural network. The input of the first residual capsule neural network is the remote sensing image of the roof to be measured, and the output is the number of eaves lines, the number of ridge lines, the number of waist lines of the roof to be measured, and the angle between each pair of eaves lines, ridge lines, and waist lines. S3 acquires remote sensing images of the roof under test using a camera fixed to the bottom of the drone; S4, input the remote sensing image of the roof to be tested into the first residual capsule neural network, and output the number of eaves lines, the number of ridge lines, the number of waist lines, and the angle between each pair of eaves lines, ridge lines, and waist lines of the roof to be tested; match the number of eaves lines, the number of ridge lines, the number of waist lines, and the angle between each pair of eaves lines, ridge lines, and waist lines of the roof to be tested with a pre-obtained roof type library to obtain the roof type to be tested; The initial residual capsule neural network includes a standard convolutional layer, a capsule layer, and a feedback iteration layer; The capsule layer is based on the first image to the... M The partial images of the eaves, ridge, and waistline in the imagery were extracted from the first image to the second image using a dynamic routing algorithm. M The number of eaves lines, ridge lines, and waist lines in the image, as well as the angles between any two eaves lines, ridge lines, and waist lines, are used to obtain the first set of recognition data. M Identify data groups; based on the first image to the... M The partial images of the eaves, ridge, and waistline in the imagery were extracted from the first image to the second image using a dynamic routing algorithm. M The number of eaves lines, ridge lines, and waist lines in the image, as well as the angles between any two eaves lines, ridge lines, and waist lines, are used to obtain the first set of recognition data. M The parameters used in the process of identifying data groups are denoted as capsule layer parameters; the capsule layer parameters include the number of input capsules, the number of output capsules, the output capsule dimension, the input capsule dimension, and the coupling coefficient; the number of capsule layer parameters is obtained. L Re-mark the capsule layer parameters as the first capsule layer parameters up to the second. L Capsule layer parameters.
2. The remote sensing identification method for building roof type using residual capsule networks as described in claim 1, characterized in that, The standard convolutional layer uses a convolutional neural network algorithm to extract images from the first image to the second image. M Local images of the eaves, ridge, and waistline in the image; using a convolutional neural network algorithm to extract the first image to the second... M The parameters used in the process of creating local images of eaves, ridges, and waistlines in the image are denoted as standard convolutional layer parameters; the standard convolutional layer parameters include convolution kernel, convolution kernel width, number of input channels, number of output channels, and offset top; Number of parameters for standard convolutional layers H Relabel the standard convolutional layer parameters with the first standard convolutional layer parameters up to the 1st standard convolutional layer parameters. H Standard convolutional layer parameters.
3. The remote sensing identification method for building roof type using residual capsule networks as described in claim 2, characterized in that, The first identification data group to the first M The identification data group is represented as follows: ; in, Indicates the first Identify data groups; Indicates the first Number of roof lines in the image; Indicates the first Number of ridge lines in the image; Indicates the first Number of waistlines in the image; It is a data set, representing the first... The set of angles between each pair of the eaves line, ridge line, and waist line in the image; For values from 1 to M Integer variables between [a certain range].
4. The remote sensing identification method for building roof type using residual capsule networks as described in claim 3, characterized in that, The feedback iteration layer uses the particle swarm optimization algorithm to optimize the standard convolutional layer parameters and capsule layer parameters to obtain the optimal standard convolutional layer parameters and optimal capsule layer parameters; the optimal standard convolutional layer parameters and optimal capsule layer parameters are used as the standard convolutional layer parameters and capsule layer parameters of the first residual capsule neural network, respectively.
5. The remote sensing identification method for building roof type using residual capsule networks as described in claim 4, characterized in that, The method for optimizing the standard convolutional layer parameters and capsule layer parameters using the particle swarm optimization algorithm to obtain the optimal standard convolutional layer parameters and optimal capsule layer parameters is as follows: Construct an optimization objective function; the optimization objective function is expressed as: ; in, This represents the objective function to be optimized. Indicates the parameters of a standard convolutional layer; Indicates capsule layer parameters; Indicates the first The actual number of eaves lines on the roof corresponding to the image; Indicates the first The actual number of ridge lines on the roof corresponding to the image; Indicates the first The actual number of roofline lines corresponding to the image; Indicates the first The actual included angles between any two of the eaves line, ridge line, and waist line of the roof corresponding to the image are related to the first... The first in the identification data group The sum of the absolute values of the differences in the angles between any two of the eaves line, ridge line, and waist line in the image, expressed in radians; Construct optimization constraints; Using optimization constraints as constraints and minimizing the value of the objective function as the objective, the optimal values of the standard convolutional layer parameters and the optimal values of the capsule layer parameters are calculated using the particle swarm optimization algorithm, and are denoted as the optimal standard convolutional layer parameters and the optimal capsule layer parameters, respectively.
6. The remote sensing identification method for building roof type using residual capsule networks as described in claim 5, characterized in that, The optimization constraints are as follows: ; in, Indicates the first t Standard convolutional layer parameters; Indicates the pre-set first t Lower bound of standard convolutional layer parameters; Indicates the pre-set first t Upper limit of standard convolutional layer parameters; Indicates the first c Capsule layer parameters; Indicates the pre-set first c Lower limit of capsule layer parameters; Indicates the pre-set first c Upper limit of capsule layer parameters; t The value is 1 to H Integers between; c The value is 1 to L Integers between [a certain range].
7. The remote sensing identification method for building roof type using residual capsule networks as described in claim 6, characterized in that, The method for matching the number of eaves lines, ridge lines, and waist lines of the roof to be tested, as well as the included angles between any two eaves lines, ridge lines, and waist lines, with a pre-obtained roof type library to obtain the roof type to be tested is as follows: The roof type library includes pre-defined roof types and the corresponding number of pre-defined eaves lines, ridge lines, and waist lines, as well as pre-defined angles between any two eaves lines, ridge lines, and waist lines; the pre-defined roof types include types one through several. G Type; Type 1 to Type 2 G The number of preset eaves lines, preset ridge lines, preset waist lines, and the preset included angles between any two eaves lines, ridge lines, and waist lines corresponding to the type are respectively denoted as the first type feature parameters up to the [number missing]. G Type characteristic parameters; Calculate the number of eaves lines, ridge lines, and waist lines of the roof to be measured, as well as the angles between any two eaves lines, ridge lines, and waist lines, and the first type of characteristic parameters up to the [number missing]. G The weighted Euclidean distance of the type characteristic parameters is calculated; the roof type corresponding to the minimum weighted Euclidean distance is recorded as the roof type to be measured; in the calculation of the weighted Euclidean distance, a pre-set first weight is assigned to the number of ridge lines, a pre-set second weight is assigned to the number of eaves lines, a pre-set third weight is assigned to the number of waist lines, and a pre-set fourth weight is assigned to the angle between each pair of eaves lines, ridge lines, and waist lines; the first weight is greater than the second weight, the second weight is greater than the third weight, the third weight is greater than the fourth weight, and the sum of the first weight, the second weight, the third weight, and the fourth weight is 1.
Citation Information
Patent Citations
Capsule residual error neural network and image classification method of capsule residual error neural network
CN110009097A
Remote sensing image deep learning classification method and system based on Capsules-Unet model
CN111401455A