Floor plan recognition method, device, electronic device and storage medium
By automatically extracting and fusing the outer edge and key area features of floor plans and using a neural network model to identify floor plan information, the problem of low efficiency in manually obtaining floor plan information is solved, and fast and accurate floor plan recognition is achieved.
Patent Information
- Application Number
- CN202111452660.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2041-12-01
AI Technical Summary
In the existing technology, obtaining house layout information requires manual participation, resulting in high time and labor costs and low efficiency.
By obtaining the outer edge features and key area features of the floor plan to be identified, the neural network model is used to extract and fuse features to automatically identify the floor plan information.
It realizes rapid floor plan recognition without human intervention, reduces time and labor costs, and improves recognition speed and accuracy.
Smart Images

Figure CN114283440B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence recognition technology, and in particular to a floor plan recognition method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of the economy and real estate industry, people's demand for housing is increasing. In order to meet people's housing needs, it is crucial to determine the house type information.
[0003] Currently, workers are often required to manually obtain the house layout information from the floor plan. This method is not only slow and time-consuming, but also requires workers to have high professional knowledge, which greatly increases labor costs.
[0004] For this reason, a kind of floor plan recognition method is now urgently needed. Summary of the Invention
[0005] The present invention provides a floor plan recognition method, device, electronic equipment and storage medium to solve the defects in the prior art.
[0006] The present invention provides a floor plan recognition method, comprising:
[0007] Get the floor plan to be identified;
[0008] Extracting the outer edge features and key area features of the floor plan to be identified, and determining the floor plan information in the floor plan to be identified based on the outer edge features and key area features of the floor plan.
[0009] According to a floor plan recognition method provided by the present invention, determining the floor plan information in the floor plan to be recognized based on the floor plan outer edge features and the floor plan key area features specifically includes:
[0010] Fusing the outer edge features of the apartment type and the key area features of the apartment type to obtain apartment type fusion features;
[0011] The apartment type information is determined based on the apartment type fusion feature.
[0012] According to a floor plan recognition method provided by the present invention, the key area features of the floor plan include at least two of the floor plan local edge features, the floor plan global features, and the floor plan local features;
[0013] Accordingly, the unit type outer edge features and the unit type key area features are fused to obtain the unit type fusion features, which specifically include:
[0014] Fusing the characteristics of the key area of the apartment type to determine the regional fusion characteristics;
[0015] The regional fusion feature, the unit type outer edge feature, and each feature of the unit type key area feature are fused to obtain the unit type fusion feature.
[0016] According to a floor plan recognition method provided by the present invention, the floor plan information in the floor plan to be recognized is determined based on the floor plan outer edge features and the floor plan key area features, which includes:
[0017] Determining the outer edge information of the apartment type based on the outer edge features of the apartment type;
[0018] De-noising the floor plan to be identified based on the outer edge information of the floor plan to obtain a de-noised floor plan;
[0019] Feature extraction is performed on the denoised floor plan to obtain global features of the apartment type.
[0020] According to a floor plan recognition method provided by the present invention, the floor plan information includes at least one of floor plan outer edge information, floor plan segmentation information, floor plan classification information, and edge information corresponding to the floor plan segmentation information.
[0021] According to a floor plan recognition method provided by the present invention, extracting floor plan outer edge features and floor plan key area features of the floor plan to be recognized, and determining floor plan information in the floor plan to be recognized based on the floor plan outer edge features and the floor plan key area features, specifically includes:
[0022] Inputting the floor plan to be identified into a floor plan recognition model, extracting floor plan outer edge features and floor plan key area features of the floor plan to be identified based on the floor plan recognition model, and determining floor plan information in the floor plan to be identified based on the floor plan outer edge features and the floor plan key area features;
[0023] The floor plan recognition model is trained based on floor plan samples that carry floor plan information labels.
[0024] According to a floor plan recognition method provided by the present invention, the floor plan recognition model includes a first type of branch for extracting the outer edge features of the floor plan, and a second type of branch for extracting the key area features of the floor plan;
[0025] The floor plan recognition model is determined based on the following steps:
[0026] Based on the first type of floor plan samples carrying the outer edge information labels of the floor plans, an initial detection model including the initial first type of branches is trained to obtain the first type of branches;
[0027] An initial recognition model including the first type of branches and the initial second type of branches is constructed, and the initial recognition model is trained based on the second type of floor plan samples carrying at least one of the floor plan segmentation information labels, the floor plan classification information labels, and the edge information labels corresponding to the floor plan segmentation information labels to obtain the floor plan recognition model.
[0028] The present invention also provides a floor plan recognition device, comprising:
[0029] A floor plan acquisition module is used to obtain the floor plan to be identified;
[0030] The floor plan recognition module is used to extract the floor plan outer edge features and floor plan key area features of the floor plan to be identified, and determine the floor plan information in the floor plan to be identified based on the floor plan outer edge features and the floor plan key area features.
[0031] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described floor plan recognition methods are implemented.
[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described floor plan recognition methods.
[0033] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned floor plan recognition methods.
[0034] The floor plan recognition method, device, electronic device, and storage medium provided by the present invention first obtain a floor plan to be recognized; then, extract the outer edge features and key area features of the floor plan; and based on these features, determine the floor plan information in the floor plan to be recognized. This process eliminates the need for human intervention, significantly improving the recognition speed and reducing both time and labor costs. Furthermore, by extracting multimodal features such as the outer edge features and key area features of the floor plan, the accuracy of floor plan recognition can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on the drawings in the following description without any creative work.
[0036] Figure 1 It is a schematic flow chart of the floor plan recognition method provided by the present invention;
[0037] Figure 2 This is the case where the outer edge points of the key area of the apartment plan in the apartment plan recognition method provided by the present invention are a few key points on the outer edge;
[0038] Figure 3 This is the case where the outer edge points of the key area of the apartment plan in the apartment plan recognition method provided by the present invention are all the key points of the outer edge;
[0039] Figure 4 is a schematic diagram of a denoised floor plan obtained in the floor plan recognition method provided by the present invention;
[0040] Figure 5 It is a structural diagram of a floor plan recognition model in the floor plan recognition method provided by the present invention;
[0041] Figure 6 It is a structural schematic diagram of the floor plan recognition device provided by the present invention;
[0042] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0043] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0044] Currently, obtaining house layout information typically requires manual labor from floor plan drawings. This is especially true for older homes, which often only have paper documentation. Therefore, manual labor is required. This method is not only slow and time-consuming, but also requires significant expertise, significantly increasing labor costs. To address this issue, embodiments of the present invention provide a floor plan recognition method.
[0045] Figure 1 FIG. 1 is a flow chart of a floor plan recognition method provided in an embodiment of the present invention, as shown in FIG. Figure 1 As shown, the method includes:
[0046] S1, obtain the floor plan to be identified;
[0047] S2, extracting the outer edge features and key area features of the floor plan to be identified, and determining the floor plan information in the floor plan to be identified based on the outer edge features and key area features of the floor plan.
[0048] Specifically, the floor plan recognition method provided in the embodiment of the present invention is executed by a floor plan recognition device, which can be configured in a server. The server can be a local server or a cloud server. The local server can specifically be a computer, a tablet computer, a smart phone, etc., and this is not specifically limited in the embodiment of the present invention.
[0049] First, step S1 is executed to obtain a floor plan to be identified. The floor plan to be identified refers to the floor plan whose floor plan information needs to be determined. The floor plan to be identified can generally include blueprints, white drawings, scanned drawings, and CAD drawings. The floor plan to be identified generally includes all floor plan areas and public areas on a floor, and the public areas are generally surrounded by the floor plan areas. In addition, the floor plan to be identified may also include noise information such as the dimensions of each floor plan area and the public areas, and information about the person who drew the drawings.
[0050] Then, step S2 is executed to extract features from the floor plan to be identified, determining the outer edge features of the floor plan and the features of the key area of the floor plan in the floor plan to be identified. The outer edge features of the floor plan refer to the edge features of the key area of the floor plan in the floor plan to be identified. The key area of the floor plan refers to the area formed by all floor plan areas and the public area in the floor plan to be identified. Therefore, the outer edge features of the floor plan can be the outer edge features of all floor plan areas in the floor plan to be identified. Here, the outer edge features of the floor plan can be represented by the outer edge point features of all floor plan areas in the floor plan to be identified.
[0051] The key area features of the apartment type refer to the regional features of the key area of the apartment type in the apartment type diagram to be identified, and may include at least one of the local edge features of the apartment type, the global features of the apartment type, and the local features of the apartment type. The local edge features of the apartment type refer to the edge features of each apartment type area, the global features of the apartment type refer to the global features of the key area of the apartment type, and the local features of the apartment type refer to the regional features of each apartment type area, that is, the local features in the key area of the apartment type.
[0052] In the embodiment of the present invention, the feature extraction process can be understood as a feature encoding process, which can be implemented by a neural network model. The neural network model can be a convolutional neural network model, a deep neural network model, etc. An attention mechanism can also be introduced into the neural network model so that the features obtained are all attention features. No specific limitation is made here. Before applying the neural network model for feature extraction, the initial neural network model needs to be trained so that the trained neural network model has feature extraction capabilities. In addition, sparse matrix, principal component analysis and other methods can also be used for feature extraction.
[0053] Here, when extracting local edge features from key area features of a floor plan, the floor plan to be identified can be first converted into a binary floor plan, and then feature extraction can be performed on the binary floor plan to obtain local edge features of the floor plan. When extracting global features from key area features of a floor plan, the floor plan to be identified can be first denoised, retaining only the key area of the floor plan to obtain a denoised floor plan, and then feature extraction can be performed on the denoised floor plan to obtain global features of the floor plan.
[0054] After extracting the outer edge features and key area features of the floor plan, the floor plan information of the floor plan to be identified can be determined by combining these features. Floor plan information refers to floor plan-related information contained in the floor plan to be identified, and may include, for example, at least one of floor plan segmentation information, floor plan classification information, and edge information corresponding to the floor plan segmentation information. The floor plan segmentation information may be the segmentation results corresponding to each floor plan area in the floor plan to be identified. This segmentation result may be a probability map of each floor plan area obtained by segmenting the floor plan to be identified. This segmentation result may be the same size as the floor plan to be identified, with only useful areas retained and unused areas filled with black.
[0055] The apartment classification information may be the apartment type corresponding to each apartment area in the floor plan to be identified, such as three bedrooms and one living room, three bedrooms and two living rooms, or two bedrooms and two living rooms. The edge information corresponding to the apartment segmentation information refers to the edge information corresponding to each apartment area in the floor plan to be identified, which may be the coordinate information of each edge point or an edge line formed by sequentially connecting the edge points.
[0056] Among them, the edge information corresponding to the apartment classification information and the apartment segmentation information can be understood as high-level semantic representations.
[0057] In an embodiment of the present invention, apartment type information can be obtained using the apartment type's outer edge features and apartment type's key area features. Here, a correspondence between the apartment type's outer edge features, apartment type's key area features, and apartment type information can be pre-established based on apartment type sample drawings. Then, based on the apartment type's outer edge features and apartment type's key area features of the apartment type drawings to be identified, the apartment type information can be obtained by combining these correspondences. Furthermore, the apartment type information can be obtained by performing fusion decoding on the apartment type's outer edge features and apartment type's key area features. The fusion decoding process can also be implemented using a neural network model, which is not specifically limited here.
[0058] The floor plan recognition method provided in an embodiment of the present invention first obtains the floor plan to be recognized; then, it extracts the outer edge features and key area features of the floor plan; and based on these features, determines the floor plan information in the floor plan to be recognized. This method eliminates the need for human intervention during floor plan recognition, significantly improving the recognition speed and reducing both time and labor costs. Furthermore, by extracting multimodal features such as the outer edge features and key area features, the accuracy of floor plan recognition can be improved.
[0059] Based on the above embodiment, the floor plan recognition method provided in the embodiment of the present invention, wherein the floor plan information in the floor plan to be recognized is determined based on the floor plan outer edge features and the floor plan key area features, specifically includes:
[0060] Fusing the outer edge features of the apartment type and the key area features of the apartment type to obtain apartment type fusion features;
[0061] The apartment type information is determined based on the apartment type fusion feature.
[0062] Specifically, in an embodiment of the present invention, when determining the floor plan information in a floor plan to be identified based on floor plan outer edge features and floor plan key area features, the floor plan outer edge features and floor plan key area features can be first fused to obtain a floor plan fusion feature. Since the floor plan key area features include at least one of the floor plan local edge features, the floor plan global features, and the floor plan local features, when performing feature fusion, the floor plan outer edge features can be fused with the floor plan local edge features, the floor plan global features, or the floor plan local features; the floor plan outer edge features can also be fused with any two of the floor plan local edge features, the floor plan global features, and the floor plan local features; or the floor plan outer edge features, the floor plan local edge features, the floor plan global features, and the floor plan local features can all be fused.
[0063] Feature fusion can be achieved directly through weighted summation or through a neural network model, which can be a convolutional neural network model, a deep neural network model, etc., which is not specifically limited here. Here, feature fusion can be achieved by splicing and fusing features by channel.
[0064] Then, the apartment type information is determined based on the apartment type fusion features obtained by feature fusion. This process can also be a feature decoding process, where the apartment type fusion features can be decoded by a neural network model to obtain the apartment type information output by the neural network model.
[0065] In the embodiment of the present invention, by fusing the outer edge features of the apartment type and the key area features of the apartment type, and then determining the apartment type information according to the obtained apartment type fusion features, the precision and accuracy of the apartment type information can be improved.
[0066] Based on the above embodiment, in the floor plan recognition method provided in the embodiment of the present invention, the key area features of the floor plan include at least two of the floor plan local edge features, the floor plan global features, and the floor plan local features;
[0067] Accordingly, the unit type outer edge features and the unit type key area features are fused to obtain the unit type fusion features, which specifically include:
[0068] Fusing the characteristics of the key area of the apartment type to determine the regional fusion characteristics;
[0069] The regional fusion feature, the unit type outer edge feature, and each feature of the unit type key area feature are fused to obtain the unit type fusion feature.
[0070] Specifically, the key area features of the apartment type may include at least two of the local edge features of the apartment type, the global features of the apartment type and the local features of the apartment type. It may be a combination of any two of the local edge features of the apartment type, the global features of the apartment type and the local features of the apartment type, or it may be a combination of the three local edge features of the apartment type, the global features of the apartment type and the local features of the apartment type.
[0071] On this basis, when integrating the apartment type fusion features, two fusions can be performed: first, the features in the key area features of the apartment type can be integrated to determine the regional fusion features, and then the regional fusion features, the outer edge features of the apartment type, and the features in the key area features of the apartment type can be integrated to obtain the apartment type fusion features. This can further ensure the precision and accuracy of the apartment type information.
[0072] Based on the above embodiment, in the floor plan recognition method provided in the embodiment of the present invention, the floor plan information includes at least one of floor plan outer edge information, floor plan segmentation information, floor plan classification information, and edge information corresponding to the floor plan segmentation information.
[0073] Specifically, in an embodiment of the present invention, the information included in the apartment type information can be selected as needed, including at least one of the apartment type outer edge information, apartment type segmentation information, apartment type classification information, and edge information corresponding to the apartment type segmentation information. This can meet the user's demand for a variety of apartment type information and improve the user experience.
[0074] Based on the above embodiment, the floor plan recognition method provided in the embodiment of the present invention, wherein the floor plan information in the floor plan to be recognized is determined based on the floor plan outer edge features and the floor plan key area features, comprises:
[0075] Determining the outer edge information of the apartment type based on the outer edge features of the apartment type;
[0076] De-noising the floor plan to be identified based on the outer edge information of the floor plan to obtain a de-noised floor plan;
[0077] Feature extraction is performed on the denoised floor plan to obtain global features of the apartment type.
[0078] Specifically, in embodiments of the present invention, when determining the global characteristics of a unit type within the key unit type area characteristics, the unit type outer edge information can be determined based on the unit type outer edge characteristics. This unit type outer edge information can be outer edge information of the key unit type area, and can include outer edge points of the key unit type area, coordinate information of each outer edge point, and an outer edge line formed by sequentially connecting each outer edge point. Here, the unit type outer edge information can be obtained by decoding the unit type edge characteristics.
[0079] The number of outer edge points is not fixed, and can be a few key points on the outer edge or all key points on the outer edge. The more key points there are, the greater the amount of calculation required. Conversely, the fewer key points there are, the smaller the amount of calculation required. Figure 2 For the case where the outer edge points of the key area of the apartment are a few key points on the outer edge, Figure 3 The outer edge points of the key area of the apartment are all the key points on the outer edge.
[0080] When obtaining the coordinate information of each outer edge point of the key area of the apartment type, you can first obtain the Gaussian heat map of each outer edge point, and then take the point coordinates of the maximum value on each Gaussian heat map as the coordinate information of the outer edge point corresponding to the Gaussian heat map.
[0081] Then, based on the outer edge information of the floor plans, the floor plans to be identified are denoised. Here, the floor plans to be identified can be first fused with the outer edge information. That is, the floor plans to be identified can be segmented based on the outer edge information to obtain the key floor plan areas within the floor plans to be identified, i.e., the denoised floor plans. It can be understood that the greater the number of outer edge points, the more accurate the key floor plan areas obtained. Conversely, the fewer the number of outer edge points, the coarser the key floor plan areas obtained, and the less computational effort required. Figure 4 To get a schematic diagram of the denoised plane, Figure 4 In the figure, “+” indicates fusion, “=” indicates the fusion result, the image on the left of “+” indicates the floor plan to be identified, the image on the right of “+” indicates the outer edge information of the floor plan, and the image on the right of “=” indicates the fusion result, that is, the denoised floor plan.
[0082] Finally, by encoding and decoding the denoised floor plan, the global characteristics of the apartment type can be obtained.
[0083] In an embodiment of the present invention, the outer edge information of the floor plan to be identified is first denoised using the outer edge features of the floor plan, and then the global features of the floor plan are quickly extracted, thereby improving the efficiency of floor plan recognition and reducing time costs.
[0084] Based on the above embodiment, the floor plan recognition method provided in the embodiment of the present invention, wherein the method extracts the floor plan outer edge features and floor plan key area features of the floor plan to be recognized, and determines the floor plan information in the floor plan to be recognized based on the floor plan outer edge features and the floor plan key area features, specifically includes:
[0085] Inputting the floor plan to be identified into a floor plan recognition model, extracting floor plan outer edge features and floor plan key area features of the floor plan to be identified based on the floor plan recognition model, and determining floor plan information in the floor plan to be identified based on the floor plan outer edge features and the floor plan key area features;
[0086] The floor plan recognition model is trained based on floor plan samples that carry floor plan information labels.
[0087] Specifically, in an embodiment of the present invention, when executing step S2, a neural network model can be used to extract features and determine the floor plan information. Here, the neural network model can be a floor plan recognition model. When the floor plan to be recognized is input into the floor plan recognition model, the floor plan recognition model can output the floor plan information in the floor plan to be recognized.
[0088] Here, the floor plan recognition model can be trained using floor plan samples with floor plan information labels. Floor plan information labels can include floor plan segmentation information labels, floor plan classification information labels, and edge information labels corresponding to floor plan segmentation information labels. Furthermore, floor plan information labels can also include floor plan outer edge information labels.
[0089] In the embodiment of the present invention, the floor plan recognition model is used to determine the floor plan information in the floor plan to be recognized, which can greatly improve the efficiency of floor plan recognition and reduce the amount of calculation.
[0090] Based on the above embodiment, in the floor plan recognition method provided in the embodiment of the present invention, the floor plan recognition model includes a first branch for extracting the outer edge features of the floor plan, and a second branch for extracting the key area features of the floor plan;
[0091] The floor plan recognition model is determined based on the following steps:
[0092] Based on the first type of floor plan samples carrying the outer edge information labels of the floor plans, an initial detection model including the initial first type of branches is trained to obtain the first type of branches;
[0093] An initial recognition model including the first type of branches and the initial second type of branches is constructed, and the initial recognition model is trained based on the second type of floor plan samples carrying at least one of the floor plan segmentation information labels, the floor plan classification information labels, and the edge information labels corresponding to the floor plan segmentation information labels to obtain the floor plan recognition model.
[0094] Specifically, in an embodiment of the present invention, the floor plan recognition model may include a first branch and a second branch. The first branch is used to extract the floor plan outer edge features and can also be used to determine the floor plan outer edge information based on the floor plan outer edge features. The second branch is used to extract the floor plan key area features and can also be used to determine the floor plan information in the floor plan to be recognized based on the floor plan outer edge features and the floor plan key area features.
[0095] Accordingly, the floor plan information tag may include a floor plan outer edge information tag, and at least one of a floor plan segmentation information tag, a floor plan classification information tag, and an edge information tag corresponding to the floor plan segmentation information. Floor plan samples carrying floor plan outer edge information tags may be recorded as first-category floor plan samples, while floor plan samples carrying at least one of a floor plan segmentation information tag, a floor plan classification information tag, and an edge information tag corresponding to the floor plan segmentation information may be recorded as second-category floor plan samples.
[0096] Therefore, the training process of obtaining the floor plan recognition model can be divided into two stages. In the first stage, the initial detection model containing the initial first-class branch can be trained based on the first-class floor plan sample to obtain the first-class branch. Here, the initial first-class branch refers to the first-class branch before training, and the initial detection model refers to the model with the initial first-class branch as the core. It needs to be trained to enable it to have the function of detecting the outer edge information of the floor plan. After training, a detection model can be obtained, and the first-class branch contained in the detection model is recorded as the first-class branch obtained after training. In this training stage, the mean square error loss function can be used to calculate the gradient value, and feedback training can be performed until the initial detection model converges.
[0097] In the second stage, an initial recognition model including the first type of branch and the initial second type of branch can be constructed. Here, the initial second type of branch refers to the second type of branch before training, and the initial recognition model refers to a model with the first type of branch and the initial second type of branch as the core, which needs to be trained to enable it to have the function of recognizing apartment type information. Then, combined with the second type of apartment type sample, the initial recognition model can be trained, and after training, the final apartment type recognition model can be obtained. In this training stage, at least one of the arcface distance loss function, mean square error loss function, and cross entropy loss function in the angular space can be used to calculate the gradient value, and feedback training can be performed until the initial recognition model converges.
[0098] In the embodiment of the present invention, through two-stage training, after the first stage training, the first type of branches obtained by the first stage training can be directly used, which greatly shortens the training time of the second stage and reduces the training cost.
[0099] Figure 5 This is a schematic diagram of the structure of the floor plan recognition model provided in an embodiment of the present invention. Figure 5 As shown, the first type of branch may include a first input branch and a first output branch, and the second type of branch may include at least one of a second input branch, a third input branch, and a fourth input branch, and at least one of a second output branch, a third output branch, and a fourth output branch. The second type of branch also includes a first fusion unit and a second fusion unit.
[0100] Extracting the outer edge features of the floor plan to be identified through the first input branch;
[0101] Determining the outer edge information of the apartment type based on the outer edge characteristics of the apartment type through the first output branch;
[0102] Through the second input branch, based on the attention mechanism, the global features of the apartment type are extracted from the key area features of the apartment type;
[0103] Through the third input branch, based on the attention mechanism, the local features of the apartment type are extracted from the key area features of the apartment type;
[0104] Through the fourth input branch, based on the attention mechanism, the local edge features of the apartment type are extracted from the key area features of the apartment type.
[0105] By means of a first fusion unit, at least two of the local edge features of the apartment type, the global features of the apartment type, and the local features of the apartment type are fused to obtain an alternative fusion result;
[0106] By means of a second fusion unit, at least two of the candidate fusion results, the unit type outer edge features, the unit type local edge features, the unit type global features, and the unit type local features are fused to obtain a unit type fusion feature;
[0107] Determining, through the second output branch, the apartment type segmentation information of the apartment type diagram to be identified based on the apartment type fusion feature;
[0108] Determining, through a third output branch, the apartment type classification information of the apartment type diagram to be identified based on the apartment type fusion feature;
[0109] Through the fourth output branch, based on the apartment type fusion feature, edge information corresponding to the apartment type segmentation information of the apartment type diagram to be identified is determined.
[0110] Among them, the first input branch, the second input branch, the third input branch and the fourth input branch can all include different encoders and convolution modules, the first output branch and the second input branch can both include a decoder composed of multiple deconvolution layers, and the third output branch and the fourth output branch can both include a convolution layer and multiple fully connected layers.
[0111] It should be noted that the floor plan recognition model also includes a third fusion unit, through which the floor plan to be identified and the outer edge information of the floor plan can be fused to obtain a denoised floor plan, and then the denoised floor plan can be input into the second input branch. The second input branch is based on the attention mechanism to extract the global features of the floor plan from the key area features of the floor plan.
[0112] The floor plan recognition model also includes a binarization layer, through which the floor plan to be identified can be binarized to obtain a binary floor plan. The binary floor plan can then be input into the fourth input branch. The fourth input branch uses an attention mechanism to extract the local edge features of the floor plan from the key area features of the floor plan.
[0113] Based on the above embodiment, the second output branch can adopt the arcface distance loss function in the angular space based on the metric learning method; the third output branch can adopt the cross entropy loss function; and the fourth output branch can adopt the mean square error loss function.
[0114] After the two training phases are completed, a testing phase can also be included. In the testing phase, a floor plan sample can be input into the floor plan recognition model. After passing through the floor plan recognition model, the second output branch obtains a segmentation probability map, and the argmax function outputs the pixel-by-pixel classification result, that is, the floor plan segmentation information of the floor plan sample. The third output branch obtains a high-level semantic representation, which outputs the floor plan classification information of the floor plan sample through a simple distance metric or combined with a machine learning classification algorithm. The fourth output branch obtains the edge points of each floor plan area, and the Gaussian heat map of each edge point is obtained, and the coordinates of the point with the maximum value on each Gaussian heat map are taken as the coordinate information of the corresponding edge point. Here, in the testing phase, the first output branch does not need to output the result.
[0115] In the embodiment of the present invention, different loss functions are used for training to obtain a floor plan recognition model, which can avoid the influence of the selection of the loss function on the accuracy of the floor plan recognition model.
[0116] like Figure 6 As shown, based on the above embodiment, an embodiment of the present invention provides a floor plan recognition device, including:
[0117] A floor plan acquisition module 61 is used to acquire a floor plan to be identified;
[0118] The floor plan recognition module 62 is used to extract the floor plan outer edge features and floor plan key area features of the floor plan to be recognized, and determine the floor plan information in the floor plan to be recognized based on the floor plan outer edge features and the floor plan key area features.
[0119] On the basis of the above embodiments, the floor plan recognition device provided in the embodiments of the present invention, wherein the floor plan recognition module specifically includes:
[0120] A fusion submodule, configured to fuse the outer edge features of the apartment type and the key area features of the apartment type to obtain an apartment type fusion feature;
[0121] The identification submodule is used to determine the apartment type information based on the apartment type fusion feature.
[0122] On the basis of the above embodiment, in the apparatus for identifying floor plans provided in the embodiment of the present invention, the key floor plan area features include at least two of the floor plan local edge features, the floor plan global features, and the floor plan local features;
[0123] Accordingly, the fusion submodule is specifically used to:
[0124] Fusing the characteristics of the key area of the apartment type to determine the regional fusion characteristics;
[0125] The regional fusion feature, the unit type outer edge feature, and each feature of the unit type key area feature are fused to obtain the unit type fusion feature.
[0126] Based on the above embodiment, in the floor plan recognition device provided in the embodiment of the present invention, the floor plan information includes at least one of floor plan outer edge information, floor plan segmentation information, floor plan classification information, and edge information corresponding to the floor plan segmentation information.
[0127] Based on the above embodiment, the floor plan recognition device provided in the embodiment of the present invention further includes a floor plan key area feature determination module, which is used to:
[0128] Determining the outer edge information of the apartment type based on the outer edge features of the apartment type;
[0129] De-noising the floor plan to be identified based on the outer edge information of the floor plan to obtain a de-noised floor plan;
[0130] Feature extraction is performed on the denoised floor plan to obtain global features of the apartment type.
[0131] On the basis of the above embodiments, the floor plan recognition device provided in the embodiments of the present invention, wherein the floor plan recognition module is specifically configured to:
[0132] Inputting the floor plan to be identified into a floor plan recognition model, extracting floor plan outer edge features and floor plan key area features of the floor plan to be identified based on the floor plan recognition model, and determining floor plan information in the floor plan to be identified based on the floor plan outer edge features and the floor plan key area features;
[0133] The floor plan recognition model is trained based on floor plan samples that carry floor plan information labels.
[0134] Based on the above embodiment, in the floor plan recognition device provided in the embodiment of the present invention, the floor plan recognition model includes a first branch for extracting the outer edge features of the floor plan, and a second branch for extracting the key area features of the floor plan;
[0135] The floor plan recognition model is determined based on the following steps:
[0136] Based on the first type of floor plan samples carrying the outer edge information labels of the floor plans, an initial detection model including the initial first type of branches is trained to obtain the first type of branches;
[0137] An initial recognition model including the first type of branches and the initial second type of branches is constructed, and the initial recognition model is trained based on the second type of floor plan samples carrying at least one of the floor plan segmentation information labels, the floor plan classification information labels, and the edge information labels corresponding to the floor plan segmentation information labels to obtain the floor plan recognition model.
[0138] Specifically, the functions of each module in the floor plan recognition device provided in the embodiment of the present invention correspond one-to-one to the operating procedures of each step in the above-mentioned method embodiment, and the effects achieved are also consistent. Please refer to the above-mentioned embodiment for details, and no further details will be given in the embodiment of the present invention.
[0139] Figure 7 An example of a physical structure diagram of an electronic device is shown below. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other via the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the floor plan recognition method provided in the above embodiments, which includes: obtaining a floor plan to be recognized; extracting floor plan outer edge features and floor plan key area features of the floor plan to be recognized, and determining the floor plan information in the floor plan to be recognized based on the floor plan outer edge features and the floor plan key area features.
[0140] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0141] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the floor plan recognition method provided in the above embodiments, which method includes: obtaining the floor plan to be identified; extracting the floor plan outer edge features and floor plan key area features of the floor plan to be identified, and determining the floor plan information in the floor plan to be identified based on the floor plan outer edge features and the floor plan key area features.
[0142] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the floor plan recognition method provided in the above-mentioned embodiments, the method comprising: obtaining the floor plan to be identified; extracting the floor plan outer edge features and floor plan key area features of the floor plan to be identified, and determining the floor plan information in the floor plan to be identified based on the floor plan outer edge features and the floor plan key area features.
[0143] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0144] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0145] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A floor plan recognition method, characterized in that: include: Obtaining a floor plan to be identified; the floor plan to be identified includes all apartment areas and public areas on a floor, and the public area is surrounded by all apartment areas; Extracting the outer edge features and key area features of the floor plan to be identified, and determining the floor plan information in the floor plan to be identified based on the outer edge features and key area features; the key area features refer to the area features of the key area of the floor plan in the floor plan to be identified, and the key area of the floor plan refers to the area formed by all floor plan areas and public areas in the floor plan to be identified; The key area features of the apartment type include at least two of the edge features of each apartment type area, the global features of the key area of the apartment type, and the regional features of each apartment type area; The determining of the apartment type information in the to-be-identified apartment type diagram based on the apartment type outer edge features and the apartment type key area features specifically includes: Fusing the characteristics of the key area of the apartment type to determine the regional fusion characteristics; Fusing the regional fusion feature, the unit type outer edge feature, and the unit type key area feature to obtain a unit type fusion feature; Decoding the apartment type fusion features based on a neural network model to determine the apartment type information; Among them, feature fusion is to splice and fuse features by channel.
2. The floor plan recognition method according to claim 1, characterized in that: The determining of the apartment type information in the to-be-identified apartment type diagram based on the apartment type outer edge features and the apartment type key area features includes: Determining the outer edge information of the apartment type based on the outer edge features of the apartment type; De-noising the floor plan to be identified based on the outer edge information of the floor plan to obtain a de-noised floor plan; Feature extraction is performed on the denoised floor plan to obtain global features of key areas of the apartment type.
3. The floor plan recognition method according to any one of claims 1-2, characterized in that: The apartment type information includes at least one of apartment type outer edge information, apartment type segmentation information, apartment type classification information, and edge information corresponding to the apartment type segmentation information.
4. The floor plan recognition method according to any one of claims 1-2, characterized in that: The extracting of the outer edge features and key area features of the floor plan to be identified, and determining the floor plan information in the floor plan to be identified based on the outer edge features and key area features of the floor plan, specifically includes: Inputting the floor plan to be identified into a floor plan recognition model, extracting floor plan outer edge features and floor plan key area features of the floor plan to be identified based on the floor plan recognition model, and determining floor plan information in the floor plan to be identified based on the floor plan outer edge features and the floor plan key area features; The floor plan recognition model is trained based on floor plan samples that carry floor plan information labels.
5. The floor plan recognition method according to claim 4, characterized in that: The floor plan recognition model includes a first branch for extracting features of the outer edges of the floor plan and a second branch for extracting features of key areas of the floor plan; The floor plan recognition model is determined based on the following steps: Based on the first type of floor plan samples carrying the outer edge information labels of the floor plans, an initial detection model including the initial first type of branches is trained to obtain the first type of branches; An initial recognition model including the first type of branches and the initial second type of branches is constructed, and the initial recognition model is trained based on the second type of floor plan samples carrying at least one of the floor plan segmentation information labels, the floor plan classification information labels, and the edge information labels corresponding to the floor plan segmentation information labels to obtain the floor plan recognition model.
6. A floor plan recognition device, characterized in that: include: A floor plan acquisition module is used to acquire a floor plan to be identified; the floor plan to be identified includes all floor plan areas and public areas on a floor, and the public area is surrounded by all floor plan areas; A floor plan recognition module is configured to extract floor plan outer edge features and floor plan key area features of the floor plan to be recognized, and determine floor plan information in the floor plan to be recognized based on the floor plan outer edge features and the floor plan key area features; the floor plan key area features refer to area features of the floor plan key area in the floor plan to be recognized, and the floor plan key area refers to the area formed by all floor plan areas and public areas in the floor plan to be recognized; The key area features of the apartment type include at least two of the edge features of each apartment type area, the global features of the key area of the apartment type, and the regional features of each apartment type area; The floor plan recognition module is specifically used for: Fusing the characteristics of the key area of the apartment type to determine the regional fusion characteristics; Fusing the regional fusion feature, the unit type outer edge feature, and the unit type key area feature to obtain a unit type fusion feature; Decoding the apartment type fusion features based on a neural network model to determine the apartment type information; Among them, feature fusion is to splice and fuse features by channel.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the floor plan recognition method according to any one of claims 1 to 5 are implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the floor plan recognition method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
House type image recognition method combined with direction sensing kernel cluster
CN113591929A