Civil infrastructure crack segmentation method and device, terminal equipment and storage medium
By introducing trainable increments and LoRA increments into the large semantic segmentation model, a crack segmentation model with high generalization and robustness is generated and deployed to the cloud platform, which solves the problem of low efficiency and low crack segmentation efficiency in the existing technology. The problem of poor accuracy is solved and a more efficient crack identification effect is achieved.
Patent Information
- Application Number
- CN202410488609.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-08-30
AI Technical Summary
In the existing technology, manual identification and traditional models are inefficient when used for crack segmentation, and have poor cross-scenario and cross-scale capabilities, resulting in poor model generalization and robustness, and low segmentation accuracy and efficiency.
Trainable increments are introduced into the large semantic segmentation model, and through efficient fine-tuning of parameters, a crack segmentation model with high generalization and strong robustness is generated and deployed to the cloud platform for processing.
The efficiency and accuracy of crack segmentation are improved. By introducing trainable adapter increments and LoRA increments, and adjusting model hyperparameters based on test results, the segmentation accuracy is further improved, and the processing efficiency is improved through cloud platform resources.
Smart Images

Figure CN118570462A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer application technology, and in particular, relates to a method, device, terminal equipment and computer-readable storage medium for segmenting cracks in civil infrastructure. Background Art
[0002] Cracks are common damage in civil infrastructure, which may lead to reduced structural strength of building facilities, shortened service life, and damage the aesthetics of building facilities, seriously affecting the safety and stability of building facilities. Therefore, identifying cracks is crucial in structural health monitoring.
[0003] In the related technology, engineers can manually identify and analyze cracks, but this method is highly subjective and inefficient. Crack segmentation can also be performed by denoising crack images through filters, wavelet transforms, etc., and each pixel in the crack image is classified to distinguish between cracks and background, but this method requires manual input of parameters, so it also has the problem of low efficiency. Traditional models based on deep learning are also used for crack segmentation, but due to the poor cross-scene and cross-scale capabilities of traditional models, the crack segmentation problem will be affected by many interference factors, such as cracks that are too fine, low resolution of crack images, differences in shooting distances, shadows, occlusions, traffic and pedestrian flow, and different working conditions, etc., resulting in poor generalization and robustness of the model, and low segmentation accuracy and efficiency when using traditional models for crack segmentation. Summary of the invention
[0004] The purpose of the present application is to provide a method, apparatus, terminal device and computer-readable storage medium for crack segmentation of civil infrastructure, which can solve the problem of low efficiency of crack segmentation due to the need for manual processing when crack segmentation is performed using manual recognition or crack image denoising technology in the related art, or the problem of poor model generalization and robustness, low crack segmentation accuracy and efficiency when crack segmentation is performed using traditional model recognition methods due to the poor cross-scene and cross-scale capabilities of traditional models.
[0005] In a first aspect, an embodiment of the present application provides a method for crack segmentation of civil infrastructure, including: collecting multiple crack images to generate a crack data set; based on the idea of efficient parameter fine-tuning, introducing trainable increments in a large semantic segmentation model, training and testing and adjusting the large semantic segmentation model according to the crack data set, and generating a crack segmentation model; obtaining a target crack image, calling the crack segmentation model, and generating a crack segmentation result.
[0006] In a possible implementation manner of the first aspect, the semantic segmentation large model includes an image encoder, a hint encoder, and a mask decoder. Based on the idea of efficient parameter fine-tuning, a trainable increment is introduced into the semantic segmentation large model. The semantic segmentation large model is trained, tested, and adjusted according to the crack dataset to generate a crack segmentation model, including:
[0007] Based on the idea of efficient parameter fine-tuning, trainable increments are introduced into the image encoder;
[0008] Based on the crack dataset, train the weights of the trainable increment and hint encoder and mask decoder;
[0009] According to the crack dataset, the trained semantic segmentation model is tested and adjusted to generate a crack segmentation model.
[0010] Optionally, in another possible implementation of the first aspect, the method of testing the trained semantic segmentation large model according to the crack dataset to generate the crack segmentation model includes:
[0011] Based on the crack dataset, the trained semantic segmentation model is tested to generate test results;
[0012] According to the test results, the model hyperparameters of the trained semantic segmentation model are adjusted to generate a crack segmentation model.
[0013] Optionally, in another possible implementation manner of the first aspect, the image encoder includes a ViT block, the ViT block includes an attention layer and a multi-layer perceptron, the trainable increment is an adapter increment, and the introducing the trainable increment in the image encoder includes:
[0014] After connecting the adapter increment to the attention layer in series, the adapter increment includes the downsampling linear layer, the activation function layer, and the upsampling linear layer;
[0015] Connect another adapter increment in parallel to the multilayer perceptron.
[0016] Optionally, in another possible implementation manner of the first aspect, the image encoder includes a ViT block, the ViT block includes an attention layer, the attention layer includes a query module, a key module, a value module and an output module, the trainable increment is a LoRA increment, and the introducing the trainable increment in the image encoder includes:
[0017] Connect the LoRA increment in parallel to at least one module of the attention layer, wherein the LoRA increment includes a downward projection layer and an upward projection layer.
[0018] Optionally, in another possible implementation manner of the first aspect, the image encoder includes a ViT block, the ViT block includes an attention layer and a multilayer perceptron, the attention layer includes a query module, a key module, a value module and an output module, the trainable increment is an adapter increment and a LoRA increment, and the introducing of the trainable increment in the image encoder includes:
[0019] After connecting the adapter increment in series to the attention layer, the LoRA increment is connected in parallel to at least one module of the attention layer, wherein the adapter increment includes a downsampling linear layer, an activation function layer, and an upsampling linear layer, and the LoRA increment includes a down-projection layer and an up-projection layer;
[0020] Connect another adapter increment in parallel to the multilayer perceptron.
[0021] Optionally, in another possible implementation manner of the first aspect, before acquiring the target crack image, calling the crack segmentation model, and generating the crack segmentation result, the method further includes:
[0022] Deploy the crack segmentation model to the cloud platform.
[0023] Optionally, in another possible implementation manner of the first aspect, the acquiring the target crack image, calling the crack segmentation model, and generating the crack segmentation result includes:
[0024] Acquire the target crack image and upload the target crack image to the cloud platform;
[0025] The crack segmentation model is called to perform crack segmentation processing on the target crack image and obtain the crack segmentation result.
[0026] In the second aspect, the present application also provides a crack segmentation device for civil infrastructure, including: a first generation module, used to collect multiple crack images and generate a crack data set; a second generation module, used to introduce trainable increments in the semantic segmentation large model based on the idea of efficient parameter fine-tuning, train and test and adjust the semantic segmentation large model according to the crack data set, and generate a crack segmentation model; a third generation module, used to obtain the target crack image, call the crack segmentation model, and generate a crack segmentation result.
[0027] In a possible implementation manner of the second aspect, the semantic segmentation large model includes an image encoder, a hint encoder, and a mask decoder; accordingly, the second generation module includes:
[0028] Introducing a unit for introducing trainable increments in image encoders based on the idea of efficient parameter fine-tuning;
[0029] A training unit, for training the weights of the trainable increment and hint encoder and the mask decoder according to the crack dataset;
[0030] The first generating unit is used to test and adjust the trained semantic segmentation large model according to the crack data set to generate a crack segmentation model.
[0031] Optionally, in another possible implementation manner of the second aspect, the first generating unit is specifically configured to:
[0032] Based on the crack dataset, the trained semantic segmentation model is tested to generate test results;
[0033] According to the test results, the model hyperparameters of the trained semantic segmentation model are adjusted to generate a crack segmentation model.
[0034] Optionally, in another possible implementation manner of the second aspect, the image encoder includes a ViT block, the ViT block includes an attention layer and a multi-layer perceptron, and the trainable increment is an adapter increment; accordingly, the introduction unit is specifically used to:
[0035] After connecting the adapter increment to the attention layer in series, the adapter increment includes the downsampling linear layer, the activation function layer, and the upsampling linear layer;
[0036] Connect another adapter increment in parallel to the multilayer perceptron.
[0037] Optionally, in another possible implementation manner of the second aspect, the image encoder includes a ViT block, the ViT block includes an attention layer, the attention layer includes a query module, a key module, a value module and an output module, and the trainable increment is a LoRA increment; accordingly, the introduction unit is further used to:
[0038] Connect the LoRA increment in parallel to at least one module of the attention layer, wherein the LoRA increment includes a downward projection layer and an upward projection layer.
[0039] Optionally, in another possible implementation manner of the second aspect, the image encoder includes a ViT block, the ViT block includes an attention layer and a multilayer perceptron, the attention layer includes a query module, a key module, a value module and an output module, and the trainable increment is an adapter increment and a LoRA increment; accordingly, the introduction unit is further specifically used to:
[0040] After connecting the adapter increment in series to the attention layer, the LoRA increment is connected in parallel to at least one module of the attention layer, wherein the adapter increment includes a downsampling linear layer, an activation function layer, and an upsampling linear layer, and the LoRA increment includes a down-projection layer and an up-projection layer;
[0041] Connect another adapter increment in parallel to the multilayer perceptron.
[0042] Optionally, in another possible implementation of the second aspect, the above-mentioned civil infrastructure crack segmentation device further includes:
[0043] The deployment module is used to deploy the crack segmentation model to the cloud platform.
[0044] Optionally, in another possible implementation of the second aspect, the third generating module includes:
[0045] An acquisition unit, used for acquiring a target crack image and uploading the target crack image to a cloud platform;
[0046] The calling unit is used to call the crack segmentation model to perform crack segmentation processing on the target crack image and obtain the crack segmentation result.
[0047] In a third aspect, the present application further provides a terminal device. The terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for implementing any one of the implementation modes of the first aspect is implemented.
[0048] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of any one of the implementation modes of the first aspect is implemented.
[0049] In a fifth aspect, the present application further provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute any one of the methods of the first aspect.
[0050] Compared with the prior art, the embodiments of the present application have the following beneficial effects: based on the idea of efficient parameter fine-tuning, by introducing trainable increments into the semantic segmentation large model, the semantic segmentation large model with the introduced increments is trained and adjusted according to the crack data set, thereby obtaining a crack segmentation model with high generalization and strong robustness, and then processing the crack image through the crack segmentation model to obtain the crack segmentation result, thereby improving the efficiency and accuracy of crack segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 It is a flow chart of a method for segmenting cracks in civil infrastructure provided by an embodiment of the present application;
[0053] Figure 2 It is a structural diagram of a large semantic segmentation model provided in an embodiment of the present application;
[0054] Figure 3 is a schematic diagram of a crack segmentation model training method provided by another embodiment of the present application;
[0055] Figure 4 It is a schematic diagram of the structure of the ViT block introducing the adapter increment provided in an embodiment of the present application;
[0056] Figure 5 It is a schematic diagram of the process of introducing LoRA increment provided in an embodiment of the present application;
[0057] Figure 6 It is a schematic diagram of the structure of a crack segmentation device for civil infrastructure provided in an embodiment of the present application;
[0058] Figure 7 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0060] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0061] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0062] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0063] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0064] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0065] The following describes in detail the civil infrastructure crack segmentation method, apparatus, terminal equipment, storage medium and computer program provided in the present application with reference to the accompanying drawings.
[0066] Figure 1 A schematic flow chart of a method for segmenting cracks in civil infrastructure provided in an embodiment of the present application is shown.
[0067] Step 101: collect multiple crack images to generate a crack data set.
[0068] It should be noted that the civil infrastructure crack segmentation method of the embodiment of the present application can be executed by the crack segmentation device of the embodiment of the present application. The crack segmentation device of the embodiment of the present application can be configured in any terminal device to execute the civil infrastructure crack segmentation method of the embodiment of the present application.
[0069] As a possible implementation method, a large-scale open source crack semantic segmentation dataset can be integrated through the Internet and other means. Multiple crack images of multiple scenes including road surfaces, sidewalks, bridges and walls can be collected. The crack images can be images of cracks in civil infrastructure. A crack dataset can be generated based on the collected multiple crack images.
[0070] As a possible implementation method, the labeling method of the collected crack images can be unified. For cracks with labeled artifacts, a 3×3 convolution kernel can be used to first perform single-step erosion on the labeled mask and then single-step expansion. For crack images that are labeled too coarsely, too finely, or incorrectly, they can be re-labeled. Based on the collected crack images after unified labeling, a crack dataset is generated.
[0071] As a possible implementation of the present application, the fracture data set may be divided into a training set, a test set, and a validation set in proportion.
[0072] For example, the fracture data set may be divided into a training set, a test set, and a validation set according to the ratios of 85%, 10%, and 5%.
[0073] As a possible implementation of the present application, artificial noise can be added to the crack images in the test set, such as introducing Gaussian blur, lowering the image brightness, etc., and the crack images with artificial noise and the crack images in the original test set are added to the test set of the crack data set. In this way, the model can be tested with richer data to verify the robustness of the model.
[0074] As a possible implementation method of this application, multiple crack images with complex working conditions can be collected and annotated through automated detection means such as drones, inspection vehicles, and robots. The crack images can come from scenes such as road cracks, bridge cracks, and tunnel cracks. Interference factors such as construction joints, shadows, occlusions, machinery, vegetation, people, and road markings can be retained during shooting. Crack images with complex working conditions collected by automated detection equipment can be added to the test set of the crack data set. In this way, the generalization of the model can be evaluated and improved through crack images containing complex working conditions.
[0075] It should be noted that the above-listed crack image annotation methods and crack image division ratios are only exemplary. In actual use, the crack image annotation methods and crack image division ratios can be determined according to actual usage requirements and application scenarios, and the embodiments of the present application do not limit this.
[0076] Step 102, based on the idea of efficient parameter fine-tuning, introduce trainable increments into the semantic segmentation model, train and test the semantic segmentation model according to the crack dataset, and generate a crack segmentation model.
[0077] Among them, the semantic segmentation large model can be based on a converter architecture with hundreds of millions of parameters and can be a model pre-trained by a huge data set. It can assign each pixel in the image to a different semantic category and identify and classify each object in the image.
[0078] For example, the semantic segmentation model can be a segment anything model (SAM).
[0079] As a possible implementation method of the present application, the semantic segmentation large model can be fine-tuned based on the parameter fine-tuning idea, and the incremental method, the selective method, and the re-parameterization method in the efficient parameter fine-tuning method can be adopted. A trainable increment can be introduced into the semantic segmentation large model. The trainable increment is a module that can be trained and updated. The initial weights in the semantic segmentation large model are frozen, and the semantic segmentation large model with the trainable increment is trained and tested and adjusted according to the crack data set. Specifically, the semantic segmentation large model can be trained (fine-tuned) using the training set in the crack data set, and the semantic segmentation large model can be verified using the validation set. Then, the semantic segmentation large model with the highest intersection and ratio on the validation set can be tested using the test set, and the semantic segmentation large model is adjusted according to the test results to generate a crack segmentation model.
[0080] As a possible implementation method, during the training process, a weighted combination of cross entropy and dice loss can be used as the loss function for training a large semantic segmentation model, thereby avoiding the problem of background-dominated loss caused by the cross entropy loss often quickly converging to zero due to the high imbalance of crack segmentation. The weighted combination of cross entropy and dice loss can be expressed as:
[0081]
[0082]
[0083] L=λL CE +(1-λ)L Dice
[0084] Among them, y represents the true label, which takes the value of 0 or 1, 0 represents the image background, and 1 represents the crack. It represents the probability of predicting the label, and its value range can be 0 to 1. X corresponds to the mask area of the true label, and Y represents the mask area of the predicted label. The parameter λ represents the weighting coefficient, and its value range can be 0.1 to 0.2.
[0085] As a possible implementation of the present application, an exponential decay strategy can be used to adjust the learning rate of the large semantic segmentation model for training. The exponential decay strategy is combined with the warmup strategy. For the initial warm_up (warm_up can take a positive integer value according to actual needs) iterations, the learning rate increases linearly from 0 to a fixed value (for example, 0.0004). Subsequently, during the entire iteration process, the learning rate can be multiplied by To dynamically scale, power is used to control the shape of the learning rate curve (for example, it can be 6), max_i ter represents the maximum iteration limit, which can be set to 140, and the batch size can be 8.
[0086] As a possible implementation of the present application, the crack segmentation model can be built on the Pytorch framework of the Python language. Training and reasoning can be performed on a 24GB RTX 3090 GPU and two Xeon Gold 5218R CPUs.
[0087] Furthermore, the semantic segmentation model may include an image encoder, a hint encoder, and a mask decoder. Since the main parameters of the semantic segmentation model are concentrated in the image encoder, a trainable increment may be introduced into the image encoder to improve the efficiency of model training. That is, in a possible implementation of the embodiment of the present application, the semantic segmentation model includes an image encoder, a hint encoder, and a mask decoder. The above step 102 may include:
[0088] Step 1021, based on the idea of efficient parameter fine-tuning, introduce trainable increments into the image encoder;
[0089] Step 1022, training the weights of the trainable increment and hint encoder and mask decoder according to the crack dataset;
[0090] Step 1023, based on the crack data set, the trained semantic segmentation large model is tested and adjusted to generate a crack segmentation model.
[0091] As a possible implementation of the present application, the semantic segmentation model may include an image encoder, a hint encoder, and a mask decoder, such as Figure 2 shown.
[0092] Among them, the image encoder is a vision transformer (ViT) pre-trained by a mask autoencoder, which can be composed of a block embedding layer, a learnable position encoding, a ViT backbone layer and a neck layer. The block embedding layer can include a 16×16 convolution kernel with a moving step of 16. The ViT backbone layer can be composed of a series of ViT blocks. Depending on the size of the backbone layer, there are three options: ViT-H, ViT-L and ViT-B. The embedding dimension, number of blocks and number of attention heads of ViT-B can be 768, 12 and 12 respectively, the embedding dimension, number of blocks and number of attention heads of ViT-L can be 1024, 24 and 16 respectively, and the embedding dimension, number of blocks and number of attention heads of ViT-H can be 1280, 32 and 16 respectively. At the neck layer, the image embedding can be fed to point-by-point convolution and 3×3 convolution to reduce the dimension to 256. Layer normalization can be performed after each convolution. The output size of the image encoder can be 1 / 16 of the original size, and the embedding dimension is 256.
[0093] Among them, the hint encoder can receive sparse (points and boxes) or dense (masks and text) hint words. In crack segmentation, the input of the hint encoder can be "none", and the default embedding can be a learnable vector token. The token can be added to each position of the image embedding.
[0094] The mask decoder may include a 2-layer bidirectional transformer, a 2-layer deconvolution layer, a cross attention layer, and a multi-layer perceptron. A set of learnable tokens may be added to the prompt word embedding, and the obtained tokens, image embeddings, and their position embeddings may be fed into the 2-layer bidirectional transformer. In the bidirectional transformer, the following steps are mainly performed: first, an 8-head self-attention operation is performed on the input token; then, a cross attention is performed from the token to the image embedding, where the token is regarded as a query and the image embedding is regarded as a key and a value; then, the token is updated by a multi-layer perceptron with a hidden dimension of 2048 and a ReLU activation function; finally, the cross attention layer is passed. The attention layer may consist of 8 heads, the dimensions of the query, key, and value in the self-attention layer may be set to 256, and the dimensions of the cross attention layer may be set to 128. After each attention layer and multi-layer perceptron layer, residual connections and layer normalization may be added, and before being input to each attention layer, the original token and image position embedding may be re-added to the query and key to better store the information of the token, and the updated token and image embedding output from the first layer of the bidirectional transformer may be used as the input of the second layer. The convolution kernel of the 2-layer deconvolution layer is 2, the stride is 2, and the dimensions are 64 and 32. The image with a size of 1 / 16 can be upsampled to 1 / 4. After convolution, GELU activation can be performed, and layer normalization is added. The token can be finally updated by the cross attention layer, and the dimension is converted to 32 through the 3-layer multilayer perceptron. The multilayer perceptron is a linear classifier with an output shape of (num_class, 32). num_class represents the number of predicted categories. When segmenting cracks, it can be 2, indicating two categories of cracks and non-cracks. The mask foreground probability of each position of the image embedding can be predicted. The shape of the image embedding is (32, H / 4, W / 4). H / 4 and W / 4 represent the height and width of the output feature map respectively. The low-resolution mask with an output shape of (num_class, H / 4, W / 4) can be obtained by point-by-point multiplication, and the high-resolution mask can be derived by bilinear interpolation.
[0095] As a possible implementation of this application, Figure 3 As shown, a trainable increment can be introduced into the image encoder, and the weights of each layer in the image encoder except the trainable increment can be frozen. The trainable increment and the weights of the prompt encoder and mask decoder can be trained according to the crack dataset, and the trained semantic segmentation large model can be tested and adjusted through the test set in the crack dataset to generate a crack segmentation model.
[0096] Furthermore, the semantic segmentation model can be tested, and the hyperparameters of the semantic segmentation model can be adjusted according to the test results, so as to further improve the accuracy of the model. That is, in a possible implementation of the embodiment of the present application, the above-mentioned testing of the trained semantic segmentation model based on the crack dataset to generate the crack segmentation model can include:
[0097] Based on the crack dataset, the trained semantic segmentation model is tested to generate test results;
[0098] According to the test results, the model hyperparameters of the trained semantic segmentation model are adjusted to generate a crack segmentation model.
[0099] In a possible implementation, the trained semantic segmentation model can be tested based on a crack data set. The data in the crack data set used for testing can be data that has never been used to train the model. For example, it can be multiple crack images with complex working conditions collected by automated detection means such as drones, inspection vehicles, and robots, or crack images with artificial noise, etc., to generate test results. The test results may include the model's precision, recall rate, F1 score, intersection-over-union ratio, etc. under the test data. The hyperparameters of the semantic segmentation model can be adjusted based on the test results to generate a crack segmentation model.
[0100] Furthermore, since the main parameters of the semantic segmentation large model are concentrated in the ViT block of the image encoder, the adapter increment can be introduced into the ViT block of the image encoder for training, thereby improving the accuracy and training efficiency of the model. That is, in a possible implementation of the embodiment of the present application, the image encoder includes a ViT block, the ViT block includes an attention layer and a multi-layer perceptron, the trainable increment is an adapter increment, and the introduction of the trainable increment in the image encoder may include:
[0101] After connecting the adapter increment to the attention layer in series, the adapter increment includes the downsampling linear layer, the activation function layer, and the upsampling linear layer;
[0102] Connect another adapter increment in parallel to the multilayer perceptron.
[0103] As a possible implementation of this application, Figure 4 As shown, the ViT block can include an attention layer and a multi-layer perceptron. The trainable increment can be an adapter increment. The adapter increment can include a downsampling linear layer, an activation function layer, and an upsampling linear layer. The activation function layer can use a GELU activation function. An adapter increment can be connected in series after the attention layer. The adapter increment uses the following parameters: The downsampling linear layer projects the original d-dimensional features into a smaller dimension m, where the intermediate dimension m << d. Subsequently, non-linear activation is performed through the activation function layer. Then, the upsampling linear layer with parameters restores the features to the d-dimensional space and adds a residual connection during the process. Representing the input as x and the output of the adapter increment as x′, the formula for the above operations can be expressed as:
[0104] x′ = W up ·GELU(W down x + b down ) + b up + x
[0105] where b down represents the bias corresponding to the downsampling linear layer, and b up represents the bias corresponding to the upsampling linear layer.
[0106] As a possible implementation of this application, another adapter increment can be connected in parallel at the multi-layer perceptron. For connecting another adapter increment at the multi-layer perceptron, there is no need to add a residual connection during the process, but the update degree of the adapter increment can be controlled by the scaling factor s. Given the input x m of the multi-layer perceptron and the output x m ′ of the adapter increment, the formula for the above operations can be expressed as:
[0107] x m ′ = s·(W up ·GELU(W down ·LN(x m ) + b down ) + b up ) + MLP(LN(x m )) + x m
[0108] Furthermore, since the main parameters of the semantic segmentation large model are concentrated in the ViT blocks of the image encoder, the LoRA increment can be introduced into the ViT blocks of the image encoder for training, thereby improving the accuracy and training efficiency of the model. That is, in a possible implementation of the embodiments of this application, the above image encoder includes ViT blocks, the above ViT blocks include attention layers, the above attention layers include query modules, key modules, value modules, and output modules, the above trainable increment is the LoRA increment, and introducing the trainable increment into the image encoder can include:
[0109] Connect the LoRA increment in parallel to at least one module of the attention layer, where the LoRA increment includes a downward projection layer and an upward projection layer.
[0110] As a possible implementation method of the present application, the image encoder includes a ViT block, the ViT block may include an attention layer, the attention layer includes a query module, a key module, a value module and an output module, and the LoRA increment may be connected in parallel to at least one module of the attention layer, and the LoRA increment includes a downward projection layer and an upward projection layer.
[0111] For example, the LoRA increment can be connected in parallel to the query module and the value module, or it can be connected in parallel only to the query module, or it can be connected in parallel to the query module, key module, value module and output module.
[0112] It should be noted that the above-mentioned parallel LoRA increment method is only exemplary. In actual use, it can be determined according to actual needs, and the embodiments of the present application do not limit this.
[0113] As a possible implementation method, for the initial weight matrix W o ∈R d×k ,like Figure 5 As shown, the weight update can be paralleled with the LoRA increment constraint, and the LoRA increment can be expressed as ΔW∈R d×k , we can use low-rank decomposition to decompose ΔW into the product of matrices A and B, with rank r<<min(d,k), for the original path y=W O x, the output y′ after the above operation can be expressed as:
[0114] y′=(W O +ΔW)x=W O x+ABx
[0115] Among them, during fine-tuning, the initial weight matrix W o Keep it frozen and only fine-tune A and B. Matrix A can be initialized using random Gaussian initialization and matrix B can be initialized to 0.
[0116] Furthermore, the adapter increment and the LoRA increment can be simultaneously introduced into the ViT block of the image encoder to improve the efficiency of model training and improve the accuracy of the model. That is, in a possible implementation of the embodiment of the present application, the image encoder includes a ViT block, the ViT block includes an attention layer and a multi-layer perceptron, the attention layer includes a query module, a key module, a value module and an output module, the trainable increment is the adapter increment and the LoRA increment, and the introduction of the trainable increment in the image encoder may also include:
[0117] After connecting the adapter increment in series to the attention layer, the LoRA increment is connected in parallel to at least one module of the attention layer, wherein the adapter increment includes a downsampling linear layer, an activation function layer, and an upsampling linear layer, and the LoRA increment includes a down-projection layer and an up-projection layer;
[0118] Connect another adapter increment in parallel to the multilayer perceptron.
[0119] As a possible implementation method of the present application, the adapter increment and the LoRA increment can be introduced into the ViT block of the image encoder at the same time. The adapter increment can be connected in series to the attention layer, and the LoRA increment can be connected in parallel to at least one module of the attention layer, and another adapter increment can be connected in parallel to the multi-layer perceptron. The specific method and principle are the same as above and will not be repeated here.
[0120] As a possible implementation method of the present application, when the above-mentioned trainable increment includes an adapter increment, the intermediate dimension, scaling factor and application position of the adapter increment can be adjusted according to the reasoning performance of the model under the test data. The application position refers to the position of the specific ViT block where the trainable increment is introduced (it may be introduced by several ViT blocks). When the above-mentioned trainable increment includes a LoRA increment, the rank size and application position can be adjusted according to the reasoning performance of the model under the test data.
[0121] Step 103, obtaining a target crack image, calling a crack segmentation model, and generating a crack segmentation result.
[0122] As a possible implementation method of the present application, a target crack image can be obtained through a request interface. The target crack image can be an image that needs to be crack identified and is taken by automated detection equipment such as drones, inspection vehicles, and robots. The target crack image can be input into a crack segmentation model, and a crack segmentation result can be generated based on the output of the crack segmentation model.
[0123] As a possible implementation, the output of the crack segmentation model can be a crack mask, that is, the crack segmentation result can be a crack mask, the threshold for crack mask binarization can be set to 0.5, and the index of the maximum value in the channel dimension of the mask can be returned to generate the final predicted crack mask.
[0124] For example, the shape of the mask returned by the crack segmentation model is (batch size, 2, 448, 448), where batchsize is the batch size, 2 is the channel dimension, representing the probability of non-cracks and cracks, such as (0.32, 0.85), and the index of the maximum value of the returned channel dimension is 1, indicating a crack; otherwise, if it is 0, it is not a crack.
[0125] Furthermore, the crack segmentation model can be deployed on a cloud platform to utilize the rich computing resources of the cloud platform to achieve more accurate crack segmentation. That is, in a possible implementation of the embodiment of the present application, before the above step 103, the following may also be included:
[0126] Deploy the crack segmentation model to the cloud platform.
[0127] As a possible implementation method, the crack segmentation model can be exported to a specific model file format (such as ONNX, etc.), and then a cloud service provider can be selected. A cloud platform that can provide cloud computing resources and machine learning services can be selected. Then, appropriate cloud computing instances, such as virtual machines, containers, serverless functions, etc., can be created on the cloud platform to deploy the crack segmentation model and set the appropriate scale, computing power and storage resources. At the same time, the necessary software and dependencies can be installed in the cloud computing instance, which can include machine learning frameworks, image processing libraries, etc. The environment can be configured to meet the needs of the crack segmentation model. The exported crack segmentation model can be loaded into the cloud computing instance, and the corresponding machine learning framework can be used to load the model and perform reasoning tests to ensure that the appropriate code logic and calling method can be implemented.
[0128] Furthermore, after the crack segmentation model is deployed on the cloud platform, the target crack image can be uploaded to the cloud platform, thereby making full use of the cloud platform resources and improving the efficiency of crack segmentation. That is, in a possible implementation of the embodiment of the present application, the above step 103 may include:
[0129] Step 1031, obtaining a target crack image, and uploading the target crack image to a cloud platform;
[0130] The crack segmentation model is called to perform crack segmentation processing on the target crack image to generate a crack segmentation result.
[0131] As a possible implementation method, a target crack image taken by an automated device can be obtained, the target crack image can be uploaded to a cloud platform, a crack segmentation model can be called, and the crack segmentation model can perform crack segmentation processing on the target crack image to generate a crack segmentation result, and the crack segmentation result sent by the cloud platform can be received.
[0132] As a possible implementation method of the present application, the functions provided by the cloud platform can be used to implement API interfaces, load balancing, automatic expansion, etc. A monitoring and logging mechanism can be set up to monitor the performance of the model and the resource usage of the cloud platform service in real time. Optimization and adjustment can be performed based on the monitoring results to improve the performance and response speed of the crack segmentation model.
[0133] As a possible implementation method of the present application, the automated equipment can call the request interface to send the captured target crack image directly to the cloud platform. After calling the crack segmentation model to perform crack segmentation processing on the target crack image, the crack segmentation result sent by the cloud platform can be received through the request interface.
[0134] The method for crack segmentation of civil infrastructure provided in the embodiment of the present application is based on the idea of efficient parameter fine-tuning. By introducing trainable increments into the semantic segmentation large model, the semantic segmentation large model with the introduced increments is trained and adjusted according to the crack data set, so as to obtain a crack segmentation model with high generalization and strong robustness. The crack image is processed by the crack segmentation model to obtain a crack segmentation result, thereby improving the efficiency and accuracy of crack segmentation. By introducing trainable adapter increments and / or LoRA increments, and testing the model with test data, the hyperparameters of the model are adjusted according to the test results, so as to further improve the accuracy of crack segmentation. The crack segmentation model is deployed to a cloud platform with rich computing resources, so as to further improve the efficiency of crack segmentation.
[0135] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0136] Corresponding to the civil infrastructure crack segmentation method described in the above embodiment, Figure 6 A structural block diagram of a crack segmentation device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0137] Reference Figure 6 , the device 60 comprises:
[0138] A first generating module 61 is used to collect multiple crack images and generate a crack data set;
[0139] The second generation module 62 is used to introduce trainable increments into the semantic segmentation model based on the idea of efficient parameter fine-tuning, train and test the semantic segmentation model according to the crack dataset, and generate a crack segmentation model;
[0140] The third generation module 63 is used to obtain a target crack image, call a crack segmentation model, and generate a crack segmentation result.
[0141] In actual use, the crack segmentation device provided in the embodiment of the present application can be configured in any terminal device to execute the aforementioned civil infrastructure crack segmentation method.
[0142] The crack segmentation device provided in the embodiment of the present application is based on the idea of efficient parameter fine-tuning. By introducing trainable increments into the semantic segmentation large model, the semantic segmentation large model with the introduced increments is trained and adjusted according to the crack data set, thereby obtaining a crack segmentation model with high generalization and strong robustness. The crack image is then processed by the crack segmentation model to obtain a crack segmentation result, thereby improving the efficiency and accuracy of crack segmentation.
[0143] In a possible implementation form of the present application, the semantic segmentation model includes an image encoder, a hint encoder and a mask decoder; accordingly, the second generation module 62 includes:
[0144] Introducing a unit for introducing trainable increments in image encoders based on the idea of efficient parameter fine-tuning;
[0145] A training unit, for training the weights of the trainable increment and hint encoder and the mask decoder according to the crack dataset;
[0146] The first generating unit is used to test and adjust the trained semantic segmentation large model according to the crack data set to generate a crack segmentation model.
[0147] Furthermore, in another possible implementation form of the present application, the first generating unit is specifically configured to:
[0148] Based on the crack dataset, the trained semantic segmentation model is tested to generate test results;
[0149] According to the test results, the model hyperparameters of the trained semantic segmentation model are adjusted to generate a crack segmentation model.
[0150] Furthermore, in another possible implementation form of the present application, the image encoder includes a ViT block, the ViT block includes an attention layer and a multi-layer perceptron, and the trainable increment is an adapter increment; accordingly, the introduction unit is specifically used to:
[0151] After connecting the adapter increment to the attention layer in series, the adapter increment includes the downsampling linear layer, the activation function layer, and the upsampling linear layer;
[0152] Connect another adapter increment in parallel to the multilayer perceptron.
[0153] Further, in another possible implementation form of the present application, the image encoder includes a ViT block, the ViT block includes an attention layer, the attention layer includes a query module, a key module, a value module and an output module, and the trainable increment is a LoRA increment; accordingly, the introduction unit is further used to:
[0154] Connect the LoRA increment in parallel to at least one module of the attention layer, wherein the LoRA increment includes a downward projection layer and an upward projection layer.
[0155] Further, in another possible implementation form of the present application, the image encoder includes a ViT block, the ViT block includes an attention layer and a multi-layer perceptron, the attention layer includes a query module, a key module, a value module and an output module, and the trainable increment is an adapter increment and a LoRA increment; accordingly, the introduction unit is further used to:
[0156] After connecting the adapter increment in series to the attention layer, the LoRA increment is connected in parallel to at least one module of the attention layer, wherein the adapter increment includes a downsampling linear layer, an activation function layer, and an upsampling linear layer, and the LoRA increment includes a down-projection layer and an up-projection layer;
[0157] Connect another adapter increment in parallel to the multilayer perceptron.
[0158] Furthermore, in another possible implementation form of the present application, the above-mentioned civil infrastructure crack segmentation device 60 further includes:
[0159] The deployment module is used to deploy the crack segmentation model to the cloud platform.
[0160] Optionally, in another possible implementation of the second aspect, the third generating module 63 further includes:
[0161] An acquisition unit, used for acquiring a target crack image and uploading the target crack image to a cloud platform;
[0162] The calling unit is used to call the crack segmentation model to perform crack segmentation processing on the target crack image and obtain the crack segmentation result.
[0163] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0164] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0165] In order to implement the above embodiments, the present application also proposes a terminal device.
[0166] Figure 7 A schematic diagram of the structure of a terminal device according to an embodiment of the present application.
[0167] like Figure 7 As shown, the terminal device 200 includes:
[0168] A memory 210 and at least one processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), the memory 210 stores a computer program, and when the processor 220 executes the program, the civil infrastructure crack segmentation method described in the embodiment of the present application is implemented.
[0169] Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0170] The terminal device 200 typically includes a variety of electronic device readable media, which can be any available media that can be accessed by the terminal device 200, including volatile and non-volatile media, removable and non-removable media.
[0171] The memory 210 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and / or cache memory 250. The terminal device 200 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 260 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 not shown, usually called a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to bus 230 via one or more data medium interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0172] A program / utility 280 having a set (at least one) of program modules 270 may be stored, for example, in the memory 210, such program modules 270 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 270 generally perform the functions and / or methods of the embodiments described herein.
[0173] The terminal device 200 can also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), and can also communicate with one or more devices that enable users to interact with the terminal device 200, and / or communicate with any device that enables the terminal device 200 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be carried out through an input / output (I / O) interface 292. In addition, the terminal device 200 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 293. As shown in the figure, the network adapter 293 communicates with other modules of the terminal device 200 through a bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the terminal device 200, including but not limited to: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive, and data backup storage system, etc.
[0174] The processor 220 executes various functional applications and data processing by running the programs stored in the memory 210 .
[0175] It should be noted that the implementation process and technical principles of the terminal device of this embodiment refer to the aforementioned explanation of the civil infrastructure crack segmentation method of the embodiment of the present application, and will not be repeated here.
[0176] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0177] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0178] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0179] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0180] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0181] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0182] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0183] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for segmenting cracks in civil infrastructure, characterized in that: include: Collect multiple crack images and generate a crack data set; Based on the idea of efficient parameter fine-tuning, a trainable increment is introduced into the semantic segmentation large model, and the semantic segmentation large model is trained, tested and adjusted according to the crack dataset to generate a crack segmentation model; A target crack image is acquired, the crack segmentation model is called, and a crack segmentation result is generated.
2. The method according to claim 1, characterized in that The semantic segmentation model includes an image encoder, a hint encoder and a mask decoder. Based on the idea of efficient parameter fine-tuning, a trainable increment is introduced into the semantic segmentation model. According to the crack data set, the semantic segmentation model is trained, tested and adjusted to generate a crack segmentation model, including: Based on the idea of efficient parameter fine-tuning, the trainable increment is introduced into the image encoder; According to the crack data set, training the trainable increments and the weights of the hint encoder and the mask decoder; According to the crack data set, the trained semantic segmentation large model is tested and adjusted to generate the crack segmentation model.
3. The method according to claim 2, characterized in that The step of testing the trained semantic segmentation model according to the crack data set to generate the crack segmentation model includes: According to the crack data set, the trained semantic segmentation large model is tested to generate a test result; According to the test results, the model hyperparameters of the trained semantic segmentation large model are adjusted to generate the crack segmentation model.
4. The method according to claim 2, characterized in that The image encoder includes a ViT block, the ViT block includes an attention layer and a multi-layer perceptron, the trainable increment is an adapter increment, and the introducing the trainable increment in the image encoder includes: After connecting the adapter increment in series to the attention layer, the adapter increment includes a downsampling linear layer, an activation function layer, and an upsampling linear layer; Another adapter increment is connected in parallel to the multilayer perceptron.
5. The method according to claim 2, characterized in that The image encoder includes a ViT block, the ViT block includes an attention layer, the attention layer includes a query module, a key module, a value module and an output module, the trainable increment is a LoRA increment, and the introducing the trainable increment in the image encoder includes: The LoRA increment is connected in parallel to at least one module of the attention layer, wherein the LoRA increment includes a downward projection layer and an upward projection layer.
6. The method according to claim 2, characterized in that The image encoder includes a ViT block, the ViT block includes an attention layer and a multi-layer perceptron, the attention layer includes a query module, a key module, a value module and an output module, the trainable increment is an adapter increment and a LoRA increment, and the introduction of the trainable increment in the image encoder includes: After connecting the adapter increment in series to the attention layer, the LoRA increment is connected in parallel to at least one module of the attention layer, wherein the adapter increment includes a downsampling linear layer, an activation function layer, and an upsampling linear layer, and the LoRA increment includes a downward projection layer and an upward projection layer; Another adapter increment is connected in parallel to the multilayer perceptron.
7. The method according to any one of claims 1 to 6, characterized in that: Before acquiring the target crack image, calling the crack segmentation model, and generating the crack segmentation result, the method further includes: The crack segmentation model is deployed to a cloud platform.
8. The method according to claim 7, characterized in that The step of acquiring a target crack image, calling the crack segmentation model, and generating a crack segmentation result includes: Acquire the target crack image, and upload the target crack image to the cloud platform; The crack segmentation model is called to perform crack segmentation processing on the target crack image, and a crack segmentation result is obtained.
9. A crack segmentation device for civil infrastructure, characterized in that: include: A first generation module is used to collect multiple crack images and generate a crack data set; The second generation module is used to introduce trainable increments into the semantic segmentation model based on the idea of efficient parameter fine-tuning, train and test the semantic segmentation model according to the crack dataset, and generate a crack segmentation model; The third generation module is used to obtain a target crack image, call the crack segmentation model, and generate a crack segmentation result.
10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the terminal device implements the method according to any one of claims 1 to 8.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by an electronic device, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Knowledge distillation-based high-precision lightweight bridge crack identification method
CN116994130A
Mine surface damage crack extraction method and device, electronic equipment and medium
CN117788811A
Cited By
Image shelter segmentation method, system and device based on low-rank adaptive fine tuning
CN119540253A
Cracking degree determination method of self-piercing riveting rivet buckle, electronic equipment and storage medium
CN121708076A
