A method and electronic device for reviewing architectural drawings
By segmenting public areas and interior rooms in architectural drawings, identifying elevator and staircase types, and using OCR and furniture detection models to verify annotation text, the problem of inaccurate architectural drawing review has been solved, achieving higher review accuracy.
Patent Information
- Application Number
- CN202310622943.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-05-30
AI Technical Summary
The review of architectural drawings in the current technology is not accurate, especially when the actual function of the rooms in the public area does not match the labeling or the labeling is missing, which makes it impossible to accurately identify the room type.
By obtaining the interior room areas and public areas from the architectural drawings, the elevator and staircase areas and the vestibule area are segmented, the types of elevators and staircases are identified, and architectural association recognition is performed based on these types. OCR text detection and furniture detection models are used to proofread the room function label text to improve the accuracy of the review.
It improved the accuracy of architectural drawing review, solved the problems of inconsistent room function labels in public areas and difficulties in identification caused by the lack of labeling text, and ensured the accuracy of the review.
Smart Images

Figure CN117115845B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of architectural drawing review technology, and more particularly to a method and electronic device for reviewing architectural drawings. Background Technology
[0002] Currently, the existing method for reviewing architectural drawings is to first identify room functions using an OCR text detection model, then identify rooms based on the identified room functions, and finally conduct a standardization review on the identified rooms.
[0003] However, in the process of developing this invention, the inventors discovered at least the following problems in the existing technology: During batch drawing analysis, discrepancies may arise between the actual function of rooms in public areas and the labeled room functions, or rooms in public areas may lack labeled room functions, leading to issues related to the review of architectural drawings. For example, if the anteroom public area is described as a connecting corridor, the review software will review the anteroom according to the corridor-based standard, resulting in inaccurate review of the architectural drawings. Furthermore, if all rooms in the public area lack labeled room functions, and the existing methods for reviewing architectural drawings are based on recognizing the spatial function labels in the drawings, the drawings may fail to recognize these labels. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a method and electronic device for reviewing architectural drawings, which solves the technical problem of inaccurate review of architectural drawings in the prior art.
[0006] (II) Technical Solution
[0007] To achieve the above objectives, the main technical solutions adopted by the present invention include:
[0008] In a first aspect, embodiments of the present invention provide a method for reviewing architectural drawings, comprising: obtaining architectural drawings to be reviewed; wherein the architectural drawings to be reviewed include an interior room area and a public area other than the interior room area, and the public area includes an elevator staircase area and a vestibule area other than the elevator staircase area, and room function labeling text on the public area having at least some of the rooms in the public area; segmenting the public area from the architectural drawings to be reviewed; identifying the elevator staircase area from the public area, and determining the elevator type corresponding to the elevator area and the staircase type corresponding to the staircase area in the elevator staircase area; performing architectural association identification on the vestibule area based on the elevator type and staircase type to determine the vestibule type corresponding to the vestibule area; and reviewing the architectural drawings to be reviewed using the staircase type, elevator type, and vestibule type to obtain architectural drawing review results.
[0009] It should be noted that the drawings in this application embodiment do not refer to paper-based drawings, but rather to architectural drawings created using various software programs. For example, the drawings could be CAD drawings.
[0010] In one possible embodiment, segmenting the public area from the architectural drawings to be reviewed includes: inputting the architectural drawings to be reviewed into a pre-trained room outline detection model to obtain room outline location information of all rooms in the architectural drawings to be reviewed; determining the location information of indoor room areas based on the room outline location information; and segmenting the public area from the architectural drawings to be reviewed based on the location information of indoor room areas.
[0011] In one possible embodiment, before inputting the architectural drawings to be reviewed into a pre-trained room outline detection model, the method further includes: training an initial room outline detection model to obtain a trained room outline detection model; wherein the room outline detection model includes an input layer, a first multi-layer convolutional layer, a second multi-layer convolutional layer, a first concat layer, a second concat layer, a first feature segmentation layer, a second feature segmentation layer, and a processing layer; the training process of the initial room outline detection model includes: obtaining training sample drawings and training labels through the input layer; performing convolution processing on the training sample drawings through the first multi-layer convolutional layer to obtain a first convolution processing result, and performing convolution processing on the training labels through the second multi-layer convolutional layer to obtain a second convolution processing result; and performing convolution processing on the training labels through the first concat layer to obtain a second convolution processing result; and performing convolution processing on the training samples through the first concat layer to obtain a second convolution processing result; and performing convolution processing on the training samples through the first concat layer to obtain a second concat processing result; and performing convolution processing on the training samples through the first concat layer to obtain a second concat processing result; and performing convolution processing on the training samples through the second multi-layer convolutional layer to obtain a second concat processing result; and performing convolution processing on the training samples through the first concat layer to obtain a second concat processing result; and performing convolution processing on the training samples through the second concat ... second concat layer to obtain a second concat processing result; and performing convolution processing on the training samples through the second concat layer to obtain a second concat processing result; and performing convolution processing on the The `cat` layer merges the channels of the first and second convolutional processing results to obtain the first channel merged result. The first feature segmentation layer divides the first convolutional processing result into S*S non-overlapping first local features, and the second feature segmentation layer divides the second convolutional processing result into S*S non-overlapping second local features; S is a preset positive integer. The second `Concat` layer merges the first channel merged result, the S*S non-overlapping first local features, and the S*S non-overlapping second local features to obtain the second channel merged result. The processing layer detects room contour location information based on the second channel merged result to obtain the training result. The initial room contour detection model is adjusted using the training result to obtain a trained room contour detection model.
[0012] In one possible embodiment, the processing layer includes a Transformer layer, a first convolutional layer, a first normalization layer, an activation function layer, and a second convolutional layer; wherein, the Transformer layer is used to extract temporal features based on the second channel merging result, the first convolutional layer performs convolution processing on the temporal features to obtain a third convolution processing result, the first normalization layer normalizes the third convolution processing result to obtain a normalized processing result, the activation function layer activates the normalized processing result to obtain an activation processing result, and the second convolutional layer performs convolution processing on the activation processing result to obtain a training result.
[0013] In one possible embodiment, determining the location information of an indoor room area based on room outline location information includes: segmenting all room areas from the architectural drawings to be reviewed based on the room outline location information; inputting an image of the first room area into a pre-trained OCR text detection model to obtain a first text detection result; wherein, the first room area is any one of the room areas in the architectural drawings to be reviewed; if the first text detection result indicates that the first room area has corresponding room function label text and that the corresponding room function label text is related to the indoor room area, then the first room area is determined to be an indoor room area; if the first text detection result indicates that the first room area does not have corresponding room function label text and that indoor furniture exists within the first room area, then the first room area is determined to be an indoor room area.
[0014] In one possible embodiment, when the first text detection result indicates that the first room region does not have corresponding room function label text and it is determined that there is indoor furniture in the first room region, determining the first room region as an indoor room region includes: when the first text detection result indicates that the first room region does not have corresponding room function label text, inputting the image of the first room region into a pre-trained furniture detection model to obtain the furniture category of the furniture in the first room region; wherein, the furniture detection model includes a third multi-layer convolutional layer, a feature pyramid layer, a second normalization layer, and a softmax classification layer, the third multi-layer convolutional layer is used to perform convolution processing on the image of the first room region to obtain a fourth convolution processing result, the feature pyramid layer is used to perform convolutional feature extraction on the fourth convolution processing result to obtain a feature extraction result, the second normalization layer is used to normalize the feature extraction result to obtain a second normalization processing result, and the softmax classification layer is used to classify the second normalization processing result to obtain the furniture category; when the furniture category is the furniture category corresponding to indoor furniture, the first room region is determined as an indoor room region.
[0015] In one possible embodiment, identifying an elevator staircase area from a public area includes: determining the location information of all room areas within the public area based on room outline location information; inputting an image of a second room area into a pre-trained elevator staircase detection model to obtain an elevator staircase detection result; wherein the second room area is any one of the room areas within the public area, and the elevator staircase detection model includes a feature extraction layer, an image feature fusion layer, a weight adjustment layer, and a prediction classification layer. The feature extraction layer is used to extract elevator staircase features, including staircase features, from the image of the second room area; the image feature fusion layer is used to perform image feature fusion on the extracted elevator staircase features to obtain an image feature fusion result; the weight adjustment layer is used to balance the weights of other features in the staircase features besides the step features; and the prediction classification layer is used to identify the elevator staircase based on the output of the weight adjustment layer to obtain an elevator staircase detection result; if the elevator staircase detection result indicates the existence of an elevator staircase, the second room area is determined to be an elevator staircase area.
[0016] In one possible embodiment, when there are room function labeling texts for at least some public area rooms in a public area, the architectural drawings to be reviewed are examined using staircase type, elevator type, and vestibule type to obtain architectural drawing review results. This includes: verifying the staircase type, elevator type, and vestibule type using room function labeling texts to obtain verification results; and reviewing the architectural drawings to be reviewed based on the verification results to obtain architectural drawing review results.
[0017] In one possible embodiment, the architectural drawings to be reviewed are reviewed based on the proofreading results to obtain architectural drawing review results, including: if the proofreading results show that at least one of the staircase type, elevator type, and vestibule type and its corresponding room function label text are inconsistent, the architectural drawings to be reviewed are reviewed based on at least one type to obtain architectural drawing review results.
[0018] In one possible embodiment, elevator types include stretcher elevators, smoke-proof elevators, and accessible elevators, and stair types include scissor stairs and ordinary stairs.
[0019] Secondly, embodiments of this application provide a storage medium storing a computer program, which, when executed by a processor, performs the method described in the first aspect or any optional implementation thereof.
[0020] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the method described in the first aspect or any optional implementation of the first aspect.
[0021] Fourthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the method in the first aspect or any possible implementation thereof.
[0022] (III) Beneficial Effects
[0023] The beneficial effects of this invention are:
[0024] This application embodiment obtains architectural drawings to be reviewed, which include indoor room areas and public areas other than the indoor room areas. The public areas include elevator and staircase areas and anteroom areas other than the elevator and staircase areas. The process involves segmenting the public areas from the architectural drawings to be reviewed, identifying the elevator and staircase areas from the public areas, determining the elevator type corresponding to the elevator area and the staircase type corresponding to the staircase area in the elevator and staircase areas, and performing architectural association identification on the anteroom areas based on the elevator and staircase types to determine the anteroom type corresponding to the anteroom areas. The architectural drawings to be reviewed are then reviewed using the staircase type, elevator type, and anteroom type to obtain architectural drawing review results. This not only avoids the problem of discrepancies between the actual functions of the rooms in the public areas and the room function labels, thus improving the accuracy of architectural drawing review, but also solves the technical problem of unidentifiable rooms due to the lack of room function labels on the public areas.
[0025] To make the above-mentioned objectives, features and advantages to be achieved by the embodiments of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 A schematic diagram of a method for reviewing architectural drawings provided in an embodiment of this application is shown;
[0028] Figure 2 This illustration shows a structural schematic diagram of a room contour detection model provided in an embodiment of this application;
[0029] Figure 3 This paper shows a schematic diagram of the structure of a furniture inspection model provided in an embodiment of this application;
[0030] Figure 4 A schematic diagram of the structure of an elevator staircase detection model provided in an embodiment of this application is shown. Detailed Implementation
[0031] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0032] Current technology uses drafting software to obtain textual information primitives and identifies room types by whether the text is located within a room. However, drafting software cannot support text position correction, and font variations can cause positional offsets, resulting in text that does not accurately represent a common area. For example, the text "kitchen" might be misplaced on the stairs, or in a shared anteroom space, the common area might be identified as a kitchen for regulatory review. Furthermore, current mainstream technology involves exporting images from drawings and using OCR text detection models to identify text for common area recognition. However, inconsistencies between room types and text can occur during the engineer's drafting process; for example, the text "anteroom" might be standardized as "living room," leading to the common area being identified as a living room. Additionally, some drawings lack any text in common areas, making it impossible for existing OCR text detection models to identify room types.
[0033] Based on this, this application provides a scheme for reviewing architectural drawings. The scheme involves obtaining architectural drawings to be reviewed, which include indoor room areas and public areas excluding the indoor room areas. The public areas include elevator and staircase areas and anteroom areas excluding the elevator and staircase areas. The scheme involves segmenting the public areas from the architectural drawings, identifying the elevator and staircase areas within the public areas, determining the elevator type corresponding to the elevator area and the staircase type corresponding to the staircase area within the elevator and staircase areas, performing architectural association identification on the anteroom areas based on the elevator and staircase types to determine the anteroom type corresponding to the anteroom areas, and reviewing the architectural drawings using the staircase type, elevator type, and anteroom type to obtain the architectural drawing review results. This not only avoids the problem of discrepancies between the actual functions of the rooms in the public areas and the room function labels, thus improving the accuracy of architectural drawing review, but also solves the technical problem of unidentifiable rooms due to the lack of room function labels on the public areas.
[0034] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.
[0035] Please see Figure 1 , Figure 1 This illustration shows a schematic diagram of a method for reviewing architectural drawings according to an embodiment of this application. It should be understood that this method can be executed by an electronic device, and the specific device can be configured according to actual needs; this embodiment is not limited thereto. For example, the electronic device can be a computer, a server, etc. Specifically, the method includes:
[0036] Step S110: Obtain the architectural drawings to be reviewed. The architectural drawings to be reviewed include the interior room area and the public area other than the interior room area, and the public area includes the elevator staircase area and the anteroom area other than the elevator staircase area.
[0037] It should be noted that although this description uses room function labels for at least some rooms in a public area as an example, those skilled in the art should understand that even if none of the rooms in the public area have room function labels, the room functions of the rooms in the public area can still be identified according to the solution of this application.
[0038] Step S120: Separate the public area from the architectural drawings to be reviewed.
[0039] It should be understood that the specific process of dividing public areas from the architectural drawings to be reviewed can be set according to actual needs, and the embodiments of this application are not limited thereto.
[0040] Optionally, the architectural drawings to be reviewed are input into a pre-trained room outline detection model to obtain the room outline location information of all rooms in the architectural drawings to be reviewed; based on the room outline location information, the location information of the indoor room area is determined; based on the location information of the indoor room area, the public area is segmented from the architectural drawings to be reviewed.
[0041] It should also be understood that the specific model structure of the room contour detection model can be set according to actual needs, and the embodiments of this application are not limited thereto.
[0042] Alternatively, the connected components of each room can be obtained by directly segmenting the drawing. However, due to the complexity of the line segments in the drawing, algorithms such as Segnet, Unetv3, SAM, and Open-VocabularySegment may segment two adjacent rooms as a single room outline, or segment rooms containing furniture as a single room.
[0043] To resolve the above issues, please refer to [link / reference]. Figure 2 , Figure 2 A schematic diagram of the structure of a room contour detection model provided in an embodiment of this application is shown. Figure 2 As shown, the room contour detection model includes an input layer, a first multi-layer convolutional layer, a second multi-layer convolutional layer, a first concat layer, a second concat layer, a first feature segmentation layer, a second feature segmentation layer, and a processing layer. The processing layer includes a Transformer layer, a first convolutional layer, a first normalization layer, an activation function layer, and a second convolutional layer.
[0044] In the training process of the aforementioned room contour detection model, training sample drawings and training labels are obtained through the input layer. The training sample drawings can be architectural drawings used for training, and the training labels can be room contour points. The training sample drawings are then convolved through a first multi-layer convolutional layer to obtain a first convolutional processing result, which may include features such as room color and texture. The training labels are then convolved through a second multi-layer convolutional layer to obtain a second convolutional processing result, which represents the geometric contour features of the room's connected components.
[0045] Furthermore, the first convolution processing result and the second convolution processing result are channel merged (or spliced, or channel merged, which can be considered as increasing the thickness of the data) through the first Concat layer to obtain the first channel merged result. Furthermore, in order to learn the abstract features of each adjacent room boundary, as well as the logical abstract features of furniture and room architecture, the first convolution processing result can be divided into S*S non-overlapping first local features through the first feature partitioning layer, and the second convolution processing result can be divided into S*S non-overlapping second local features through the second feature partitioning layer; S is a preset positive integer, and the first channel merging result, the S*S non-overlapping first local features, and the S*S non-overlapping second local features can be merged through the second Concat layer to obtain the second channel merging result. Thus, the training sample drawings and training labels can be merged through the last layer of two multi-layer convolutions to obtain basic global features, and the results of the two convolution processing can be divided into S*S non-overlapping local detail features. The basic global features and local detail features are then fused to obtain the multi-dimensional feature vector of drawing architecture association (i.e., the second channel merging result). Thus, the global layout features of each room and the abstract features of each adjacent room boundary, as well as the logical abstract features of furniture and room architecture can be obtained.
[0046] Furthermore, the Transformer layer is used to extract temporal features based on the second channel merging result. That is, in the image-based sequence, global and local component building association features of the drawing room can be established to extract image temporal features. The deep structure of the Transformer allows for higher levels of abstraction than multiple convolutional layers. The first convolutional layer performs convolution processing on the temporal features to obtain the third convolution processing result. The first normalization layer normalizes the third convolution processing result to obtain the normalized processing result. The activation function layer is used to activate the normalized processing result to obtain the activation processing result. The second convolutional layer is used to perform convolution processing on the activation processing result to obtain the training result.
[0047] It should be noted that since the weights and other information obtained during the training of the training labels are stored in the model, once the room outline detection model is trained, only the architectural drawings to be reviewed need to be input.
[0048] It should also be understood that the specific layer structure of each layer in the room contour detection model can be set according to actual needs, and the embodiments of this application are not limited thereto.
[0049] Optionally, the first multi-layer convolutional layer comprises n contiguous convolutional layers, where n is a positive integer greater than 5 and less than 12.
[0050] Optionally, the second multi-layer convolutional layer also includes n convolutional layers connected together, where n is a positive integer greater than 5 and less than 12.
[0051] It should also be understood that the specific process of determining the location information of the indoor room area based on the room outline location information can also be set according to actual needs, and the embodiments of this application are not limited thereto.
[0052] Optionally, based on the room outline location information, all room areas are segmented from the architectural drawings to be reviewed. The image of the first room area can also be input into a pre-trained OCR text detection model to obtain a first text detection result. The first room area is any one of the room areas in the architectural drawings to be reviewed. Furthermore, if the first text detection result indicates that the first room area has corresponding room function labeling text and that the corresponding room function labeling text is related to an indoor room area, then the first room area is determined to be an indoor room area. For example, if the first text detection result indicates that the first room area has corresponding room function labeling text and that the room function labeling text for the first room area is "kitchen," then the first room area is determined to be an indoor room area; if the first text detection result indicates that the first room area does not have corresponding room function labeling text and that indoor furniture is present within the first room area, then the first room area is determined to be an indoor room area.
[0053] It should be understood that the OCR text detection model can be an existing OCR text detection model, as long as it can recognize the room function label text. The embodiments of this application are not limited to this.
[0054] It should also be understood that the specific process for determining whether there is indoor furniture in the first room area can be set according to actual needs, and the embodiments of this application are not limited thereto.
[0055] Optionally, if the first text detection result indicates that the first room region does not have corresponding room function labeling text, the image of the first room region is input into a pre-trained furniture detection model to obtain the furniture category of the furniture within the first room region. If the furniture category corresponds to the furniture category of indoor furniture, the first room region is determined to be an indoor room region, and room function can be mapped through furniture. For example, if the furniture category is toilet, the first room region can be determined to be an indoor toilet.
[0056] It should also be understood that the specific model structure of the furniture inspection model can be set according to actual needs, and the embodiments of this application are not limited thereto.
[0057] Optionally, such as Figure 3 As shown, Figure 3A schematic diagram of the structure of a furniture inspection model provided in an embodiment of this application is shown. Figure 3 As shown, the furniture detection model includes a third multi-layer convolutional layer, a feature pyramid layer, a second normalization layer, and a softmax classification layer. The third multi-layer convolutional layer performs convolution processing on the image of the first room region to obtain a fourth convolution processing result. The feature pyramid layer performs convolutional feature extraction on the fourth convolution processing result to obtain a feature extraction result. The second normalization layer normalizes the feature extraction result to obtain a second normalized processing result. The softmax classification layer classifies the second normalized processing result to obtain the furniture category. The furniture category can be, for example, a toilet or a bed.
[0058] Step S130: Identify the elevator stair area from the public area, and determine the elevator type corresponding to the elevator area and the stair type corresponding to the stair area in the elevator stair area. The elevator stair area may include an elevator area and / or a stair area.
[0059] It should be understood that the specific process for identifying elevator stairwell areas from public areas can also be set according to actual needs, and the embodiments of this application are not limited thereto.
[0060] Optionally, based on the room outline location information, the location information of all room areas within the public area is determined; the image of the second room area is input into a pre-trained elevator and staircase detection model to obtain elevator and staircase detection results. Here, the second room area can be any room area among all room areas within the public area; for example, the elevator and staircase detection result could be that the second room area is a stairwell, or that the second room area is an elevator shaft. If the elevator and staircase detection result indicates the existence of an elevator and staircase, the second room area is determined to be the elevator and staircase area.
[0061] It should be understood that the specific model structure of the elevator staircase detection model can be further set according to the actual situation, and the embodiments of this application are not limited thereto.
[0062] Optionally, such as Figure 4 As shown, Figure 4 A schematic diagram of the structure of an elevator staircase detection model provided in an embodiment of this application is shown. Figure 4As shown, the elevator staircase detection model includes a feature extraction layer, an image feature fusion layer, a weight adjustment layer, and a prediction classification layer. The feature extraction layer is used to extract elevator staircase features, including staircase features, from the image of the second room area. The image feature fusion layer is used to perform image feature fusion on the extracted elevator staircase features to obtain the image feature fusion result. The weight adjustment layer is used to balance the weights of other features in the staircase features besides the step features (e.g., the arrow direction and step symbols of the staircase). (For example, the weights of other features such as the arrow direction and step symbols of the staircase can be increased slightly.) The prediction classification layer is used to identify the elevator staircase based on the output of the weight adjustment layer to obtain the elevator staircase detection result.
[0063] In other words, if the elevator staircase detection model detects steps and a stairwell, it can be identified as a stairwell; and if it detects a car, it can be identified as an elevator shaft.
[0064] It should also be understood that the specific layer structure of each floor in the elevator staircase detection model can be set according to actual needs, and the embodiments of this application are not limited thereto.
[0065] Optionally, the feature extraction layer can be a large-scale network such as MobileNet, ShuffleNet, or a backbone network.
[0066] Optionally, the image feature fusion layer can be an FPA layer.
[0067] Optionally, the weight adjustment layer can consist of SPPF and CoupledHead.
[0068] It should be noted that, in order to avoid confusion between elevator steps and stairs, as well as between the steps at the entrance of the first floor and the steps in the stairwell, this application adds SPPF to fuse multi-dimensional information and also adds CoupledHead to extract higher-dimensional features. In addition, there are arrows and section symbols on these steps, such as those not present on the steps of the first floor, so as to learn more abstract features and thus accurately identify the steps of the stairs.
[0069] Optionally, the prediction classification layer can be PredictObject.
[0070] It should also be understood that the specific method for determining the elevator type corresponding to the elevator area and the stair type corresponding to the stair area in the elevator stair zone can also be set according to actual needs, and the embodiments of this application are not limited thereto.
[0071] Optionally, NLP (Natural Language Processing) is used to extract and classify the descriptive text information into staircases (e.g., scissor stairs and regular stairs) and elevator types (e.g., smoke-proof elevators and stretcher elevators, etc.).
[0072] Step S140: Based on elevator type and stair type, perform building association identification on the vestibule area to determine the vestibule type corresponding to the vestibule area.
[0073] Specifically, identification is achieved through architectural connections and room topology between other vestibule areas, staircases, and elevators. For example, if a scissor staircase and a smoke-proof staircase are connected to the same room, and there are at least two scissor staircases leading to this three-in-one vestibule, and a regular staircase and a smoke-proof staircase are connected to the same room, this room can be classified as a shared vestibule.
[0074] Step S150: Review the architectural drawings to be reviewed using staircase type, elevator type, and vestibule type to obtain architectural drawing review results.
[0075] Specifically, the image of the second room region is input into a pre-trained OCR text detection model to obtain the second text detection result. The second room region is any one of the room regions within the public area.
[0076] If the document's detection result indicates that room function labeling text exists in the second room area, the room function labeling text in the second room area and its corresponding type (e.g., staircase type, elevator type, or anteroom type) are checked or compared to determine whether they are consistent. If they are consistent, the check result is that they are the same; if they are inconsistent, the check result is that they are different.
[0077] For example, if the room function label in the current second room area is "elevator" and the above steps confirm that the current second room area is an elevator, then the verification result is that the two are the same.
[0078] Furthermore, if the proofreading results show inconsistencies between at least one of the staircase type, elevator type, and vestibule type and the corresponding room function labeling text, the architectural drawings to be reviewed shall be examined based on at least one type to obtain the architectural drawing review results.
[0079] In other words, the identified room type in the public area is compared with the detection result of the second document. If they are inconsistent, the room type in the public area identified through the above steps shall prevail, and building association identification shall be performed on it.
[0080] For example, if the room function label in the current second room area is "stairs" and the current second room area is determined to be an elevator through the above steps, then the verification result is that the two are the same. In this case, the actual type of the current second room area can be associated with the elevator type determined through the above steps, and the current second room area can be reviewed based on the relevant standards and specifications for elevators.
[0081] In summary, when there are room function labels for at least some public area rooms in the public area (e.g., the room function label for the elevator area is "elevator"), the room function labels are used to verify the staircase type, elevator type, and anteroom type to obtain verification results; the architectural drawings to be reviewed are then reviewed based on the verification results to obtain architectural drawing review results.
[0082] Furthermore, if the verification result shows that the room function label text on the current second room area is consistent with the type determined through the above steps, then the room function label text on the current second room area can be used as the standard, and the architectural drawings to be reviewed can be reviewed based on the room function label text on the current second room area to obtain the architectural drawing review result.
[0083] Furthermore, if the document's detection result indicates that there are no room function labeling texts in the second room area, the architectural drawings to be reviewed can be examined based on the types of public area rooms identified in the above steps, in order to obtain the architectural drawing review results.
[0084] It should be noted that the review of architectural drawings can also be improved by pre-establishing a standard database and matching the drawings to be reviewed with the standard database.
[0085] Therefore, this application, by adopting a patch approach and designing a network model using a transformer, can simultaneously acquire the global layout features of each room, the boundaries of each adjacent room, and the abstract details of furniture and room architecture logic. This allows for accurate segmentation of each room on the drawing. Indoor rooms are then identified through furniture or text, with the remaining room areas designated as public areas. Object detection in the public areas identifies staircases and elevators, with elevators and staircases being the core rooms. Identification and text verification are performed by associating elevators / staircases with the remaining public area architecture. A standardized database is established after verification, and finally, the drawing's rationality and standardization are reviewed to improve accuracy. Thus, this application not only solves the problem of inconsistencies between public area rooms and text, but also addresses the classification of public areas without text, and resolves the problem of room classification errors caused by text primitive offset.
[0086] It should be understood that the above-described method for reviewing architectural drawings is merely exemplary, and those skilled in the art can make various modifications based on the above method, and the modified solutions also fall within the protection scope of this application.
[0087] This application provides an electronic device including a processor, a memory, and a computer program stored in the memory, wherein the processor executes the computer program to implement the methods described in the embodiments.
[0088] Furthermore, this application also provides a storage medium storing a computer program that, when executed by a processor, performs the methods described in the embodiments.
[0089] Furthermore, this application also provides a computer program product that, when run on a computer, causes the computer to perform the method described in the method embodiment.
[0090] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0091] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions.
[0092] It should be noted that any reference numerals placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In claims that enumerate several means, several of these means may be embodied by the same hardware. The use of the terms first, second, third, etc., is merely for convenience of expression and does not indicate any order. These terms can be understood as part of the component names.
[0093] Furthermore, it should be noted that in the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0094] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the claims should be interpreted to include both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0095] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, then this invention should also include these modifications and variations.
Claims
1. A method of reviewing construction drawings, characterized by, The method is applied to an electronic device, and the method comprises: obtaining a to-be-inspected architectural drawing; wherein the to-be-inspected architectural drawing comprises an indoor room area and a public area other than the indoor room drawing area, and the public area comprises an elevator stair area and an anteroom area other than the elevator stair area; segmenting the public area from the to-be-inspected architectural drawing; identifying the elevator stair area from the public area, and determining an elevator type corresponding to an elevator area in the elevator stair area and a stair type corresponding to a stair area in the elevator stair area; performing architectural correlation identification on the anteroom area based on the elevator type and the stair type to determine an anteroom type corresponding to the anteroom area; performing inspection on the to-be-inspected architectural drawing by using the stair type, the elevator type and the anteroom type to obtain an architectural drawing inspection result; the segmentation of the public area from the to-be-inspected architectural drawing comprises: inputting the to-be-inspected architectural drawing into a pre-trained room contour detection model to obtain room contour position information of all rooms in the to-be-inspected architectural drawing; determining position information of the indoor room area based on the room contour position information; segmenting the public area from the to-be-inspected architectural drawing based on the position information of the indoor room area; before the inputting of the to-be-inspected architectural drawing into the pre-trained room contour detection model, the method further comprises: training an initial room contour detection model to obtain a trained room contour detection model; wherein the room contour detection model comprises an input layer, a first multi-layer convolutional layer, a second multi-layer convolutional layer, a first Concat layer, a second Concat layer, a first feature division layer, a second feature division layer and a processing layer; the training process of the initial room contour detection model comprises: obtaining a training sample drawing and a training label through the input layer; performing convolutional processing on the training sample drawing through the first multi-layer convolutional layer to obtain a first convolutional processing result, and performing convolutional processing on the training label through the second multi-layer convolutional layer to obtain a second convolutional processing result; performing channel merging on the first convolutional processing result and the second convolutional processing result through the first Concat layer to obtain a first channel merging result; dividing the first convolutional processing result into S*S non-overlapping first local features through the first feature division layer, and dividing the second convolutional processing result into S*S non-overlapping second local features through the second feature division layer; S is a preset positive integer; performing channel merging on the first channel merging result, the S*S non-overlapping first local features and the S*S non-overlapping second local features through the second Concat layer to obtain a second channel merging result; performing detection of room contour position information based on the second channel merging result through the processing layer to obtain a training result; The initial room contour detection model is adjusted based on the training result to obtain the trained room contour detection model.
2. The method of claim 1, wherein, The processing layer includes a Transformer layer, a first convolution layer, a first normalization layer, an activation function layer, and a second convolution layer; the Transformer layer is configured to extract time sequence features based on the second channel merging result; the first convolution layer is configured to perform convolution processing on the time sequence features to obtain a third convolution processing result; the first normalization layer is configured to perform normalization processing on the third convolution processing result to obtain a normalization processing result; the activation function layer is configured to perform activation processing on the normalization processing result to obtain an activation processing result; and the second convolution layer is configured to perform convolution processing on the activation processing result to obtain the training result.
3. The method of claim 1, wherein, The position information of the indoor room area is determined based on the room contour position information, including: All room areas are segmented from the building drawing under review based on the room contour position information; An image of a first room area is input into a pre-trained OCR text detection model to obtain a first text detection result; the first room area is any one of the room areas of the building drawing under review; In a case where the first text detection result indicates that the first room area has corresponding room function annotation text and it is determined that the corresponding room function annotation text of the first room area is related to the room function annotation text of the indoor room area, the first room area is determined to be the indoor room area. In a case where the first text detection result indicates that the first room area does not have corresponding room function annotation text and it is determined that there is indoor furniture in the first room area, the first room area is determined to be the indoor room area.
4. The method of claim 3, wherein, The case where the first text detection result indicates that the first room area does not have corresponding room function annotation text and it is determined that there is indoor furniture in the first room area, includes: In a case where the first text detection result indicates that the first room area does not have corresponding room function annotation text, an image of the first room area is input into a pre-trained furniture detection model to obtain a furniture category of furniture in the first room area; the furniture detection model includes a third multi-layer convolution layer, a feature pyramid layer, a second normalization layer, and a softmax classification layer; the third multi-layer convolution layer is configured to perform convolution processing on the image of the first room area to obtain a fourth convolution processing result; the feature pyramid layer is configured to perform convolution feature extraction on the fourth convolution processing result to obtain a feature extraction result; the second normalization layer is configured to perform normalization processing on the feature extraction result to obtain a second normalization processing result; and the softmax classification layer is configured to classify the second normalization processing result to obtain the furniture category. In a case where the furniture category is a furniture category corresponding to the indoor furniture, the first room area is determined as the indoor room area.
5. The method of claim 1, wherein, The identifying the elevator stair area from the common area comprises: Based on the room contour position information, position information of all room areas in the common area is determined. An image of a second room area is input into a pre-trained elevator stair detection model to obtain an elevator stair detection result, wherein the second room area is any one of the room areas in the common area, and the elevator stair detection model comprises a feature extraction layer, an image feature fusion layer, a weight adjustment layer, and a prediction classification layer, the feature extraction layer is configured to extract elevator stair features including stair features from the image of the second room area, the image feature fusion layer is configured to perform image feature fusion on the extracted elevator stair features to obtain an image feature fusion result, the weight adjustment layer is configured to balance the weights of features other than step features in the stair features, and the prediction classification layer is configured to identify the elevator stair based on the output of the weight adjustment layer to obtain the elevator stair detection result. In a case where the elevator stair detection result is that there is an elevator stair, the second room area is determined as the elevator stair area.
6. The method of claim 1, wherein, In a case where the common area has room function annotation text of at least part of the common area room, the reviewing the to-be-reviewed architectural drawing based on the stair type, the elevator type, and the anteroom type to obtain an architectural drawing review result comprises: The stair type, the elevator type, and the anteroom type are proofread based on the room function annotation text to obtain a proofread result; The to-be-reviewed architectural drawing is reviewed based on the proofread result to obtain the architectural drawing review result.
7. The method of claim 6, wherein, The reviewing the to-be-reviewed architectural drawing based on the proofread result to obtain the architectural drawing review result comprises: In a case where the proofread result is that at least one type of the stair type, the elevator type, and the anteroom type and the corresponding room function annotation text are inconsistent, the to-be-reviewed architectural drawing is reviewed based on the at least one type to obtain the architectural drawing review result.
8. An electronic device comprising a processor, a memory, and a computer program stored on the memory, wherein the computer program, when executed by the processor, is arranged to perform the method of any one of claims 1 to 7. The processor executes the computer program to implement the method for reviewing an architectural drawing according to any one of claims 1-7.
Citation Information
Patent Citations
Architectural drawing automatic recognition method based on boundary scanning algorithm
CN113626907A
Method for accurately identifying stair anterior chamber in CAD drawing
CN114022894A