Indoor mapping recognition method and system based on graphic template and deep learning

By combining graphic templates with deep learning methods and utilizing element compensation, curve correction, and topology optimization, the problems of noise processing and complex architectural element representation in indoor mapping in existing technologies are solved, achieving higher-quality indoor mapping recognition.

CN115239995BActive Publication Date: 2025-09-19CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210826397.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-14
Publication Date
2025-09-19
Estimated Expiration
2042-07-14

AI Technical Summary

Technical Problem

Existing deep learning-based indoor mapping methods have difficulty in processing noise when dealing with indoor maps of various styles and types, and are unable to effectively represent complex architectural elements and distinguish room types, resulting in unsatisfactory segmentation results.

Method used

Combining graphic templates with deep learning, through element compensation, curve correction and topology optimization, a training instance segmentation model is constructed to repair pseudo sample images, perform data enhancement, improve image quality, and ultimately achieve recognition.

Benefits of technology

It effectively repairs irregular or tilted building elements, clearly draws arc areas, closes gaps, improves the alignment between building elements, and enhances recognition accuracy and segmentation effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115239995B_ABST
    Figure CN115239995B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image recognition and provides an indoor mapping recognition method and system based on graphic templates and deep learning, comprising: S1: obtaining training samples, constructing a training instance segmentation model, inputting the training samples into the training instance segmentation model for training, and obtaining a pseudo-sample image; S2: constructing a graphic template, repairing the pseudo-sample image using the graphic template, and obtaining a repaired pseudo-sample image; S3: performing data enhancement on the repaired pseudo-sample image to obtain an enhanced sample image; S4: inputting the enhanced sample image into the training instance segmentation model for training, and obtaining an enhanced training instance segmentation model; S5: inputting the image to be recognized into the enhanced training instance segmentation model for recognition, and obtaining a final recognition prediction result. The present invention can restore regular or irregular element morphology, close gaps, and correct topological errors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition, and in particular to an indoor mapping recognition method and system based on graphic templates and deep learning. Background Art

[0002] A relatively mature traditional solution for interpreting building floor plans into indoor maps currently exists. This involves three main steps: image filtering, vectorization, and symbol recognition, which are then integrated to produce the indoor map. Image segmentation, text extraction, and image merging are selected as needed. The noise in parsing floor plans includes not only sampling noise introduced during scanning, but also redundant pixels such as dimension lines, furniture, and decorative patterns, which are also considered noise. This makes it difficult to design a unified approach to handle indoor maps of varying styles and types.

[0003] Deep learning-based methods directly extract features from large amounts of indoor map data to learn the semantic representation of architectural elements, which greatly improves the universality of the methods, but these methods also have some shortcomings. Node-based methods need to satisfy the Manhattan prior, which requires that the main axes of all elements are aligned, the wall thickness is consistent, and the room is rectangular. As a result, many complex architectural elements in the real world cannot be represented. Another type of deep learning-based method uses semantic segmentation. Although this method is not subject to Manhattan constraints and can theoretically represent architectural elements of any shape, since architectural elements are usually hollow inside, features cannot be extracted, resulting in a smearing effect. At the same time, the features of two different types of rooms (such as bedrooms and dining rooms) are not significantly different, which makes it easy to make mistakes in distinguishing the type of house, and ultimately leads to unsatisfactory segmentation results.

[0004] The above content is only used to assist in understanding the technical solution of the present invention and does not constitute an admission that the above content is prior art. Summary of the Invention

[0005] To solve the above technical problems, the present invention provides an indoor mapping recognition method based on graphic templates and deep learning, comprising:

[0006] S1: Obtain training samples, build a training instance segmentation model, input the training samples into the training instance segmentation model for training, and obtain pseudo sample images;

[0007] S2: constructing a graphic template, and repairing the pseudo sample image using the graphic template to obtain a repaired pseudo sample image;

[0008] S3: performing data enhancement on the restored pseudo sample image to obtain an enhanced sample image;

[0009] S4: inputting the enhanced sample image into the training instance segmentation model for training to obtain an enhanced training instance segmentation model;

[0010] S5: Input the image to be recognized into the enhanced training instance segmentation model for recognition to obtain the final recognition prediction result.

[0011] Preferred:

[0012] The training samples are images containing architectural elements;

[0013] The pseudo sample image includes: a category of a building element, a bounding box of the building element, and a mask of the building element.

[0014] Preferably, step S2 is specifically as follows:

[0015] S21: extracting each architectural element in the pseudo sample image;

[0016] S22: Repair building elements classified as walls through element compensation;

[0017] S23: Repair of architectural elements classified as doors or windows by curve correction;

[0018] S24: performing topological optimization on each building element to obtain the restored pseudo sample image.

[0019] Preferably, step S22 is specifically as follows:

[0020] If the category of a building element is a wall, and the opposite sides of the building element are approximately parallel and perpendicular to the x or y axis, then the bounding box of the building element is taken out and the mask of the building element is discarded;

[0021] If the IoU of the building element's bounding box and the mask are both less than 0.7 and both are tilted, then the bounding box and mask of the building element are taken out; the minimum circumscribed quadrilateral of the mask is calculated, and the two longest sides of the minimum circumscribed quadrilateral are selected as candidate sides. The minimum circumscribed quadrilateral is expanded outward along the candidate sides until it reaches the bounding box area, and the part of the quadrilateral outside the bounding box is deleted.

[0022] Preferably, step S23 is specifically as follows:

[0023] Get the bounding box and mask of the building element, and divide the bounding box into two groups: horizontal group (B l ,B r ) and vertical group (B t ,B b ), where B represents the bounding box, and t, b, l, r represent the upper, lower, left, and right sub-blocks within the bounding box;

[0024] Calculate the overlap between the building element mask and the bounding box. The calculation formula is as follows:

[0025]

[0026] Where M represents the mask of the building element; the mask M and each sub-block B are calculated separately t ,B b ,B l ,B r The intersection of the two occupies the ratio of the bounding box, and four position relationships are obtained, including: upper left type I t , Upper right type I b , Lower left type I l and lower right type I r ;

[0027] Will I t , I b , I l and I r The position relationship corresponding to the maximum value in is taken as the position relationship of the building element.

[0028] Preferably, step S24 is specifically as follows:

[0029] S24: The minimum circumscribed quadrilateral of each building element is used as an adjustment unit, and two adjacent adjustment units are used as an adjustment group;

[0030] S25: Dividing the adjustment group into an I-shape, an L-shape, or a T-shape according to the positional relationship between the two adjustment units in the adjustment group;

[0031] S26: According to the type of each adjustment group, align and adjust the two adjustment units in each adjustment group through an adjustment equation;

[0032] If the adjustment group is T-shaped, the first constraint relationship must be satisfied:

[0033]

[0034]

[0035] Among them, I1, I2 and J1, J2 represent two pairs of vertices of the adjacent edges of two adjustment units respectively. The first constraint relationship makes the areas of triangles ΔI1, J2, I2 and ΔI1, J2, I1 tend to 0, ultimately ensuring that the two adjacent edges are collinear;

[0036] If the adjustment group is I-shaped, the first constraint relationship and the second constraint relationship must be satisfied at the same time. The expression of the second constraint relationship is:

[0037]

[0038]

[0039] In the second constraint relationship, I1, I2 and J1, J2 are prevented from moving in the same direction so that their gaps are closed;

[0040] If the adjustment group is L-shaped, the first constraint relationship needs to be satisfied so that the areas of triangles ΔI1, J2, I2 and ΔI1, J2, I1 tend to 0, ultimately ensuring that the two adjacent edges are collinear.

[0041] Preferably, the expression of the adjustment equation is:

[0042]

[0043] Where x and y are the vertex coordinates before adjustment, and x′ and y′ are the vertex coordinates after adjustment; θ is the adjustment angle, ranging from [0,π); τ is the adjustment amount, and its sign indicates movement in the positive or negative direction.

[0044] An indoor mapping recognition system based on graphic templates and deep learning, comprising:

[0045] A pseudo sample image acquisition module is used to acquire training samples, build a training instance segmentation model, input the training samples into the training instance segmentation model for training, and obtain pseudo sample images;

[0046] a repair module, configured to construct a graphic template, and repair the pseudo sample image using the graphic template to obtain a repaired pseudo sample image;

[0047] An enhancement module, configured to perform data enhancement on the restored pseudo sample image to obtain an enhanced sample image;

[0048] A training module, configured to input the enhanced sample image into the training instance segmentation model for training to obtain an enhanced training instance segmentation model;

[0049] The recognition prediction module is used to input the image to be recognized into the enhanced training instance segmentation model for recognition to obtain the final recognition prediction result.

[0050] The present invention has the following beneficial effects:

[0051] 1. Use graphic templates to compensate for the shortcomings of deep learning methods in interior mapping; graphic templates include: element compensation, curve correction, and topology optimization;

[0052] 2. Element compensation mainly targets irregular or tilted elements. By utilizing the relationship between their bounding boxes and masks, the mask is expanded outward to the appropriate area, effectively repairing wall-like architectural elements.

[0053] 3. Curve correction is mainly targeted at elements such as doors and windows. It converts segmentation branches and bounding boxes into control points of corresponding Bezier curves. The curve equation is constructed based on the control points, and the arc interval is clearly drawn, which can effectively repair architectural elements such as doors or windows.

[0054] 4. Topology optimization mainly optimizes the global position. By adjusting the vertex coordinates and aligning the elements pair by pair, the gaps between building elements can be effectively closed. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 This is a flow chart of a method according to an embodiment of the present invention;

[0056] Figure 2 This is a system structure diagram of an embodiment of the present invention;

[0057] Figure 3 is a schematic diagram of a graphic template;

[0058] Figure 4 Obtain a schematic diagram for the minimum circumscribed quadrilateral of the wall;

[0059] Figure 5 Schematic diagram of the expansion of the minimum circumscribed quadrilateral of the wall;

[0060] Figure 6 This is a schematic diagram of wall repair;

[0061] Figure 7 Group diagrams for doors or windows;

[0062] Figure 8 Provide a schematic diagram for door or window classification;

[0063] Figure 9 It is type I adjacency;

[0064] Figure 10 It is T-type adjacency;

[0065] Figure 11 It is L-shaped adjacency;

[0066] Figure 12 Optimization diagram for the T-shaped adjustment group;

[0067] Figure 13 Optimization diagram for the I-shaped adjustment group;

[0068] Figure 14 Optimization diagram for the L-shaped adjustment group;

[0069] Figure 15 Schematic diagram of the difference between pseudo sample images before and after optimization;

[0070] Figure 16 This is a schematic diagram of the final recognition prediction results;

[0071] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0072] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0073] Reference Figure 1 The present invention provides an indoor mapping recognition method based on graphic templates and deep learning, which combines the advantages of deep learning and traditional graphics methods. A graphic template is proposed to make up for the shortcomings of deep learning methods, including element compensation, curve correction and topology optimization. The graphic template can restore the shape of regular or irregular elements, close gaps, and correct topological errors. This method also uses Bezier curves to represent curved elements such as doors and windows, overcoming the problem that previous algorithms cannot represent or represent inaccurately.

[0074] include:

[0075] S1: Obtain training samples, build a training instance segmentation model, input the training samples into the training instance segmentation model for training, and obtain pseudo sample images;

[0076] Specifically, the pseudo sample images obtained at this time are relatively rough and contain a lot of erroneous information, such as misalignment between elements, gaps, overlaps, etc.

[0077] S2: constructing a graphic template, and repairing the pseudo sample image using the graphic template to obtain a repaired pseudo sample image;

[0078] Specifically, after the graphic template restoration, the quality of the restored pseudo sample image is significantly improved;

[0079] S3: performing data enhancement on the restored pseudo sample image to obtain an enhanced sample image;

[0080] Specifically, data enhancement is performed on the restored pseudo sample images to enhance their diversity. This mainly includes horizontal or vertical flipping, rotation, scaling, and masking of parts. During the enhancement process, architectural elements that are out of bounds or truncated will be removed.

[0081] S4: inputting the enhanced sample image into the training instance segmentation model for training to obtain an enhanced training instance segmentation model;

[0082] S5: inputting the image to be recognized into the enhanced training instance segmentation model for recognition to obtain a final recognition prediction result;

[0083] Specifically, all building elements are closed to form a room, and then the text recognition method is used to determine the house type to obtain the final recognition prediction result.

[0084] In this embodiment:

[0085] The training samples are images containing architectural elements;

[0086] The pseudo sample image includes: a category of a building element, a bounding box of the building element, and a mask of the building element.

[0087] Specifically, a training instance segmentation model is used as a benchmark using any instance segmentation. In the present invention, MASK-RCNN is used as an example, but is not limited to this model. Images of building elements and corresponding labels are sent to the training instance segmentation model for training, and prediction results can be obtained after convergence.

[0088] In this embodiment, step S2 is specifically as follows:

[0089] S21: extracting each architectural element in the pseudo sample image;

[0090] S22: Repair building elements classified as walls through element compensation;

[0091] S23: Repair of architectural elements classified as doors or windows by curve correction;

[0092] S24: performing topological optimization on each building element to obtain the restored pseudo sample image.

[0093] In this embodiment, all architectural elements are roughly divided into regular primitives and irregular elements. The former mainly includes horizontal or vertical instances, and the latter mainly includes inclined and arc instances. If the two pairs of opposite sides of an instance are approximately parallel, and each side is perpendicular to the x or y axis, and the intersection of its internal mask and the rectangle formed by the coordinates should be as large as possible; otherwise, this instance is an irregular element or needs to be repaired; if the instance is a regular element, its bounding box coordinates (x1, y1...x n ,y n ); and use mask (x1,y1…x n ,y n ) usually loses precision and is redundant; for irregular elements, since they cannot be accurately depicted by rectangles, masks are necessary;

[0094] Step S22 is specifically as follows:

[0095] If the category of a building element is a wall, and the opposite sides of the building element are approximately parallel and perpendicular to the x or y axis, then the bounding box of the building element is taken out and the mask of the building element is discarded;

[0096] If the IoU of the building element's bounding box and the mask are both less than 0.7 and both are tilted, then the bounding box and mask of the building element are taken out; the minimum circumscribed quadrilateral of the mask is calculated, and the two longest sides of the minimum circumscribed quadrilateral are selected as candidate sides. The minimum circumscribed quadrilateral is expanded outward along the candidate sides until it reaches the bounding box area, and the part of the quadrilateral outside the bounding box is deleted.

[0097] Specifically, Figure 3 is a wall instance of the graphic template, where the hollow rectangle is the bounding box of the building element and the irregular solid part inside is the mask. Take out its bounding box and internal mask; calculate the minimum circumscribed quadrilateral of its mask and select the two longest sides as candidate edges, such as Figure 4 As shown, these two posterior selected edges can roughly represent the orientation of the building element; then, the circumscribed quadrilateral is expanded outward along the posterior selected edge direction until it reaches the bounding box area, as shown in Figure 5 As shown; Finally, the circumscribed quadrilateral is subtracted from the bounding box, and the redundant area outside the bounding box is removed, as shown Figure 6 shown.

[0098] In this embodiment, a door or window element is usually represented by a fan-shaped area, and its closed area is usually represented by a fan-shaped area. Since the area is irregular, this method uses a second-order Bezier curve to represent the area. Through analysis, the second-order Bezier curve can cover almost all cases. The Bezier curve can usually be expressed as a parametric equation:

[0099]

[0100] Where c(t) is the parameterized representation of the curve;

[0101] n is the order, b i represents the i-th control point, B i,n (t) is expressed as a Bessel coefficient polynomial, which is expressed as:

[0102]

[0103] in is the coefficient; based on this, this method can convert any arc instance into a Bezier curve;

[0104] Step S23 is specifically as follows:

[0105] Get the bounding box and mask of the building element, and divide the bounding box into two groups: horizontal group (B l ,B r ) and vertical group (B t ,B b ),like Figure 7As shown, B represents the bounding box, t, b, l, r represent the upper, lower, left and right sub-blocks in the bounding box;

[0106] Calculate the overlap between the building element mask and the bounding box. The calculation formula is as follows:

[0107]

[0108] Where M represents the mask of the building element; the mask M and each sub-block B are calculated separately t ,B b ,B l ,B r The intersection of the two occupies the ratio of the bounding box, and four position relationships are obtained, including: upper left type I t , Upper right type I b , Lower left type I l and lower right type I r ;

[0109] Will I t , I b , I l and I r The position relationship corresponding to the maximum value in is taken as the position relationship of the building element.

[0110] Specifically, Figure 8 For a door or window instance, from left to right, it can be classified into lower left type, upper left type, lower right type, and upper right type. According to its type, three of the four coordinate points of the bounding box can be used as candidate points to construct a Bezier curve to accurately depict the area, such as Figure 8 The bold coordinate points are shown in the figure.

[0111] In this example, global topology optimization is performed on all building elements. Here, the smallest circumscribed quadrilateral of all elements is selected as the adjustment unit, and its coordinates are fine-tuned globally to close gaps and correct errors. This method classifies all element connection methods into five types: I, L, T, X, and U. The X and U types can be further simplified to form other types, so only the first three simple types are introduced here.

[0112] For any two quadrilaterals I and J, such as Figure 9 As shown, if the short side I S1 and J on the other short side of I S1 On the same side, I S1 as adjacent candidate edges; if the two short edges I S1 and I S2 If the above conditions are met at the same time, then I S1 and I S2 None of them can be used as adjacent candidate edges, and the long edges adjacent to them are used as subsequent candidate edges, such as Figure 10As shown; if there is still a short edge and a long edge as candidate edges at the same time, such as Figure 11 As shown; Check I S1 Does it intersect with J? If so, then I S1 As a candidate edge, otherwise I L2 As a candidate edge;

[0113] Step S24 is specifically as follows:

[0114] S24: The minimum circumscribed quadrilateral of each building element is used as an adjustment unit, and two adjacent adjustment units are used as an adjustment group;

[0115] S25: Dividing the adjustment group into an I-shape, an L-shape, or a T-shape according to the positional relationship between the two adjustment units in the adjustment group;

[0116] S26: According to the type of each adjustment group, align and adjust the two adjustment units in each adjustment group through an adjustment equation;

[0117] like Figure 12 As shown, if the adjustment group is T-shaped, the first constraint relationship needs to be satisfied:

[0118]

[0119]

[0120] Among them, I1, I2 and J1, J2 represent two pairs of vertices of the adjacent edges of two adjustment units respectively. The first constraint relationship makes the areas of triangles ΔI1, J2, I2 and ΔI1, J2, I1 tend to 0, ultimately ensuring that the two adjacent edges are collinear;

[0121] like Figure 13 As shown, if the adjustment group is I-shaped, the first constraint relationship and the second constraint relationship must be satisfied at the same time. The expression of the second constraint relationship is:

[0122]

[0123]

[0124] In the second constraint relationship, I1, I2 and J1, J2 are prevented from moving in the same direction so that their gaps are closed;

[0125] like Figure 14 As shown, if the adjustment group is L-shaped, the first constraint relationship needs to be satisfied so that the areas of triangles ΔI1, J2, I2 and ΔI1, J2, I1 tend to 0, and ultimately ensure that the two adjacent edges are collinear.

[0126] In this embodiment, the expression of the adjustment equation is:

[0127]

[0128] Where x and y are the vertex coordinates before adjustment, and x′ and y′ are the vertex coordinates after adjustment; θ is the adjustment angle, ranging from [0,π); τ is the adjustment amount, and its sign indicates movement in the positive or negative direction.

[0129] By solving the above equations, the adjustment units are moved pair by pair to adjust the position. During the solution process, a smaller value of τ is preferred, that is, the coordinates after movement are not much different from the original coordinates, but the constraint relationship is satisfied.

[0130] refer to Figure 2 The present invention provides an indoor mapping recognition system based on graphic templates and deep learning, comprising:

[0131] A pseudo sample image acquisition module is used to acquire training samples, build a training instance segmentation model, input the training samples into the training instance segmentation model for training, and obtain pseudo sample images;

[0132] a repair module, configured to construct a graphic template, and repair the pseudo sample image using the graphic template to obtain a repaired pseudo sample image;

[0133] An enhancement module, configured to perform data enhancement on the restored pseudo sample image to obtain an enhanced sample image;

[0134] A training module, configured to input the enhanced sample image into the training instance segmentation model for training to obtain an enhanced training instance segmentation model;

[0135] The recognition prediction module is used to input the image to be recognized into the enhanced training instance segmentation model for recognition to obtain the final recognition prediction result.

[0136] Effect after implementation:

[0137] 1. Figure 15 The difference between pseudo samples before and after optimization is shown. The results show that the unrestored image contains numerous errors, such as overlap, gaps, and incomplete masks. While the restored image still contains some errors, its quality has been greatly improved, making it more conducive to obtaining high-quality pseudo samples and thus training models with stronger generalization performance.

[0138] 2. Figure 16To illustrate the final recognition prediction results, optical character recognition (OCR) was used to identify room types. This method adds characters (a, z) to distinguish different room types. This approach addresses the issue of missing room labels, but assumes that all rooms are clearly and correctly labeled. To validate this assumption, we collected a large number of real-world indoor maps and meticulously analyzed each image. We found that every room has a clear and accurate label, thus validating the added character distinction and the assumption in real-world scenarios.

[0139] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0140] The serial numbers of the embodiments of the present invention are for descriptive purposes only and do not represent superiority or inferiority of the embodiments. In a unit claim that lists several means, several of these means may be embodied by the same item of hardware. The use of the terms first, second, and third, etc., does not denote any order and should be construed as identifiers.

[0141] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An indoor mapping recognition method based on graphic templates and deep learning, characterized in that: include: S1: Obtain training samples, build a training instance segmentation model, input the training samples into the training instance segmentation model for training, and obtain pseudo sample images; S2: constructing a graphic template, and repairing the pseudo sample image using the graphic template to obtain a repaired pseudo sample image; Step S2 is specifically as follows: S21: extracting each architectural element in the pseudo sample image; S22: Repair building elements classified as walls through element compensation; Step S22 is specifically as follows: If the category of a building element is a wall, and the opposite sides of the building element are approximately parallel and perpendicular to the x or y axis, then the bounding box of the building element is taken out and the mask of the building element is discarded; If the IoU of the building element's bounding box and the mask are both less than 0.7 and both are tilted, extract the building element's bounding box and mask. Calculate the minimum circumscribed quadrilateral of the mask, select the two longest sides of the minimum circumscribed quadrilateral as candidate sides, and expand the minimum circumscribed quadrilateral outward along the candidate sides until it reaches the bounding box area. Delete the part of the quadrilateral outside the bounding box. S23: Repair of architectural elements classified as doors or windows by curve correction; Step S23 is specifically as follows: Get the bounding box and mask of the building element, and divide the bounding box into two groups: horizontal group (B l ,B r ) and vertical group (B t ,B b ), where B represents the bounding box, and t, b, l, r represent the upper, lower, left, and right sub-blocks within the bounding box; Calculate the overlap between the building element mask and the bounding box. The calculation formula is as follows: Where M represents the mask of the building element; the mask M and each sub-block B are calculated separately t ,B b ,B l ,B r The intersection of the two occupies the ratio of the bounding box, and four position relationships are obtained, including: upper left type I t , Upper right type I b , Lower left type I l and lower right type I r ; Will I t , I b , I l and I r The position relationship corresponding to the maximum value in is taken as the position relationship of the building element; S24: performing topological optimization on each building element to obtain the restored pseudo sample image; Step S24 is specifically as follows: S24: The minimum circumscribed quadrilateral of each building element is used as an adjustment unit, and two adjacent adjustment units are used as an adjustment group; S25: Dividing the adjustment group into an I-shape, an L-shape, or a T-shape according to the positional relationship between the two adjustment units in the adjustment group; S26: According to the type of each adjustment group, align and adjust the two adjustment units in each adjustment group through an adjustment equation; If the adjustment group is T-shaped, the first constraint relationship must be satisfied: Among them, I1, I2 and J1, J2 represent two pairs of vertices of the adjacent edges of two adjustment units respectively. The first constraint relationship makes the areas of triangles ΔI1, J2, I2 and ΔI1, J2, I1 tend to 0, ultimately ensuring that the two adjacent edges are collinear; If the adjustment group is I-shaped, the first constraint relationship and the second constraint relationship must be satisfied at the same time. The expression of the second constraint relationship is: In the second constraint relationship, I1, I2 and J1, J2 are prevented from moving in the same direction so that their gaps are closed; If the adjustment group is L-shaped, the first constraint relationship needs to be satisfied so that the areas of the triangles ΔI1, J2, I2 and ΔI1, J2, I1 tend to 0, ultimately ensuring that the two adjacent edges are collinear; S3: performing data enhancement on the restored pseudo sample image to obtain an enhanced sample image; S4: inputting the enhanced sample image into the training instance segmentation model for training to obtain an enhanced training instance segmentation model; S5: Input the image to be recognized into the enhanced training instance segmentation model for recognition to obtain the final recognition prediction result.

2. The indoor mapping recognition method based on graphic templates and deep learning according to claim 1, characterized in that: The training samples are images containing architectural elements; The pseudo sample image includes: a category of a building element, a bounding box of the building element, and a mask of the building element.

3. The indoor mapping recognition method based on graphic templates and deep learning according to claim 1 is characterized in that: The expression of the adjustment equation is: Among them, x and y are the vertex coordinates before adjustment, x ′ and y ′ is the vertex coordinate after adjustment; θ is the adjustment angle, and its value range is [0,π); τ is the adjustment amount, and its sign indicates movement in the positive or negative direction.

4. An indoor mapping recognition system based on graphic templates and deep learning, used to implement the indoor mapping recognition method based on graphic templates and deep learning according to any one of claims 1 to 3, characterized in that: include: A pseudo sample image acquisition module is used to acquire training samples, build a training instance segmentation model, input the training samples into the training instance segmentation model for training, and obtain pseudo sample images; a repair module, configured to construct a graphic template, and repair the pseudo sample image using the graphic template to obtain a repaired pseudo sample image; An enhancement module, configured to perform data enhancement on the restored pseudo sample image to obtain an enhanced sample image; A training module, configured to input the enhanced sample image into the training instance segmentation model for training to obtain an enhanced training instance segmentation model; The recognition prediction module is used to input the image to be recognized into the enhanced training instance segmentation model for recognition to obtain the final recognition prediction result.