CN113536432B - Village house layout method based on prediction network, storage medium and terminal equipment - Google Patents
Village house layout method based on prediction network, storage medium and terminal equipment Download PDFInfo
- Publication number
- CN113536432B CN113536432B CN202110821241.2A CN202110821241A CN113536432B CN 113536432 B CN113536432 B CN 113536432B CN 202110821241 A CN202110821241 A CN 202110821241A CN 113536432 B CN113536432 B CN 113536432B
- Authority
- CN
- China
- Prior art keywords
- house
- village
- block
- layout
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000010586 diagram Methods 0.000 claims abstract description 9
- 238000012545 processing Methods 0.000 claims abstract description 8
- 238000013507 mapping Methods 0.000 claims description 16
- 239000000463 material Substances 0.000 claims description 16
- 238000009826 distribution Methods 0.000 claims description 13
- 238000012876 topography Methods 0.000 claims description 12
- 238000009877 rendering Methods 0.000 claims description 3
- 102100037651 AP-2 complex subunit sigma Human genes 0.000 claims 2
- 101000806914 Homo sapiens AP-2 complex subunit sigma Proteins 0.000 claims 2
- 238000012549 training Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000013135 deep learning Methods 0.000 description 4
- 238000005457 optimization Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 238000010276 construction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000011449 brick Substances 0.000 description 1
- 239000004566 building material Substances 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
- 238000001308 synthesis method Methods 0.000 description 1
- 239000002023 wood Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/13—Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2111/00—Details relating to CAD techniques
- G06F2111/08—Probabilistic or stochastic CAD
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computer Hardware Design (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Software Systems (AREA)
- Medical Informatics (AREA)
- Architecture (AREA)
- Civil Engineering (AREA)
- Structural Engineering (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention provides a village layout method based on a prediction network, a storage medium and terminal equipment, wherein the method comprises the following steps: image acquisition is carried out on the traditional village building terrain to obtain an original data source; dividing villages into blocks according to the road trend in the villages to obtain topographic chart form data; expanding and converting the topographic chart form data to obtain model input data; building a village layout decision network according to the model input data, wherein the village layout decision network comprises a house continuous placement judging module, a house category module, a house position module and a house orientation module; and processing the block scene existing in the current empty or existing part of houses into a multi-channel characteristic diagram, inputting the multi-channel characteristic diagram into the village layout decision network, and outputting village layout results. According to the invention, the village layout decision network is constructed according to the model input data to predict the category, the position and the orientation of the house, so that the village layout generation speed and the village layout generation quality are improved.
Description
Technical Field
The invention relates to the field of outdoor scene layout, in particular to a village house layout method based on a prediction network, a storage medium and terminal equipment.
Background
The main study object of the layout is a spatial position relation, and the main study object can be specifically divided into: indoor and outdoor scene layouts. Wherein the outdoor scene layout includes a village layout, and the indoor scene layout includes two types of layout designs: one is a spatial division, such as a house pattern, where each room has a specific function and there may be an association between rooms; the other is furniture layout, and furniture in rooms is arranged according to a certain rule.
Currently, many studies on village layout are few, and most of the village layout is based on the traditional method, mainly generating object space positions according to specific layout rules, functional requirements and other custom input constraints. When a large-scene resident community is constructed, as the number of houses needing to be laid is increased, the time complexity of a layout optimization algorithm is increased, the generation speed and quality are obviously reduced, and the real-time requirement is difficult to meet. In terms of the layout field, a learner applies deep learning to home layout, and an indoor scene synthesis method based on a convolutional neural network is provided, so that the layout generation speed can be increased. However, due to large differences in field characteristics, such as large village area, irregular house shape, complex roads in villages, and the like, the flow of deep learning application to the house layout cannot be transferred to the village layout, and rapid layout of villages cannot be realized.
Accordingly, the prior art is still in need of improvement.
Disclosure of Invention
In view of the shortcomings of the prior art, the invention aims to provide a village layout method based on a prediction network, which aims to solve the problems of low generation speed and low quality of the existing village layout.
The technical scheme of the invention is as follows:
A method of village layout based on a predictive network, comprising the steps of:
Image acquisition is carried out on the traditional village building topography, a traditional village topography map is drawn according to the acquired image, house information is marked on the topography map, and an original data source is obtained;
Dividing villages in the original data source into blocks according to the road trend in the villages, storing house information and house contour point coordinates included in each block into a table, and obtaining topographic map table data;
Expanding and converting the topographic map form data to obtain model input data;
Building a village layout decision network according to the model input data, wherein the village layout decision network comprises a house continuous placement judging module, a house category module, a house position module and a house orientation module;
And processing the block scene existing in the current empty or existing part of houses into a multi-channel characteristic diagram, inputting the multi-channel characteristic diagram into the village layout decision network, and outputting village layout results.
The village layout method based on the prediction network, wherein the steps of expanding and converting the topographic map form data comprise the following steps:
sequentially extracting house information, house contour point coordinates and block contour point coordinates in each table from the topographic chart table data, storing the table data in a plain text form to obtain a CSV file, and taking_block_cnts.csv as a suffix;
and calculating the extension information of all houses contained in each block, and taking the block_info.csv as a suffix.
The village layout method based on the prediction network, wherein the extension information of the house comprises one or more of house area, orientation angle of a door, rotation datum point coordinates of a house minimum rectangular bounding box, house contour point coordinates, whether the house is a convex polygon, whether the house is segmented, center point coordinates of the house minimum rectangular bounding box, house material labels, floor labels, house shape labels, block area classification labels, a nearest distance value from the center of the minimum rectangular bounding box of the house after scaling to the block, a distance value from the center of the minimum rectangular bounding box of the house after scaling to the block center and house scoring.
The village layout method based on the prediction network, wherein the steps of expanding and converting the topographic map form data comprise the following steps:
performing orthogonal top-down rendering on each block in the topographic map table data, and mapping each block area onto 256×256 images;
Encoding semantic features onto a channel, wherein a first layer of the channel is a block channel, and 1 is taken from the block; the second layer of the channels is the channels of all houses, and the pixel value at the house is 1; the third layer and the fourth layer of the channel are house orientation channels, and the two channels respectively encode sin theta and cos theta; the fifth layer of the channel is a 5-layer material category channel, a 5-layer floor category channel, a 6-layer shape category channel and a 5-layer house area category channel.
The village layout method based on the prediction network, wherein the step of constructing a village layout decision network according to the model input data comprises the following steps:
adding a house continuous placement judging module in the village layout decision network in advance;
Mapping the current block scene to 256×256 block multi-channel views to serve as input data of a house continuous placement judging module;
The state of the current block scene is encapsulated by two sets of features, existingcountsS represents the count vector of each house category existing in the current block scene, resnetVS is to extract the advanced features of VS by ResNet18, and output the probability of whether the house can be placed continuously in the current block scene: pcontinue (t|s) = (MLPexistingcountsS, resnetVS), where MLP represents several linear layers.
The village layout method based on the prediction network, wherein the step of constructing a village layout decision network according to the model input data comprises the following steps:
Adding a house category module in the village layout decision network in advance;
Mapping the block scene which is confirmed to be continuously placed by the house continuous placement judging module to 256 x 256 block multi-channel views to serve as input data of a house type module;
Four category probability distributions of the house added into the block scene are obtained through a formula Pcat (pi| Cati, S) = (LINEARMLPCATI, RESNETVS), wherein i epsilon 1,2,3 and 4 are respectively a material label, a floor label, a shape label and an area label.
The village layout method based on the prediction network, wherein the step of constructing a village layout decision network according to the model input data comprises the following steps:
Adding a house position module in the village layout decision network in advance;
mapping the block scene confirmed by the house type module to 256 block multi-channel views of 256 to serve as input data of the house position module;
the probability of each pixel of a house appearing at a possible location is obtained by the formula Ploc (pl|s) = MLPUpConvResnetVS.
The village layout method based on the prediction network, wherein the step of constructing a village layout decision network according to the model input data comprises the following steps:
adding a house orientation module in the village layout decision network in advance;
mapping the block scene confirmed by the house position module onto 256-256 block multi-channel views as input data of the house orientation module;
The rotation angle of the house is obtained by the formula μ, σ 2 =split (MLPVS), sdown= linear (DownConvVS), cos θ=mlp ([ z, sdown ]), wherein the input scene is encoded using MLP multiple linear layers, split into two dimensions of the same feature mean μ and variance σ 2, a normal distribution is constructed from the aforementioned mean and variance, and a random vector z is sampled from the normal distribution P-N (0, 1).
The present invention also provides a storage medium storing one or more programs executable by one or more processors to implement the steps of the predictive network-based village layout method as provided by the present invention.
The invention also provides a terminal device, which comprises a processor, wherein the processor is suitable for realizing each instruction; and a storage medium adapted to store a plurality of instructions adapted to be loaded by a processor and to perform the steps of the predictive network based village layout method as provided by the invention.
The beneficial effects are that: the invention provides a village layout method based on a prediction network, which applies a deep learning method to the village layout field. According to the invention, a large amount of real layout data of the traditional villages are collected, the road trend in the villages is divided into blocks, the data are expanded and converted, so that input data which can practically reflect the shape characteristics of the houses are obtained, the types, the positions and the orientations of the houses are predicted by constructing a village layout decision network, and the layout result is obtained, so that the quality and the efficiency of the generated houses are improved, and the problems that the time complexity of a layout optimization algorithm is increased and the generation speed and the quality are obviously reduced along with the increase of the number of the houses in the prior art are overcome.
Drawings
Fig. 1 is a flow chart of steps of a method for predicting network-based village layout according to the present invention;
Fig. 2 is a block diagram of a terminal device according to the present invention.
Detailed Description
The invention provides a village house layout method based on a prediction network, a storage medium and a terminal device, and the invention is further described in detail below for making the purposes, technical schemes and effects of the invention clearer and more definite. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a preferred embodiment of a village layout method based on a prediction network according to the present invention, as shown in the drawings, comprising the steps of:
s100, performing image acquisition on the traditional village building topography, drawing a traditional village topography map according to the acquired image, and marking house information on the topography map to obtain an original data source;
S200, dividing villages in the original data source into blocks according to the road trend in the villages, storing house information and house contour point coordinates included in each block into a table, and obtaining topographic map table data;
s300, expanding and converting the topographic map form data to obtain model input data;
S400, constructing a village layout decision network according to the model input data, wherein the village layout decision network comprises a house continuous placement judging module, a house category module, a house position module and a house orientation module;
S500, processing the block scene existing in the current empty or existing part of houses into a multi-channel characteristic diagram, inputting the multi-channel characteristic diagram into the village layout decision network, and outputting village layout results.
According to the method, a large amount of real layout data of the traditional villages are collected, the road trend in the villages is divided into blocks, the data are expanded and converted, input data which can practically reflect the shape characteristics of the houses are obtained, the types, the positions and the orientations of the houses are predicted by constructing a village layout decision network, the layout result is obtained, the quality and the efficiency of the generated houses are improved, and the problems that the time complexity of a layout optimization algorithm is increased and the generation speed and the quality are obviously reduced along with the increase of the number of the houses in the prior art are solved.
In some embodiments, taking the data of the topography chart of 50 villages as an example, firstly consulting and researching the files of the traditional villages and recording the distribution places, carrying out image acquisition on the traditional villages by using an unmanned aerial vehicle, then drawing the topography chart of the traditional villages by adopting AutoCAD software according to the acquired traditional village road images, wherein the topography chart comprises natural landscapes such as houses, road outlines, mountain rivers and the like, and marking the building materials and floor information of each house to obtain an original data source. In this embodiment, after the original data source is obtained, the whole village is divided into blocks (blocks) according to the road trend in the conventional village, and since the conventional village is compact in construction, part of the roads cannot be photographed clearly and completely during image acquisition. Therefore, before dividing the village into blocks, it further comprises: manually supplementing a route which is not completely shot on the topographic map through the noted points recorded during the field interview to form an enclosure of a building group, and then marking a block sequence number; the method comprises the steps of manually extracting outline point coordinates of houses and blocks and information of materials and floors marked on the outline point coordinates from AutoCAD, sequentially storing the outline point coordinates of the corresponding houses according to first line label information, storing the outline point coordinates of the blocks into an excel table, storing all data of one block in villages in each table, and finally obtaining tens or hundreds of block tables for each village.
In some embodiments, the step S300 includes:
S310, sequentially extracting house information, house contour point coordinates and block contour point coordinates in each table from the topographic map table data, storing the table data in a plain text form to obtain a CSV file, and taking_block_cnts.csv as a suffix;
S320, calculating the expansion information of all houses contained in each block, and taking block_info.csv as a suffix.
Specifically, considering that the conventional village is complicated in layout, the block shape and area are different, and the number and size of houses within the block are also different. Thus, in some embodiments, the step S320 further includes: and classifying the blocks according to the block areas to obtain the cnts_block_categories.csv and info_block_categories.csv files. When designing the network model, training one category to obtain a good pre-training model, and then applying the model to other categories, so that the time for generating the layout result can be shortened. Further, the classification method can be selected as Kmeans clustering.
Further, the step S300 further includes:
s330, performing orthogonal top-down rendering on each block in the topographic map table data, and mapping each block area onto 256 x 256 images;
S340, coding semantic features onto a channel, wherein a first layer of the channel is a block channel, and 1 is taken from the block; the second layer of the channels is the channels of all houses, and the pixel value at the house is 1; the third layer and the fourth layer of the channel are house orientation channels, and the two channels respectively encode sin theta and cos theta; the fifth layer of the channel is a 5-layer material category channel, a 5-layer floor category channel, a 6-layer shape category channel and a 5-layer house area category channel.
Taking the example of acquiring one of 50 villages: the method comprises the steps of sequentially extracting house label information, contour point coordinates and block contour point coordinates of topographic map table data of each block, storing the table data in a plain text form to obtain a CSV file, wherein each data is that one block contains all information, and taking_block_cnts.csv as a suffix; for each block of villages, the expansion information of all houses is calculated according to the topographic map form data, and the block info. Csv is used as a suffix.
Specifically, taking the storage content of each house as an example, the expansion information sequentially comprises: one or more of a room area (area), a door orientation angle (angle), a rotation reference point coordinate (base_ver) of a room minimum rectangular bounding box, a room contour point coordinate (vercoordinate), whether a room is a convex polygon (convex), whether a room is segmented (segmentation), a center point coordinate (center) of a room minimum rectangular bounding box, a room material label (label_material), a floor label (label_ floors), a room shape label (label_shape), a block area classification label (label_area), a distance value (dist_house_block) of a nearest distance from a center of a scaled minimum rectangular bounding box of a room to a block center, a distance value (dist_block_center_ houses) of a scaled minimum rectangular bounding box of a room, and a room score (houses _score).
The house shape is encoded, and if the house shape is a convex polygon, the house shape is represented by convex=1, and the house shape is represented by segmentation =0, and the house shape is not required to be divided; if the house shape is a concave polygon, it is represented by convex=0, and a list of convex polygon coordinate points is represented by segmentation =1.
The house shape labels are encoded, similarity calculation and distinction are carried out on all house shapes in one village by utilizing the invariant moment property of hu, clustering is carried out by utilizing a mixed Gaussian model clustering algorithm, the house shape labels are divided into 5 categories, and if the convex=1, the label labels are represented by label_shape=5, and other concave polygon label numbers are determined according to clustering results.
Wherein, the material label is expressed by 1,2,3,4,5, wherein 1,2,3,4,5 are expressed as bricks, wood, mixed, simplified and broken in sequence; the floor label is represented by 1,2,3,4 and 5, wherein 1,2,3,4 and 5 are sequentially represented by one layer, two layers, three layers, four layers and five layers.
The calculation method of the house score is the sum of the distance value from the center of the minimum rectangular bounding box of the house to the nearest block after the scaling, the distance value from the center of the minimum rectangular bounding box of the house to the center of the block after the scaling and the sum of the house area multiplied by different weight values. And after the house score is obtained, taking the score as a label of the house score.
Further, classifying the block areas of all the blocks by using Kmeans clusters to define 5 categories, summarizing the village block data, and corresponding each block of each category to the original processed house data to finally obtain two processed cnts_block_categories.csv and info_block_categories.csv files.
House data of each block category is converted into txt for storage. Under the cnts and info folders are five block class folders, such as 0_blocks, …,4_blocks. Taking a 0_blocks folder as an example, a 0_cnts_0.txt file and the like are arranged below, and the content is a row of data in the cnts_block_categories.csv; the corresponding file is a 0_info_0.txt file under the 0_info folder, and the content is a row of data inside the info_block_categories. ". txt" the 0 in front of which indicates the block class number also corresponds to the number of the file directory on which it is located, and "0" the 0 in front of which indicates the rank in the block total count for all villages.
Further, mapping each block region to 256 images, and encoding semantic features to other channels to obtain model input data, wherein the first layer is a block channel, and 1 is taken in the block; the second layer is the channel of all houses, and the pixel value at the house is 1; the third and fourth layers are house orientation channels, the angle is expressed by a local coordinate system consistent on all houses, and then sin theta and cos theta are respectively encoded by the two channels; the following are 5 floors of material class channels, 5 floors of floor class channels, 6 floors of shape class channels and 5 floors of house area class channels. Taking a material class channel as an example, a channel for storing the number of houses in each material class is added.
For the step S400, a village layout decision network is constructed according to the model input data, where the village layout decision network includes a house continued placement judging module, a house category module, a house position module, and a house orientation module. The step of predicting whether to continue placing the house through the judging module comprises the following steps:
s411, adding a house continuous placement judging module in the village layout decision network in advance;
s412, mapping the current block scene to 256×256 block multi-channel views, and using the current block scene as input data of a house continuous placement judging module;
s413, encapsulating the state of the current block scene by two groups of features, existingcountsS representing the count vector of each house category existing in the current block scene, resnetVS extracting the advanced features of VS by ResNet18, and outputting the probability of whether the house can be placed continuously in the current block scene: pcontinue (t|s) = (MLPexistingcountsS, resnetVS), where MLP represents several linear layers.
Specifically, the module uses the current block and the house as information to make two classifications, acquires the probability of whether to continue to place the house, and is used for judging whether to continue to join a new house under the condition of a plurality of blocks filled in the house.
The training set is obtained by scrambling txt files of the block type and obtaining training set data with train_percentage=0.8. The loss function loss is a loss using standard binary cross entropy. In the process of constructing a data set label, setting a scene complete probability complete_prob to 0.3, randomly generating a probability value representing whether to remove the data from the data set, if the random removal probability is smaller than the complete_prob, representing that the scene is complete, setting the label to 0 without adding a new house to the current block, and directly displaying the current house view; if it is greater than this value, then a random removal of the house is performed, with the tag set to 1, indicating that the current block can continue to fill the new house.
The step of predicting the house category label through the house category module comprises the following steps:
s421, adding a house category module in the village layout decision network in advance;
S422, mapping the block scene which is confirmed to be continuously placed by the house continuously placing judging module to 256×256 block multi-channel views to serve as input data of a house type module;
s423, obtaining four kinds of probability distribution of the house added into the block scene through a formula Pcat (Pi| Cati, S) = (LINEARMLPCATI, RESNETVS), wherein i epsilon 1,2,3 and 4 are respectively a material label, a floor label, a shape label and an area label.
Specifically, the module is used for predicting the material label, the floor label, the shape label and the area label of the house which need to be placed continuously through the house continuous placement judging module. Step S423 includes extracting a feature I1 by inputting a multi-channel view VS into Resnet network model, inputting a class feature Cati in training data into a plurality of Linear layers MLP to obtain Ci, then splicing Ci and the feature I1, and directly generating a class feature Pi through a layer of Linear layer Linear. Finally, four category distribution probabilities corresponding to the house are obtained in a summarizing mode.
Further, because the data set of the training is house information of the traditional village, actual conditions need to be considered in the training process, and according to research, houses close to the road are generally built in the house construction of the traditional village, and then the data set extends to the center of the area. In some embodiments, taking this feature into account defines participating in training in a sequence according to the score of the house, the final effect generating the currently required house from high to low according to the score, and its corresponding category information. The processing process of the data set is that different score thresholds are set according to the training turn, if the score corresponding to the house in the training set is lower than the threshold, the house is temporarily not involved in the training process, the house is removed, and the model is firstly fitted with house information with high score.
Wherein the step of predicting the house placement position by the house position module comprises:
s431, adding a house position module in the village layout decision network in advance;
S432, mapping the block scene confirmed by the house type module to 256×256 block multichannel views to serve as input data of the house position module;
S433, the probability of each pixel of the house appearing at a possible position is obtained by the formula Ploc (pl|s) = MLPUpConvResnetVS.
Specifically, the module functions to predict the location coordinate point where the house confirmed by the house category module is placed in the current block scene. The step S433 includes inputting Resnet the multi-channel view VS into the Resnet encoder, followed by the convolutional decoder UpConv, extracting features, and outputting heatmap with dimensions of 4×64×64×c, where C is the number of labels of each category, and heatmap is the predicted possible placement position under all categories; and then, processing heatmap of the corresponding layer by combining the selected category through the house category module to find out the corresponding position.
The step of predicting the orientation angle of house placement through the house orientation module comprises the following steps:
S441, adding a house orientation module in the village layout decision network in advance;
s442, mapping the block scene confirmed by the house position module to 256×256 block multichannel views to serve as input data of the house orientation module;
S443, σ 2 =split (MLPVS), sdown= linear (DownConvVS), by the formula μ,
The rotation angle of the house is obtained by cos θ=mlp ([ z, sdown), wherein the input scene is encoded using a plurality of linear layers of MLP, which is divided into two dimensions identical characteristic mean μ and variance σ 2, a normal distribution is constructed from the aforementioned mean and variance, and a random vector z is sampled from the normal distribution P-N (0, 1).
Specifically, this module functions to predict the angle of orientation at which the house, as confirmed by the house position module, is placed in the current block scene. In this embodiment, after the block scene confirmed by the house position module is mapped to the 256×256 block multichannel view, a translated scene multichannel view S is obtained, and after the translated scene multichannel view S is input to the house orientation module, the rotation angle of the house can be obtained. Assuming that the house of each shape class has a normal forward direction and that the house orientation angle has been found at the time of data preprocessing to be in the range of 0 ° -180 °, only the cos θ is needed. In this embodiment, an input scene is first encoded using MLP multiple linear layers, and is divided into two feature averages μ and variances σ2 of the same dimensions, a normal distribution is constructed according to the aforementioned averages and variances, and a random vector z is sampled from the normal distribution P-N (0, 1). The feature Sdown is extracted for the input scene VS using a plurality of lower convolution networks, and the result is fed to a fully connected decoder spliced with the random vector z to produce cos θ.
For the step S500, the block scene of the current empty or existing partial house is processed into a multi-channel feature map, and input into the village layout decision network, and the village layout result is output.
S510, processing a block scene existing in the current empty or existing part of houses into a multi-channel feature map, and inputting the multi-channel feature map into the village layout decision network to obtain category labels, positions and direction information;
S520, searching houses conforming to the information in a known information base;
s530, translating, scaling and rotating the house, placing the house in the current scene, and outputting a village layout result.
For example, a block scene existing in a current empty or existing part of houses is processed into a multi-channel feature map and is input into the village layout decision network, category labels CatLabel, position (x, y) and orientation angle theta information of houses to be added to the current block scene are obtained, the information is searched in all known house information bases, and a conforming house contour coordinate candidate set Room is found out according to the score by means of rule addition and calculation. And translating the block, scaling according to the size proportion of the block where the block is positioned and the current block, and rotating the direction angle theta according to the datum point. And finally, adding the house into the current block, drawing a topographic map, and marking the house information of the current existing house information of the house information so as to facilitate the next prediction. Further, in the process of placing houses, if the house overlapping situation occurs, discarding the currently selected house, and continuing to select and judge from the candidate set Room.
In some embodiments, a storage medium is also provided, wherein the storage medium stores one or more programs executable by one or more processors to implement steps in the predictive network-based village layout method of the present invention.
In some embodiments, there is also provided a terminal device, as shown in fig. 2, comprising at least one processor (processor) 20; a display screen 21; and a memory (memory) 22, which may also include a communication interface (Communications Interface) 23 and a bus 24. Wherein the processor 20, the display 21, the memory 22 and the communication interface 23 may communicate with each other via a bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may invoke logic instructions in the memory 22 to perform the methods of the embodiments described above.
Further, the logic instructions in the memory 22 described above may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand alone product.
The memory 22, as a computer readable storage medium, may be configured to store a software program, a computer executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 performs functional applications and data processing, i.e. implements the methods of the embodiments described above, by running software programs, instructions or modules stored in the memory 22.
The memory 22 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include high-speed random access memory, and may also include nonvolatile memory. For example, a plurality of media capable of storing program codes such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or a transitory storage medium may be used.
In addition, the specific processes that the storage medium and the plurality of instruction processors in the terminal device load and execute are described in detail in the above method, and are not stated here.
Comprises a processor, a memory, a control unit and a control unit, wherein the processor is suitable for realizing each instruction; and a storage medium adapted to store a plurality of instructions adapted to be loaded by a processor and to perform the steps in the predictive network-based village layout method of the invention.
The system comprises a processor, a processor and a memory, wherein the processor is suitable for realizing instructions; and a storage medium adapted to store a plurality of instructions adapted to be loaded by a processor and to perform the steps in the predictive network-based village layout method of the invention.
In summary, the village layout method based on the prediction network provided by the invention applies the deep learning method in the village layout field. According to the invention, a large amount of real layout data of the traditional villages are collected, the road trend in the villages is divided into blocks, the data are expanded and converted, so that input data which can practically reflect the shape characteristics of the houses are obtained, the types, the positions and the orientations of the houses are predicted by constructing a village layout decision network, and finally, the layout result is obtained, so that the quality and the efficiency of the generated houses are improved, and the problems that the time complexity of a layout optimization algorithm is increased and the generation speed and the quality are obviously reduced along with the increase of the number of houses in the prior art are overcome.
It is to be understood that the invention is not limited in its application to the examples described above, but is capable of modification and variation in light of the above teachings by those skilled in the art, and that all such modifications and variations are intended to be included within the scope of the appended claims.
Claims (8)
1. A method of village layout based on a predictive network, comprising the steps of:
Image acquisition is carried out on the traditional village building topography, a traditional village topography map is drawn according to the acquired image, house information is marked on the topography map, and an original data source is obtained;
Dividing villages in the original data source into blocks according to the road trend in the villages, storing house information and house contour point coordinates included in each block into a table, and obtaining topographic map table data;
Expanding and converting the topographic map form data to obtain model input data;
Building a village layout decision network according to the model input data, wherein the village layout decision network comprises a house continuous placement judging module, a house category module, a house position module and a house orientation module;
Processing the block scene existing in the current empty or existing part of houses into a multi-channel characteristic diagram, inputting the multi-channel characteristic diagram into the village layout decision network, and outputting village layout results;
The step of expanding and converting the topographic map form data comprises the following steps:
performing orthogonal top-down rendering on each block in the topographic map table data, and mapping each block area onto 256×256 images;
Encoding semantic features onto a channel, wherein a first layer of the channel is a block channel, and 1 is taken from the block; the second layer of the channels is the channels of all houses, and the pixel value at the house is 1; the third layer and the fourth layer of the channel are house orientation channels, and the two channels respectively encode sin theta and cos theta; the fifth layer of the channel is a 5-layer material class channel, a 5-layer floor class channel, a 6-layer shape class channel and a 5-layer house area class channel;
the step of constructing a village layout decision network according to the model input data comprises:
adding a house continuous placement judging module in the village layout decision network in advance;
Mapping the current block scene to 256×256 block multi-channel views to serve as input data of a house continuous placement judging module;
The state of the current block scene is encapsulated by two sets of features, existingcountsS represents the count vector of each house category existing in the current block scene, resnetVS is to extract the advanced features of VS by ResNet18, and output the probability of whether the house can be placed continuously in the current block scene: pcontinue (t|s) = (MLPexistingcountsS, resnetVS), where MLP represents several linear layers.
2. The predicted network-based village layout method according to claim 1, wherein the step of expanding and converting the topographic map table data comprises:
sequentially extracting house information, house contour point coordinates and block contour point coordinates in each table from the topographic chart table data, storing the table data in a plain text form to obtain a CSV file, and taking_block_cnts.csv as a suffix;
and calculating the extension information of all houses contained in each block, and taking the block_info.csv as a suffix.
3. The predicted network-based village layout method according to claim 2, wherein the extension information of the house comprises one or more of a house area, a door orientation angle, a rotation reference point coordinate of a house minimum rectangular bounding box, a house contour point coordinate, whether the house is a convex polygon, whether the house is divided, a center point coordinate of the house minimum rectangular bounding box, a house material label, a floor label, a house shape label, a block area classification label, a scaled minimum rectangular bounding box center to block nearest distance value of the house, a scaled minimum rectangular bounding box center to block center distance value of the house, and a house score.
4. The predicted network-based village layout method according to claim 1, wherein the step of constructing a village layout decision network according to the model input data comprises:
Adding a house category module in the village layout decision network in advance;
Mapping the block scene which is confirmed to be continuously placed by the house continuous placement judging module to 256 x 256 block multi-channel views to serve as input data of a house type module;
Four category probability distributions of the house added into the block scene are obtained through a formula Pcat (pi| Cati, S) = (LINEARMLPCATI, RESNETVS), wherein i epsilon 1,2,3 and 4 are respectively a material label, a floor label, a shape label and an area label.
5. The predictive network-based village layout method as claimed in claim 4, wherein the step of constructing a village layout decision network according to said model input data comprises:
Adding a house position module in the village layout decision network in advance;
mapping the block scene confirmed by the house type module to 256 block multi-channel views of 256 to serve as input data of the house position module;
the probability of each pixel of a house appearing at a possible location is obtained by the formula Ploc (pl|s) = MLPUpConvResnetVS.
6. The predicted network-based village placement method as defined in claim 5, wherein the step of constructing a village placement decision network based on said model input data comprises:
adding a house orientation module in the village layout decision network in advance;
mapping the block scene confirmed by the house position module onto 256-256 block multi-channel views as input data of the house orientation module;
the rotation angle of the house is obtained by the formula mu, sigma 2 = split (MLPVS), sdown = linear (DownConvVS), cos θ = MLP ([ z, sdown ]), wherein the input scene is encoded using a plurality of linear layers of MLP, which are divided into two identical dimensions of characteristic mean mu and variance sigma 2, a normal distribution is constructed from the aforementioned mean and variance, and a random vector z is sampled from the normal distribution P-N (0, 1).
7. A storage medium storing one or more programs executable by one or more processors to implement the steps of the predictive network-based village layout method of any one of claims 1-6.
8. A terminal device comprising a processor adapted to implement instructions; and a storage medium adapted to store a plurality of instructions adapted to be loaded by a processor and to perform the steps of the predictive network-based village layout method as claimed in any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110821241.2A CN113536432B (en) | 2021-07-20 | 2021-07-20 | Village house layout method based on prediction network, storage medium and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110821241.2A CN113536432B (en) | 2021-07-20 | 2021-07-20 | Village house layout method based on prediction network, storage medium and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113536432A CN113536432A (en) | 2021-10-22 |
CN113536432B true CN113536432B (en) | 2024-05-14 |
Family
ID=78129046
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110821241.2A Active CN113536432B (en) | 2021-07-20 | 2021-07-20 | Village house layout method based on prediction network, storage medium and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113536432B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114169063A (en) * | 2021-12-27 | 2022-03-11 | 北京奥科博思创新科技有限公司 | Building plane layout method and device and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107526895A (en) * | 2017-09-06 | 2017-12-29 | 合肥工业大学 | A kind of ancient houses group rapid modeling system |
CN110378059A (en) * | 2019-07-26 | 2019-10-25 | 江苏建筑职业技术学院 | A kind of village reutilization planning system |
CN111340938A (en) * | 2020-02-21 | 2020-06-26 | 贝壳技术有限公司 | Method for obtaining house layout information, network model training method and device |
CN111553006A (en) * | 2020-04-23 | 2020-08-18 | 山东建筑大学 | Large-scale rural residential layout generation design method in northern plain area |
WO2020208638A2 (en) * | 2019-04-09 | 2020-10-15 | Ark Automatic Architecture Design Ltd. | Systems and methods of automated design and spatial allocation of buildings |
CN111984701A (en) * | 2020-08-17 | 2020-11-24 | 北京大学深圳研究生院 | Method, device, equipment and storage medium for predicting village settlement evolution |
CN112686184A (en) * | 2021-01-05 | 2021-04-20 | 浙江臻善科技股份有限公司 | Remote sensing house change detection method based on neural network |
-
2021
- 2021-07-20 CN CN202110821241.2A patent/CN113536432B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107526895A (en) * | 2017-09-06 | 2017-12-29 | 合肥工业大学 | A kind of ancient houses group rapid modeling system |
WO2020208638A2 (en) * | 2019-04-09 | 2020-10-15 | Ark Automatic Architecture Design Ltd. | Systems and methods of automated design and spatial allocation of buildings |
CN110378059A (en) * | 2019-07-26 | 2019-10-25 | 江苏建筑职业技术学院 | A kind of village reutilization planning system |
CN111340938A (en) * | 2020-02-21 | 2020-06-26 | 贝壳技术有限公司 | Method for obtaining house layout information, network model training method and device |
CN111553006A (en) * | 2020-04-23 | 2020-08-18 | 山东建筑大学 | Large-scale rural residential layout generation design method in northern plain area |
CN111984701A (en) * | 2020-08-17 | 2020-11-24 | 北京大学深圳研究生院 | Method, device, equipment and storage medium for predicting village settlement evolution |
CN112686184A (en) * | 2021-01-05 | 2021-04-20 | 浙江臻善科技股份有限公司 | Remote sensing house change detection method based on neural network |
Non-Patent Citations (2)
Title |
---|
BP神经网络在城市化扩张动态模拟中的应用;徐泮林;姜凤霞;;山东科技大学学报(自然科学版)(第05期);全文 * |
基于人工神经网络的建筑多目标预测模型;喻伟;李百战;杨明宇;杜秀媛;;中南大学学报(自然科学版)(第12期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113536432A (en) | 2021-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12039423B2 (en) | System and method for procedurally synthesizing datasets of objects of interest for training machine-learning models | |
CN110795543B (en) | Unstructured data extraction method, device and storage medium based on deep learning | |
CN115205949B (en) | Image generation method and related device | |
WO2023185785A1 (en) | Image processing method, model training method, and related apparatuses | |
CN112132197B (en) | Model training, image processing method, device, computer equipment and storage medium | |
Kadam et al. | Detection and localization of multiple image splicing using MobileNet V1 | |
CN110879960B (en) | Method and computing device for generating image data set for convolutional neural network learning | |
CN115170749B (en) | WEBGIS three-dimensional visualization construction method and system based on Cesium | |
CN117033609B (en) | Text visual question-answering method, device, computer equipment and storage medium | |
CN113761153A (en) | Question and answer processing method and device based on picture, readable medium and electronic equipment | |
CN113536432B (en) | Village house layout method based on prediction network, storage medium and terminal equipment | |
CN113449741B (en) | Remote sensing image positioning method and system based on semantic inference and image understanding | |
CN115393872B (en) | Method, device and equipment for training text classification model and storage medium | |
CN106844610A (en) | A kind of distributed structured three-dimensional point cloud image processing method and system | |
CN114282059A (en) | Video retrieval method, device, equipment and storage medium | |
CN110414351A (en) | The intelligent scissor and recognition methods, system and storage medium of substation | |
Uggla et al. | Towards synthesized training data for semantic segmentation of mobile laser scanning point clouds: Generating level crossings from real and synthetic point cloud samples | |
CN115331012A (en) | Joint generation type image instance segmentation method and system based on zero sample learning | |
He et al. | GlobalMapper: Arbitrary-Shaped Urban Layout Generation | |
CN109102565B (en) | Method for automatically generating virtual terrain | |
CN113838199B (en) | Three-dimensional terrain generation method | |
CN114155524A (en) | Single-stage 3D point cloud target detection method and device, computer equipment and medium | |
Ji et al. | An extraction method for roof point cloud of ancient building using deep learning framework | |
CN117437366B (en) | Method for constructing multi-mode large-scale scene data set | |
CN113112454B (en) | Medical image segmentation method based on task dynamic learning part marks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |