AI examination labeling method and system based on construction drawing compliance detection
By using the U-Net network and Dice loss optimization to generate deformation heat maps, construct NURBS curves and perform smooth reconstruction, the problem of inaccurate vectorization of deformed areas of hand-drawn raster images in construction drawings is solved, the full-process automated processing of construction drawings is realized, and the accuracy of construction precision and compliance detection is improved.
Patent Information
- Application Number
- CN202510635561.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-09-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the AI review and annotation process of construction drawings, the non-uniform deformation areas of hand-drawn raster images cause raster jagged effects, which cannot be accurately matched with the vector NURBS smooth curves in CAD, affecting the construction accuracy of BIM model generation.
The deformation heat map is obtained through the U-Net network, and the Dice loss and deformation gradient loss are combined for optimization to extract curvature features, construct NURBS curves, and perform smooth reconstruction. The coordinate system alignment and semantic matching are combined with CAD drawings and BIM model data to generate a BIM review model, and geometric error detection and semantic compliance rate calculation are performed.
It realizes the full process automation of construction drawings, avoids the problems of inaccurate vectorization of deformation areas and frequent cracks in multi-source data fusion in traditional methods, and improves the accuracy of construction precision and compliance detection.
Smart Images

Figure CN120689654A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent construction technology, and specifically to an AI review and annotation method and system based on construction drawing compliance detection. Background Art
[0002] With my country's rapid economic development, the engineering construction industry has become increasingly important in the national economy. However, this industry also faces increasingly stringent laws, regulations, and industry standards. Furthermore, public pressure and intensified market competition are driving companies to enhance project quality and reputation through compliance management. However, as the core vehicle for engineering design, the compliance of construction drawings is directly linked to subsequent construction, material usage, and ultimately project quality. Therefore, compliance review of construction drawings has become a critical component of engineering construction management.
[0003] In recent years, breakthroughs in artificial intelligence technology (especially computer vision and deep learning) have provided a new path for construction drawing compliance detection. Image recognition technology based on convolutional neural networks (CNNs) can automatically analyze key information such as text, symbols, and dimension annotations in drawings. For example, the JHAI system (knowledge base [1]) has achieved accurate annotation of behavioral tolerances and positive and negative values. In other words, the AI system can quickly compare the content of the drawings with design specifications or standard drawings, automatically mark non-conformities (such as dimensional deviations and material specifications), and significantly shorten the review cycle.
[0004] The Chinese invention patent with publication number CN118520722A discloses a method for optimizing civil structure change monitoring data based on computer vision, including S1. Using computer vision technology to identify and segment each layer of the civil structure; S2. Using convolutional neural networks to extract features from the acquired two-dimensional images and determine the structural composition and material information of each layer; S3. Using multi-view stereo matching or voxel colorization methods to generate corresponding three-dimensional models; S4. Using mesh simplification and smoothing technology, and applying topology correction algorithms for correction; S5. Forming a structured hierarchical monitoring model by establishing data indexes and links; S6. Combining the finite element method to perform detailed calculations and predictions on the stress state and deformation of the structure, and identifying abnormal states and potential risks of the structure; This invention solves the challenges in monitoring civil structure changes, improves monitoring efficiency, accuracy and real-time performance, and provides more reliable technical support for the monitoring, evaluation and management of structural changes.
[0005] However, when using AI to review and annotate construction drawings in multiple formats, the multi-scale data from these different formats must be fused. During this data fusion process, the hand-drawn raster images must be vectorized using a bilinear interpolation algorithm. However, during this process, non-uniform deformations in the hand-drawn raster images can cause raster aliasing, which doesn't precisely match the smooth NURBS curves in CAD. This can lead to geometric cracks when the BIM model is generated, compromising construction accuracy. Summary of the Invention
[0006] The purpose of the present invention is to provide an AI review and annotation method and system based on construction drawing compliance detection to solve the problems raised in the above background technology.
[0007] To achieve the above objectives, the present invention provides the following technical solution: an AI review and annotation method based on construction drawing compliance detection, comprising:
[0008] S1: Obtaining a deformation heat map: Classifying the preprocessed hand-drawn raster image through a U-Net network to obtain a deformation area classification map, and simultaneously obtaining a deformation heat map based on the deformation area classification map;
[0009] S2: Constructing NURBS curves: Using an adaptive interpolation algorithm, the pixel values in the deformation heat map are processed to obtain initial vector primitives. At the same time, a NURBS curve is constructed based on the initial vector primitives, and the NURBS curve is smoothly reconstructed, including:
[0010] S2.1: Generating an initial vector primitive: obtaining curvature features of each position in the deformation heat map according to pixel values in the deformation heat map, and obtaining an initial vector primitive according to the curvature features and an adaptive interpolation algorithm;
[0011] S2.2: Smooth reconstruction: Construct a NURBS curve based on the initial vector primitives, and simultaneously perform smooth reconstruction on the NURBS curve using a NURBS-CAD geometric consistency optimization algorithm to obtain the final control point coordinates;
[0012] S3: Building a BIM review model: combining the final control point coordinates, the data in the CAD drawing, and the data in the BIM model, and generating a BIM review model according to the set semantic matching rules;
[0013] S4: Obtaining a construction accuracy risk report: Through geometric error detection and semantic joint analysis detection, the BIM review model is annotated and detected to generate a construction accuracy risk report.
[0014] Furthermore, deformation heat maps are obtained, including:
[0015] S1.1: Data preprocessing: grayscale, histogram equalization, denoising, and size normalization are performed on the hand-drawn raster image. Pixel value normalization and depth value normalization are also performed on the preprocessed hand-drawn raster image to obtain a four-channel tensor corresponding to the hand-drawn raster image.
[0016] S1.2: Obtaining a deformation heat map: The four-channel tensor is used as the input of the U-Net encoder, and the corresponding deformation heat map is obtained as the output. The formula for obtaining the pixel value size in the deformation heat map is specifically:
[0017]
[0018] Where: P(x, y) is the pixel value of the deformation heat map at position (x, y), σ is the activation function, W i,j is the weight parameter of the convolution kernel at position (x, y), (x, y) is the position coordinate of the deformation heat map, i and j are the relative position offsets within the convolution kernel, b is the bias term, and F(x+i, y+j) is the pixel value of the preprocessed hand-painted raster image at position (x+i, y+j).
[0019] Furthermore, the deformation heat map is used to optimize the parameters in the U-Net encoder, including:
[0020] W1: Perform region marking: Obtain deformation coefficients corresponding to different regions in the preprocessed hand-drawn raster image based on the deformed length of the preprocessed hand-drawn raster image, compare the deformation coefficients with a preset deformation threshold range, and determine the stretching region and the compression region based on the comparison results, specifically:
[0021] When the deformation coefficient is greater than the upper limit of the preset deformation threshold range, the area corresponding to the deformation coefficient is a stretching area; when the deformation coefficient is less than the lower limit of the preset deformation threshold range, the area corresponding to the deformation coefficient is a compression area; otherwise, the area corresponding to the deformation coefficient is a normal area;
[0022] W2: Generate deformation coefficient matrix: Set the pixel values in the stretching area and the compression area to 1, and set the pixel values in the normal area to 0, and obtain the deformation coefficient matrix according to the set pixel values;
[0023] W3: Obtain Dice loss value: Process the pixel values in the deformation heat map through the Sigmoid function, and obtain the Dice loss value between the deformation heat map and the deformation coefficient matrix based on the deformation coefficient matrix, specifically:
[0024]
[0025] Where: L dice is the Dice loss value, P pre (x, y) is the pixel value at position (x, y) in the deformation heat map, and G(x, y) is the pixel value at position (x, y) in the deformation coefficient matrix;
[0026] W4: Obtain deformation gradient loss value: According to the pixel values in the deformation heat map, obtain the horizontal gradient and vertical gradient of the deformation heat map, and obtain the deformation gradient loss value according to the horizontal gradient and vertical gradient, specifically:
[0027]
[0028] in: is the gradient of the deformation heat map in the horizontal direction, is the gradient of the deformation heat map in the vertical direction, L grad is the deformation gradient loss value, P per (x+1, y) is the pixel value at position (x+1, y) in the deformation heat map, P pre (x, y+1) is the pixel value at position (x, y+1) in the deformation heat map, P pre (x, y) is the pixel value at position (x, y) in the deformation heat map, and (x, y) is the position coordinate of the deformation heat map;
[0029] W5: Determine the total loss: Determine the total loss value based on the Dice loss value and the deformation gradient loss value, specifically:
[0030] L total =L dice +0.1 L grad
[0031] Where: L total is the total loss value, L dice is the Dice loss value, L grad is the deformation gradient loss value;
[0032] W6: Update network parameters: Update the parameter status in the U-Net encoder according to the total loss value, specifically:
[0033]
[0034] Where: θ t+1 is the size of the model parameters at the t+1th iteration, θ t is the size of the model parameters at the tth iteration, η is the learning rate, L total is the total loss value.
[0035] Furthermore, obtaining the initial vector primitive includes:
[0036] S2.1.1: Obtain curvature features: Based on the pixel values in the deformation heat map, obtain the sum of the second-order derivatives of the deformation heat map in the horizontal and vertical directions, specifically:
[0037]
[0038] Where: C(x, y) is the curvature feature, P(x, y) is the pixel value of the deformation heat map at position (x, y), and (x, y) is the position coordinate of the deformation heat map;
[0039] S2.1.2: Determine interpolation weights: Based on the curvature characteristics and the preset curvature threshold range, the regions in the deformation heat map are divided into high curvature regions, low curvature regions, and normal curvature regions. At the same time, interpolation weights are set according to the divided region categories. The interpolation weight setting formula is specifically as follows:
[0040]
[0041] Where: W(x, y) is the interpolation weight, α is the sensitivity coefficient, and C(x, y) is the curvature feature;
[0042] S2.1.3: Control point density adjustment: Based on the curvature characteristics and the basic curvature threshold, adjust the number of control points, specifically:
[0043]
[0044] Where: N ctrl is the number of control points after adjustment, N base is the number of basic control points, β is the curvature sensitivity coefficient, C(x,y) is the curvature feature, C base is the basic curvature threshold;
[0045] S2.1.4: Generate interpolation data: Adjust the spacing between adjacent control points based on the interpolation weights, and determine the size of the control point data to be interpolated based on the adjusted number of control points, specifically:
[0046]
[0047] Where: N m,3 (u) is the mth cubic B-spline basis function, u is a parameterized variable, r m+3 is the m+3th node in the node vector, r m is the mth node in the node vector, N m,2 (u) is the mth quadratic B-spline basis function, rm+4 is the m+4th node in the node vector, r m+1 is the m+1th node in the node vector, N m+1,2 (u) is the m+1th quadratic B-spline basis function.
[0048] Furthermore, the curvature feature is compared with a preset curvature threshold range, and based on the comparison result, the region in the deformation heat map is divided into a high curvature region, a low curvature region and a normal curvature region, specifically:
[0049] When the absolute value of the curvature feature is not less than the upper limit value of the preset curvature threshold range, the area corresponding to the curvature feature is a high curvature area. When the absolute value of the curvature feature is less than the lower limit value of the preset curvature threshold range, the area corresponding to the curvature feature is a low curvature area. Otherwise, the area corresponding to the curvature feature is a normal curvature area.
[0050] Furthermore, the final NURBS curve is obtained, including:
[0051] S2.2.1: Path fitting: Obtain the NURBS curve based on the interpolated control point data size, the number of control points, and the spacing between adjacent control points. Specifically:
[0052]
[0053] Where: Y(u) is the coordinate of the NURBS curve at the parameterized variable u, N m,k (u) is the m-th k-order B-spline basis function, ω m is the weight of the mth control point, R m is the coordinate of the mth control point, and n is the total number of control points;
[0054] S2.2.2: Curve reconstruction: Reconstruct the NURBS curve using the established objective function. The objective function is obtained using the formula:
[0055]
[0056] Where: Q m is the coordinate of the mth optimized control point, Y m is the coordinate of the mth initial control point, λ is the regularization coefficient, C(x,y) is the curvature feature, C new (x,y) is the curvature characteristic of the optimized curve, and Ω is the parameter domain;
[0057] S2.2.3: Curve smoothing: Smooth the reconstructed NURBS curve using the Laplacian smoothing algorithm to determine the final control point coordinates, specifically:
[0058]
[0059] in: is the coordinate of the final control point m, Q m is the coordinate of the mth optimized control point, δ is the smoothing factor, Q m-1 is the coordinate of the m-1th optimized control point, Q m+1 The coordinates of the m+1th optimized control point.
[0060] Furthermore, a BIM review model is generated, including:
[0061] S3.1: Coordinate alignment: Convert the final control point coordinates, the data in the CAD drawing, and the data in the BIM model into a unified coordinate system, specifically:
[0062]
[0063] Where: X WGS is the X-axis coordinate in the WGS-84 coordinate system, Y WGS is the Y-axis coordinate in the WGS-84 coordinate system, Z WGS is the Z-axis coordinate in the WGS-84 coordinate system, S is the scaling factor, J is the rotation matrix, X local is the X-axis coordinate in the local coordinate system, Y local is the Y-axis coordinate in the local coordinate system, Z local is the Z-axis coordinate in the local coordinate system, ΔX is the X-axis displacement of the origin of the local coordinate system in the WGS-84 coordinate system, ΔY is the Y-axis displacement of the origin of the local coordinate system in the WGS-84 coordinate system, and ΔZ is the Z-axis displacement of the origin of the local coordinate system in the WGS-84 coordinate system;
[0064] S3.2: Semantic matching: Perform geometric feature matching, semantic label matching, conflict detection and resolution;
[0065] S3.3: Generate BIM review model: Generate BIM review model based on unified data coordinates and matching semantic rules through Revit API calls or open source tools.
[0066] Furthermore, a construction accuracy risk report is generated, including:
[0067] S4.1: Performing geometric error detection: Based on all triangular mesh patches and actual component sizes in the BIM review model, obtain the patch distance between two adjacent triangular mesh patches, and the component dimensional error between the actual component size and the component size marked in the construction drawing. Based on the patch distance and component dimensional error, determine the crack status and component dimensional error status of the BIM review model.
[0068] S4.2: Compliance Check: Match the matching semantic rules with the prescribed building rules to obtain the compliance rate, specifically:
[0069]
[0070] Where: Q qua is the semantic compliance rate, M com To meet the standard number of items, M tot is the total number of detection items;
[0071] S4.3: Obtain risk report: Based on the crack status and component size error status of the BIM review model, mark the cracks and components determined in the BIM review model with different colors, and at the same time determine the compliance rate corresponding to the BIM review model based on the compliance rate.
[0072] Furthermore, the facet distance between two adjacent triangular mesh facets is compared with a preset distance threshold, and the crack status of the BIM review model is determined based on the comparison result, specifically:
[0073] When the facet distance is greater than a preset distance threshold, there is a crack in the BIM review model; otherwise, there is no crack in the BIM review model;
[0074] The specific formula for obtaining the patch distance is:
[0075]
[0076] Where: d is the patch distance between two adjacent triangular mesh patches, is the X-axis coordinate of the w-th triangle mesh patch, is the X-axis coordinate of the w-1th triangle mesh patch, is the Y-axis coordinate of the w-th triangle mesh patch, is the Y-axis coordinate of the w-1th triangle mesh patch, is the Z-axis coordinate of the w-th triangular mesh patch, The Z-axis coordinate of the w-1th triangle mesh patch.
[0077] Furthermore, the facet distance between two adjacent triangular mesh facets is compared with a preset distance threshold, and the crack status of the BIM review model is determined based on the comparison result, specifically:
[0078] When the facet distance is greater than a preset distance threshold, there is a crack in the BIM review model; otherwise, there is no crack in the BIM review model;
[0079] The component dimensional error between the actual component size and the component dimension in the construction drawing is compared with a preset dimensional error threshold, and the component dimensional error status of the BIM review model is determined based on the comparison result, specifically:
[0080] When the component size error is greater than a preset size error threshold, the component corresponding to the component size error has a size deviation in the BIM review model; otherwise, the component corresponding to the component size error has no size deviation in the BIM review model.
[0081] An AI review and annotation system based on construction drawing compliance detection uses any of the above-mentioned AI review and annotation methods based on construction drawing compliance detection.
[0082] Compared with the prior art, the present invention has the following beneficial effects:
[0083] First, the present invention divides the image area into three different regions: stretched, compressed, and normal, by combining the U-Net network and the four-channel tensor, thereby enhancing the ability to extract image features. At the same time, through the joint optimization of Dice loss and deformation gradient loss, the generation accuracy of deformation heat maps is further improved. The image area is further divided by the deformation coefficient matrix, thus avoiding the insufficient accuracy of traditional threshold segmentation.
[0084] Second, based on the curvature characteristics of the heat map, the present invention dynamically adjusts the interpolation weights, increases the density of control points in high-curvature areas, and reduces redundant points in low-curvature areas, thereby optimizing vectorization accuracy. Furthermore, the adaptive adjustment of the control point density further achieves high-fidelity fitting of deformed areas, avoiding the grid jagged effect. Furthermore, by minimizing the curvature difference through the objective function, the reconstructed curve is ensured to be consistent with the CAD geometry, eliminating the risk of cracks.
[0085] Third, this invention combines geometric features with semantic labels to overcome the limitations of traditional methods that rely on manual annotation. It also further improves the model's compliance by detecting component collisions through bounding box intersections and automatically adjusting layouts based on preset priorities.
[0086] Fourthly: By obtaining the distance between adjacent triangles and the size error of components, the present invention can automatically mark the out-of-limit areas (such as cracks, dimensional deviations), thereby achieving accurate positioning of defects. At the same time, it dynamically evaluates the degree of compliance of the model with the specifications, and can provide objective evaluation indicators. Combined with color marking (such as red for cracks) and compliance rate settings, it can assist decision makers in quickly identifying high-risk links and reducing construction rework costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 Schematic diagram of the process of AI review and annotation method in the present invention;
[0088] Figure 2 A schematic diagram of the process of obtaining control point data in the present invention;
[0089] Figure 3 Schematic diagram of the process of obtaining the deformation coefficient matrix in the present invention;
[0090] Figure 4 Schematic diagram of the process of updating parameters in the U-Net encoder in the present invention;
[0091] Figure 5 is the original hand-drawn raster image in the present invention;
[0092] Figure 6 is a classification diagram of deformation regions in the present invention;
[0093] Figure 7 is the deformation thermodynamic diagram of the present invention;
[0094] Figure 8 This is a relationship diagram between curvature features and interpolation weights in the present invention. DETAILED DESCRIPTION
[0095] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0096] During the AI review and annotation process for construction drawings in multiple formats, the multi-scale data from these different formats must be fused. During this data fusion process, the hand-drawn raster images must be vectorized using a bilinear interpolation algorithm. However, during the vectorization process, non-uniformly deformed areas in the hand-drawn raster images can cause raster jaggedness, which cannot be accurately matched with the smooth vector NURBS curves in CAD. This can lead to geometric cracks when the BIM model is generated, compromising construction accuracy. This technical solution uses the U-Net encoder to classify the deformation areas of the pre-processed hand-drawn raster image, combines the Dice loss and deformation gradient loss to optimize the generation of deformation heat maps, extracts curvature features, and constructs NURBS curves. At the same time, the NURBS control points are aligned with the coordinate systems of CAD drawings and BIM model data, and matched with semantic rules to fuse and generate a BIM review model. Through geometric error detection and semantic compliance rate calculation, a construction accuracy risk report is generated, thereby realizing the automation of the entire process from image processing, vectorization reconstruction to compliance analysis, and effectively solving the technical problems of inaccurate vectorization of deformation areas and frequent cracks in multi-source data fusion in traditional methods.
[0097] Example 1
[0098] refer to Figure 1 and Figure 2 This embodiment provides an AI review and annotation method based on construction drawing compliance detection, which specifically includes the following steps:
[0099] Step S1: Obtain a deformation heatmap. This involves preprocessing the hand-drawn raster image and then using a U-Net network to obtain a deformation region classification map from the preprocessed hand-drawn raster image. Simultaneously, through the collaborative processing of training data annotation and loss function, a deformation heatmap corresponding to the deformation region classification map is generated. The deformation coefficients in the deformation heatmap are then used to determine the boundaries of the non-uniformly deformed regions. The details are as follows:
[0100] Step S1.1: Data preprocessing. This involves grayscaling, histogram equalization, denoising, and size normalization of the hand-drawn raster image to enhance the image. It is worth noting that the grayscaling, histogram equalization, denoising, and size normalization processes in this embodiment are conventional techniques and are not further detailed in this embodiment.
[0101] Furthermore, according to the normalized image pixel values corresponding to the pre-processed hand-drawn raster image, the image pixel values are normalized to the range of [0, 1]. In this embodiment, the pixel value normalization processing formula is specifically:
[0102] I norm =Iresizde / 255
[0103] Where: I norm is the pixel value of the scaled image, I resizde is the normalized image pixel value.
[0104] In the specific implementation process, after the original hand-drawn raster image is scaled to 512*512 pixels, the RGB value of one pixel is 120, 80 and 200. After normalizing them one by one to the range of [0,1], their corresponding sizes are: 0.47, 0.31 and 0.78 respectively.
[0105] Furthermore, the hand-drawn raster image is scanned by a scanner to obtain the corresponding original depth map. At the same time, according to the calibration parameters of the scanner, namely the original distance value, minimum measurement distance and maximum measurement distance of the scanner, the depth pixel value of the obtained original depth map is normalized to the range of [0, 1]. In this embodiment, the depth value normalization processing formula is specifically as follows:
[0106]
[0107] Where: D norm is the normalized depth image pixel value, D raw is the original distance value of the scanner, D min is the minimum measuring distance of the scanner, D max The maximum measuring distance of the scanner.
[0108] During the specific implementation, the original distance value of the scanner is 1.75m, the minimum measurement distance of the scanner is 0.5m, and the maximum measurement distance of the scanner is 3.0m, and the corresponding normalized depth image pixel value is 0.5.
[0109] Furthermore, the normalized image pixel values and the normalized depth image pixel values are concatenated and merged to generate a four-channel tensor.
[0110] In the specific implementation process, the normalized image pixel values are: 0.47, 0.31 and 0.78, and the normalized depth image pixel value is 0.5. The four-channel tensor obtained by stitching and merging is: [0.47, 0.31, 0.78, 0.5], that is, the tensor size formed is: 512*512*4.
[0111] Step S1.2: Obtain a deformation heatmap. This involves processing the four-channel tensor generated in step S1.1 through a U-Net encoder, outputting the corresponding deformation heatmap. Specifically, the four-channel tensor generated in step S1.1 is used as input to the U-Net encoder. The image's feature map size is expanded through the downsampling path and the number of convolutional layers configured in the downsampling path.
[0112] In the implementation, the downsampling path extracts features from a four-channel tensor using a 4-channel convolution kernel. The kernel size is 3x3, with a stride of 1 and padding of 1. Each set of convolution kernels consists of two 3x3 convolution layers with ReLU activation. A 2x2 pooling window with a stride of 2 is also used, and the feature map size is halved. Therefore, in the downsampling path, the expansion path for a 512x512x4 tensor size is shown in Table 1 below:
[0113] Table 1: Extension path table for 512*512*4 tensor size
[0114] Hierarchy Input size Output size 1 512*512*4 512*512*64 2 512*512*64 256*256*64 3 256*256*64 256*256*128
[0115] Furthermore, through the upsampling path in the U-Net encoder and the number of convolution layers set in the upsampling path, the size of the extended feature map in the downsampling path is further doubled, and at the same time, the feature map of the same layer in the U-Net encoder is spliced and merged with the feature map with doubled size in the upsampling path to obtain the final extended feature map.
[0116] In the specific implementation, the transposed convolution in the upsampling path uses a 2*2 convolution kernel with a stride of 2, doubling the size of the feature map. The encoder's feature map at the same layer is concatenated with the doubled feature map to enhance detail recovery. The concatenated feature map is then passed through a convolutional layer to reduce its channel count. Therefore, in the upsampling path, the expansion path for a 256*256*128 tensor size is shown in Table 2 below:
[0117] Table 1: Extension path table for 256*256*128 tensor size
[0118] Hierarchy Input size Output size 1 256*256*128 512*512*64 2 512*512*64 512*512*32
[0119] Furthermore, the number of channels of the final expanded feature map is compressed to 1 through the output layer of the U-Net encoder and the convolution kernel set in the output layer, and the deformation heat map is output through the activation function, specifically:
[0120]
[0121] Where: P(x, y) is the pixel value of the deformation heat map at position (x, y), σ is the activation function, W i,j is the weight parameter of the convolution kernel at position (x, y), (x, y) is the position coordinate of the deformation heat map, i and j are the relative position offsets within the convolution kernel, b is the bias term, and F(x+i, y+j) is the pixel value of the preprocessed hand-painted raster image at position (x+i, y+j).
[0122] refer to Figure 5-Figure 7 , Figure 5 is the original hand-drawn raster image in this embodiment, Figure 6 is a deformation area classification diagram in this embodiment, Figure 7 is the deformation thermodynamic diagram in this embodiment, from Figure 5-Figure 7 As can be seen, the deformation heatmap reflects the deformation regions in the image, with the stretched and compressed regions corresponding to the highlighted areas in the heatmap. This means that the deformation region classification map can effectively distinguish different deformation types. Furthermore, the highlighted regions in the deformation heatmap are consistent with the classification results in the deformation region classification map. This means that the combined optimization of the Dice loss and the gradient loss can further improve the accuracy of heatmap generation.
[0123] Step S2: Construct a NURBS curve. This involves using the adaptive interpolation algorithm and the pixel values corresponding to each position in the deformation heat map obtained in step S1.2 to obtain an initial vector primitive. Based on the obtained initial vector primitive, a NURBS curve is constructed and smoothly reconstructed. The details are as follows:
[0124] Step S2.1: Generate initial vector primitives. That is, based on the pixel values corresponding to each position in the deformation heat map obtained in step S1.2, obtain the curvature features corresponding to each position in the deformation heat map, and obtain the initial vector primitives through the adaptive interpolation algorithm and the obtained curvature features. The details are as follows:
[0125] Step S2.1.1: Obtain curvature features. That is, based on the pixel values corresponding to each position in the deformation heat map obtained in step S1.2, obtain the sum of the second-order derivatives of the deformation heat map in the horizontal and vertical directions, specifically:
[0126]
[0127] Where: C(x, y) is the curvature feature, P(x, y) is the pixel value of the deformation heat map at position (x, y), and (x, y) is the position coordinate of the deformation heat map.
[0128] In the specific implementation process, the pixel value of the center point (1,1) of the deformation heat map is 0.9, so the second-order derivative of the center pixel value in the horizontal direction is: 0.3-2*0.9+0.2=-1.3, and the second-order derivative of the center pixel value in the vertical direction is: 0.4-2*0.9+0.7=-0.7, so the curvature feature corresponding to the center pixel value is -2.0.
[0129] Step S2.1.2: Determine the interpolation weight. Specifically, based on the curvature feature size obtained in step S2.1.1, compare the absolute value of the curvature feature with a preset curvature threshold range. If the absolute value of the curvature feature is not less than the upper limit of the preset curvature threshold range, the area corresponding to the curvature feature is a high curvature area. If the absolute value of the curvature feature is less than the lower limit of the preset curvature threshold range, the area corresponding to the curvature feature is a low curvature area. Otherwise, the area corresponding to the curvature feature is a normal curvature area.
[0130] Furthermore, different interpolation weights are assigned to different curvature regions based on their respective curvature zones. Specifically, the interpolation weights for high-curvature regions are set smaller, those for low-curvature regions are set larger, and those for normal-curvature regions are set normal. In other words, the spacing between control points is adjusted based on the determined interpolation weights, increasing or decreasing the original spacing between control points.
[0131] In this embodiment, the interpolation weight setting formula is specifically:
[0132]
[0133] Where: W(x, y) is the interpolation weight, α is the sensitivity coefficient, and C(x, y) is the curvature feature.
[0134] During implementation, the sensitivity coefficient was set to 0.5. It's worth noting that the sensitivity coefficient can be adjusted based on actual needs, so this example is only illustrated with example data. For example, when the pixel value at the center point (1,1) of the deformation heat map is 0.9, the corresponding curvature feature is -2.0, and the corresponding interpolation weight is 0.5. In other words, the spacing between control points is reduced to 50% of the original spacing.
[0135] refer to Figure 8 , Figure 8 is the relationship diagram between the curvature feature and the interpolation weight in this embodiment, Figure 8 It can be seen that high curvature areas correspond to lower interpolation weights, which increases the density of control points and optimizes curve fitting. Furthermore, low curvature areas correspond to higher interpolation weights, which can reduce redundant points.
[0136] Step S2.1.3: Control point density adjustment. That is, according to the curvature feature size and basic curvature threshold obtained in step S2.1.1, the number of control points is adjusted, specifically:
[0137]
[0138] Where: N ctrl is the number of control points after adjustment, N base is the number of basic control points, β is the curvature sensitivity coefficient, C(x, y) is the curvature feature, C base is the base curvature threshold.
[0139] During the specific implementation, the curvature sensitivity coefficient was set to 0.15. It is worth noting that the curvature sensitivity coefficient can be set based on actual needs, so this embodiment is only illustrated with example data. Furthermore, the curvature characteristic corresponding to the center point (1,1) of the deformation heat map is -2.0, where the base curvature threshold is set to 0.5 and the base number of control points is set to 10. The adjusted number of control points is 14.5, or approximately 15. In other words, the number of control points increases from 10 to 15.
[0140] Step S2.1.4: Generate interpolation data. That is, adjust the spacing between adjacent control points based on the interpolation weights determined in step S2.1.2, and determine the size of the control point data for interpolation based on the number of control points determined in step S2.1.3. Specifically:
[0141]
[0142] Where: N m,3 (u) is the mth cubic B-spline basis function, u is a parameterized variable, r m+3 is the m+3th node in the node vector, r m is the mth node in the node vector, N m,2 (u) is the mth quadratic B-spline basis function, r m+4 is the m+4th node in the node vector, r m+1 is the m+1th node in the node vector, N m+1,2 (u) is the m+1th quadratic B-spline basis function.
[0143] Step S2.2: Smooth reconstruction. This involves converting the interpolated control point data obtained in step S2.1.4 into a NURBS curve. The NURBS-CAD geometric consistency optimization algorithm is then used to smoothly reconstruct the NURBS curve to eliminate the grid jagged effect in the NURBS curve. The details are as follows:
[0144] Step S2.2.1: Path fitting. This involves smoothly connecting the interpolated control point data obtained in step S2.1.4, combined with the determined number of control points and the spacing between adjacent control points, to obtain the corresponding NURBS curve, specifically:
[0145]
[0146] Where: Y(u) is the coordinate of the NURBS curve at the parameterized variable u, N m,k (u) is the m-th k-order B-spline basis function, ω m is the weight of the mth control point, R m is the coordinate of the mth control point, and n is the total number of control points.
[0147] During implementation, three control points were extracted from the deformation heatmap: (0,0), (1,2), and (3,1), with corresponding weights of 1, 2, and 1, respectively. At a parameterized variable of 0.5, the 0th cubic B-spline basis function is 0.25, the first cubic B-spline basis function is 0.5, and the second cubic B-spline basis function is 0.25. The corresponding curve coordinate Y(0.5) is (1.17, 2.83).
[0148] Step S2.2.2: Curve reconstruction. That is, the NURBS curve constructed in step S2.2.1 is reconstructed using the established objective function. In this embodiment, the objective function is obtained by the formula:
[0149]
[0150] Where: Q m is the coordinate of the mth optimized control point, Y m is the coordinate of the mth initial control point, λ is the regularization coefficient, C(x, y) is the curvature feature, C new (x, y) is the curvature characteristic of the optimized curve, and Ω is the parameter domain.
[0151] In the implementation, the initial control point coordinates are (0,0), (2,3), and (5,1), with curvature characteristics of 1.5 and 0.2, and the regularization coefficient is set to 0.5. Furthermore, the coordinates of the first optimized control point are the same as the first initial control point coordinates, namely (0,0). After iteratively solving the above objective function, the coordinates of the second optimized control point are (2.1,3.2), and the curvature characteristic of the optimized curve is 1.4.
[0152] Step S2.2.3: Curve smoothing. This involves smoothing the NURBS curve reconstructed in step S2.2.2 using the Laplacian smoothing algorithm to determine the final control point coordinates, specifically:
[0153]
[0154] in: is the coordinate of the final control point m, Q m is the coordinate of the mth optimized control point, δ is the smoothing factor, Q m-1 is the coordinate of the m-1th optimized control point, Q m+1 The coordinates of the m+1th optimized control point.
[0155] In the specific implementation process, the coordinates of the three consecutive optimized control points are: (1, 2), (1.5, 2.3) and (2, 2), where the smoothing factor is set to 0.3, and the corresponding final control point coordinates are (1.5, 2.25).
[0156] Step S3: Construct a BIM review model. This involves combining the final control points obtained in step S2.2.3, the data in the CAD drawings, and the data in the BIM model, and combining them with the defined semantic matching rules to generate a BIM review model. The details are as follows:
[0157] Step S3.1: Coordinate alignment. This involves converting data from different sources (the final control point coordinates obtained in step S2.2.3, the coordinates in the CAD drawing, and the coordinates in the BIM model) into a unified coordinate system to eliminate spatial deviations between the data. Specifically:
[0158]
[0159] Where: X WGS is the X-axis coordinate in the WGS-84 coordinate system, Y WGS is the Y-axis coordinate in the WGS-84 coordinate system, Z WGS is the Z-axis coordinate in the WGS-84 coordinate system, S is the scaling factor, J is the rotation matrix, X local is the X-axis coordinate in the local coordinate system, Y local is the Y-axis coordinate in the local coordinate system, Z local is the Z-axis coordinate in the local coordinate system, ΔX is the X-axis displacement of the origin of the local coordinate system in the WGS-84 coordinate system, ΔY is the Y-axis displacement of the origin of the local coordinate system in the WGS-84 coordinate system, and ΔZ is the Z-axis displacement of the origin of the local coordinate system in the WGS-84 coordinate system.
[0160] Step S3.2: Semantic Matching. This involves geometric feature matching, semantic label matching, and conflict detection and resolution. Specifically, when performing geometric feature matching, the aspect ratio of a rectangular outline can be matched with a BIM wall cluster, and the diameter of a circular cross-section can be matched with a BIM pipe cluster.
[0161] Furthermore, when performing semantic tag matching, you can match the CAD layer name with the BIM settings. For example, you can match the CAD layer name "WALL-EXTERIOR" with the BIM "Exterior Wall-Concrete".
[0162] Furthermore, when performing conflict detection, the intersection of the pipeline bounding box and the structural beam bounding box is obtained to determine whether there is a conflict between the two. For example, if the air duct bounding box [10,20]×[5,15]×[0,3] intersects with the beam bounding box [12,18]×[8,12]×[0,3], then there is a collision between the two.
[0163] Furthermore, when performing the resolution, it is possible to set the priority of components, which can be set according to its own needs. At the same time, it is required that low-priority components (such as water pipes) avoid high-priority components (such as structural beams).
[0164] Step S3.3: Generate a BIM review model. This involves combining the unified data coordinates in step S3.1 and the matching rules set in step S3.2 with Revit API calls or open source tools (such as IfcOpenShell) to generate a BIM review model.
[0165] Step S4: Obtaining a construction accuracy risk report. This involves automatically marking and inspecting the BIM review model through geometric error detection and semantic joint analysis, and obtaining the corresponding construction accuracy risk report. The details are as follows:
[0166] Step S4.1: Perform geometric error detection. This involves obtaining the distance between two adjacent triangular meshes based on all triangular meshes in the BIM review model, including vertex coordinates and adjacency relationships. The obtained distance is then compared with a preset distance threshold, and based on the comparison result, a determination is made as to whether cracks exist. Specifically:
[0167] When the obtained patch distance is greater than a preset distance threshold, there is a crack in the BIM review model; otherwise, there is no crack in the BIM review model.
[0168] In this embodiment, the formula for obtaining the patch distance is specifically:
[0169]
[0170] Where: d is the patch distance between two adjacent triangular mesh patches, is the X-axis coordinate of the w-th triangle mesh patch, is the X-axis coordinate of the w-1th triangle mesh patch, is the Y-axis coordinate of the w-th triangle mesh patch, is the Y-axis coordinate of the w-1th triangle mesh patch, is the Z-axis coordinate of the w-th triangular mesh patch, The Z-axis coordinate of the w-1th triangle mesh patch.
[0171] In the specific implementation process, the vertex coordinates of patch A are (0,0,0) and the vertex coordinates of patch B are (0.6,0,0), so the patch distance between patch A and patch B is 0.6 mm. At the same time, the preset distance threshold in this embodiment is 0.5 mm, so there is a crack between patch A and patch B.
[0172] Furthermore, the actual dimensions of the components in the BIM review model are compared with the dimensions of the components in the construction drawings to obtain the component dimensional error. At the same time, the obtained component dimensional error is compared with the preset dimensional error threshold, and based on the comparison results, it is determined whether the component has dimensional deviation. Specifically:
[0173] When the obtained component size error is greater than the preset size error threshold, the component corresponding to the component size error has a size deviation in the BIM review model; otherwise, the component corresponding to the component size error has no size deviation in the BIM review model.
[0174] In this embodiment, the formula for obtaining the component size error is specifically:
[0175] △L=|L act -L pre |
[0176] Where: ΔL is the component size error, L act To review the actual size of the components in the BIM model, L pre Dimension components in construction drawings.
[0177] During implementation, the actual size of a structural beam in the BIM review model is 4950mm, while the dimension marked in the construction drawing is 5000mm. The dimensional error between the two is 50mm. Furthermore, the preset dimensional error threshold in this embodiment is set to 5mm, so the structural beam has a dimensional deviation in the BIM review model.
[0178] Step S4.2: Compliance detection. This is to match the semantic rules matched in step S3.2 with the prescribed building rules (such as the "Code for Fire Protection Design of Buildings") to obtain the corresponding compliance rate, specifically:
[0179]
[0180] Where: Q qua is the semantic compliance rate, M com To meet the standard number of items, M tot is the total number of detected items.
[0181] Step S4.3: Obtaining a risk report. That is, generating a corresponding construction accuracy risk report based on the geometric error detection results obtained in step S4.1 and the semantic compliance rate obtained in step S4.2.
[0182] Specifically, based on the geometric error detection results obtained in step S4.1, cracks in the BIM review model are highlighted in red, numbered, and labeled with their sizes. Furthermore, components with dimensional deviations in the BIM review model are highlighted in yellow, and the ratio between the actual value and the design value is marked.
[0183] This embodiment also provides an AI review and annotation system based on construction drawing compliance detection, which uses the above-mentioned AI review and annotation method based on construction drawing compliance detection.
[0184] Example 2
[0185] refer to Figure 3 and Figure 4 This embodiment provides an AI review and annotation method based on construction drawing compliance detection. Its specific implementation method is the same as that of Example 1. The difference between the two is that in step S1.2, when the four-channel tensor generated in step S1.1 is processed by the U-Net encoder, the parameters in the U-Net encoder can be optimized based on the manual annotation and loss function corresponding to the hand-drawn raster image after image enhancement processing in step S1.1. The present invention is described below with examples based on the specific implementation methods of this embodiment.
[0186] In this embodiment, the deformation coefficient matrix corresponding to the hand-drawn raster image is obtained by manually marking the deformation area polygons, and the deformation coefficient matrix is compared with the deformation heat map obtained in step S1.2 to obtain the total loss value between the two. Based on the obtained total loss value, the parameters in the U-Net encoder in step S1.2 are optimized.
[0187] The details are as follows:
[0188] Step W1: Perform region labeling. This involves labeling the RGB image and depth image corresponding to the hand-drawn raster image preprocessed in step S1.1 using annotation tools such as LabelMe and CVAT. Furthermore, using polygon / rectangle annotation tools, distinguish between stretched and compressed regions in the RGB and depth images. Specifically, the stretched regions can be marked in red, while the compressed regions can be marked in blue to distinguish between the stretched and compressed regions.
[0189] Furthermore, the corresponding deformed lengths in the RGB image and the depth image are compared with the original lengths in the original hand-drawn raster image to obtain the deformation coefficient between the two, specifically:
[0190]
[0191] Where: S is the deformation coefficient, L defor is the deformed length in the RGB image or depth image, L orig is the original length in the original hand-drawn raster image.
[0192] Furthermore, the deformation coefficient between the deformed length and the original length is compared with a preset deformation threshold range, and based on the comparison result, the stretching area and the compression area are determined, specifically:
[0193] When the obtained deformation coefficient is greater than the upper limit value of the preset deformation threshold range, the area corresponding to the deformation coefficient is the stretching area. When the obtained deformation coefficient is less than the lower limit value of the preset deformation threshold range, the area corresponding to the deformation coefficient is the compression area. Otherwise, the area corresponding to the deformation coefficient is the normal area.
[0194] In the specific implementation process, the preset deformation threshold range is set to 0.8-1.2. That is, when the deformation coefficient exceeds 1.2, the corresponding area is in the stretching area, and when the deformation coefficient is less than 0.8, the corresponding area is in the compression area. When the deformation coefficient is between 0.8-1.2, the corresponding area is in the normal area.
[0195] Step W2: Generate a deformation coefficient matrix. Specifically, based on the stretched and compressed areas determined in step W1, set the pixel values in the stretched and compressed areas to 1, while setting the pixel values in the normal area to 0. In other words, the corresponding deformation coefficient matrix is obtained based on the set pixel values.
[0196] Step W3: Obtain the Dice loss value. That is, using the Sigmoid function, compress each pixel value in the deformation heat map obtained in step S1.2 to the range of [0, 1]. At the same time, based on the pixel values marked in the deformation coefficient matrix obtained in step W2, obtain the Dice loss value between the deformation heat map and the deformation coefficient matrix. Specifically, it is:
[0197]
[0198] Where: L dice is the Dice loss value, P pre (x, y) is the pixel value at position (x, y) in the deformation heat map, and G(x, y) is the pixel value at position (x, y) in the deformation coefficient matrix.
[0199] Step W4: Obtain the deformation gradient loss value. That is, based on the pixel value at each position in the deformation heat map, obtain the gradients of adjacent pixels in the horizontal and vertical directions, that is, the horizontal gradient and vertical gradient corresponding to the deformation heat map. Then, based on the obtained horizontal gradient and vertical gradient, obtain the deformation gradient loss value, specifically:
[0200]
[0201] in: is the gradient of the deformation heat map in the horizontal direction, is the gradient of the deformation heat map in the vertical direction, L grad is the deformation gradient loss value, P pre (x+1, y) is the pixel value at position (x+1, y) in the deformation heat map, P pre (x, y+1) is the pixel value at position (x, y+1) in the deformation heat map, P pre (x, y) is the pixel value at position (x, y) in the deformation heat map, and (x, y) is the position coordinate of the deformation heat map.
[0202] Step W5: Determine the total loss. That is, based on the Dice loss value obtained in step W3 and the deformation gradient loss value obtained in step W4, determine the total loss value, specifically:
[0203] L total =L dice +0.1 L grad
[0204] Where: L total is the total loss value, L dice is the Dice loss value, L grad is the deformation gradient loss value.
[0205] Step W6: Update network parameters. That is, based on the total loss value obtained in step W5, update the status of all trainable parameters in the U-Net encoder (such as convolution kernel weights and bias terms), specifically:
[0206]
[0207] Where: θ t+1 is the size of the model parameters at the t+1th iteration, θ t is the size of the model parameters at the tth iteration, η is the learning rate, L total is the total loss value.
[0208] Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is limited by the accompanying embodiments and their equivalents.
Claims
1. An AI review and annotation method based on construction drawing compliance detection, characterized in that: Includes: S1: Obtaining a deformation heat map: Classifying the preprocessed hand-drawn raster image through a U-Net network to obtain a deformation area classification map, and simultaneously obtaining a deformation heat map based on the deformation area classification map; S2: Constructing NURBS curves: Using an adaptive interpolation algorithm, the pixel values in the deformation heat map are processed to obtain initial vector primitives. At the same time, a NURBS curve is constructed based on the initial vector primitives, and the NURBS curve is smoothly reconstructed, including: S2.1: Generating an initial vector primitive: obtaining curvature features of each position in the deformation heat map according to pixel values in the deformation heat map, and obtaining an initial vector primitive according to the curvature features and an adaptive interpolation algorithm; S2.2: Smooth reconstruction: Construct a NURBS curve based on the initial vector primitives, and simultaneously perform smooth reconstruction on the NURBS curve using a NURBS-CAD geometric consistency optimization algorithm to obtain the final control point coordinates; S3: Building a BIM review model: combining the final control point coordinates, the data in the CAD drawing, and the data in the BIM model, and generating a BIM review model according to the set semantic matching rules; S4: Obtaining a construction accuracy risk report: Through geometric error detection and semantic joint analysis detection, the BIM review model is annotated and detected to generate a construction accuracy risk report.
2. The AI review and annotation method based on construction drawing compliance detection according to claim 1 is characterized in that: Get deformation heat map, including: S1.1: Data preprocessing: grayscale, histogram equalization, denoising, and size normalization are performed on the hand-drawn raster image. Pixel value normalization and depth value normalization are also performed on the preprocessed hand-drawn raster image to obtain a four-channel tensor corresponding to the hand-drawn raster image. S1.2: Obtaining a deformation heat map: The four-channel tensor is used as the input of the U-Net encoder, and the corresponding deformation heat map is obtained as the output. The formula for obtaining the pixel value size in the deformation heat map is specifically: Where: P(x, y) is the pixel value of the deformation heat map at position (x, y), σ is the activation function, W i,j is the weight parameter of the convolution kernel at position (x, y), (x, y) is the position coordinate of the deformation heat map, i and j are the relative position offsets within the convolution kernel, b is the bias term, and F(x+i, y+j) is the pixel value of the preprocessed hand-painted raster image at position (x+i, y+j).
3. The AI review and annotation method based on construction drawing compliance detection according to claim 2 is characterized in that: The deformation heat map is used to optimize the parameters in the U-Net encoder, including: W1: Perform region marking: Obtain deformation coefficients corresponding to different regions in the preprocessed hand-drawn raster image based on the deformed length of the preprocessed hand-drawn raster image, compare the deformation coefficients with a preset deformation threshold range, and determine the stretching region and the compression region based on the comparison results, specifically: When the deformation coefficient is greater than the upper limit of the preset deformation threshold range, the area corresponding to the deformation coefficient is a stretching area; when the deformation coefficient is less than the lower limit of the preset deformation threshold range, the area corresponding to the deformation coefficient is a compression area; otherwise, the area corresponding to the deformation coefficient is a normal area; W2: Generate deformation coefficient matrix: Set the pixel values in the stretching area and the compression area to 1, and set the pixel values in the normal area to 0, and obtain the deformation coefficient matrix according to the set pixel values; W3: Obtain Dice loss value: Process the pixel values in the deformation heat map through the Sigmoid function, and obtain the Dice loss value between the deformation heat map and the deformation coefficient matrix based on the deformation coefficient matrix, specifically: Where: L dice is the Dice loss value, P pre (x, y) is the pixel value at position (x, y) in the deformation heat map, and G(x, y) is the pixel value at position (x, y) in the deformation coefficient matrix; W4: Obtain deformation gradient loss value: According to the pixel values in the deformation heat map, obtain the horizontal gradient and vertical gradient of the deformation heat map, and obtain the deformation gradient loss value according to the horizontal gradient and vertical gradient, specifically: in: is the gradient of the deformation heat map in the horizontal direction, is the gradient of the deformation heat map in the vertical direction, L grad is the deformation gradient loss value, P pre (x+1, y) is the pixel value at position (x+1, y) in the deformation heat map, P pre (x, y+1) is the pixel value at position (x, y+1) in the deformation heat map, P pre (x, y) is the pixel value at position (x, y) in the deformation heat map, and (x, y) is the position coordinate of the deformation heat map; W5: Determine the total loss: Determine the total loss value based on the Dice loss value and the deformation gradient loss value, specifically: L total =L dice +0.1 L grad Where: L total is the total loss value, L dice is the Dice loss value, L grad is the deformation gradient loss value; W6: Update network parameters: Update the parameter status in the U-Net encoder according to the total loss value, specifically: Where: θ t+1 is the size of the model parameters at the t+1th iteration, θ t is the size of the model parameters at the tth iteration, η is the learning rate, L total is the total loss value.
4. The AI review and annotation method based on construction drawing compliance detection according to claim 1 is characterized in that: Obtaining the initial vector primitive includes: S2.1.1: Obtain curvature features: Based on the pixel values in the deformation heat map, obtain the sum of the second-order derivatives of the deformation heat map in the horizontal and vertical directions, specifically: Where: C(x, y) is the curvature feature, P(x, y) is the pixel value of the deformation heat map at position (x, y), and (x, y) is the position coordinate of the deformation heat map; S2.1.2: Determine interpolation weights: Based on the curvature characteristics and the preset curvature threshold range, the regions in the deformation heat map are divided into high curvature regions, low curvature regions, and normal curvature regions. At the same time, interpolation weights are set according to the divided region categories. The interpolation weight setting formula is specifically as follows: Where: W(x, y) is the interpolation weight, α is the sensitivity coefficient, and C(x, y) is the curvature feature; S2.1.3: Control point density adjustment: Based on the curvature characteristics and the basic curvature threshold, adjust the number of control points, specifically: Where: N ctrl is the number of control points after adjustment, N base is the number of basic control points, β is the curvature sensitivity coefficient, C(x,y) is the curvature feature, C base is the basic curvature threshold; S2.1.4: Generate interpolation data: Adjust the spacing between adjacent control points based on the interpolation weights, and determine the size of the control point data to be interpolated based on the adjusted number of control points, specifically: Where: N m,3 (u) is the mth cubic B-spline basis function, u is a parameterized variable, r m+3 is the m+3th node in the node vector, r m is the mth node in the node vector, N m,2 (u) is the mth quadratic B-spline basis function, r m+4 is the m+4th node in the node vector, r m+1 is the m+1th node in the node vector, N m+1,2 (u) is the m+1th quadratic B-spline basis function.
5. The AI review and annotation method based on construction drawing compliance detection according to claim 4 is characterized in that: The curvature feature is compared with a preset curvature threshold range, and based on the comparison result, the region in the deformation heat map is divided into a high curvature region, a low curvature region, and a normal curvature region, specifically: When the absolute value of the curvature feature is not less than the upper limit value of the preset curvature threshold range, the area corresponding to the curvature feature is a high curvature area. When the absolute value of the curvature feature is less than the lower limit value of the preset curvature threshold range, the area corresponding to the curvature feature is a low curvature area. Otherwise, the area corresponding to the curvature feature is a normal curvature area.
6. The AI review and annotation method based on construction drawing compliance detection according to claim 1 is characterized in that: Get the final NURBS curve, including: S2.2.1: Path fitting: Obtain the NURBS curve based on the interpolated control point data size, the number of control points, and the spacing between adjacent control points. Specifically: Where: Y(u) is the coordinate of the NURBS curve at the parameterized variable u, N m,k (u) is the m-th k-order B-spline basis function, ω m is the weight of the mth control point, R m is the coordinate of the mth control point, and n is the total number of control points; S2.2.2: Curve reconstruction: Reconstruct the NURBS curve using the established objective function. The objective function is obtained using the formula: Where: Q m is the coordinate of the mth optimized control point, Y m is the coordinate of the mth initial control point, λ is the regularization coefficient, C(x,y) is the curvature feature, C new (x,y) is the curvature characteristic of the optimized curve, and Ω is the parameter domain; S2.2.3: Curve smoothing: Smooth the reconstructed NURBS curve using the Laplacian smoothing algorithm to determine the final control point coordinates, specifically: in: is the coordinate of the final control point m, Q m is the coordinate of the mth optimized control point, δ is the smoothing factor, Q m-1 is the coordinate of the m-1th optimized control point, Q m+1 The coordinates of the m+1th optimized control point.
7. The AI review and annotation method based on construction drawing compliance detection according to claim 1 is characterized in that: Generate a BIM review model, including: S3.1: Coordinate alignment: Convert the final control point coordinates, the data in the CAD drawing, and the data in the BIM model into a unified coordinate system, specifically: Where: X WGS is the X-axis coordinate in the WGS-84 coordinate system, Y WGS is the Y-axis coordinate in the WGS-84 coordinate system, Z WGS is the Z-axis coordinate in the WGS-84 coordinate system, S is the scaling factor, J is the rotation matrix, X local is the X-axis coordinate in the local coordinate system, Y local is the Y-axis coordinate in the local coordinate system, Z local is the Z-axis coordinate in the local coordinate system, ΔX is the X-axis displacement of the origin of the local coordinate system in the WGS-84 coordinate system, ΔY is the Y-axis displacement of the origin of the local coordinate system in the WGS-84 coordinate system, and ΔZ is the Z-axis displacement of the origin of the local coordinate system in the WGS-84 coordinate system; S3.2: Semantic matching: Perform geometric feature matching, semantic label matching, conflict detection and resolution; S3.3: Generate BIM review model: Generate BIM review model based on unified data coordinates and matching semantic rules through Revit API calls or open source tools.
8. The AI review and annotation method based on construction drawing compliance detection according to claim 1 is characterized in that: Generate construction accuracy risk report, including: S4.1: Performing geometric error detection: Based on all triangular mesh patches and actual component sizes in the BIM review model, obtain the patch distance between two adjacent triangular mesh patches, and the component dimensional error between the actual component size and the component size marked in the construction drawing. Based on the patch distance and component dimensional error, determine the crack status and component dimensional error status of the BIM review model. S4.2: Compliance Check: Match the matching semantic rules with the prescribed building rules to obtain the compliance rate, specifically: Where: Q qua is the semantic compliance rate, M com To meet the standard number of items, M tot is the total number of detection items; S4.3: Obtain risk report: Based on the crack status and component size error status of the BIM review model, mark the cracks and components determined in the BIM review model with different colors, and at the same time determine the compliance rate corresponding to the BIM review model based on the compliance rate.
9. The AI review and annotation method based on construction drawing compliance detection according to claim 8 is characterized in that: The patch distance between two adjacent triangular mesh patches is compared with a preset distance threshold, and the crack status of the BIM review model is determined based on the comparison result, specifically: When the facet distance is greater than a preset distance threshold, there is a crack in the BIM review model; otherwise, there is no crack in the BIM review model; The component dimensional error between the actual component size and the component dimension in the construction drawing is compared with a preset dimensional error threshold, and the component dimensional error status of the BIM review model is determined based on the comparison result, specifically: When the component size error is greater than a preset size error threshold, the component corresponding to the component size error has a size deviation in the BIM review model; otherwise, the component corresponding to the component size error has no size deviation in the BIM review model.
10. An AI review and annotation system based on construction drawing compliance detection, characterized by: An AI review and annotation method based on construction drawing compliance detection as described in any one of claims 1 to 9 is used.
Citation Information
Patent Citations
Civil structure change monitoring data optimization method based on computer vision
CN118520722A