A KNet-based method and apparatus for identifying the number of steel supports and columns.

By using a KNet-based semantic segmentation method, the problems of low efficiency and insufficient accuracy in steel structure support and column quantity identification were solved, enabling accurate quantity identification and stability assessment at the construction site.

CN119904641BActive Publication Date: 2026-01-06HUAQIAO UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411990498.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2026-01-06
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

In existing technologies, the identification of the number of steel structure supports and columns relies on manual statistics, which is inefficient, costly, and prone to omissions and misjudgments. Furthermore, the identification accuracy is insufficient in complex construction environments.

Method used

A semantic segmentation method based on KNet is adopted, including image preprocessing, KNet model training and segmentation, morphological operations and connected component analysis. By calculating the position, density and distribution characteristics of steel supports and columns, accurate quantity identification is achieved.

Benefits of technology

It improves the accuracy and real-time performance of steel support and column quantity identification, reduces false detections and missed detections, and provides real-time monitoring and stability assessment of support structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904641B_ABST
    Figure CN119904641B_ABST
Patent Text Reader

Abstract

The present application relates to a steel support and column quantity identification method and device based on KNet, the method comprising: acquiring an image containing steel support, column and background information of a construction site; preprocessing the image; inputting the preprocessed image into a pre-trained KNet semantic segmentation model for segmentation, extracting a high-confidence binary mask image, and optimizing the image quality through morphological operation; performing connected component analysis to calculate the area of each region, screening effective regions according to the minimum area threshold, determining the accurate position of steel support and column using the centroid calculation, and evaluating the uniformity of distribution and the stability of structure; counting the number of effective regions and generating a structure quantity statistical report containing specific position, quantity and distribution density, and visualizing the report on the interface. The present application provides an efficient and accurate building structure detection and quantity statistical scheme, which can automatically identify and count the number of steel support and column, and solve the identification problem in the complex environment of a construction site.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of target recognition, and in particular to a steel support and column quantity identification method and device based on KNet. BACKGROUND

[0002] With the gradual improvement of the requirements of building engineering automation and safety management, the traditional manual inspection and regular maintenance mode gradually cannot meet the actual construction demand. Steel support and column as the key load-bearing component in building construction, its stability and rationality of distribution have important influence on construction quality and safety. However, the quantity identification and distribution analysis of steel structure mainly depend on manual statistics and monitoring, which is low in efficiency, high in cost, and easy to produce missed and misjudged. In order to improve the construction efficiency and ensure the reliability of the support system, it is urgent to develop an intelligent identification device which can monitor and analyze the quantity and layout of steel support and column in real time.

[0003] Under this background, data-driven methods such as computer vision and machine learning are gradually applied to the field of automatic identification of building engineering. Through the analysis of image data by deep learning model, the distribution state of steel support and column can be automatically identified, the identification efficiency is improved, and the labor cost is reduced. However, this kind of method still faces many challenges in application. On the one hand, the complex environment such as light, noise and occlusion of construction site affects the accuracy of model identification. On the other hand, the shape and size of steel support and column are often different, how to effectively distinguish and count their quantity is a key difficulty.

[0004] In recent years, instance segmentation methods based on convolutional neural network (CNN) have made significant progress, providing a new idea for the quantity identification of steel support and column. For example, KNet (Kernel-based Network) model performs well in image segmentation task, which can refine the edges of targets in image and accurately locate individual objects, providing technical support for steel structure identification and statistics. However, traditional segmentation methods are mostly used in scenes with clear target boundaries, and it is difficult to deal with the complex environment of construction site. Especially, the dense distribution of steel support and column can easily lead to the reduction of recognition accuracy of the model, and the existing model lacks pertinence in analyzing the mask area, which is difficult to further output structure feature data such as position and density. SUMMARY

[0005] In order to solve the above problems, the present application provides a steel support and column quantity identification method and device based on KNet, which solves the problems of low identification efficiency and poor accuracy of steel structure in construction site in the prior art, and realizes the real-time monitoring demand of support structure in modern building construction.

[0006] The specific scheme is as follows:

[0007] In one aspect, the KNet-based steel support and column quantity identification method comprises:

[0008] S1, obtaining image data of a construction site; the coverage area of the image data includes steel supports, columns and background information for interference identification;

[0009] S2, preprocessing the image data of the construction site;

[0010] S3, inputting the preprocessed image data into a trained KNet-based semantic segmentation model for segmentation;

[0011] S4, obtaining high-confidence binary mask images of steel supports and columns from the image data segmented by the model, performing morphological operations on the binary mask images to optimize the mask image quality, performing connected component analysis on the optimized mask images, calculating the area of each region and filtering the effective regions according to the minimum area threshold, determining the accurate positions of the steel supports and columns in the effective regions through centroid calculation, calculating the average Euclidean distance and distribution density between the steel supports and columns based on the accurate positions to evaluate the distribution uniformity, and performing quantity statistics and geometric feature analysis on the effective regions based on the distribution uniformity to obtain the structural stability and quantity of the steel supports and columns;

[0012] S5, taking the obtained quantity of steel supports and columns as the final identification result, generating a structure quantity statistical report, and visualizing and displaying it on the interface; the statistical report includes the specific positions, quantities and distribution densities of the steel supports and columns.

[0013] Further, in S2, the preprocessing includes resizing, image normalization and data augmentation of the image data of the construction site;

[0014] The resizing is used to adjust the image data of the construction site to a standard size that meets the input requirements of the KNet model to ensure the consistency of the input image size;

[0015] The image normalization is used to normalize the image data after resizing, scaling the pixel value from the range [0, 255] to [0, 1]; the calculation formula is as follows:

[0016]

[0017] Where X is the pixel value of the image of the construction site, X min and X max are the minimum and maximum values of the image pixel value respectively; X' is the pixel value of the normalized image data, which ranges from 0 to 1;

[0018] The data augmentation includes random cropping, rotation, color disturbance, and blur and noise addition;

[0019] The random cropping is used to randomly select normalized image regions. The normalized image is cropped to accommodate target samples at different viewing angles and distances. The cropping region is determined by randomly generating a center point and scale, as shown in the following formula:

[0020] R c =X′[x0:x0+h c ,y0:y0+w c ];

[0021] Among them, h c and w c Let (x0, y0) represent the height and width of the cropping area, respectively, and (x0, y0) be the coordinates of a randomly selected starting point. R c The normalized image region after random cropping;

[0022] The rotation is used to randomly rotate the resized image within the angle range of [-θ, θ], selecting an angle θ∈[-15, 15°] to simulate the multi-angle observation effect in a real construction site. The formula is as follows:

[0023] X′ rotated =X′·cos(θ)-Y′·sin(θ);

[0024] Where, X′ rotated This represents the pixel position of the rotated image, where θ is the rotation angle, and X′ and Y′ are the horizontal and vertical coordinates of the image, respectively.

[0025] The color perturbation is used to randomly perturb the normalized image to simulate scenes under different lighting conditions. The basic calculation formula for the color perturbation is as follows:

[0026] X′ adjusted =α·X′+β;

[0027] Where, X′ adjusted For the color-perturbed image, α is used to control the contrast of the normalized image, and β is used to control the brightness of the normalized image;

[0028] The blurring and noise addition is used to add Gaussian blur or random noise to the normalized image. The calculation formula is as follows:

[0029] X′ noisy =X′+N(0,σ 2 );

[0030] Where N(0,σ) 2 ) represents the added Gaussian noise, σ represents the standard deviation, and X′ represents the noise level. noisy This is the image after noise.

[0031] Furthermore, in S3, the KNet-based semantic segmentation model includes a backbone network, a decoder head, an auxiliary head, a loss function, a cost-sensitive learning strategy, and an optimizer.

[0032] The backbone network extracts global features from the input image to obtain basic feature representations; the decoding head performs sampling and semantic refinement on the basic features to generate accurate segmentation results; the auxiliary head provides additional supervision to the backbone network and the decoding head, helping to improve feature extraction capabilities and convergence speed; the loss function compares the segmentation results with the actual annotations, calculates the error, and provides an optimization objective; the cost-sensitive learning strategy improves the recognition of steel supports and columns through a weighted loss function; the optimizer updates the model parameters based on the loss to ensure effective training of the network.

[0033] Backbone Network: The Swin Transformer is used as the backbone network, and basic features are extracted step by step through a hierarchical self-attention mechanism. The self-attention calculation formula is as follows:

[0034]

[0035] Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively, and d k This is the scaling factor;

[0036] The decoding head consists of a kernel update head and a unified perceptron (UPerHead). The kernel update head is used to dynamically adjust the segmentation features, while the unified perceptron (UPerHead) is used to aggregate contextual information.

[0037] Auxiliary head section: By combining with the fully convolutional network head FCNHead to provide additional supervision signals, the auxiliary segmentation results are output through the fully convolutional network head FCNHead to realize gradient transfer between the backbone network and the decoding head;

[0038] Loss function part: The model is optimized using the cross-entropy loss function, which is defined as follows:

[0039]

[0040] Among them, y i This represents the true label, i.e., the classification label corresponding to the steel supports or columns in the sample; p i This represents the probability predicted by the model, i.e., the probability of the model predicting the category of steel support or column; N is the number of samples, representing the total number of samples participating in model training or testing.

[0041] Cost-sensitive learning strategy section: Introducing a cost-sensitive learning strategy, different weight coefficients w are set for the steel support, column, and background area. i This makes the model focus more on the target areas of steel supports and columns during training. The loss function after weight adjustment is expressed as:

[0042]

[0043] Optimizer section: The AdamW optimizer is used to update model parameters, with the following update rules:

[0044] m t =β1m t-1 +(1-β1)g t ;

[0045]

[0046] Where, m t and v t β1 and β2 are the first and second momentum of the gradient, respectively, used to smooth and accelerate gradient updates; α is the learning rate, controlling the step size of model parameter updates; β1 and β2 are momentum decay coefficients, used to adjust the update ratio of the first and second momentum; ∈ is the stabilization term, used to avoid zero denominators and improve the stability of numerical calculations; λ is the weight decay factor, which suppresses model overfitting by introducing regularization; g t The gradient at time t indicates the direction of model optimization, and t represents the iteration number used to track the optimization progress; φ t This represents the parameter vector of the model.

[0047] Furthermore, the Kernel Update Head uses weight W dynamic The convolution operation is performed using the following formula:

[0048] F out =F*W dynamic +b dynamic ;

[0049] Where F is the input feature map, representing the feature data to be processed after being extracted by the backbone network, used for subsequent feature extraction and enhancement; W dynamic and b dynamic The weights and biases of the convolution kernel are dynamically generated based on the input features to improve the expressiveness and flexibility of the convolution operation; * indicates the convolution operation, which performs weighted calculations on the input feature map F to extract and update the features, thereby capturing the feature distribution of steel supports and columns under complex working conditions.

[0050] Furthermore, S4 specifically includes: -

[0051] Extract binary mask images of steel supports and columns, filter out binary mask image regions with confidence scores higher than the first threshold, and filter out binary mask image regions with confidence scores lower than the first threshold.

[0052] The binary mask image satisfies the following conditions:

[0053]

[0054] Where (x,y) is the pixel position in the image, M(x,y) is the extracted binary mask image, P(x,y) represents the segmentation confidence of the pixel, and θ is the threshold used to filter low confidence regions;

[0055] Morphological operations are used to eliminate noise in the binary mask image and fill in small holes;

[0056] Morphological operations specifically involve closing operations, with the result denoted as M. morph The formula is as follows:

[0057] M morph =Morph(M; kernel);

[0058] Here, kernel is the structural element in morphological operations;

[0059] Perform connected component analysis on the processed binary mask image, calculate the area of ​​each region, and filter out regions smaller than the minimum area threshold based on the minimum area threshold, retaining the effective region;

[0060] Mask M for closing operation morph Perform connected component analysis to identify each connected region R i And calculate the area A(R) of each region. i The formula is as follows:

[0061]

[0062] By setting the first threshold T min To filter out areas smaller than T min Within the given region, select the target regions that meet the criteria. The set of valid regions is defined as follows:

[0063]

[0064] The precise locations of the steel supports and columns are determined by calculating the centroid of each effective area.

[0065] The formula for calculating the centroid position is as follows:

[0066]

[0067] Among them, C(R)i )=(x c ,y c ) is region R i The location of the centroid;

[0068] The average Euclidean distance between the steel supports and columns is calculated based on their precise locations, and the distribution density of the steel supports and columns in the image is obtained based on the ratio of the total area of ​​the effective region to the total area of ​​the binary mask image, so as to evaluate the uniformity of the distribution of the steel supports and columns.

[0069] Calculate the average Euclidean distance d between the steel support and the column. avg The formula is as follows:

[0070]

[0071] Among them, ||C(R) i )-C(R i+1 )|| represents the Euclidean distance between adjacent steel supports or columns. Calculate the distribution density ρ of the steel supports and columns in the image:

[0072]

[0073] in, A represents the total area of ​​the effective region. img The total area of ​​the binary mask image;

[0074] The geometric characteristics of steel supports and columns are analyzed, as well as their impact on structural stability. The total number of steel supports and columns is obtained by statistically analyzing the effective area and combining it with the calculation results of density and average Euclidean distance.

[0075] The geometric characteristics of the supporting structure are analyzed by calculating the shape factor κ to measure the shape consistency of the target area, as shown in the following formula:

[0076]

[0077] Among them, P i For region R i circumference;

[0078] Calculate the number of steel supports or columns separately, using the following formula:

[0079]

[0080] Where, N steel The number of steel supports, This refers to the effective area corresponding to the steel support. N pillar The number of columns, This refers to the valid area corresponding to the column.

[0081] Furthermore, S5 also includes:

[0082] The structural quantity statistics results are stored in a database or file system to support the retrieval of structural quantity statistics results from the database or file system when needed during construction site management, construction progress tracking and safety monitoring.

[0083] On the other hand, the KNet-based steel support and column quantity recognition device includes:

[0084] The image data acquisition module is used to acquire image data of the construction site; the image coverage area includes steel supports, columns, and background information for interference identification.

[0085] The preprocessing module is used to preprocess image data from the construction site.

[0086] The model segmentation module is used to input preprocessed image data into a pre-trained KNet-based semantic segmentation model to perform segmentation;

[0087] The quantity statistics module is used to obtain high-confidence binary mask images of steel supports and columns from the image data after model segmentation. Morphological operations are performed on the binary mask images to optimize their quality. Connected component analysis is performed on the optimized mask images to calculate the area of ​​each region and filter the effective regions according to the minimum area threshold. The precise position of the steel supports and columns in the effective regions is determined by centroid calculation. Based on the precise position, the average Euclidean distance and distribution density between the steel supports and columns are calculated to evaluate the distribution uniformity. Based on the distribution uniformity, quantity statistics and geometric feature analysis are performed on the effective regions to obtain the structural stability and quantity of steel supports and columns.

[0088] The report generation module is used to take the obtained number of steel supports and columns as the final identification results, generate a structural quantity statistics report, and display it visually on the interface; the statistics report includes the specific location, quantity, and distribution density of the steel supports and columns.

[0089] The present invention adopts the above technical solution and has the following beneficial effects:

[0090] (1) This invention solves the problems of accuracy and real-time performance when identifying the number of steel supports and columns in complex construction environments by using refined region segmentation, morphological operations and mask region extraction technology;

[0091] (2) This invention extracts the mask region and focuses on the key information region, reducing background interference; it adopts the region size filtering step to improve the recognition accuracy of the actual target structure and reduce false detection and missed detection.

[0092] (3) This invention performs precise analysis of structural position and density through dynamic centroid calculation and quantity statistics, and provides real-time monitoring of support distribution in the scene. Attached Figure Description

[0093] Figure 1 This invention provides a KNet-based method for identifying the number of steel supports and columns.

[0094] Figure 2 This is a schematic diagram illustrating the application of KNet in identifying the number of steel supports and columns under a certain construction site foundation pit condition according to an embodiment of the present invention.

[0095] Figure 3 This is a structural block diagram of a KNet-based steel support and column quantity identification device according to an embodiment of the present invention. Detailed Implementation

[0096] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.

[0097] like Figure 1 As shown, the present invention provides a KNet-based method for identifying the number of steel supports and columns, comprising:

[0098] S1, acquire image data of the construction site; the coverage area of ​​the image data includes steel supports, columns, and background information for interference identification.

[0099] Specifically, in this embodiment, image data of the construction site is acquired through a camera or other image acquisition device, including images of the construction site taken from different angles and positions.

[0100] Specifically, in this embodiment, background information that interferes with identification includes, for example, stacked building materials (such as steel bars, formwork, wooden boards, cement bags, etc.), environmental factors (such as shadows, light reflections, dust or smoke, etc.), other temporary structures (such as support poles, protective nets, guardrails, etc.), and trees, vegetation, earthwork or sky in the natural environment.

[0101] S2, preprocesses the image data of the construction site;

[0102] Specifically, the preprocessing includes resizing, normalizing, and augmenting the image data of the construction site.

[0103] The size adjustment is used to adjust the image data of the construction site to a standard size that meets the input requirements of the KNet model to ensure the consistency of the input image size.

[0104] Image normalization: This is used to normalize the resized image data, scaling pixel values ​​from the range [0,255] to [0,1]; the calculation formula is as follows:

[0105]

[0106] Where X represents the image pixel value of the construction site, X min and X max X and X' are the minimum and maximum pixel values ​​of the image, respectively; X' is the pixel value of the normalized image data, which ranges from [0,1].

[0107] The data augmentation includes random cropping, rotation, color perturbation, and blurring and noise addition;

[0108] The random cropping is used to randomly select normalized image regions. The normalized image is cropped to accommodate target samples at different viewing angles and distances. The cropping region is determined by randomly generating a center point and scale, as shown in the following formula:

[0109] R c =X′[x0:x0+h c ,y0:y0+w c ];

[0110] Among them, h c and w c Let (x0, y0) represent the height and width of the cropping area, respectively, and (x0, y0) be the coordinates of a randomly selected starting point. R c The normalized image region after random cropping;

[0111] The rotation is used to randomly rotate the resized image within the angle range of [-θ, θ], selecting an angle θ∈[-15°, 15°] to simulate the multi-angle observation effect in a real construction site. The formula is as follows:

[0112] X′ rotated =X′·cos(θ)-Y′·sin(θ);

[0113] Where, X′ rotated This represents the pixel position of the rotated image, where θ is the rotation angle, and X′ and Y′ are the horizontal and vertical coordinates of the image, respectively.

[0114] The color perturbation is used to randomly perturb the normalized image to simulate scenes under different lighting conditions. The basic calculation formula for the color perturbation is as follows:

[0115] X′ adjusted =αX′+β;

[0116] Where, X′adjusted For the color-perturbed image, α is used to control the contrast of the normalized image, and β is used to control the brightness of the normalized image;

[0117] The blurring and noise addition is used to add Gaussian blur or random noise to the normalized image. The calculation formula is as follows:

[0118] X′ noisy =X′+N(0,σ 2 );

[0119] Where N(0,σ) 2 ) represents the added Gaussian noise, σ represents the standard deviation, and X′ represents the noise level. noisy This is the image after noise.

[0120] S3, input the preprocessed image data into the trained KNet-based semantic segmentation model to perform segmentation;

[0121] Specifically, the KNet-based semantic segmentation model includes a backbone network, a decoder head, an auxiliary head, a loss function, a cost-sensitive learning strategy, and an optimizer.

[0122] The backbone network extracts global features from the input image to obtain basic feature representations; the decoding head performs sampling and semantic refinement on the basic features to generate accurate segmentation results; the auxiliary head provides additional supervision to the backbone network and the decoding head, helping to improve feature extraction capabilities and convergence speed; the loss function compares the segmentation results with the actual annotations, calculates the error, and provides an optimization objective; the cost-sensitive learning strategy improves the recognition of steel supports and columns through a weighted loss function; the optimizer updates the model parameters based on the loss to ensure effective training of the network.

[0123] Backbone Network: The Swin Transformer is used as the backbone network, and basic features are extracted step by step through a hierarchical self-attention mechanism. The self-attention calculation formula is as follows:

[0124]

[0125] Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively, and d k This is the scaling factor;

[0126] The decoding head consists of a kernel update head and a unified perceptron (UPerHead). The kernel update head is used to dynamically adjust the segmentation features, while the unified perceptron (UPerHead) is used to aggregate contextual information.

[0127] Auxiliary head section: By combining with the fully convolutional network head FCNHead to provide additional supervision signals, the auxiliary segmentation results are output through the fully convolutional network head FCNHead to realize gradient transfer between the backbone network and the decoding head;

[0128] Loss function part: The model is optimized using the cross-entropy loss function, which is defined as follows:

[0129]

[0130] Among them, y i This represents the true label, i.e., the classification label corresponding to the steel supports or columns in the sample; p i This represents the probability predicted by the model, i.e., the probability of the model predicting the category of steel support or column; N is the number of samples, representing the total number of samples participating in model training or testing.

[0131] Cost-sensitive learning strategy section: Introducing a cost-sensitive learning strategy, different weight coefficients w are set for the steel support, column, and background area. i This makes the model focus more on the target areas of steel supports and columns during training. The loss function after weight adjustment is expressed as:

[0132]

[0133] Optimizer section: The AdamW optimizer is used to update model parameters, with the following update rules:

[0134] m t =β1m t-1 +(1-β1)g t ;

[0135]

[0136] Where, m t and v t β1 and β2 are the first and second momentum of the gradient, respectively, used to smooth and accelerate gradient updates; α is the learning rate, controlling the step size of model parameter updates; β1 and β2 are momentum decay coefficients, used to adjust the update ratio of the first and second momentum; ∈ is the stabilization term, used to avoid zero denominators and improve the stability of numerical calculations; λ is the weight decay factor, which suppresses model overfitting by introducing regularization; g t The gradient at time t indicates the direction of model optimization, and t represents the iteration number used to track the optimization progress; φ t This represents the parameter vector of the model.

[0137] Specifically, the Kernel Update Head uses weight W dynamic The convolution operation is performed using the following formula:

[0138] F out =F*W dynamic +b dynamic ;

[0139] Where F is the input feature map, W dynamic and b dynamic These are the convolution kernel weights and biases dynamically generated based on the input features. * indicates the convolution operation.

[0140] Specifically, in this embodiment, α takes values ​​in the range of [0.8, 1.2], β takes values ​​in the range of [-0.2, 0.2], and the model input data format is H×W×C, where H and W represent the height and width of the image, respectively, and C is the number of channels (usually three channels of an RGB image). After normalization and data augmentation, the input data can effectively improve the model's generalization ability in complex backgrounds.

[0141] Specifically, the Kernel Update Head uses generated learnable convolutional kernels to update the target features. Dynamic convolution generates convolutional kernel weights based on input features, adapting them to local feature changes in the input features and improving segmentation details. The UPerHead (Unified Perceptual Parsing Head) is used for multi-layer feature aggregation, fusing features from different levels and upsampling them to generate predictions of the same size as the input image. It mainly uses the Feature Pyramid Network (FPN) strategy to upsample high-level semantic features and combine them with low-level detail features to obtain the final segmentation result. The Fully Convolutional Network Head (FCNHead) is used as an auxiliary head or basic segmentation head in semantic segmentation. It mainly utilizes the architecture of a fully convolutional network to classify input features pixel by pixel.

[0142] S4. Obtain high-confidence binary mask images of steel supports and columns from the image data after model segmentation. Perform morphological operations on the binary mask images to optimize their quality. Perform connected component analysis on the optimized mask images to calculate the area of ​​each region and filter the effective regions based on the minimum area threshold. Determine the precise location of the steel supports and columns in the effective regions through centroid calculation. Calculate the average Euclidean distance and distribution density between the steel supports and columns based on the precise location to evaluate the distribution uniformity. Perform statistical analysis and geometric feature analysis on the effective regions based on the distribution uniformity to obtain the structural stability and quantity of the steel supports and columns.

[0143] Specifically, S4 includes:

[0144] Extract binary mask images of steel supports and columns, filter out binary mask image regions with confidence scores higher than the first threshold, and filter out binary mask image regions with confidence scores lower than the first threshold.

[0145] The binary mask image satisfies the following conditions:

[0146]

[0147] Where (x,y) is the pixel position in the image, M(x,y) is the extracted binary mask image, P(x,y) represents the segmentation confidence of the pixel, and θ is the threshold used to filter low confidence regions;

[0148] Morphological operations are used to eliminate noise in the binary mask image and fill in small holes;

[0149] Morphological operations specifically involve closing operations, with the result denoted as M. morph The formula is as follows:

[0150] M morph =Morph(M; kernel);

[0151] Here, kernel is the structural element in morphological operations;

[0152] Perform connected component analysis on the processed binary mask image, calculate the area of ​​each region, and filter out regions smaller than the minimum area threshold based on the minimum area threshold, retaining the effective region;

[0153] Mask M for closing operation morph Perform connected component analysis to identify each connected region R i And calculate the area A(R) of each region. i The formula is as follows:

[0154]

[0155] By setting the first threshold T min To filter out areas smaller than T min Within the given region, select the target regions that meet the criteria. The set of valid regions is defined as follows:

[0156]

[0157] The precise locations of the steel supports and columns are determined by calculating the centroid of each effective area.

[0158] The formula for calculating the centroid position is as follows:

[0159]

[0160] Among them, C(R) i )=(x c ,y c ) is region R iThe location of the centroid;

[0161] The average Euclidean distance between the steel supports and columns is calculated based on their precise locations, and the distribution density of the steel supports and columns in the image is obtained based on the ratio of the total area of ​​the effective region to the total area of ​​the binary mask image, so as to evaluate the uniformity of the distribution of the steel supports and columns.

[0162] Calculate the average Euclidean distance d between the steel support and the column. avg The formula is as follows:

[0163]

[0164] Among them, ||C(R) i )-C(R i+1 )|| represents the Euclidean distance between adjacent steel supports or columns. Calculate the distribution density ρ of the steel supports and columns in the image:

[0165]

[0166] in, A represents the total area of ​​the effective region. img The total area of ​​the binary mask image;

[0167] The geometric characteristics of steel supports and columns are analyzed, as well as their impact on structural stability. The total number of steel supports and columns is obtained by statistically analyzing the effective area and combining it with the calculation results of density and average Euclidean distance.

[0168] The geometric characteristics of the supporting structure are analyzed by calculating the shape factor κ to measure the shape consistency of the target area, as shown in the following formula:

[0169]

[0170] Among them, P i For region R i circumference;

[0171] Calculate the number of steel supports or columns separately, using the following formula:

[0172]

[0173] Where, N steel The number of steel supports, This refers to the effective area corresponding to the steel support. N pillar The number of columns, This refers to the valid area corresponding to the column.

[0174] S5. The obtained number of steel supports and columns are used as the final identification results to generate a structural quantity statistics report, which is then visualized on the interface. The statistics report includes the specific location, quantity, and distribution density of the steel supports and columns.

[0175] Specifically, the structural quantity statistics results are stored in a database or file system to support the retrieval of structural quantity statistics results from the database or file system when needed during construction site management, construction progress tracking, and safety monitoring.

[0176] Specifically, such as Figure 2 As shown, in this embodiment, image data of steel supports and columns under the condition of a foundation pit at a certain construction site were selected as input. I This represents the input dataset used to train the model. It is derived from historical data (such as images of steel supports and columns under different working conditions) after specific preprocessing (e.g., feature extraction using KNet). Each image contains visual features such as the number of steel supports, column distribution, angles, and spacing under different working conditions. I Indicates the training phase corresponding to X I The labeled data serves as the supervised output of the model. It consists of target values ​​generated through manual annotation, and these feature data are preprocessed using KNet as the model input. After preprocessing, the input dataset X is obtained. w , where each X w This represents multiple feature data segments from an image, including structural information such as the number of steel supports and the distribution of columns. This data is input into a pre-trained Knet-based cost-sensitive recognition model, which outputs the recognition result Y. w , where Y w The prediction result for the corresponding image (such as whether it meets the safety layout requirements, whether the number of supports or columns meets the standards, etc.), where w represents the application under the working condition.

[0177] Meanwhile, to verify the effectiveness of the steel support and column quantity recognition method based on the Knet model proposed in this invention, the image data was randomly divided into a training set (80%) and a test set (20%) for model training and recognition effect verification. The experimental parameters of this invention are shown in Table 1 below:

[0178] Table 1. Experimental parameter settings

[0179]

[0180] The steel support and column quantity recognition method based on KNet of this invention was used to train and test the model, and its performance was observed. The confusion matrix of the test set pixel results in the multi-class dataset is shown in Table 2.

[0181] Table 2. Confusion Matrix

[0182] BACKGROUND Steel support Column BACKGROUND 1174414 53995 8479 Steel support 11764 698762 3331 Column 37446 3485 190301

[0183] The data on the diagonal (e.g., 1174414, 698762, 190301) represent the number of sample pixels correctly predicted by the model.

[0184] Off-diagonal data: Represents misclassification results of the model, specifically including: misclassifying "background" as "steel support" or "column". Misclassifying "steel support" as "background" or "column". Misclassifying "column" as "background" or "steel support".

[0185] Based on the confusion matrix, the accuracy of multi-class prediction is calculated to be 94.569%.

[0186] The precision, recall, and F1 score of the classification predictions are calculated as shown in Table 3.

[0187] Table 3. Recall and F1 score results

[0188] CLASS Precision Recall F1 Score BACKGROUND 95.79 95.51 95.65 Steel support 91.49 92.89 92.18 Column 94.24 89.88 92.01

[0189] The accuracy of the prediction of the number of foundation pit steel supports and columns for the test set is shown in Table 4.

[0190] Table 4. Real-time Fault Prediction Accuracy

[0191] Type Actual occurrences Predicted failures Accuracy Steel support 142 132 91.03% Column 37 35 94.59% Overall accuracy 179 167 93.30%

[0192] Based on the KNet algorithm, this model performs excellently in steel support and column classification and fault prediction tasks. In terms of classification performance, the precision, recall, and F1 score for the background category are around 90%, while the classification precision for steel supports and columns reaches 92.18% and 92.01%, respectively. However, the recall for columns is slightly lower, indicating some missed detections. In practical applications, the model achieves an overall accuracy of 93.30% in predicting the number of steel supports and columns in foundation pit conditions, with a prediction accuracy of 91.03% for steel supports and 94.59% for columns, effectively meeting engineering requirements.

[0193] like Figure 3 As shown, this embodiment also discloses a KNet-based steel support and column quantity recognition device, including:

[0194] Image data acquisition module 31 is used to acquire image data of the construction site; the coverage area of ​​the image data includes steel supports, columns, and background information for interference identification;

[0195] Preprocessing module 32 is used to preprocess image data from the construction site;

[0196] The model segmentation module 33 is used to input the preprocessed image data into a pre-trained KNet-based semantic segmentation model to perform segmentation;

[0197] The quantity statistics module 34 is used to obtain high-confidence binary mask images of steel supports and columns from the image data after model segmentation, perform morphological operations on the binary mask images to optimize the mask image quality, perform connected component analysis on the optimized mask images, calculate the area of ​​each region and filter the effective regions according to the minimum area threshold, determine the precise position of steel supports and columns in the effective regions through centroid calculation, calculate the average Euclidean distance and distribution density between steel supports and columns based on the precise position to evaluate the distribution uniformity, and perform quantity statistics and geometric feature analysis on the effective regions based on the distribution uniformity to obtain the structural stability and quantity of steel supports and columns.

[0198] The report generation module 35 is used to take the obtained number of steel supports and columns as the final identification results, generate a structural quantity statistics report, and display it visually on the interface; the statistics report includes the specific location, quantity, and distribution density of the steel supports and columns.

[0199] The specific implementation of the KNet-based steel support and column quantity identification device is the same as the KNet-based steel support and column quantity identification method, and will not be described again in this embodiment.

[0200] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.

Claims

1. A KNet-based steel support and stand number recognition method, characterized by, The method comprises the following steps: S1, obtaining image data of a construction site; the coverage area of the image data includes steel supports, columns and background information for interference identification; S2, preprocessing the image data of the construction site; S3, inputting the preprocessed image data into a trained KNet-based semantic segmentation model to perform segmentation; S4, obtaining high-confidence binary mask images of the steel supports and columns from the image data segmented by the model, performing morphological operations on the binary mask images to optimize the mask image quality, performing connected component analysis on the optimized mask images, calculating the area of each region and filtering out regions smaller than a minimum area threshold, determining the accurate positions of the steel supports and columns in the effective regions by calculating the centroid, calculating the average Euclidean distance between the steel supports and columns based on the accurate positions, and calculating the distribution density of the steel supports and columns in the image based on the ratio of the total area of the effective regions to the total area of the binary mask images, to evaluate the uniformity of the distribution, and based on the distribution uniformity, performing number statistics and geometric feature analysis on the effective regions to obtain the structural stability and number of the steel supports and columns; S5, taking the number of the steel supports and the number of the columns obtained as the final recognition result, generating a structural number statistics report, and visualizing and displaying the report on an interface; the statistics report includes the specific positions, numbers and distribution densities of the steel supports and columns; The S4 specifically comprises: extracting binary mask images of the steel supports and columns, filtering out binary mask image regions with a confidence higher than a first threshold, and filtering out binary mask image regions with a confidence lower than the first threshold; the binary mask image meets the following conditions: ; wherein, is a pixel position in the image, is the extracted binary mask image, denotes the segmentation confidence of a pixel point, is a threshold value for filtering low confidence regions; using morphological operations to eliminate noise in the binary mask image and fill small holes; The morphological operation is specifically a closing operation, and a mask of the closing operation is denoted as , and the formula is as follows: ; wherein is a structuring element in morphological operations; performing connected component analysis on the processed binary mask image, calculating the area of each region, and filtering out regions smaller than a minimum area threshold, and retaining effective regions; Masks for closed operations Connected component analysis is performed to identify each connected region And the area of each region is calculated The formula is as follows: ; By setting a first threshold to filter out regions with area less than , the target regions that meet the conditions are retained, and the effective region set is defined as: ; determining the accurate positions of the steel supports and columns by calculating the centroid position of each effective region; the calculation formula of the centroid position is as follows: ; wherein is the centroid position of the region of the region calculating the average Euclidean distance between the steel supports and columns based on the accurate positions, and calculating the distribution density of the steel supports and columns in the image based on the ratio of the total area of the effective regions to the total area of the binary mask image, to evaluate the uniformity of the distribution of the steel supports and columns; The average Euclidean distance between steel bracing and columns is calculated The formula is as follows: ; wherein, Euclidean distance to the nearest steel support or column, calculated steel support and column distribution density in the image : ; wherein is the total area of the effective area, is the total area of the binary mask image; analyzing the geometric features of the steel supports and columns and the influence of the steel supports and columns on the structural stability; by number statistics of the effective regions, and in combination with the calculation results of the density and average Euclidean distance, the total number of the steel supports and columns is obtained; By calculating the shape factor To measure the shape consistency of the target region, the geometric features of the support structure are analyzed, and the formula is as follows: ; wherein is the perimeter of the area of the area calculating the number of the steel supports or columns respectively, and the formula is as follows: ; ; wherein, is the number of steel supports, is the effective area corresponding to the steel support, is the number of columns, is the effective area corresponding to the column.

2. The KNet-based steel support and column number identification method according to claim 1, characterized by, In S2, the preprocessing includes size adjustment, image normalization and data enhancement of the image data of the construction site; the size adjustment is used to adjust the image data of the construction site to a standard size that meets the input requirements of the KNet model to ensure the consistency of the input image size; the image normalization is used to normalize the image data after size adjustment, and scale the pixel value from the range [0, 255] to [0, 1]; the calculation formula is as follows: ; wherein, is the image pixel value at the construction site, and are the minimum and maximum values of the image pixel value, respectively; is the normalized image data pixel value, which ranges from [0, 1]; the data enhancement includes random cropping, rotation, color disturbance, and blur and noise addition; The random cropping: for randomly selecting the normalized image region The normalized image is cropped to adapt to the target sample under different observation angles and distances, and the cropping region is determined by randomly generating a center point and a scale, and the formula is as follows: ; wherein, and are the height and width of the cropped region, respectively, is a randomly selected starting point coordinate, is the normalized image region after random cropping. The rotation: for randomly rotating the size-adjusted image in an angle range of , and selecting an angle to simulate the multi-angle observation effect in the actual construction site, and the formula is as follows: ; wherein, denotes the rotated image pixel position, is the rotation angle, and are the horizontal and vertical coordinates of the image, respectively; The color disturbance: used for random disturbance of the normalized image to simulate scenes under different lighting conditions, and the basic calculation formula of color disturbance is: ; wherein, is the image after color disturbance, for controlling the contrast of the normalized image, for controlling the brightness of the normalized image; The blur and noise addition: used for adding Gaussian blur or random noise in the normalized image, and the calculation formula is as follows: ; wherein, is the added Gaussian noise, is the standard deviation, is the image after noise.

3. The KNet-based steel support and column number identification method according to claim 1, characterized by, In S3, the KNet-based semantic segmentation model includes a backbone network part, a decoding head part, an auxiliary head part, a loss function part, a cost-sensitive learning strategy part and an optimizer part: The backbone network part extracts global features of the input image to obtain basic feature representation; The decoding head part performs sampling and semantic refinement on the basic features to generate accurate segmentation results; the auxiliary head part provides additional supervision for the backbone network part and the decoding head part to assist in improving feature extraction capability and convergence speed; The loss function part compares the segmentation results with the actual labels, calculates the error and provides the optimization target; the cost-sensitive learning strategy part improves the recognition of steel supports and columns by weighting the loss function; the optimizer updates the model parameters based on the loss to ensure effective training of the network; The backbone network part: adopts Swin Transformer as the backbone network, which gradually extracts basic features through hierarchical self-attention mechanism, and the self-attention calculation formula is: ; wherein Q, K and V are query matrix, key matrix and value matrix, respectively, is a scaling factor; The decoding head part: consists of Kernel Update Head and UPerHead, Kernel Update Head is used for dynamic adjustment of segmentation features; UPerHead is used for aggregating context information; The auxiliary head part: combines FCNHead to provide additional supervision signals, and the gradient transmission between the backbone network and the decoding head is realized by outputting auxiliary segmentation results through FCNHead; The loss function part: adopts cross-entropy loss function to optimize the model, and the definition of cross-entropy loss function is: ; wherein, represents the true label, i.e., the classification label corresponding to the steel support or column in the sample; represents the probability predicted by the model, i.e., the prediction probability of the model on the steel support or column category; is the number of samples, representing the total number of samples participating in the model training or testing; Cost-sensitive learning strategy part: introduce cost-sensitive learning strategy, set different weight coefficients for steel support, column and background area Make the model pay more attention to the steel support and column target area during training, and the loss function after weight correction is represented as: ; The optimizer part: uses AdamW optimizer to update the model parameters, and the update rule is: ; ; ; ; where, and are the first and second order momentum of the gradient, respectively, for smoothing and accelerating the gradient update; is the learning rate, controlling the step size of the model parameter update; and are the momentum decay coefficients, for adjusting the update proportion of the first and second order momentum; is the stability term, for avoiding zero denominator and improving the stability of numerical calculation; is the weight decay factor, for inhibiting model overfitting by introducing regularization; denotes the gradient at the current time t, indicating the optimization direction of the model, t represents the iteration number, for tracking the optimization process; denotes the parameter vector of the model.

4. The KNet-based steel support and column number identification method according to claim 3, characterized by, The Kernel Update Head is calculated by weights The convolution operation is performed, and the calculation formula is as follows: ; wherein, is an input feature map, representing the feature data to be processed extracted by the backbone network, for subsequent feature extraction and enhancement; and is the weight and bias of the convolution kernel dynamically generated based on the input feature, used to improve the expression ability and flexibility of the convolution operation; represents a convolution operation, which performs weighted calculation on the input feature map with the weight and bias, completes the extraction and update of the features, so as to capture the feature distribution of the steel support and the column under complex working conditions.

5. The KNet-based steel support and column number identification method according to claim 1, characterized by, In S5, Also includes: Store the structure quantity statistics result to the database or file system to support extracting the structure quantity statistics result from the database or file system when needed in the construction site management, construction progress tracking and safety monitoring process.

6. A KNet-based steel support and prop quantity identification device, characterized by, Including: An image data acquisition module for acquiring image data of a construction site; the coverage area of the image data includes steel supports, columns and background information for interference recognition; A preprocessing module for preprocessing image data of a construction site; A model segmentation module for inputting preprocessed image data into a pre-trained KNet-based semantic segmentation model for segmentation; The quantity counting module is configured to obtain high-confidence binary mask images of steel supports and columns from the model segmented image data, perform morphological operations on the binary mask images to optimize the mask image quality, perform connected component analysis on the optimized mask images, calculate the area of each region and filter valid regions according to a minimum area threshold, determine the accurate positions of the steel supports and columns in the valid regions through centroid calculation, calculate the average Euclidean distance and distribution density between the steel supports and columns based on the accurate positions, and evaluate the distribution uniformity, perform quantity counting and geometric feature analysis on the valid regions based on the distribution uniformity, and obtain the structural stability and quantity of the steel supports and columns. The binary mask image of the steel support and column is extracted, and a binary mask image region with a confidence higher than a first threshold is selected, and a binary mask image region with a confidence lower than the first threshold is filtered out. The binary mask image satisfies the following conditions: ; wherein, is a pixel position in the image, is the extracted binary mask image, denotes the segmentation confidence of a pixel point, is a threshold value for filtering low confidence regions; Morphological operations are adopted to eliminate noise of the binary mask image and fill small holes; The morphological operation is specifically a closing operation, and a mask of the closing operation is denoted as , and the formula is as follows: ; wherein is a structuring element in morphological operations; Connected component analysis is performed on the processed binary mask image, the area of each region is calculated, and regions smaller than a minimum area threshold are filtered out according to the minimum area threshold, and valid regions are retained; Masks for closed operations Connected component analysis is performed to identify each connected region And the area of each region is calculated The formula is as follows: ; By setting a first threshold to filter out regions with area less than , the target regions that meet the conditions are retained, and the effective region set is defined as: ; The accurate positions of the steel supports and columns are determined by calculating the centroid positions of each valid region; The calculation formula of the centroid position is as follows: ; wherein is the centroid position of the region of the region The average Euclidean distance between the steel supports and columns is calculated based on the accurate positions, and the distribution density of the steel supports and columns in the image is obtained based on the ratio of the total area of the valid regions to the total area of the binary mask image, so as to evaluate the distribution uniformity of the steel supports and columns; The average Euclidean distance between steel bracing and columns is calculated and is given by the formula: ; wherein, Euclidean distance to the nearest steel support or column, calculated steel support and column distribution density in the image : ; wherein is the total area of the effective area, is the total area of the binary mask image; The geometric features of the steel supports and columns and the influence of the steel supports and columns on the structural stability are analyzed; the total number of the steel supports and columns is obtained by counting the number of the valid regions and combining the calculation results of the density and the average Euclidean distance; By calculating the shape factor To measure the shape consistency of the target region, the geometry of the support structure is analyzed, and the formula is as follows: ; wherein is the perimeter of the area of the region The number of the steel supports or columns is calculated respectively, and the formula is as follows: ; ; wherein, is the number of steel supports, is the effective area corresponding to the steel support, is the number of columns, is the effective area corresponding to the column; The report generation module is configured to generate a structural quantity counting report by taking the obtained number of steel supports and columns as final recognition results, and visualize the report on an interface; the statistical report includes the specific positions, number and distribution density of the steel supports and columns.

Citation Information

Patent Citations

  • Steel bar number statistical model training method and device, steel bar number statistical model statistical method and device, and equipment

    CN111127457A

  • Lane line detection method, device and system based on semantic segmentation and storage medium

    CN112613392A