[go: up one dir, main page]

CN116259065A - Space identification method, device, equipment and readable storage medium - Google Patents

Space identification method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN116259065A
CN116259065A CN202111509256.1A CN202111509256A CN116259065A CN 116259065 A CN116259065 A CN 116259065A CN 202111509256 A CN202111509256 A CN 202111509256A CN 116259065 A CN116259065 A CN 116259065A
Authority
CN
China
Prior art keywords
space
identified
target
identification
curve
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111509256.1A
Other languages
Chinese (zh)
Inventor
梁雄
丁博文
谭文宇
杨振樱
刘大娣
郭义武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Glodon Co Ltd
Original Assignee
Glodon Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Glodon Co Ltd filed Critical Glodon Co Ltd
Priority to CN202111509256.1A priority Critical patent/CN116259065A/en
Publication of CN116259065A publication Critical patent/CN116259065A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of building drawing identification and discloses a space identification method, a device, equipment and a readable storage medium. Wherein the method comprises the following steps: acquiring a target drawing, and identifying characteristic information of a space to be identified contained in the target drawing; constructing a closed curve of the space to be identified based on the characteristic information and the target graphic element, and determining a space candidate set corresponding to the space to be identified; and deleting the non-space curve of the space to be identified from the space candidate set to obtain a target space set corresponding to the space to be identified. By implementing the method and the device, the layers of the target drawing are not required to be identified, the interference of space identification of the layer conversion pictures is avoided, meanwhile, component identification forming a space is not relied on, component identification errors are prevented from being transmitted to the space identification, and the accuracy of the space identification in the target drawing is improved.

Description

Space identification method, device, equipment and readable storage medium
Technical Field
The invention relates to the technical field of building drawing identification, in particular to a space identification method, a device, equipment and a readable storage medium.
Background
With the development of computer technology, drawing tools gradually replace manual drawing, wherein the most widely applied computer aided design (Computer Aided Design, CAD) is used in industries such as construction, machinery and the like, usually, drawing staff can carry out space definition according to own needs when carrying out construction drawing, however, the space definition standards of CAD drawings are different, at present, space identification in the construction drawings needs to identify components constituting the construction space, the components are extracted and converted into pictures by depending on layers in the CAD, edges of the identification space are detected and identified based on edges, a closure search algorithm is used for obtaining a closed space in the pictures, small spaces with a certain threshold are filtered, and finally, the names of the spaces are determined through characters in the search space.
However, in an actual building engineering drawing, there are various cases where layers are mixed, and components (such as walls, doors, windows, etc.) constituting a space are identified, so that component identification errors are transmitted to the space identification, and components constituting the space can be separated according to the layers.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a space recognition method, apparatus, device, and readable storage medium, so as to solve the problem that it is difficult to accurately recognize a target building space in a CAD drawing.
According to a first aspect, an embodiment of the present invention provides a spatial identification method, including: acquiring a target drawing, and identifying characteristic information of a space to be identified and target graphic elements of the space to be identified, which are contained in the target drawing; constructing a closed curve of the space to be identified based on the characteristic information and the target primitive, and determining a space candidate set corresponding to the space to be identified; and deleting the non-space curve of the space to be identified from the space candidate set to obtain a target space set corresponding to the space to be identified.
According to the space identification method provided by the embodiment of the invention, the characteristic information of the space to be identified and the target graphic element of the space to be identified are identified, the closed curve of the space to be identified is constructed according to the characteristic information and the target graphic element, the space candidate set corresponding to the space to be identified is determined, and the non-space curve of the space to be identified is deleted from the space candidate set, so that the target space set corresponding to the space to be identified is obtained. According to the method, the layers of the target drawing are not required to be identified, interference of space identification of the layer conversion pictures is avoided, meanwhile, component identification forming a space is not relied on, component identification errors are prevented from being transmitted to the space identification, and the accuracy of the space identification in the target drawing is improved.
With reference to the first aspect, in a first implementation manner of the first aspect, identifying feature information of a space to be identified included in the target drawing includes: identifying text primitives contained in the target drawing, and determining name text primitives of the space to be identified; acquiring coordinate information of the name text primitive, and calculating center coordinates of the name text primitive; and determining the center coordinates as characteristic information of the space to be identified.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, identifying the target primitive of the space to be identified includes: acquiring a primitive object and a composition mode of the target drawing; filtering text class primitives corresponding to the target drawing based on the type attribute of the primitive object to obtain a first primitive set corresponding to the target drawing; filtering out the primitives which do not meet the preset rules from the first primitive set based on the preset rules corresponding to the composition modes, and obtaining a second primitive set corresponding to the target drawing; and filtering out space identification interference primitives corresponding to the space to be identified from the second primitive set to obtain target primitives of the space to be identified.
According to the space recognition method provided by the embodiment of the invention, the text graphic primitives contained in the target drawing are recognized to determine the name text graphic primitives of the space to be recognized, and the central coordinates of the name text graphic primitives are determined as the characteristic information of the space to be recognized, so that the central position corresponding to the space to be recognized is determined, and the recognition efficiency of the space to be recognized is improved. Meanwhile, all the primitives of the target drawing are filtered based on the type attribute of the primitive object and the preset rule corresponding to the composition mode, and the interference primitives affecting the space recognition are filtered, so that the target primitives corresponding to the space to be recognized are obtained to construct a closed curve corresponding to the space to be recognized, the accurate recognition of the target primitives is ensured, and the space recognition accuracy of the target drawing is further ensured.
With reference to the first aspect, in a third implementation manner of the first aspect, the constructing a closed curve of the space to be identified based on the feature information and the target primitive, and determining a space candidate set corresponding to the space to be identified includes: acquiring a target position of the characteristic information; constructing a closed curve around the target position based on the target primitive; and correlating the closed curve with the characteristic information to obtain a space candidate set corresponding to the space to be identified.
According to the space recognition method provided by the embodiment of the invention, the closed curve surrounding the characteristic information is obtained by obtaining the target position surrounding the characteristic information, constructing the closed curve surrounding the target position based on the target graphic element, and correlating the closed curve with the characteristic information to obtain the space candidate set corresponding to the space to be recognized, so that the closed curve corresponding to the space to be recognized can be obtained more comprehensively, even if the space to be recognized is an irregular space, the closed curve corresponding to the space can be constructed by recognizing the target graphic element, and the recognition error of the space is avoided to a greater extent.
With reference to the first aspect, in a fourth implementation manner of the first aspect, the deleting the non-spatial curve of the space to be identified from the spatial candidate set includes: judging whether each closed curve in the space candidate set is a non-space curve or not; and deleting the non-space curve when the closed curve is the non-space curve.
With reference to the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the determining whether each closed curve in the spatial candidate set is a non-spatial curve includes: acquiring identification confidence corresponding to each closed curve in the space candidate set; and taking the closed curve with the confidence coefficient smaller than a preset value as the non-space curve.
With reference to the fourth implementation manner of the first aspect, in a sixth implementation manner of the first aspect, the determining whether each closed curve in the spatial candidate set is a non-spatial curve includes: judging whether the closed curve in the space candidate set is a member closed curve or not; when the closed curve is the member closed curve, the member closed curve is taken as the non-space curve.
According to the space recognition method provided by the embodiment of the invention, as the closed curves in the space candidate set possibly have non-space curves, the non-space curves in the space candidate set need to be deleted at the moment, so that the closed curves in the space candidate set correspond to the space to be recognized, the influence of the non-space curves on the space recognition of the target drawing is avoided, and the recognition accuracy of the space to be recognized is further improved.
With reference to the first aspect, in a seventh implementation manner of the first aspect, the method further includes: acquiring a candidate space set of the space to be identified; judging whether the space to be identified has an adjacent pavement space or not; and searching adjacent spaces corresponding to the space to be identified from the candidate space set when the space to be identified does not exist adjacent pavement spaces, and determining the adjacent spaces as the pavement spaces.
With reference to the seventh implementation manner of the first aspect, in an eighth implementation manner of the first aspect, the acquiring the candidate space set of the space to be identified includes: acquiring an internal cavity space between two non-adjacent spaces to be identified; judging whether the internal cavity space is a building internal space or not; when the interior void space is a building interior space, the interior void space is determined as the candidate space set.
According to the space identification method provided by the embodiment of the invention, the candidate space set of the space to be identified is obtained, whether the space to be identified has the adjacent pavement space is judged, when the space to be identified does not have the adjacent pavement space, the adjacent space corresponding to the space to be identified is searched from the candidate space set, and the adjacent space is determined to be the pavement space, so that the missing identification of special spaces such as the pavement space is avoided, and the integrity of space identification is ensured.
With reference to the first aspect or any implementation manner of the first to eighth implementation manners of the first aspect, in a ninth implementation manner of the first aspect, the method further includes: displaying the space identification information of the target drawing; and responding to the identification error instruction corresponding to the space identification information, and filtering error information corresponding to the identification error instruction.
According to the space recognition method provided by the embodiment of the invention, the space recognition information of the target drawing is displayed, so that a user can confirm whether errors exist in the recognition information in the space recognition process, and when the errors exist, the error information corresponding to the recognition error instruction can be filtered in response to the recognition error instruction corresponding to the space recognition information, so that the error information is prevented from affecting the space recognition, and the space recognition accuracy in the target drawing is further improved.
According to a second aspect, an embodiment of the present invention provides a spatial recognition apparatus, including: the acquisition module is used for acquiring a target drawing and identifying characteristic information of a space to be identified and target primitives of the space to be identified, which are contained in the target drawing; the construction module is used for constructing a closed curve of the space to be identified based on the characteristic information and the target graphic element, and determining a space candidate set corresponding to the space to be identified; and the identification module is used for deleting the non-space curve of the space to be identified from the space candidate set to obtain a target space set corresponding to the space to be identified.
According to a third aspect, an embodiment of the present invention provides an electronic device, including: the space identification system comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions so as to execute the space identification method according to the first aspect or any implementation mode of the first aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where the computer readable storage medium stores computer instructions for causing a computer to perform the spatial identification method according to the first aspect or any implementation manner of the first aspect.
It should be noted that, the description of the corresponding content in the spatial identification method is omitted herein for brevity, and the spatial identification device, the electronic device and the computer readable storage medium provided in the embodiments of the present invention have corresponding beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a spatial identification method according to an embodiment of the present invention;
FIG. 2 is another flow chart of a spatial identification method according to an embodiment of the invention;
FIG. 3 is another flow chart of a spatial identification method according to an embodiment of the invention;
FIG. 4 is another flow chart of a spatial identification method according to an embodiment of the invention;
FIG. 5 is a block diagram of a space recognition apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In accordance with an embodiment of the present invention, there is provided an embodiment of a spatial identification method, it being noted that the steps shown in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order other than that shown or described herein.
In this embodiment, a space recognition method is provided, which may be used in an electronic device, such as a mobile phone, a tablet computer, a computer, etc., fig. 1 is a flowchart of a space recognition method according to an embodiment of the present invention, and as shown in fig. 1, the flowchart includes the following steps:
s11, acquiring a target drawing, and identifying feature information of a space to be identified and target graphic elements of the space to be identified, which are contained in the target drawing.
The target drawing is a building vector drawing with the design completed, and can be designed by a technician through CAD drawing software, can be imported by external storage equipment, can be obtained from a local storage space, is not particularly limited, and can be determined according to actual needs by the technician.
The space to be identified is a building space corresponding to a room in the target drawing, and the characteristic information of the space to be identified is used for representing the characteristic of the space to be identified, wherein the characteristic information can be the name of the space to be identified, the type of the space to be identified and the like, and the target graphic element of the space to be identified is a line drawing element forming a closed polygon corresponding to the space to be identified. After the electronic device obtains the target drawing, the electronic device can identify text information and graphic information contained in the target drawing so as to determine the characteristic information of the space to be identified and the target graphic element of the space to be identified.
And S12, constructing a closed curve of the space to be identified based on the characteristic information and the target graphic element, and determining a space candidate set corresponding to the space to be identified.
The space candidate set is a set of candidate closed curves corresponding to the space to be identified. The closed curve is a closed polygon corresponding to the space to be identified, and the polygon may be regular or irregular. The electronic equipment takes the position of the characteristic information as the center, recognizes the target graphic elements around the center, and sequentially connects the target graphic elements based on the coordinate positions of the target graphic elements to obtain a closed curve taking the position of the characteristic information as the center, so that a plurality of closed curves can be obtained, and a space candidate set formed by the closed curves is obtained.
And S13, deleting a non-space curve of the space to be identified from the space candidate set to obtain a target space set corresponding to the space to be identified.
The target space set is a set of closed curves corresponding to the space to be identified. The non-space curve is a closed curve corresponding to other components or other spaces in the target drawing, i.e. the closed curve corresponding to the non-space curve does not correspond to the space to be identified. The electronic equipment can delete the non-space curve from the space candidate set to obtain a closed curve meeting the space to be identified, and the closed curve meeting the space to be identified forms a target space set, namely the closed curve in the target space set is a room which needs to be identified from the target drawing.
According to the space identification method provided by the embodiment, the characteristic information of the space to be identified and the target graphic element of the space to be identified are identified, the closed curve of the space to be identified is constructed according to the characteristic information and the target graphic element, the space candidate set corresponding to the space to be identified is determined, and the non-space curve of the space to be identified is deleted from the space candidate set, so that the target space set corresponding to the space to be identified is obtained. According to the method, the layers of the target drawing are not required to be identified, interference of space identification of the layer conversion pictures is avoided, meanwhile, component identification forming a space is not relied on, component identification errors are prevented from being transmitted to the space identification, and the accuracy of the space identification in the target drawing is improved.
In this embodiment, a space recognition method is provided, which may be used in an electronic device, such as a mobile phone, a tablet computer, a computer, etc., fig. 2 is a flowchart of the space recognition method according to an embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
s21, acquiring a target drawing, and identifying feature information of a space to be identified and target graphic elements of the space to be identified, which are contained in the target drawing.
Specifically, the step S21 may include:
S211, acquiring a target drawing. Detailed description reference is made to the corresponding related description of the above embodiments, and the detailed description is omitted here.
S212, identifying text primitives contained in the target drawing, and determining name text primitives of the space to be identified.
The target drawing usually has related text descriptions of room types and purposes, and other contents, such as door and window numbers, special practices and the like, are expressed by text. The electronic device identifies text primitives contained in the target drawing through a feature extractor, extracts text features expressing a space to be identified, and determines name text primitives corresponding to the space to be identified from the text primitives, wherein the feature extractor can adopt a regular algorithm, can also adopt a machine learning algorithm such as a random forest and a support vector machine which are common in the NLP field, can also adopt various common short text classification deep learning models such as Fasttext, bert and the like based on a neuron network, can also adopt other algorithms, is not limited in particular, and can be determined according to actual needs by a person skilled in the art.
S213, acquiring coordinate information of the name text primitive, and calculating center coordinates of the name text primitive.
The electronic equipment can establish a coordinate system corresponding to the target drawing, and determine the coordinate information of the name text primitive corresponding to the space to be identified based on the coordinate system, and further calculate the central coordinate value corresponding to the name text primitive according to the coordinate information of the name text primitive.
And S214, determining the center coordinates as characteristic information of the space to be identified.
The electronic equipment can take the center line coordinate as the characteristic information of the space to be identified, so that the electronic equipment can determine the position of the space to be identified in the target drawing according to the center coordinate of the name text primitive.
S215, obtaining a primitive object and a composition mode of the target drawing.
The primitive object is a structural object, such as a wall, a column and the like, which forms the building engineering in the target drawing. The patterning pattern is a pattern used when building a construction project from a structured object, such as an axial net. The electronic equipment can determine the structural object forming the building engineering by identifying each graphic element in the target drawing, and can determine the composition mode of the target drawing according to the placement form of each graphic element.
S216, filtering text class primitives corresponding to the target drawing based on the type attribute of the primitive object to obtain a first primitive set corresponding to the target drawing.
The type attribute is a category attribute of the primitive, such as a text primitive, a line segment primitive, and the like, and the electronic device can identify that the primitive in the target drawing is a text class primitive or a line segment primitive through the type attribute. When determining the target primitive corresponding to the space to be identified, the electronic device can efficiently and accurately filter text primitives affecting the space identification based on the type attribute, such as text primitives with size labeling, text numbers and the like, to obtain a first primitive set.
S217, filtering out the primitives which do not meet the preset rule from the first primitive set based on the preset rule corresponding to the composition mode, and obtaining a second primitive set corresponding to the target drawing.
The preset rule is a general drawing rule of the building engineering design, the electronic equipment traverses a plurality of primitives existing in the first primitive set, clusters and analyzes geometric configuration of primitive features, and filters out primitives which interfere with spatial recognition, namely primitives which do not meet the preset rule, so as to obtain a second primitive set which meets the preset rule. The preset rules are different according to different composition modes, for example, a line segment plus axis number plus circle mode is adopted in the axis network to conduct drawing, and then the electronic equipment can filter the first primitive set according to the preset rule mode corresponding to the axis network.
S218, filtering space identification interference primitives corresponding to the space to be identified from the second primitive set to obtain target primitives of the space to be identified.
The spatially identified interfering primitives are primitives that interfere with spatial identification. The electronic equipment basically completes the identification of the primitives corresponding to the space to be identified through the steps, and the identification of the space identification interference primitives such as the stair tread lines, the household appliances and furniture in the room and the like which are difficult to confirm can be carried out by adopting a neural network model. Specifically, the electronic device may convert the primitives difficult to confirm into matrix expressions, then input the primitives of the matrix expressions into a neural network model for target detection, so as to determine space identification interference primitives, and filter the space identification interference primitives from the second primitive set, so as to obtain target primitives corresponding to the space to be identified. The neural network model may be, but not limited to, an open source model such as YOLO, retinaNet, fast R-CNN, etc., or a self-developed neural network model, provided that detection of spatial recognition interference primitives can be achieved, and the neural network model is not particularly limited herein, and can be determined by a person skilled in the art according to actual needs.
S22, constructing a closed curve of the space to be identified based on the characteristic information and the target graphic element, and determining a space candidate set corresponding to the space to be identified.
Specifically, the step S22 may include:
s221, acquiring the target position of the characteristic information.
The target position of the feature information can represent the position of the space to be identified in the target drawing, and specifically, when the electronic equipment extracts the feature information corresponding to the space to be identified, the target position corresponding to the feature information can be determined according to the coordinate system where the target drawing is located.
S222, around the target position, constructing a closed curve based on the target graphic element.
And taking the target position as a central point of the space to be identified, expanding the electronic equipment around the target position, determining line primitives which can form a closed curve from the target graphic primitives, and generating the closed curve corresponding to the space to be identified according to the determined line primitives.
It should be noted that, the electronic device may perform preprocessing on the line elements obtained by forming the closed curve, and extend the disjoint line elements under a certain threshold value to ensure that the line elements in the innermost space to be identified form the closed curve.
And S223, correlating the closed curve with the characteristic information to obtain a space candidate set corresponding to the space to be identified.
The closed curve is constructed based on the characteristic information and the target graphic element, and the content space corresponding to the closed curve is the space to be identified corresponding to the characteristic information, so that the association relationship between the characteristic information and the closed curve is constructed. And the electronic equipment sequentially traverses the closed curves corresponding to all the characteristic information in the target drawing, and a space candidate set corresponding to the space to be identified in the target drawing can be obtained.
S23, deleting the non-space curve of the space to be identified from the space candidate set to obtain a target space set corresponding to the space to be identified. Detailed description reference is made to the corresponding related description of the above embodiments, and the detailed description is omitted here.
According to the space recognition method, the text graphic primitives contained in the target drawing are recognized to determine the name text graphic primitives of the space to be recognized, and the central coordinates of the name text graphic primitives are determined to be the characteristic information of the space to be recognized, so that the central position corresponding to the space to be recognized is determined, and the recognition efficiency of the space to be recognized is improved. Meanwhile, all the primitives of the target drawing are filtered based on the type attribute of the primitive object and the preset rule corresponding to the composition mode, and the interference primitives affecting the space recognition are filtered, so that the target primitives corresponding to the space to be recognized are obtained to construct a closed curve corresponding to the space to be recognized, the accurate recognition of the target primitives is ensured, and the space recognition accuracy of the target drawing is further ensured.
The closed curve surrounding the characteristic information is constructed based on the target graphic element, and the closed curve is associated with the characteristic information to obtain a space candidate set corresponding to the space to be identified, so that the closed curve corresponding to the space to be identified can be obtained more comprehensively, even if the space to be identified is an irregular space, the closed curve corresponding to the space to be identified can be constructed by identifying the target graphic element, and the identification error of the space is avoided to a greater extent.
In this embodiment, a space recognition method is provided, which may be used in an electronic device, such as a mobile phone, a tablet computer, a computer, etc., fig. 3 is a flowchart of the space recognition method according to an embodiment of the present invention, and as shown in fig. 3, the flowchart includes the following steps:
s31, acquiring a target drawing, and identifying feature information of a space to be identified and target graphic elements of the space to be identified, which are contained in the target drawing. Detailed description reference is made to the corresponding related description of the above embodiments, and the detailed description is omitted here.
S32, constructing a closed curve of the space to be identified based on the characteristic information and the target graphic element, and determining a space candidate set corresponding to the space to be identified. Detailed description reference is made to the corresponding related description of the above embodiments, and the detailed description is omitted here.
And S33, deleting the non-space curve of the space to be identified from the space candidate set to obtain a target space set corresponding to the space to be identified.
Specifically, the step S33 may include:
s331, judging whether each closed curve in the space candidate set is a non-space curve.
And traversing each closed curve in the space candidate set, determining whether a non-space curve exists in the closed curve, executing step S332 when the closed curve corresponding to the non-space curve exists in the space candidate set, otherwise, judging that the closed curve corresponds to the space to be identified.
Optionally, the step S331 may include:
(1) And acquiring the recognition confidence corresponding to each closed curve in the space candidate set.
The recognition confidence is the probability that the closed curve corresponds to the space to be recognized, and can be determined based on the information of the name, shape, area and the like of the space to be recognized. Specifically, the electronic device sequentially calculates the recognition confidence of each closed curve according to the information such as the name, the shape, the area and the like of the space to be recognized.
(2) And taking the closed curve with the identification confidence coefficient smaller than a preset value as a non-space curve.
The preset value is the minimum recognition confidence corresponding to the closed curve, and may be 90%, 95%, or other values, where the preset value is not limited, and may be determined by a person skilled in the art according to an empirical value.
And the electronic equipment compares the identification confidence with a preset value and judges whether the identification confidence is smaller than the preset value. When the recognition confidence is larger than a preset value, the closed curve is indicated to correspond to the space to be recognized, and the electronic equipment can keep the closed curve with the recognition confidence larger than the preset value in the space candidate set; when the recognition confidence is less than the preset value, the closed curve is represented as a non-space curve, and then the electronic device can delete the closed curve from the space candidate set.
Optionally, the step S331 may further include:
(3) And judging whether the closed curve in the space candidate set is a component closed curve or not.
The closed curves of the components are closed polygons of the components such as walls, columns and the like, the components in the target drawing have characteristics different from rooms, and the electronic equipment can extract the characteristics of each closed curve in the space candidate set so as to determine whether the closed curves of the components exist in a plurality of closed curves contained in the space candidate set. When the electronic device determines that a certain closed curve or a few closed curves are component closed curves, step (4) is performed, otherwise the closed curves are still reserved in the space candidate set.
(4) The member closed curve is taken as a non-space curve.
When the closed curve is a member closed curve, it indicates that the closed curve does not correspond to the space to be identified, at which time the identified member closed curve may be determined to be a non-space curve, which may then be deleted from the space candidate set by the electronic device.
And S332, deleting the non-space curve when the closed curve is the non-space curve, and obtaining a target space set corresponding to the space to be identified.
And deleting the non-space curve from the space candidate set when the existence of the non-space curve in the space candidate set is detected, so as to obtain a closed curve set corresponding to the space to be identified, namely a target space set.
It should be noted that, the electronic device may also cut out the pictures of the corresponding parts from the target drawing by using the target detector, and input the pictures into the target detector to identify whether the pictures are non-space curves. The target detector is a pre-trained classification model, can identify the space needing to be identified, such as an elevator, a stair and the like, and can keep the space needing to be identified in a space candidate set, and can also identify a non-space curve which is difficult to determine by the method and reject the identified non-space curve from the space candidate set.
S34, acquiring a candidate space set of the space to be identified.
The candidate space set is a set of potentially missing spaces corresponding to the space to be identified, such as a special walk space, and can be established by a topological space candidate set.
Specifically, as shown in fig. 4, the step S34 may include:
s341, obtaining an internal cavity space between two non-adjacent spaces to be identified.
The internal cavity space is an internal space corresponding to the non-adjacent space to be identified. The electronic equipment can identify the adjacent relation between each space to be identified in the target drawing, determine the non-adjacent space to be identified, determine whether the internal cavity space exists in the non-adjacent two spaces to be identified, and extract the part of the internal cavity space in the non-adjacent two spaces to be identified if the internal cavity space exists.
S342, judging whether the internal cavity space is a building internal space.
When the internal cavity space is extracted, the electronic device may determine whether the internal cavity space is a building internal space based on the building design rule, if the internal cavity space is a building internal space, step S343 is performed, otherwise, it indicates that the internal cavity space is not a building internal space, and the internal cavity space may be deleted.
S343, the internal cavity space is determined as the candidate space set.
When the internal cavity space is the building internal space, the internal cavity space is used as a candidate space set, so that the electronic equipment can conveniently complement the space to be identified according to the candidate space set, and the missing identification of the space to be identified is avoided.
S35, judging whether the space to be identified has adjacent pavement spaces or not.
The pavement space is necessary for the space to be identified, the electronic device can determine whether the space to be identified has an adjacent pavement space in combination with the building global, and execute step S36 when the space to be identified does not have an adjacent pavement space, otherwise, the electronic device indicates that the space to be identified has an adjacent pavement space.
S36, searching adjacent spaces corresponding to the space to be identified from the candidate space set, and determining the adjacent spaces as the pavement spaces.
When the space to be identified does not have the adjacent pavement space, the electronic equipment searches the adjacent space corresponding to the space to be identified in the candidate space set, and takes the adjacent space as the pavement space corresponding to the space to be identified, so that the space identification of the whole building engineering target drawing is completed.
S37, displaying the space identification information of the target drawing.
The space identification information is an identification result obtained in the target drawing identification process, a corresponding man-machine interaction interface can be arranged on the electronic equipment, and the space identification information in the target drawing identification process is displayed through the man-machine interaction interface, so that a technician can determine whether the identification result is correct or not.
S38, responding to the identification error instruction corresponding to the space identification information, and filtering error information corresponding to the identification error instruction.
The identification error instruction indicates that the space identification information has identification errors, the identification error instruction can be input by a technician through a man-machine interaction interface, correspondingly, the electronic equipment can respond to the identification error instruction input by the technician, determine error information corresponding to the identification error instruction, and filter the error information to avoid affecting the accuracy of the space identification.
According to the space recognition method provided by the embodiment, as the closed curves in the space candidate set possibly have non-space curves, the non-space curves in the space candidate set need to be deleted at the moment, so that the closed curves in the space candidate set correspond to the space to be recognized, the influence of the non-space curves on the space recognition of the target drawing is avoided, and the recognition accuracy of the space to be recognized is further improved. By acquiring the candidate space set of the space to be identified, judging whether the space to be identified has adjacent pavement spaces, searching the adjacent space corresponding to the space to be identified from the candidate space set when the space to be identified does not have the adjacent pavement spaces, and determining the adjacent space as the pavement space, thereby avoiding the occurrence of missing identification of special spaces such as the pavement space and ensuring the integrity of space identification. By displaying the space identification information of the target drawing, a user can confirm whether errors exist in the identification information in the space identification process, and when the errors exist, the user can respond to the identification error instruction corresponding to the space identification information, filter the error information corresponding to the identification error instruction, avoid the error information from affecting the space identification, and further improve the space identification accuracy in the target drawing.
The embodiment also provides a space recognition device, which is used for realizing the embodiment and the preferred implementation manner, and the description is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a space recognition apparatus, as shown in fig. 5, including:
the obtaining module 41 is configured to obtain a target drawing, and identify feature information of a space to be identified and a target primitive of the space to be identified included in the target drawing. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
The construction module 42 is configured to construct a closed curve of the space to be identified based on the feature information and the target primitive, and determine a space candidate set corresponding to the space to be identified. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
And the identifying module 43 is configured to delete the non-space curve of the space to be identified from the space candidate set, and obtain a target space set corresponding to the space to be identified. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
According to the space recognition device provided by the embodiment, the feature information of the space to be recognized and the target graphic element of the space to be recognized are recognized, the closed curve of the space to be recognized is constructed according to the feature information and the target graphic element, the space candidate set corresponding to the space to be recognized is determined, and the non-space curve of the space to be recognized is deleted from the space candidate set, so that the target space set corresponding to the space to be recognized is obtained. The device does not need to identify the layer of the target drawing, avoids interference existing in space identification of the layer conversion picture, does not depend on component identification forming space, avoids component identification error transmission to the space identification, and improves the accuracy of the space identification in the target drawing.
The spatial recognition means in this embodiment are presented in the form of functional units, here means ASIC circuits, processors and memories executing one or more software or fixed programs, and/or other devices that can provide the functionality described above.
Further functional descriptions of the above modules are the same as those of the above corresponding embodiments, and are not repeated here.
The embodiment of the invention also provides electronic equipment, which is provided with the space recognition device shown in the figure 5.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, as shown in fig. 6, the device may include: at least one processor 501, such as a CPU (Central Processing Unit ), at least one communication interface 503, a memory 504, at least one communication bus 502. Wherein a communication bus 502 is used to enable connected communications between these components. The communication interface 503 may include a Display screen (Display), a Keyboard (Keyboard), and the optional communication interface 503 may further include a standard wired interface, and a wireless interface. The memory 504 may be a high-speed RAM memory (Random Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 504 may also optionally be at least one storage device located remotely from the aforementioned processor 501. Wherein the processor 501 may have stored in the memory 504 an application program in the apparatus described in connection with fig. 5 and the processor 501 invokes the program code stored in the memory 504 for performing any of the above-mentioned method steps.
The communication bus 502 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The communication bus 502 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
Wherein the memory 504 may include volatile memory (english) such as random-access memory (RAM); the memory may also include a nonvolatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated as HDD) or a solid state disk (english: solid-state drive, abbreviated as SSD); memory 504 may also include a combination of the types of memory described above.
The processor 501 may be a central processor (English: central processing unit, abbreviated: CPU), a network processor (English: network processor, abbreviated: NP) or a combination of CPU and NP.
The processor 501 may further include a hardware chip, among others. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof (English: programmable logic device). The PLD may be a complex programmable logic device (English: complex programmable logic device, abbreviated: CPLD), a field programmable gate array (English: field-programmable gate array, abbreviated: FPGA), a general-purpose array logic (English: generic array logic, abbreviated: GAL), or any combination thereof.
Optionally, the memory 504 is also used for storing program instructions. The processor 501 may invoke program instructions to implement the spatial identification method as shown in the embodiments of fig. 1-4 of the present application.
The embodiment of the invention also provides a non-transitory computer storage medium, which stores computer executable instructions that can execute the processing method of the space recognition method in any of the above method embodiments. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (13)

1. A method of spatial recognition, comprising:
Acquiring a target drawing, and identifying characteristic information of a space to be identified and target graphic elements of the space to be identified, which are contained in the target drawing;
constructing a closed curve of the space to be identified based on the characteristic information and the target primitive, and determining a space candidate set corresponding to the space to be identified;
and deleting the non-space curve of the space to be identified from the space candidate set to obtain a target space set corresponding to the space to be identified.
2. The method according to claim 1, wherein identifying the feature information of the space to be identified contained in the target drawing includes:
identifying text primitives contained in the target drawing, and determining name text primitives of the space to be identified;
acquiring coordinate information of the name text primitive, and calculating center coordinates of the name text primitive;
and determining the center coordinates as characteristic information of the space to be identified.
3. The method of claim 2, wherein identifying the target primitive for the space to be identified comprises:
acquiring a primitive object and a composition mode of the target drawing;
filtering text class primitives corresponding to the target drawing based on the type attribute of the primitive object to obtain a first primitive set corresponding to the target drawing;
Filtering out the primitives which do not meet the preset rules from the first primitive set based on the preset rules corresponding to the composition modes, and obtaining a second primitive set corresponding to the target drawing;
and filtering out space identification interference primitives corresponding to the space to be identified from the second primitive set to obtain target primitives of the space to be identified.
4. The method according to claim 1, wherein constructing a closed curve of the space to be identified based on the feature information and the target primitive, and determining a space candidate set corresponding to the space to be identified, comprises:
acquiring a target position of the characteristic information;
constructing a closed curve around the target position based on the target primitive;
and correlating the closed curve with the characteristic information to obtain a space candidate set corresponding to the space to be identified.
5. The method of claim 1, wherein the deleting the non-spatial curve of the space to be identified from the spatial candidate set comprises:
judging whether each closed curve in the space candidate set is a non-space curve or not;
and deleting the non-space curve when the closed curve is the non-space curve.
6. The method of claim 5, wherein said determining whether each closed curve in the spatial candidate set is a non-spatial curve comprises:
acquiring identification confidence corresponding to each closed curve in the space candidate set;
and taking the closed curve with the identification confidence coefficient smaller than a preset value as the non-space curve.
7. The method of claim 5, wherein said determining whether each closed curve in the spatial candidate set is a non-spatial curve comprises:
judging whether the closed curve in the space candidate set is a member closed curve or not;
when the closed curve is the member closed curve, the member closed curve is taken as the non-space curve.
8. The method as recited in claim 1, further comprising:
acquiring a candidate space set of the space to be identified;
judging whether the space to be identified has an adjacent pavement space or not;
and searching adjacent spaces corresponding to the space to be identified from the candidate space set when the space to be identified does not exist adjacent pavement spaces, and determining the adjacent spaces as the pavement spaces.
9. The method of claim 8, wherein the obtaining the candidate space set for the space to be identified comprises:
Acquiring an internal cavity space between two non-adjacent spaces to be identified;
judging whether the internal cavity space is a building internal space or not;
when the interior void space is a building interior space, the interior void space is determined as the candidate space set.
10. The method according to any one of claims 1-9, further comprising:
displaying the space identification information of the target drawing;
and responding to the identification error instruction corresponding to the space identification information, and filtering error information corresponding to the identification error instruction.
11. A spatial recognition apparatus, characterized by comprising:
the acquisition module is used for acquiring a target drawing and identifying characteristic information of a space to be identified and target primitives of the space to be identified, which are contained in the target drawing;
the construction module is used for constructing a closed curve of the space to be identified based on the characteristic information and the target graphic element, and determining a space candidate set corresponding to the space to be identified;
and the identification module is used for deleting the non-space curve of the space to be identified from the space candidate set to obtain a target space set corresponding to the space to be identified.
12. An electronic device, comprising:
a memory and a processor, said memory and said processor being communicatively coupled to each other, said memory having stored therein computer instructions, said processor executing said computer instructions to perform the spatial identification method of any of claims 1-10.
13. A computer readable storage medium, characterized in that the computer readable storage medium stores computer instructions for causing a computer to perform the spatial identification method according to any one of claims 1-10.
CN202111509256.1A 2021-12-10 2021-12-10 Space identification method, device, equipment and readable storage medium Pending CN116259065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111509256.1A CN116259065A (en) 2021-12-10 2021-12-10 Space identification method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111509256.1A CN116259065A (en) 2021-12-10 2021-12-10 Space identification method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116259065A true CN116259065A (en) 2023-06-13

Family

ID=86684929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111509256.1A Pending CN116259065A (en) 2021-12-10 2021-12-10 Space identification method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116259065A (en)

Similar Documents

Publication Publication Date Title
US12051261B2 (en) Semantic segmentation of 2D floor plans with a pixel-wise classifier
EP3506211B1 (en) Generating 3d models representing buildings
CN113158292B (en) Component matching method, engineering amount calculating device and electronic equipment
US20110218777A1 (en) System and method for generating a building information model
CN113901550B (en) Method and related equipment for generating BIM (building information modeling) model of assembled building
US20220148327A1 (en) Machine learning techniques for extracting floorplan elements from architectural drawings
CN110348368B (en) Method, computer readable medium and system for artificial intelligence analysis of house type graph
US20190392087A1 (en) Method for constructing a 3d digital model from a 2d plan
CN114925416B (en) A method and device for building structure generation based on data conversion
CN114241509A (en) Space segmentation method, system, storage medium and equipment based on construction drawing
CN114429640A (en) Drawing segmentation method and device and electronic equipment
CN112486384B (en) Picture examination processing method and related device
CN113724388A (en) Method, device and equipment for generating high-precision map and storage medium
CN116704542A (en) Layer classification method, device, equipment and storage medium
CN111881171B (en) Drawing identification recommendation method and system based on data analysis
CN114154622A (en) Algorithm model for traffic operation system flow data acquisition missing completion
CN113963011A (en) Image recognition method and device, electronic equipment and storage medium
CN116259065A (en) Space identification method, device, equipment and readable storage medium
US20040013306A1 (en) Generating processing sequences for image-based decision systems
CN116681792A (en) Subgraph generation method, device and equipment of vector drawing and readable storage medium
CN111612890B (en) Method and device for automatically generating three-dimensional model by two-dimensional house type graph and electronic equipment
CN114821617A (en) Door and window hole identification method, device, equipment and readable storage medium
CN115905016A (en) BIOS Setup search function test method and device, electronic equipment and storage medium
CN115577526A (en) Customized building information model construction method for pedestrian traffic modeling
CN118711204B (en) Building model construction method and system based on AI drawing recognition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination