A neural network optimization method based on visual state space model for bridge disease

By constructing a neural network based on a visual state space model, and combining feature extraction and dynamic neuron pruning, the problems of feature extraction, model optimization, and multi-scale adaptation in bridge defect detection were solved, achieving efficient and accurate bridge defect identification and structured output of identification results.

CN121052293BActive Publication Date: 2026-02-24FUJIAN EXPRESSWAY TECH INNOVATION RES INST CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511553121.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-02-24
Estimated Expiration
2045-10-29

AI Technical Summary

Technical Problem

Existing neural network models for bridge defect detection are inadequate in terms of feature extraction capabilities, model optimization mechanisms, and multi-scale adaptability, making it difficult to meet the engineering requirements for detection accuracy and operational efficiency, resulting in identification bias and resource waste.

Method used

A neural network based on a visual state space model is constructed. The feature extraction backbone network captures local details and long-distance global dependencies. The task adaptation head network performs multi-scale feature pyramid processing, and the model is optimized through dynamic neuron pruning to achieve efficient and accurate bridge defect identification.

Benefits of technology

It improves the feature extraction accuracy of bridge defect detection, optimizes model size and computational load, reduces the rate of missed and false detections, provides structured recognition results, and enhances the reliability and practical application value of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121052293B_ABST
    Figure CN121052293B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computer vision and artificial intelligence, and particularly discloses a neural network optimization method based on a visual state space model for bridge diseases, which comprises the following steps: constructing a neural network comprising a feature extraction backbone network and a task adaptation head network, modeling the image feature sequence based on the visual state space model to capture local details and long-distance global dependencies, and using the task adaptation head network to output disease categories, confidence and positions; training the model using a standardized data set, dynamically optimizing by evaluating neuron importance, sorting and cutting redundant neurons; inputting the preprocessed image to be detected into the optimized model, performing feature extraction, multi-branch processing and non-maximum suppression, and outputting accurate disease recognition results. The present application improves disease feature extraction accuracy, realizes model lightweight, adapts to multi-scale disease detection, enhances the practicality of recognition results, and is suitable for intelligent bridge disease detection scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and artificial intelligence, specifically to a neural network optimization method based on a visual state space model for bridge defects. Background Technology

[0002] In the field of intelligent bridge defect detection, neural network technology, with its automatic feature extraction and pattern recognition capabilities, has become a core technology direction for replacing traditional manual detection and improving detection efficiency. However, existing neural network models applied to bridge defect detection still have significant bottlenecks in terms of technical performance and scenario adaptability, making it difficult to meet the dual requirements of detection accuracy and operational efficiency in engineering practice. The specific problems are mainly reflected in the following three aspects:

[0003] Imbalance in feature extraction capabilities: Existing models struggle to efficiently capture both local details and long-distance global dependencies in bridge images; while traditional convolutional neural networks (CNNs) can extract local image features, they are weak at modeling global correlation information across regions, and are prone to errors in defect identification due to one-sided features; while Transformer-based models can model global dependencies, they require a large number of parameters and computational resources, making them difficult to run efficiently on edge devices commonly used in bridge inspection, thus limiting practical deployment scenarios;

[0004] Lack of model optimization mechanisms: Most neural networks used for bridge defect detection do not have dynamic optimization mechanisms designed for the "performance-efficiency balance"; after the model is trained, the network structure and parameter size are fixed, and a large number of redundant neurons with low contribution to defect identification still occupy computing and storage resources, resulting in large model size, slow inference speed, and inability to adapt to the limited computing power of edge devices; at the same time, the lack of quantitative evaluation of the importance of neurons and dynamic pruning strategies makes it difficult to achieve model lightweighting while ensuring detection accuracy, resulting in resource waste and affecting inspection efficiency;

[0005] Insufficient adaptation to multi-scale defects: Bridge defects vary significantly in size, but existing neural networks have not built a targeted multi-scale feature processing mechanism; single-scale feature extraction is difficult to adapt to the detection needs of defects of different sizes, and small defects are easily missed due to weak feature signals, while large defects are inaccurately located due to incomplete feature capture, resulting in the completeness and accuracy of the detection results failing to meet engineering requirements.

[0006] Therefore, a neural network optimization method based on a visual state-space model is proposed to address the above problems. Summary of the Invention

[0007] The purpose of this invention is to provide a neural network optimization method based on a visual state space model for bridge defects, so as to solve the problems mentioned in the background art.

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] A neural network optimization method based on a visual state-space model for bridge defects includes the following steps:

[0010] Step S1: Construct a neural network based on a visual state space model; the neural network includes:

[0011] Feature extraction backbone network: It is built on the visual state space model, which models the input image feature sequence through state equations and observation equations to capture local details and long-distance global dependencies in the image;

[0012] Task adapter head network: Connected to the output of the feature extraction backbone network, it is used to output information related to a specific task based on the extracted features; when the specific task is bridge defect identification, the task adapter head network is configured to output the defect category, confidence level and location information.

[0013] Step S2, Model Training and Dynamic Optimization: Train the neural network using a standardized training dataset relevant to the specific task, and perform dynamic neuron pruning during training, including:

[0014] Each neuron in the neural network model is evaluated using a preset evaluation strategy to obtain a set of evaluation values. The neural network model contains multiple neurons, and the preset evaluation strategy corresponds to a target ranking strategy. Each evaluation value in the set of evaluation values ​​is mapped to the corresponding neuron.

[0015] If the number of times each neuron is evaluated reaches a preset threshold, multiple sets of neurons are obtained;

[0016] Based on the evaluation value set and mapping relationship, a target ranking strategy is used to rank all neurons in multiple neuron sets to obtain the ranking result;

[0017] Based on the sorting results, a preset number of target neurons are selected to obtain a set of target neurons;

[0018] Each target neuron in the target neuron set is pruned, and the neural network model is adjusted based on the pruning results after pruning to obtain the optimized target neural network model.

[0019] As a preferred option, the method also includes step S3, model application: the image to be detected is input into the optimized target neural network model, the feature extraction backbone network extracts features, and the task adaptation head network outputs the recognition result related to the specific task; when the specific task is bridge defect recognition, the intelligent recognition of bridge defects is completed.

[0020] As a preferred approach, the feature extraction backbone network is constructed based on a visual state-space model, specifically including the following steps:

[0021] Image feature serialization: The input image is uniformly divided into blocks to obtain multiple non-overlapping image blocks. Each image block is linearly projected and converted into a feature vector, thus forming an image feature sequence.

[0022] State sequence update: The image feature sequence is input into the state equation of the visual state space model. The image feature sequence is sequentially scanned through one-dimensional convolution operation to gradually update the hidden state sequence in order to capture long-distance global dependencies in the image.

[0023] Observation feature extraction: The hidden state sequence is input into the observation equation of the visual state space model, and the output feature sequence is extracted from the hidden state sequence through linear transformation, which serves as the enhanced image feature representation;

[0024] Feature map reconstruction and enhancement: The output feature sequence is reshaped into a two-dimensional feature map, and local feature fusion and dimensionality reduction are performed through multiple convolutional layers. Finally, a high-level feature map is output for the task adaptation head network.

[0025] As a preferred embodiment, the task adapter head network is configured to output the disease category, confidence level, and location information, including the following steps:

[0026] Feature map reception and preprocessing: High-level feature maps are received from the feature extraction backbone network, and multi-scale feature pyramids are constructed on the high-level feature maps to generate feature maps of multiple scales, so as to enhance the detection capability of diseases of different sizes.

[0027] Category prediction branch processing: For each feature map in the multi-scale feature map, feature transformation is performed through convolutional layers to output the category probability distribution of the disease at each spatial location, where the category probability distribution represents the probability that the disease belongs to each predefined category;

[0028] Confidence prediction branch processing: Based on the processed feature map, confidence prediction is performed through another convolutional layer, and the confidence score of the presence of disease at each spatial location is output. The confidence score represents the reliability of the detection result.

[0029] Location regression branch processing: At the same time, based on multi-scale feature maps, bounding box prediction is performed through regression convolutional layers, and the bounding box coordinates of the lesion at each spatial location are output. The bounding box coordinates are used to locate the specific location of the lesion in the image.

[0030] Results Integration and Output: The category probability distribution, confidence score, and bounding box coordinate information are fused together. Redundant detection boxes are removed using a non-maximum suppression algorithm. Finally, the category label, confidence value, and location coordinates of the disease are output.

[0031] As a preferred approach, a pre-defined evaluation strategy is used to evaluate each neuron in the neural network model to obtain a set of evaluation values, including the following steps:

[0032] Neuron evaluation initialization: For each neuron in the neural network model, the preset evaluation strategy is defined as the gradient sensitivity of the neuron's output to the loss function, and a threshold for the number of evaluations is set.

[0033] Multiple evaluation value collection: During model training, for each neuron, the evaluation operation is repeatedly performed in multiple training batches. Each time the evaluation is performed, the gradient norm of the neuron's output with respect to the loss function in the current training batch is calculated and used as the temporary evaluation value of the neuron.

[0034] Evaluation value aggregation: When the number of evaluation operations performed by each neuron reaches a preset threshold, all temporary evaluation values ​​are weighted and averaged to obtain the final evaluation value of each neuron, thus forming an evaluation value set;

[0035] Mapping relationship establishment: Associate each final evaluation value with its corresponding neuron to establish a one-to-one mapping relationship between neurons and evaluation values ​​for subsequent sorting.

[0036] As a preferred approach, after evaluating each neuron a preset threshold number of times, a set of multiple neurons is obtained, including the following steps:

[0037] Neuron evaluation record initialization: Creates a list of evaluation records for each neuron in the neural network model to store the temporary evaluation values ​​of that neuron in multiple evaluations;

[0038] Temporary evaluation value collection and storage: During model training, each neuron is evaluated multiple times according to the preset evaluation strategy. After each evaluation, the temporary evaluation value of the neuron is calculated and stored in the corresponding evaluation record list in sequence.

[0039] Evaluation count monitoring and triggering: The number of evaluations for each neuron is monitored in real time. When the number of evaluations for any neuron reaches a preset threshold, the neuron set generation process is triggered.

[0040] Evaluation value aggregation processing: For each neuron, all temporary evaluation values ​​are extracted from its evaluation record list and aggregated using a weighted average algorithm to obtain the aggregated evaluation value for each neuron;

[0041] Neuron set partitioning: Based on the range of aggregate evaluation values ​​of all neurons, neurons are divided into multiple sets, where each set contains neurons whose aggregate evaluation values ​​fall within a specific range;

[0042] Set output: The multiple sets of neurons after partitioning are used as input for subsequent sorting processing, where each set of neurons represents a group of neurons with similar importance levels.

[0043] As a preferred approach, based on the evaluation value set and mapping relationship, a target ranking strategy is used to rank all neurons in multiple neuron sets, resulting in the following ranking results:

[0044] Ranking strategy configuration: Based on the set of evaluation values ​​and the mapping relationship, the target ranking strategy is configured to sort in descending order according to the evaluation value, where the evaluation value represents the importance level of the neuron;

[0045] Preliminary sorting within each neuron set: For each neuron set, the evaluation value of each neuron in the set is extracted according to the mapping relationship, and the neurons in the set are sorted in descending order of the evaluation value to generate a local sorted list for each neuron set;

[0046] Global sorting integration: The local sorting lists of all neuron sets are merged, and all neurons are sorted in global descending order based on the evaluation value to form a preliminary global sorting sequence;

[0047] Sorting result verification and adjustment: The initial global sorting sequence is verified to check whether there are neurons with the same evaluation value. If so, a secondary sorting is performed according to the layer position of the neurons in the neural network, with neurons in the earlier layer positions being sorted first, and finally the complete sorting result is obtained.

[0048] As a preferred approach, based on the ranking results, a predetermined number of target neurons are selected to obtain a set of target neurons, including the following steps:

[0049] Preset number determination: Based on the model compression requirements or performance goals, set the preset number of target neurons. This preset number is either a fixed value or calculated based on the proportion of the total number of neurons in the neural network model.

[0050] Sorted sequence traversal: Based on the sorting result, each neuron is traversed sequentially from the end of the sorted sequence backwards. The sorted sequence is a list of neurons arranged in descending order of evaluation value, and the last neuron corresponds to the neuron with the lowest evaluation value.

[0051] Target neuron selection: During the traversal, the number of neurons that have been traversed is counted in real time. When the number of neurons that have been traversed reaches the preset number, the traversal is stopped, and all neurons that have been traversed are selected as candidate target neurons.

[0052] Target neuron set generation: The identification information of candidate target neurons is summarized to form a target neuron set, wherein the identification of each target neuron includes its layer position and neuron index.

[0053] As a preferred approach, each target neuron in the target neuron set is pruned, and after pruning, the neural network model is adjusted based on the pruning results to obtain an optimized target neural network model, including:

[0054] Target neuron localization information extraction: Based on the set of target neurons, extract the specific location information of each target neuron in the neural network model, including the network layer identifier to which the target neuron belongs and the neuron index in that layer;

[0055] Neuron pruning operation execution: Based on the extracted location information, each target neuron in the target neuron set is pruned one by one, including disconnecting the input and output connections of the target neuron and removing the weight and bias parameters associated with the target neuron;

[0056] Neural network connection reconstruction: After the pruning operation is completed, the connection reconstruction of the layers in the neural network model affected by the pruning is performed, including adjusting the connection weights between the remaining neurons and compensating for the loss of feature representation caused by the pruning through a weight redistribution algorithm;

[0057] Model structure compaction: Based on the connection reconstruction results, the overall structure of the neural network model is optimized, including reducing the number of neurons in related layers and merging redundant network branches to generate a compact intermediate neural network model.

[0058] Model fine-tuning and performance recovery: The intermediate neural network model obtained is fine-tuned using the training dataset, and the parameters of the remaining neurons are updated through the backpropagation algorithm to restore the model's recognition accuracy;

[0059] Optimize model validation and output: After fine-tuning training, use the validation dataset to evaluate the performance metrics of the fine-tuned model. When the performance metrics reach a preset threshold, output the fine-tuned model as the optimized target neural network model.

[0060] As a preferred embodiment, step S3 specifically includes the following steps:

[0061] Image preprocessing: Receive the bridge defect images to be detected, resize the images and normalize the pixel values ​​to generate standardized image data that meets the input requirements of the optimized target neural network model;

[0062] Backbone network feature extraction: Standardized image data is input into the feature extraction backbone network. The image feature sequence is sequentially scanned and hidden states are updated through the state equation and observation equation of the visual state space model to extract the enhanced multi-level feature map.

[0063] Head network result generation: The multi-level feature map is input into the task-adaptive head network, and the features are fused through a multi-scale feature pyramid structure. The feature map is then processed through the category prediction branch, confidence prediction branch, and location regression branch, and the preliminary category probability distribution, confidence score, and bounding box coordinates of the disease are output.

[0064] Detection result optimization: Non-maximum suppression is applied to the preliminary category probability distribution, confidence score and bounding box coordinates to remove redundant and low-confidence detection boxes, and the probability information of each category is fused to generate optimized disease detection results;

[0065] Recognition result output: Based on the optimized disease detection results, the final category label, confidence value and location coordinates of the disease are extracted and output to complete the intelligent recognition of bridge diseases.

[0066] As can be seen from the technical solution provided by the present invention above, the neural network optimization method based on a visual state space model for bridge defects provided by the present invention has the following beneficial effects:

[0067] Improve the accuracy of disease feature extraction: The feature extraction backbone network built on the visual state space model can simultaneously capture local details and long-distance global dependencies in bridge images, providing more comprehensive and accurate feature support for disease identification and reducing identification errors caused by missing features;

[0068] Achieving efficient model optimization: Dynamic neuron pruning during training, by evaluating the importance of neurons and pruning redundant and low-contribution neurons, compresses the model size and reduces computational and storage requirements while ensuring recognition accuracy, making the model more suitable for edge device deployment in bridge inspection scenarios;

[0069] Improve the applicability of disease detection: The multi-scale feature pyramid and multi-branch design of the task adaptation head network can adapt to the detection needs of bridge diseases of different sizes. Combined with non-maximum suppression to remove redundant detection boxes, it effectively reduces the rate of missed detection and false detection, and improves the reliability of detection results.

[0070] Enhance the practicality of identification results: The complete process design can output the type of defect, confidence level and precise location, and can be associated with the actual parts of the bridge. The identification results are structured and easy to interpret, providing direct data support for bridge defect assessment and maintenance decisions, and improving the practical application value and efficiency of intelligent bridge defect identification. Attached Figure Description

[0071] Figure 1 This is a schematic diagram of the steps of a neural network optimization method based on a visual state space model for bridge defects according to the present invention. Detailed Implementation

[0072] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0073] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific embodiments.

[0074] like Figure 1 As shown, this embodiment of the invention provides a neural network optimization method based on a visual state-space model for bridge defects, comprising the following steps:

[0075] Step S1: Construct a neural network based on a visual state space model; the neural network includes:

[0076] Feature extraction backbone network: It is built on the visual state space model, which models the input image feature sequence through state equations and observation equations to capture local details and long-distance global dependencies in the image;

[0077] Task adapter head network: Connected to the output of the feature extraction backbone network, it is used to output information related to a specific task based on the extracted features; when the specific task is bridge defect identification, the task adapter head network is configured to output the defect category, confidence level and location information.

[0078] Step S2, Model Training and Dynamic Optimization: Train the neural network using a standardized training dataset relevant to the specific task, and perform dynamic neuron pruning during training, including:

[0079] Each neuron in the neural network model is evaluated using a preset evaluation strategy to obtain a set of evaluation values. The neural network model contains multiple neurons, and the preset evaluation strategy corresponds to a target ranking strategy. Each evaluation value in the set of evaluation values ​​is mapped to the corresponding neuron.

[0080] If the number of times each neuron is evaluated reaches a preset threshold, multiple sets of neurons are obtained;

[0081] Based on the evaluation value set and mapping relationship, a target ranking strategy is used to rank all neurons in multiple neuron sets to obtain the ranking result;

[0082] Based on the sorting results, a preset number of target neurons are selected to obtain a set of target neurons;

[0083] Each target neuron in the target neuron set is pruned, and the neural network model is adjusted based on the pruning results after pruning to obtain the optimized target neural network model.

[0084] Step S3, Model Application: Input the image to be detected into the optimized target neural network model, extract features by the feature extraction backbone network, and output the recognition result related to the specific task by the task adaptation head network; when the specific task is bridge defect recognition, the intelligent recognition of bridge defects is completed.

[0085] In this embodiment, step S1 serves to build the core neural network architecture for bridge defect identification. A feature extraction backbone network based on a visual state space model captures local image details and long-range global dependency features. Then, a task adaptation head network specifically outputs defect-related information, laying the foundation for subsequent model training and optimization, and practical defect identification applications. The detailed steps are as follows:

[0086] Step S1-1: Construction of the Feature Extraction Backbone Network: The feature extraction backbone network is constructed based on the visual state space model. The core objective is to accurately capture local detail information and long-distance global dependencies from the input bridge image through multi-step processing, and finally output a high-level feature map that can be used for subsequent disease identification tasks. The specific steps are as follows:

[0087] Image feature serialization processing: The input bridge-related image is uniformly segmented into multiple non-overlapping image blocks, ensuring that each image block is of consistent size and avoiding the impact of block size differences on the stability of subsequent feature extraction. Subsequently, a linear projection operation is performed on each segmented image block, transforming each image block from pixel space into a high-dimensional feature vector through linear transformation, making the image information more consistent with the input requirements of the visual state space model. The feature vectors corresponding to all image blocks are arranged in order of their spatial positions in the original image, forming a complete image feature sequence, providing structured input data for subsequent sequence modeling.

[0088] State sequence update operation: The generated image feature sequence is input into the state equation of the visual state space model; the model sequentially scans the image feature sequence through one-dimensional convolution operation. During the scanning process, the one-dimensional convolution kernel processes the elements in the feature sequence position by position, and dynamically updates the hidden state at the current time by combining the hidden state information of the previous time step; through this continuous hidden state update process, the model can gradually integrate the information of different positions in the image feature sequence, effectively capture long-distance global dependencies across regions in the image, and solve the limitations of traditional convolutional networks in processing global correlation information;

[0089] Observation feature extraction operation: The hidden state sequence obtained after updating the state sequence is input into the observation equation of the visual state space model; the observation equation filters and extracts key feature information from the hidden state sequence through linear transformation operation to generate the output feature sequence; this linear transformation process can enhance the effective information in the hidden state, while suppressing redundant or noise information, so that the output feature sequence becomes the enhanced image feature representation, further improving the feature's ability to represent the disease-related information in bridge images;

[0090] Feature map reconstruction and enhancement: The output feature sequence obtained from the observed feature extraction is reshaped to convert the one-dimensional feature sequence into a two-dimensional feature map, restoring the spatial structure information of the image and making the spatial distribution of the feature map correspond to that of the original input image. Then, the two-dimensional feature map is input into a multi-layer convolutional layer, and local feature fusion is achieved through multi-layer convolution operations. That is, the local detail information of adjacent pixels or regions in the feature map is integrated, and dimensionality reduction is completed through the parameter design of the convolutional layer to reduce the dimension of the feature data and the amount of computation. Finally, through the optimization of multi-layer convolution, a high-level feature map for the task adaptation head network is output. This feature map contains both local details of the image and integrates global correlation information, which can directly support the subsequent judgment of the category, confidence and location of bridge defects.

[0091] Step S1-2: Task adapter head network construction:

[0092] Feature Map Reception and Preprocessing: High-level feature maps are received from the feature extraction backbone network. These feature maps have fused local image details and long-range global dependency information, serving as the core foundational data for disease identification. To address the detection adaptation problem for diseases of different sizes (such as micro-cracks and large-area peeling), a multi-scale feature pyramid is constructed from the received high-level feature maps. By performing downsampling and upsampling operations on the original high-level feature maps at different ratios, feature maps at multiple scale levels (e.g., 1x, 2x, and 4x scale) are generated. Each scale feature map is adapted to disease targets of different sizes, ensuring that small-sized diseases do not lose details in high-resolution feature maps and that large-sized diseases can be completely captured in low-resolution feature maps, thereby significantly enhancing the network's ability to detect diseases of different sizes.

[0093] Category prediction branch processing: For each scale feature map generated in the multi-scale feature pyramid, feature transformation is performed through independent convolutional layers: the convolutional layers use convolutional kernels of a preset size (such as 3×3 convolutional kernels) to further extract and optimize spatial features of the feature maps, strengthen feature information related to disease categories, and suppress irrelevant background interference; after feature transformation, each spatial location of each scale feature map outputs a set of category probability distribution data. This category probability distribution contains the probability values ​​of the disease at the corresponding spatial location belonging to all predefined categories (for example, predefined categories include cracks, spalling, exposed reinforcement, etc.). The higher the probability value, the greater the possibility that the disease at that spatial location belongs to the corresponding category, providing a quantitative basis for subsequent disease category determination;

[0094] Confidence prediction branch processing: Based on the feature map after feature transformation by the category prediction branch, another set of independent convolutional layers is introduced to perform the confidence prediction task. The design goal of this convolutional layer is to evaluate the reliability of the detection result "there is a disease" at each spatial location. The saliency of the disease features in the feature map is analyzed by convolution operation, and a confidence score (usually ranging from 0 to 1) is output for each spatial location. The closer the score is to 1, the more reliable the result of detecting a disease at that spatial location. The closer the score is to 0, the more likely that the location is a background area or detection noise. This filters out low-reliability detection results and improves the overall recognition accuracy.

[0095] Location regression branch processing: Simultaneously, based on all scale feature maps of the multi-scale feature pyramid, a regression convolutional layer is deployed to perform bounding box prediction: The regression convolutional layer learns the spatial location patterns of disease targets in the image and outputs a set of bounding box coordinate information for each spatial location of each scale feature map (usually including the x-coordinate of the top left corner, y-coordinate of the top left corner, x-coordinate of the bottom right corner, and y-coordinate of the bottom right corner of the bounding box); different scale feature maps output bounding boxes of different size ranges. For example, high-resolution feature maps output small-sized bounding boxes to adapt to small diseases, and low-resolution feature maps output large-sized bounding boxes to adapt to large diseases, ensuring that every spatial location where a disease may exist can be accurately located.

[0096] Results Integration and Output: First, the category probability distribution output by the category prediction branch, the confidence score output by the confidence prediction branch, and the bounding box coordinates output by the location regression branch are correlated one-to-one to form a complete data set of "category-confidence-location" for each bounding box. Then, a non-maximum suppression algorithm is used to process all data sets: the algorithm traverses all bounding boxes and calculates the intersection-over-union (IoU) ratio between them. When the IoU ratio of two bounding boxes exceeds a preset threshold (e.g., 0.5), they are determined to be redundant detection boxes for the same defect. Only the bounding box with the highest confidence score is retained, and the rest of the redundant boxes are deleted. Finally, the defect category label (the category with the highest probability in the category probability distribution), confidence value (the confidence score of the corresponding bounding box), and location coordinates (the coordinate information of the corresponding bounding box) corresponding to each valid bounding box are extracted from the processed results. This completes the core output of the task adapter network, providing direct results for the intelligent identification of bridge defects.

[0097] In this embodiment, step S2 is used to train the constructed neural network using a standardized training dataset related to the specific task of bridge defect identification. During training, dynamic neuron pruning is performed to evaluate, filter, and remove redundant and less important neurons, optimizing the model structure. This improves model efficiency and structural compactness while ensuring bridge defect identification performance, ultimately resulting in an optimized target neural network model. The detailed steps are as follows:

[0098] Step S2-1: Evaluate each neuron in the neural network model using a preset evaluation strategy to obtain a set of evaluation values. The core objective of this operation is to quantify the importance of each neuron in the neural network model for the bridge defect identification task through a standardized evaluation strategy, generate a set of evaluation values ​​that can be used for subsequent neuron selection, and provide data support for dynamic neuron pruning. The specific steps are as follows:

[0099] Neuron Evaluation Initialization: For each neuron in the neural network model, the specific definition of the preset evaluation strategy is clearly defined. This strategy uses the gradient sensitivity of the neuron's output to the loss function as the core evaluation indicator. Gradient sensitivity reflects the degree to which the neuron contributes to the loss change during the model learning process, thereby measuring its importance to the disease identification task. At the same time, based on the total number of batches in the model training, data complexity, and expected evaluation accuracy, a threshold for the number of evaluations for each neuron is set (e.g., the threshold is set to 50 or 100 times based on the number of batches in the training dataset) to ensure that the evaluation results can cover a sufficient number of training scenarios and avoid the randomness of results caused by a single or small number of evaluations.

[0100] Multiple evaluation value collection: During the training process of the model using the standardized bridge defect training dataset, multiple repeated evaluation operations are performed on each neuron: After each batch of data is trained, the gradient norm of the neuron's output with respect to the loss function is calculated based on the model parameters and loss function of the current batch; the calculation of the gradient norm must be based on the backpropagation results of all samples in the current batch to ensure that it can reflect the actual impact of the neuron on the loss change on the batch of data; the gradient norm obtained each time is used as the temporary evaluation value of the neuron, and the training batch information corresponding to each evaluation is recorded to avoid confusion between temporary evaluation values ​​of different batches;

[0101] Evaluation value aggregation: Continuously monitor the number of evaluations for each neuron. When the number of evaluation operations performed by any neuron reaches a preset evaluation threshold, the evaluation value aggregation process for that neuron is initiated: Collect the temporary evaluation values ​​generated by that neuron in all evaluation batches. Based on the importance of different batches of data (e.g., early training batch data is used for basic learning, while later batch data is used for fine-tuning, and later batch data can be assigned higher weights), perform a weighted average on all temporary evaluation values. The weight allocation needs to be pre-set based on the training strategy (e.g., according to the order of training batches, the weight increases linearly from 0.8 to 1.2). By weakening the interference of abnormal batch evaluation values ​​through weighted averaging, the final evaluation value of that neuron is obtained. After all neurons have completed evaluation value aggregation, the final evaluation values ​​of all neurons are integrated to form a complete evaluation value set.

[0102] Mapping Relationship Establishment: To ensure a one-to-one correspondence between evaluation values ​​and neurons, a mapping relationship between neurons and final evaluation values ​​is established: Each neuron is assigned a unique identifier (including its network layer number and neuron index within the layer), and the identifier of each neuron is bound to its corresponding final evaluation value, generating key-value pairs of "neuron identifier - evaluation value"; all key-value pairs are stored in the form of a table or array to ensure that when sorting neurons later, the evaluation value can be quickly queried based on the neuron identifier, or the corresponding neuron can be located based on the evaluation value, providing a clear data association basis for subsequent neuron selection and pruning;

[0103] Step S2-2: When the number of evaluations for each neuron reaches a preset threshold, multiple neuron sets are obtained. The core objective of this operation is to generate neuron sets with clear grouping significance by recording, aggregating, and dividing the evaluation data according to importance level during neural network training when the number of evaluations for each neuron meets the preset conditions. This provides structured input for subsequent neuron sorting and pruning, including the following steps:

[0104] Neuron evaluation record initialization: For each neuron in the neural network model, an independent evaluation record list is created. The core function of this list is to store all temporary evaluation values ​​generated by the corresponding neuron during multiple evaluations, ensuring that the evaluation data of each neuron is archived independently and not confused with other neurons. The list needs to be associated with the unique identification information of the neuron (including the network layer identifier and intra-layer index of the neuron) for subsequent tracing and data matching, laying the data storage foundation for the subsequent aggregation and set division of evaluation values.

[0105] Temporary evaluation value collection and storage: During the training process of the model using the standardized bridge defect training dataset, each neuron is evaluated multiple times according to the preset neuron evaluation strategy (based on the gradient sensitivity of the neuron output to the loss function). After each evaluation, the temporary evaluation value of the neuron in the current training batch (i.e., the gradient norm of the neuron output to the loss function) is calculated in real time, and the temporary evaluation value is stored in the evaluation record list of the corresponding neuron in the order of evaluation time (or training batch order) to ensure the timeliness and integrity of the evaluation data and avoid data loss or disordered order.

[0106] Evaluation count monitoring and triggering: While collecting and storing temporary evaluation values, the number of evaluations for each neuron (i.e., the number of temporary evaluation values ​​stored in its evaluation record list) is monitored in real time. When the number of evaluations for any neuron reaches the preset threshold, the neuron set generation process is immediately triggered. The triggering condition here is based on "any neuron meeting the threshold", ensuring that the subsequent process is started in time before all neurons have completed a sufficient number of evaluations, so as to avoid the overall optimization progress being hindered due to the evaluation delay of individual neurons.

[0107] Evaluation value aggregation processing: For each neuron in the neural network model, all stored temporary evaluation values ​​are extracted from its corresponding evaluation record list; these temporary evaluation values ​​are aggregated using a weighted average algorithm to generate the aggregated evaluation value for each neuron; the weight allocation of the weighted average can be set according to the importance of the training batch (for example, later training batch data are closer to the model's convergence state and can be given higher weights). This aggregation operation weakens the random errors that may exist in a single evaluation, making the obtained aggregated evaluation value more objectively reflect the actual importance of the neuron to the bridge defect identification task;

[0108] Neuron set partitioning: The aggregated evaluation values ​​of all neurons are statistically analyzed to determine the overall range of aggregated evaluation values ​​(i.e., maximum and minimum values). Based on this range, multiple consecutive and non-overlapping numerical intervals are divided (for example, if the aggregated evaluation value range is 0-1, it can be divided into five intervals: 0-0.2, 0.2-0.4, 0.4-0.6, 0.6-0.8, and 0.8-1.0). Each interval corresponds to a neuron set. The aggregated evaluation value of each neuron is matched with these intervals, and neurons whose aggregated evaluation values ​​fall within the same interval are grouped together to form multiple neuron sets. Neurons within each set have similar importance levels.

[0109] Set output: The divided sets of neurons are used as input data for subsequent processing (neuron ranking). Each set of neurons must be accompanied by the aggregate evaluation value range information corresponding to the set, as well as the identification information of all neurons in the set (network layer identifier, in-layer index), to ensure that the importance level and neurons of each set can be clearly identified in the subsequent ranking process, laying the foundation for ranking by importance.

[0110] Step S2-3: Based on the evaluation value set and mapping relationship, a target ranking strategy is used to rank all neurons in multiple neuron sets to obtain the ranking results. The core objective of this operation is to uniformly rank all neurons in multiple neuron sets based on their importance evaluation values ​​using a standardized ranking strategy, clarifying the importance level of neurons, and providing a clear order basis for subsequent screening and pruning of low-importance neurons. The specific steps are as follows:

[0111] Ranking strategy configuration: Based on the generated set of evaluation values ​​(including the final evaluation values ​​of all neurons) and the pre-established "neuron-evaluation value" mapping relationship, the target ranking strategy is explicitly configured to sort in descending order of evaluation values. The numerical value of the evaluation value directly corresponds to the importance level of the neuron; a larger evaluation value indicates a higher contribution of the neuron to feature extraction and model prediction results in the bridge defect identification task, and thus a stronger importance; a smaller evaluation value indicates a lower contribution of the neuron, and thus a weaker importance. This strategy configuration ensures that the ranking results directly reflect the core value differences of the neurons.

[0112] Preliminary sorting within neuron sets: For each previously divided neuron set, based on the "neuron-evaluation value" mapping relationship, the final evaluation value corresponding to each neuron in the set is extracted one by one; using the evaluation value as the sorting criterion, all neurons in a single set are sorted in descending order, that is, the neuron with the highest evaluation value in the set is placed first, and the neuron with the lowest evaluation value is placed last; after sorting, each neuron set generates its own independent "local sorting list". The local list must retain the neuron's identification information (network layer identifier, in-layer index) and the corresponding evaluation value to ensure that the neuron information corresponds one-to-one with the importance level;

[0113] Global sorting and integration: Merge the "local sorting lists" of all neuron sets to form a temporary list containing all neurons in the neural network model; use the evaluation value as a unified standard, perform a global descending sort on all neurons in the temporary list again; traverse the evaluation values ​​of all neurons in the temporary list, place the neuron with the largest evaluation value at the front of the global sequence, and arrange the neurons with the next largest evaluation value in order until all neurons are sorted in descending order of evaluation value, and finally form a "preliminary global sorting sequence";

[0114] Sorting Result Verification and Adjustment: The completeness and rationality of the "preliminary global sorting sequence" are verified, with a focus on checking whether there are neurons with completely identical evaluation values ​​in the sequence. If neurons with identical evaluation values ​​are detected, a secondary sorting rule is initiated. Based on the "layer position" of neurons in the neural network, neurons with earlier layer positions (i.e., closer to the input layer) are prioritized in the sorting sequence, and neurons with later layer positions (i.e., closer to the output layer) are placed after them. The secondary sorting eliminates the sorting ambiguity caused by identical evaluation values, and finally generates a "complete sorting result" that is free of repetition, ambiguity, and has a clear hierarchy. This result clarifies the specific order of all neurons from high to low importance.

[0115] Step S2-4: Based on the sorting results, select a preset number of target neurons to obtain a set of target neurons. The core objective of this operation is to select a preset number of low-importance neurons as target neurons based on the descending order of neuron importance, providing clear operational objects for subsequent dynamic pruning of redundant neurons and optimization of model structure. The specific steps are as follows:

[0116] Preset Quantity Determination: Determine the preset number of target neurons based on the actual needs of the model. If the requirement is a fixed proportion of model compression (e.g., reducing neurons by 20% to reduce computational costs), then use the total number of neurons in the neural network model as the base and calculate the target number of neurons according to the preset proportion (e.g., 20%). If the requirement is a fixed scale of parameter reduction (e.g., explicitly reducing 500 neurons to adapt to edge devices), then directly set a fixed value as the target number of neurons. The determination of the preset number should take into account both model compression efficiency and recognition performance to avoid a significant decrease in model accuracy due to too many neurons, or failure to achieve the optimization effect due to too few neurons.

[0117] Sorting sequence traversal: Based on the previously obtained "complete neuron sorting results" (sorted in descending order of evaluation value, with higher evaluation values ​​indicating stronger neuron importance), all neurons are traversed sequentially from the end of the sorting sequence backwards. The neurons at the end of the sorting sequence correspond to the neurons with the lowest evaluation values ​​and the smallest contribution to the bridge defect identification task. Starting the traversal from this position can accurately locate low-importance neurons to be pruned, avoiding the misselection of high-importance neurons that would affect model performance. During the traversal, the identification information of the neurons being traversed (network layer identifier, intra-layer index) needs to be recorded in real time to ensure subsequent traceability.

[0118] Target neuron selection: During the traversal, the number of neurons traversed is counted simultaneously: the count is incremented by 1 for each neuron traversed; when the cumulative count reaches the preset number, the traversal operation is stopped immediately; at this time, all neurons that have been traversed are candidate target neurons that meet the "low importance" screening criteria; these neurons have low evaluation values ​​and contribute little to the model's extraction of bridge disease features and output of recognition results, and the impact of pruning on model performance is controllable;

[0119] Target neuron set generation: The identification information of all candidate target neurons is summarized and integrated to form a target neuron set. The set must clearly record the complete identification of each target neuron, including the identification of its network layer (e.g., the 3rd layer of the feature extraction backbone network, the 1st layer of the task adaptation head network) and the neuron index within that layer (e.g., the 15th neuron in the layer). This ensures that subsequent pruning operations can accurately locate each target neuron and avoid misoperation due to ambiguous identification. The final target neuron set will serve as the direct input data for subsequent neuron pruning steps.

[0120] Step S2-5: Prune each target neuron in the target neuron set, and after pruning, adjust the neural network model based on the pruning results to obtain an optimized target neural network model. The core objective of this operation is to accurately remove neurons in the target neuron set that contribute little to bridge defect identification. Through connection reconstruction, structural optimization, and performance restoration, while reducing redundant model parameters and improving operating efficiency, the model's recognition accuracy is ensured, ultimately generating a compact and efficient optimized model. The specific steps are as follows:

[0121] Target neuron localization information extraction: Based on the determined set of target neurons, extract the specific location information of each target neuron in the neural network model. This location information must include two core parts: first, the network layer identifier to which the target neuron belongs, clarifying whether it is located in the feature extraction backbone network (such as the state update layer or observation feature extraction layer of the visual state space model) or the task adaptation head network (such as the category prediction branch convolutional layer or the position regression branch convolutional layer), and the specific layer number; second, the neuron index of the target neuron in the corresponding network layer, that is, the unique sequence number of the neuron among all neurons in the layer. By extracting the complete localization information, it is ensured that the subsequent pruning operation can accurately locate each target neuron and avoid misoperation of non-target neurons.

[0122] Neuron pruning operation execution: Based on the extracted target neuron localization information, pruning is performed on each neuron in the target neuron set one by one. The specific operation includes two aspects: First, disconnecting the connection relationship of the target neuron, that is, cutting off the input connection between the neuron and the preceding network layer neurons, as well as the output connection between the neuron and the following network layer neurons, to ensure that the pruned neuron no longer participates in the feature transfer and calculation of the model; Second, removing the associated parameters of the target neuron, that is, deleting the weight parameters (such as the connection weights from the preceding layer to the neuron) and bias parameters corresponding to the neuron, completely eliminating the parameter occupation of the neuron in the model, reducing the model storage volume and computational load; The pruning process needs to process the target neurons one by one to ensure that each target neuron is completely removed;

[0123] Neural network connection reconstruction: After completing the pruning operation of all target neurons, connection reconstruction is performed on the network layers affected by the pruning (i.e., the layer containing the target neuron and the layers before and after it that are connected to it). First, the connection weights between the remaining neurons are adjusted. For connection paths that are broken due to the pruning of the target neuron, the connection weights of adjacent remaining neurons are redistributed to ensure the integrity of the feature transmission path. Second, a weight redistribution algorithm is used to compensate for the loss of feature representation. By calculating the contribution ratio of the target neuron to feature transmission before pruning, the weight value corresponding to this ratio is reasonably distributed to the remaining neurons in the same or adjacent layers to avoid a decrease in the model's ability to capture bridge defect features due to neuron removal.

[0124] Model structure compaction: Based on the results of connection reconstruction, the overall structure of the neural network model is optimized for compactness. On the one hand, the number of neurons in related network layers is reduced, the remaining neurons in the network layer containing the target neuron are renumbered, the index range of neurons in the layer is compressed, and the gaps in the neuron indexes in the layer caused by pruning are eliminated. On the other hand, redundant network branches in the model are merged. If a network branch has only a few neurons left after the target neuron is pruned and its contribution to feature extraction is weak, the branch is merged with other branches with similar functions to simplify the model structure, further reduce the computational complexity and storage requirements of the model, and generate a compact intermediate neural network model.

[0125] Model fine-tuning and performance recovery: The intermediate neural network model was fine-tuned using a standardized training dataset related to the bridge defect identification task. The fine-tuning process employed the backpropagation algorithm, with the model's loss in bridge defect identification as the optimization objective. The weight and bias parameters of the remaining neurons in the model were gradually updated to compensate for the potential decrease in model recognition accuracy due to neuron pruning. The number of iterations for fine-tuning training was dynamically adjusted according to changes in model performance until the model's recognition accuracy on the training dataset stabilized, ensuring that the model could be re-adapted to the requirements of bridge defect feature extraction and prediction.

[0126] Model Validation and Output Optimization: After fine-tuning training, the performance metrics of the fine-tuned model are evaluated using an independent validation dataset (such as accuracy, recall, and confidence threshold achievement rate for bridge defect identification). If the evaluation results show that the model's performance metrics meet the preset thresholds (these thresholds are set based on the accuracy requirements of the bridge defect identification task, such as accuracy not less than 95% and recall not less than 92%), the model optimization is deemed successful, and the fine-tuned model is output as the optimized target neural network model. If the performance metrics do not meet the thresholds, the model fine-tuning and performance recovery steps are returned, the number of fine-tuning iterations is increased, or the weight update strategy is adjusted, and fine-tuning training is performed again until the model performance meets the preset requirements.

[0127] In this embodiment, step S3 is model application. The core objective is to apply the optimized target neural network model to a real-world bridge defect detection scenario. By extracting features, generating and optimizing results from the input bridge image to be detected, the final output is an accurate bridge defect identification result, completing the transition from model to practical application. The specific steps are as follows:

[0128] Image preprocessing: Receive the bridge defect images to be detected, and perform image resizing and pixel value normalization to generate standardized image data that meets the input requirements of the optimized target neural network model. This step aims to eliminate the interference of image size differences and pixel value magnitude differences on model inference by receiving the bridge defect images and specifically performing resizing and pixel value normalization operations. This generates standardized image data that fully conforms to the input specifications of the optimized target neural network model, laying a unified and standardized data foundation for the subsequent accurate extraction of bridge defect features by the feature extraction backbone network. The specific operations are as follows:

[0129] Image reception and preliminary verification of bridge defects to be detected: An image transmission link is established with bridge inspection equipment (such as drones, ground inspection robots, and handheld cameras), supporting wired or wireless reception of bridge defect images to be detected. This ensures data integrity during image transmission and prevents image damage due to transmission interruptions or interference. After receiving the image, the system first checks whether the image format conforms to the preset processing standard, supporting common image formats (such as JPEG, PNG, and BMP). If the format is incompatible, the format conversion module is activated to convert it to the preset format. Simultaneously, the system verifies whether the image has missing areas, pixel corruption, or other issues. Problematic images are marked and fed back to the data acquisition end. Complete images are temporarily stored for subsequent processing. Associated information is added to each received complete bridge defect image, including image capture time, capture location (corresponding to the specific part of the bridge, such as beams, piers, or bridge deck), and capture device parameters (such as resolution and focal length). This information is transmitted along with the standardized image data, providing auxiliary basis for subsequent scenario-based analysis of defect identification results.

[0130] Image resizing: Based on the preset input specifications of the optimized target neural network model (especially the feature extraction backbone network), the target parameters for image resizing are determined, namely the target height H and the target width W (H and W are preset fixed pixel numbers, determined by the input image size standard during model training, ensuring that the resized image can directly adapt to the input layer structure of the model); a bilinear interpolation algorithm is used to perform the resizing operation. This algorithm determines the new pixel value by calculating the weighted average of the four neighboring pixels around the pixel to be interpolated, which can ensure image clarity while taking into account processing efficiency, avoiding distortion problems such as jagged edges and blurred details in the resized image, and ensuring that the detailed information of bridge defects (such as microcracks and local peeling) is not lost; the complete bridge defect image temporarily stored is read to obtain its original height H0 and original width W0; based on the bilinear interpolation algorithm, the pixel matrix of the original image is stretched or compressed proportionally so that the height of the resized image accurately matches the target height H and the width accurately matches the target width W; during the adjustment process, the spatial structure of the image and the relative positional relationship of the defect area remain unchanged to ensure that the subsequent model can accurately identify the actual location of the defect in the bridge;

[0131] Image pixel value normalization: For the resized image, iterate through all its pixels and obtain the original pixel value P for each pixel. The range of the original pixel value is determined to be 0-255 (this range is the standard range for pixel values ​​in common images; the brightness information of each pixel is represented by an integer from 0 to 255, where 0 represents black and 255 represents white). Based on the pixel value processing standard used during the training of the optimized target neural network model, the target range for the normalized pixel value is set to 0-1. This range ensures a uniform pixel value magnitude and avoids distortion caused by differences in lighting conditions between different images. Variations in pixel values ​​(e.g., generally higher pixel values ​​under strong light, generally lower pixel values ​​under backlight) interfere with feature extraction in the model. For each pixel in the resized image, the normalized pixel value P' is calculated according to the formula P'=P / 255; where P is the original pixel value of a pixel in the resized image, ranging from 0 to 255; 255 is the maximum value of the original pixel value; and P' is the normalized pixel value of that pixel, ranging from 0 to 1. After traversing all pixels to complete the calculation, image data with pixel values ​​all in the range of 0-1 is obtained.

[0132] Standardized Image Data Validation and Output: The image data that has undergone resizing and pixel value normalization undergoes dual validation. First, it checks whether the image size is precisely equal to the target height H and target width W; if a deviation exists, the resizing is re-executed. Second, multiple pixels are randomly selected from the image, and their normalized pixel values ​​are checked to see if they fall within the 0-1 range; if any pixel values ​​exceed this range, the normalization calculation is re-executed. The validated image data is converted into a tensor format that the optimized target neural network model can directly read. The tensor's dimensional order is consistent with the model's input layer requirements (e.g., channel-first or space-first format) to ensure the model can quickly parse the image data and initiate the subsequent feature extraction process. The converted tensor format standardized image data, along with image association information, is output to the input port of the feature extraction backbone network, completing the entire standardization process and awaiting feature extraction operations from the backbone network.

[0133] Backbone Network Feature Extraction: Standardized image data is input into the feature extraction backbone network. The image feature sequence is sequentially scanned and hidden states are updated using the state equations and observation equations of the visual state space model, extracting enhanced multi-level feature maps. This step involves importing preprocessed standardized image data into the feature extraction backbone network. Relying on the state equations and observation equations of the visual state space model, it completes the sequential scanning of the image feature sequence, dynamic updating of hidden states, and effective feature extraction. Finally, through feature reconstruction and enhancement, a multi-level feature map is generated, providing core feature support with both local details and global correlations for the task-adaptive head network to accurately identify bridge defect categories, locations, and confidence levels. The detailed steps are as follows:

[0134] Standardized image data input and backbone network connection verification: Receive preprocessed standardized image data in tensor format; verify that its dimensions match the input requirements of the feature extraction backbone network. If the backbone network's preset input is a three-dimensional tensor (a combination of height, width, and number of channels), confirm that the tensor dimensions of the standardized image data strictly match this combination, ensuring the data can directly enter the subsequent processing flow. If there is a dimensional deviation, activate the dimension adjustment module to expand or compress channels and fine-tune the dimensions to make the data dimensions conform to the backbone network's input specifications. Traverse the tensor elements of the standardized image data to check for outliers. If outliers are detected, use neighbor-to-neighbor interpolation to replace them, ensuring data validity. Simultaneously verify that the pixel value range of the data is within the preset normalization interval, ensuring the effectiveness of the initial pixel value normalization processing and avoiding the impact of data anomalies on subsequent feature extraction accuracy. Transmit the verified standardized image data to the input layer of the feature extraction backbone network, using a memory caching mechanism to temporarily store the data and reduce data read latency. Simultaneously, transmit data in batches according to the backbone network's computation rhythm to ensure that data supply matches the network's computation speed, avoiding data congestion or idle computing resources.

[0135] Image feature serialization processing: The input standardized image data is uniformly divided into multiple non-overlapping image blocks to ensure that each image block is of consistent size, thus avoiding the impact of block size differences on the stability of subsequent feature extraction; a linear projection operation is performed on each segmented image block to transform each image block from pixel space into a high-dimensional feature vector, making the image information more consistent with the input requirements of the visual state space model; the feature vectors corresponding to all image blocks are arranged in order of their spatial positions in the original image to form a complete image feature sequence, providing structured input data for subsequent sequence modeling of the visual state space model;

[0136] State sequence update operation: The generated image feature sequence is input into the state equation of the visual state space model to start the sequence processing flow; the image feature sequence is sequentially scanned through one-dimensional convolution operation. During the scanning process, the one-dimensional convolution kernel processes the elements in the feature sequence position by position, while combining the hidden state information of the previous time step; based on the one-dimensional convolution processing result and the hidden state of the previous time step, the hidden state of the current time step is dynamically updated; through the continuous hidden state update process, information from different positions in the image feature sequence is gradually integrated, effectively capturing long-distance global dependencies across regions in the image, and solving the limitations of traditional convolutional networks in processing global correlation information;

[0137] Observation feature extraction operation: The hidden state sequence obtained after updating the state sequence is input into the observation equation of the visual state space model to start the feature selection and extraction process; the observation equation filters and extracts key feature information from the hidden state sequence through linear transformation operation to generate the output feature sequence; this linear transformation process can enhance the effective information in the hidden state while suppressing redundant or noise information; the output feature sequence serves as the enhanced image feature representation, further improving the feature's ability to represent the disease-related information in the bridge image and providing high-quality feature data for subsequent feature map reconstruction;

[0138] Feature map reconstruction and enhancement: The output feature sequence obtained from the observed feature extraction undergoes dimensionality reshaping, converting the one-dimensional feature sequence into a two-dimensional feature map, restoring the spatial structure information of the image, and ensuring a certain correspondence between the feature map and the spatial distribution of the original input image. The two-dimensional feature map is then input into multiple convolutional layers, where local feature fusion is achieved through multi-layer convolution operations, integrating local detail information of adjacent pixels or regions in the feature map. Simultaneously, dimensionality reduction is performed through convolutional layer parameter design, reducing the dimensionality of the feature data and the computational load. Through multi-layer convolution optimization, a high-level feature map is output for the task adaptation head network. This feature map contains both local image details and global correlation information, directly supporting subsequent processing. The process involves classifying, determining the confidence level, and identifying the location of bridge defects. Multi-level feature maps are input into the task adaptation head network, where they are fused using a multi-scale feature pyramid structure. These features are then processed through category prediction, confidence prediction, and location regression branches, outputting preliminary category probability distributions, confidence scores, and bounding box coordinates for each defect. This step takes the multi-level feature maps from the feature extraction backbone network, adapts them to the detection needs of bridge defects of varying sizes using a multi-scale feature pyramid structure, and then performs targeted processing for category, confidence, and location, generating preliminary detection data that reflects the core information of the defects. This provides a foundation for subsequent removal of redundant detection results and output of accurate identification results. The detailed steps are as follows:

[0139] Multi-level feature map reception and multi-scale feature pyramid construction: The multi-level feature map output from the feature extraction backbone network is received. This feature map integrates local details and long-range global dependency information of the bridge image, covering image features at different levels, and is the core data foundation for defect detection. For the received multi-level feature map, a multi-scale feature pyramid construction operation is performed. By downsampling and upsampling the original multi-level feature map at different ratios, feature maps at multiple scale levels are generated. For example, the original feature map is adjusted at 1x, 2x, and 4x scales respectively. The 1x scale feature map retains the fine local details of the original image and is suitable for the detection of small defects. The 2x and 4x scale feature maps compress the spatial dimension through downsampling and strengthen the global correlation information, which is suitable for the detection of medium and large defects, ensuring that bridge defects of different sizes (such as small cracks and large-area spalling) can be effectively captured.

[0140] Multi-scale feature fusion processing: Cross-scale association is performed on feature maps of different scales in the multi-scale feature pyramid, establishing a correspondence between high-level feature maps (e.g., 4x scale) and low-level feature maps (e.g., 1x scale) to clarify the feature mapping relationship of the same bridge area at different scales; a feature fusion algorithm is used to integrate the global association information in the high-level feature maps with the local detail information in the low-level feature maps; through layer-by-layer feature superposition and weight allocation, each scale feature map after fusion retains the details of disease edges and textures from the low-level feature maps, while also including the global description of the overall morphology of the disease from the high-level feature maps, thus improving the ability of the feature maps to represent diseases of different sizes;

[0141] Category prediction branch processing: For the fused feature map at each scale in the multi-scale feature pyramid, each is input into an independent convolutional layer for feature transformation. The convolutional layer uses a pre-sized convolutional kernel to enhance the disease-related features in the feature map while suppressing irrelevant information in the background area, highlighting the key information related to the disease category in the feature map. After the convolutional layer transformation, each spatial location of each scale feature map outputs a set of category probability distributions. This category probability distribution contains the probability values ​​of the disease at the corresponding spatial location belonging to all predefined categories. The predefined categories cover common bridge disease types (such as cracks, spalling, exposed rebar, etc.). The higher the probability value, the greater the possibility that the disease at that spatial location belongs to the corresponding category, thereby quantifying the tendency of disease category attribution.

[0142] Confidence prediction branch processing: Based on the feature map after convolutional transformation by the category prediction branch, it is input into another set of independent convolutional layers for dedicated confidence prediction processing. The parameter design of this set of convolutional layers focuses on analyzing the saliency of disease features in the feature map. By judging the strength of the feature signals, the reliability of the detection results is evaluated. After processing by this set of convolutional layers, a confidence score is output for each spatial location of each scale feature map. The score ranges from 0 to 1. The closer the score is to 1, the more reliable the result of detecting disease at the corresponding spatial location. The closer the score is to 0, the higher the probability that the location is a background area or detection noise. This is used to screen out highly reliable disease detection results.

[0143] Location regression branch processing and preliminary result integration: The feature maps of each scale fused from the multi-scale feature pyramid are input into the regression convolutional layer for bounding box prediction. The regression convolutional layer learns the spatial location patterns of bridge defects in the image, and calculates and outputs a set of bounding box coordinate information for each spatial location of each feature map at each scale. Among them, small-scale feature maps correspond to small-sized bounding boxes, which are suitable for locating small defects; large-scale feature maps correspond to large-sized bounding boxes, which are suitable for locating medium and large defects, ensuring that the specific location of defects in the image can be accurately depicted. The class probability distribution output by the class prediction branch, the confidence score output by the confidence prediction branch, and the bounding box coordinate information output by the location regression branch are correlated one-to-one. That is, each bounding box coordinate is matched with the corresponding class probability distribution and confidence score, forming a preliminary detection data set of "bounding box-class probability-confidence", which serves as the input data for subsequent detection result optimization.

[0144] Detection result optimization: Non-maximum suppression is applied to the preliminary category probability distribution, confidence score, and bounding box coordinates to remove redundant and low-confidence detection boxes. The probability information of each category is then fused to generate optimized disease detection results. This step optimizes the preliminary detection data output by the task adapter network. Unreliable results are removed through confidence filtering, redundant detection boxes for the same type of disease are eliminated using non-maximum suppression, and category probability information is fused to ensure the accuracy of disease category judgment. Ultimately, accurate and non-redundant bridge disease detection results are generated, providing a reliable basis for subsequent final identification information output. The detailed steps are as follows:

[0145] Preliminary data processing and confidence threshold filtering: Collect all preliminary detection data output by the task adapter network, including the bounding box coordinates, the probability distribution of the category to which the detection box belongs, and the corresponding confidence score for each detection box. Establish a one-to-one correspondence data table of "bounding box coordinates - category probability distribution - confidence score" to ensure clear association between data items. Based on the accuracy requirements of bridge defect detection and historical validation data, set a fixed confidence threshold. This threshold needs to balance detection recall and precision, and is usually determined through multiple experimental verifications to ensure effective filtering of low-reliability detection results caused by noise or feature interference. Iterate through the confidence scores of all detection boxes in the data table, and directly remove detection boxes with scores lower than the preset confidence threshold from the dataset. Only retain those with confidence scores higher than or equal to the threshold. The threshold detection boxes, their corresponding category probability distributions, and bounding box coordinates are used to initially screen out candidate detection results with high reliability. For the candidate detection boxes retained after confidence screening, their corresponding category probability distributions are analyzed to determine the dominant category of each detection box. The dominant category is the disease category with the highest probability value in the category probability distribution (such as cracks, spalling, exposed reinforcement, etc.), thus clarifying the disease type corresponding to each detection box. Based on the dominant category of each detection box, all candidate detection boxes are divided into multiple groups, with detection boxes of the same dominant category grouped together. For example, all detection boxes with the dominant category of "cracks" form the "crack detection group," and detection boxes with the dominant category of "spalling" form the "spalling detection group," realizing centralized management of detection boxes of the same type of disease and laying the foundation for subsequent removal of redundant boxes of the same type.

[0146] Non-maximum suppression (NMS) removes redundant detection frames of the same type: For each group of detection frames of the same type of disease, all detection frames in the group are sorted from highest to lowest confidence score, with the detection frame with the highest confidence score placed at the top of the group as the baseline detection frame. Using the baseline detection frame as a reference, the cross-union ratio (CUP) of each other detection frame in the group is calculated. The CUP is calculated as the ratio of the area of ​​the overlapping region of two detection frames to the total area covered by the two detection frames. A CUP threshold is also set, which is determined based on the characteristics of the disease type and used for judgment. The system checks for redundancy in the detection frames. If the cross-union ratio (CUI) of a detection frame with the baseline detection frame is greater than or equal to a preset CUI threshold, the detection frame is determined to be redundant and removed from the group. If the CUI is less than the threshold, the detection frame is retained. After completing the redundancy judgment related to the baseline detection frame, the detection frame with the highest confidence is selected from the remaining detection frames as the new baseline frame. The above CUI calculation and redundancy removal operations are repeated until all detection frames in the group have completed the redundancy judgment. Finally, each group of the same type of disease retains only the detection frames with no redundancy and high confidence.

[0147] Category probability information fusion: For each detection box retained after non-maximum suppression processing, its category probability distribution is checked again to confirm whether the probability value of the dominant category is significantly higher than that of other categories (e.g., the difference between the probability value of the dominant category and the probability value of the second highest category must be greater than a preset difference threshold). If the difference does not reach the threshold, the feature matching degree of the detection box is further analyzed to ensure the accuracy of category judgment. If there are detection boxes of different dominant categories in the same bridge area (and the cross-union ratio is less than the threshold, and they are not redundant), their category probabilities are weighted and fused based on the confidence scores of each detection box. During fusion, the detection box with the higher confidence score has a greater weight in the fusion result. Through weighted calculation, the final category probability distribution of the area is determined, the most likely disease category in the area is identified, and detection errors caused by category confusion are avoided.

[0148] Optimized defect detection result generation: Collect all detection box data after non-maximum suppression processing and category probability fusion, including the bounding box coordinates of each detection box, the final determined defect category label (determined by the category with the highest probability in the fused category probability distribution), and the corresponding confidence score; Standardize the integrated detection data according to a preset format to ensure that the bounding box coordinates are presented in a unified pixel coordinate system (such as a combination of the upper left and lower right corner coordinates), the category labels adopt a unified naming convention, and the confidence score retains a fixed number of decimal places, ultimately generating a clear and accurate optimized defect detection result, preparing for the subsequent output of the final recognition information; Based on the optimized defect detection result, extract and output the final category label, confidence value, and location coordinates of the defect to complete the intelligent identification of bridge defects; The purpose of this step is to extract key information from the optimized defect detection result, transform the abstract detection data into specific and interpretable bridge defect identification conclusions, and through association with the actual bridge scene and result formatting, finally output clear and usable recognition results, completing the entire intelligent bridge defect identification process; The detailed steps are as follows:

[0149] Receiving and verifying optimized disease detection results: The system receives optimized disease detection results after non-maximum suppression processing and category probability fusion. These results include the bounding box coordinates, final category probability distribution, and confidence score for each valid detection box, serving as the core data source for extracting the final identification information. The system iterates through the received optimized detection results, checking whether each detection box completely contains the three core data items: bounding box coordinates, category probability distribution, and confidence score. If any detection box has missing data, it is directly removed to avoid errors in subsequent information extraction due to incomplete data. The system verifies that the format of each data item conforms to preset standards. Specifically, the bounding box coordinates must be integers within the standardized image pixel range; the confidence score must be a value between 0 and 1; and the category probability distribution must include the probability values ​​of all predefined disease categories, with the sum of all probability values ​​being 1, ensuring that the data format is compliant and can be directly used for subsequent information extraction.

[0150] Final Defect Key Information Extraction: For each valid detection box, its final category probability distribution is analyzed, and the defect category corresponding to the highest probability value in the probability distribution is selected as the final category label for that detection box. Predefined defect categories cover common bridge defect types (such as cracks, spalling, exposed rebar, corrosion, etc.) to ensure that the extracted category label accurately reflects the defect type corresponding to the detection box. If multiple categories have the same highest probability value (i.e., the category probabilities are tied for first), the unique final category label is further determined by combining the bounding box position and local image features (e.g., cracks are mostly linear, spalling is mostly blocky). The final category label is directly extracted from each valid detection box. The confidence score serves as the confidence value for the disease identification result. This value directly reflects the reliability of the disease detection result and must correspond one-to-one with the final category label and location coordinates in subsequent outputs to provide a basis for users to judge the credibility of disease identification. The bounding box coordinates of each valid detection box are extracted and standardized to the format of "top left x-coordinate - top left y-coordinate - bottom right x-coordinate - bottom right y-coordinate" to ensure that the coordinates can accurately locate the specific area of ​​the disease in the standardized image. At the same time, the coordinates are correlated and verified with the size (height H, width W) of the standardized image in the preprocessing stage to confirm that the coordinate values ​​do not exceed the image size range and avoid positional positioning deviations.

[0151] Correlation of Defect Information with Bridge Scene: The system retrieves associated information recorded during the preprocessing stage of the bridge image to be inspected, including the image capture location (corresponding to specific parts of the bridge, such as beams, piers, bridge deck, supports, etc.), capture time, and capture device parameters (such as resolution and focal length). This information is crucial for converting defect locations in the image into actual bridge locations. Based on the capture device parameters (such as focal length) and the field of view during capture, a standardized mapping relationship is established between image pixel coordinates and the physical coordinates of the actual bridge parts. Based on this mapping relationship, the extracted defect image location coordinates (pixel coordinates) are converted into a rough physical location description of the actual bridge parts (e.g., "2 meters from the end on the left side of the beam," "the middle lane area of ​​the bridge deck"), thus associating the defect identification results with the actual bridge structure and enhancing the practical value of the results.

[0152] The identification results are formatted for output: The final category label, confidence score, image location coordinates (standardized format), actual bridge location description, and shooting time for each defect are organized in a structured manner as "single defect entries," with each entry corresponding to an independent bridge defect, ensuring clear and organized information. The output format is determined based on actual application needs (e.g., for bridge defect management system data entry, inspection report generation, etc.). For system data entry, machine-parsable structured data formats such as JSON or XML are used; for manual viewing, table or text description formats are used (e.g., table columns include "defect category," "confidence score," "image location," "actual bridge location," and "shooting time"), ensuring that the output results are easy for subsequent processing and easy for manual interpretation.

[0153] Result Confirmation and Intelligent Recognition Completion: The formatted recognition results are subjected to secondary verification to check whether the information of each defect item is complete (no missing items) and whether the data is accurate (e.g., confidence values ​​are in the range of 0-1, location descriptions match coordinates). If any problems are found, they are corrected in time to ensure the accuracy of the output results. After the secondary verification is completed, the formatted bridge defect recognition results are officially output, marking the complete closed loop of the bridge defect intelligent recognition process from image input to result output. This achieves accurate, efficient and intelligent recognition of bridge defects, providing data support for subsequent bridge defect assessment and maintenance decisions.

[0154] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A neural network optimization method based on a visual state-space model for bridge defects, characterized in that: Includes the following steps: Step S1: Construct a neural network based on a visual state space model; the neural network includes: Feature extraction backbone network: It is built on the visual state space model, which models the input image feature sequence through state equations and observation equations to capture local details and long-distance global dependencies in the image; Task adapter head network: Connected to the output of the feature extraction backbone network, it is used to output information related to a specific task based on the extracted features; when the specific task is bridge defect identification, the task adapter head network is configured to output the defect category, confidence level and location information. Step S2, Model Training and Dynamic Optimization: Train the neural network using a standardized training dataset relevant to the specific task, and perform dynamic neuron pruning during training, including: Each neuron in the neural network model is evaluated using a preset evaluation strategy to obtain a set of evaluation values. The neural network model contains multiple neurons, and the preset evaluation strategy corresponds to a target ranking strategy. Each evaluation value in the set of evaluation values ​​is mapped to the corresponding neuron. If the number of times each neuron is evaluated reaches a preset threshold, multiple sets of neurons are obtained; Based on the evaluation value set and mapping relationship, a target ranking strategy is used to rank all neurons in multiple neuron sets to obtain the ranking result; Based on the sorting results, a preset number of target neurons are selected to obtain a set of target neurons; Each target neuron in the target neuron set is pruned, and the neural network model is adjusted based on the pruning results after pruning to obtain an optimized target neural network model, including: Neural network connection reconstruction: After the pruning operation is completed, the connection reconstruction of the layers in the neural network model affected by the pruning is performed, including adjusting the connection weights between the remaining neurons and compensating for the loss of feature representation caused by the pruning through a weight redistribution algorithm; Model structure compaction: Based on the connection reconstruction results, the overall structure of the neural network model is optimized, including reducing the number of neurons in related layers and merging redundant network branches to generate a compact intermediate neural network model. Model fine-tuning and performance recovery: The intermediate neural network model is fine-tuned using the training dataset, and the parameters of the remaining neurons are updated through the backpropagation algorithm to restore the model's recognition accuracy; Optimize model validation and output: After fine-tuning training, use the validation dataset to evaluate the performance metrics of the fine-tuned model. When the performance metrics reach a preset threshold, output the fine-tuned model as the optimized target neural network model.

2. The neural network optimization method for bridge defects based on a visual state-space model according to claim 1, characterized in that: It also includes step S3, model application: the image to be detected is input into the optimized target neural network model, the feature extraction backbone network extracts features, and the task adaptation head network outputs the recognition result related to the specific task; when the specific task is bridge defect recognition, the intelligent recognition of bridge defects is completed.

3. The neural network optimization method for bridge defects based on a visual state-space model according to claim 1, characterized in that: The feature extraction backbone network is constructed based on a visual state space model. Includes the following steps: Image feature serialization: The input image is uniformly divided into blocks to obtain multiple non-overlapping image blocks. Each image block is linearly projected and converted into a feature vector, thus forming an image feature sequence. State sequence update: The image feature sequence is input into the state equation of the visual state space model. The image feature sequence is sequentially scanned through one-dimensional convolution operation to gradually update the hidden state sequence in order to capture long-distance global dependencies in the image. Observation feature extraction: The hidden state sequence is input into the observation equation of the visual state space model, and the output feature sequence is extracted from the hidden state sequence through linear transformation, which serves as the enhanced image feature representation; Feature map reconstruction and enhancement: The output feature sequence is reshaped into a two-dimensional feature map, and local feature fusion and dimensionality reduction are performed through multiple convolutional layers. Finally, a high-level feature map is output for the task adaptation head network.

4. The neural network optimization method for bridge defects based on a visual state-space model according to claim 3, characterized in that: The task adapter head network is configured to output the disease category, confidence level, and location information, including the following steps: Feature map reception and preprocessing: High-level feature maps are received from the feature extraction backbone network, and multi-scale feature pyramids are constructed on the high-level feature maps to generate feature maps of multiple scales, so as to enhance the detection capability of diseases of different sizes. Category prediction branch processing: For each feature map in the multi-scale feature map, feature transformation is performed through convolutional layers to output the category probability distribution of the disease at each spatial location, where the category probability distribution represents the probability that the disease belongs to each predefined category; Confidence prediction branch processing: Based on the processed feature map, confidence prediction is performed through another convolutional layer, and the confidence score of the presence of disease at each spatial location is output. The confidence score represents the reliability of the detection result. Location regression branch processing: At the same time, based on multi-scale feature maps, bounding box prediction is performed through regression convolutional layers, and the bounding box coordinates of the lesion at each spatial location are output. The bounding box coordinates are used to locate the specific location of the lesion in the image. Results Integration and Output: The category probability distribution, confidence score, and bounding box coordinate information are fused together. Redundant detection boxes are removed using a non-maximum suppression algorithm. Finally, the category label, confidence value, and location coordinates of the disease are output.

5. The neural network optimization method for bridge defects based on a visual state-space model according to claim 1, characterized in that: The evaluation of each neuron in the neural network model is performed using a pre-defined evaluation strategy to obtain a set of evaluation values, including the following steps: Neuron evaluation initialization: For each neuron in the neural network model, the preset evaluation strategy is defined as the gradient sensitivity of the neuron's output to the loss function, and a threshold for the number of evaluations is set. Multiple evaluation value collection: During model training, for each neuron, the evaluation operation is repeatedly performed in multiple training batches. Each time the evaluation is performed, the gradient norm of the neuron's output with respect to the loss function in the current training batch is calculated and used as the temporary evaluation value of the neuron. Evaluation value aggregation: When the number of evaluation operations performed by each neuron reaches a preset threshold, all temporary evaluation values ​​are weighted and averaged to obtain the final evaluation value of each neuron, thus forming an evaluation value set; Mapping relationship establishment: Associate each final evaluation value with its corresponding neuron to establish a one-to-one mapping relationship between neurons and evaluation values ​​for subsequent sorting.

6. The neural network optimization method for bridge defects based on a visual state-space model according to claim 5, characterized in that: If the number of times each neuron is evaluated reaches a preset threshold, a set of multiple neurons is obtained, including the following steps: Neuron evaluation record initialization: Creates a list of evaluation records for each neuron in the neural network model to store the temporary evaluation values ​​of that neuron in multiple evaluations; Temporary evaluation value collection and storage: During model training, each neuron is evaluated multiple times according to the preset evaluation strategy. After each evaluation, the temporary evaluation value of the neuron is calculated and stored in the corresponding evaluation record list in sequence. Evaluation count monitoring and triggering: The number of evaluations for each neuron is monitored in real time. When the number of evaluations for any neuron reaches a preset threshold, the neuron set generation process is triggered. Evaluation value aggregation processing: For each neuron, all temporary evaluation values ​​are extracted from its evaluation record list and aggregated using a weighted average algorithm to obtain the aggregated evaluation value for each neuron; Neuron set partitioning: Based on the range of aggregate evaluation values ​​of all neurons, neurons are divided into multiple sets, where each set contains neurons whose aggregate evaluation values ​​fall within a specific range; Set output: The multiple sets of neurons after partitioning are used as input for subsequent sorting processing, where each set of neurons represents a group of neurons with similar importance levels.

7. The neural network optimization method for bridge defects based on a visual state-space model according to claim 1, characterized in that: Based on the evaluation value set and mapping relationship, a target ranking strategy is used to rank all neurons in multiple neuron sets, resulting in the following ranking results: Ranking strategy configuration: Based on the set of evaluation values ​​and the mapping relationship, the target ranking strategy is configured to sort in descending order according to the evaluation value, where the evaluation value represents the importance level of the neuron; Preliminary sorting within each neuron set: For each neuron set, the evaluation value of each neuron in the set is extracted according to the mapping relationship, and the neurons in the set are sorted in descending order of the evaluation value to generate a local sorted list for each neuron set; Global sorting integration: The local sorting lists of all neuron sets are merged, and all neurons are sorted in global descending order based on the evaluation value to form a preliminary global sorting sequence; Sorting result verification and adjustment: The initial global sorting sequence is verified to check whether there are neurons with the same evaluation value. If so, a secondary sorting is performed according to the layer position of the neurons in the neural network, with neurons in the earlier layer positions being sorted first, and finally the complete sorting result is obtained.

8. The neural network optimization method for bridge defects based on a visual state-space model according to claim 1, characterized in that: Based on the sorting results, a preset number of target neurons are selected to obtain a target neuron set, including the following steps: Preset number determination: Based on the model compression requirements or performance goals, set the preset number of target neurons. This preset number is either a fixed value or calculated based on the proportion of the total number of neurons in the neural network model. Sorted sequence traversal: Based on the sorting result, each neuron is traversed sequentially from the end of the sorted sequence backwards. The sorted sequence is a list of neurons arranged in descending order of evaluation value, and the last neuron corresponds to the neuron with the lowest evaluation value. Target neuron selection: During the traversal, the number of neurons that have been traversed is counted in real time. When the number of neurons that have been traversed reaches the preset number, the traversal is stopped, and all neurons that have been traversed are selected as candidate target neurons. Target neuron set generation: The identification information of candidate target neurons is summarized to form a target neuron set, wherein the identification of each target neuron includes its layer position and neuron index.

9. The neural network optimization method for bridge defects based on a visual state-space model according to claim 1, characterized in that: Each target neuron in the target neuron set is pruned, and the neural network model is adjusted based on the pruning results after pruning to obtain an optimized target neural network model, including: Target neuron localization information extraction: Based on the set of target neurons, extract the specific location information of each target neuron in the neural network model, including the network layer identifier to which the target neuron belongs and the neuron index in that layer; Neuron pruning operation execution: Based on the extracted location information, each target neuron in the target neuron set is pruned one by one, including disconnecting the input and output connections of the target neuron and removing the weight and bias parameters associated with the target neuron.

10. The neural network optimization method for bridge defects based on a visual state-space model according to claim 2, characterized in that: Step S3 specifically includes the following steps: Image preprocessing: Receive the bridge defect images to be detected, resize the images and normalize the pixel values ​​to generate standardized image data that meets the input requirements of the optimized target neural network model; Backbone network feature extraction: Standardized image data is input into the feature extraction backbone network. The image feature sequence is sequentially scanned and hidden states are updated through the state equation and observation equation of the visual state space model to extract the enhanced multi-level feature map. Head network result generation: The multi-level feature map is input into the task-adaptive head network, and the features are fused through a multi-scale feature pyramid structure. The feature map is then processed through the category prediction branch, confidence prediction branch, and location regression branch, and the preliminary category probability distribution, confidence score, and bounding box coordinates of the disease are output. Detection result optimization: Non-maximum suppression is applied to the preliminary category probability distribution, confidence score and bounding box coordinates to remove redundant and low-confidence detection boxes, and the probability information of each category is fused to generate optimized disease detection results; Recognition result output: Based on the optimized disease detection results, the final category label, confidence value and location coordinates of the disease are extracted and output to complete the intelligent recognition of bridge diseases.

Citation Information

Patent Citations

  • Method and system for quickly positioning and identifying fine cracks of tunnel lining

    CN119360385A

  • Method for detecting moisture damage on asphalt pavement based on adaptive selection of GPR image grayscale

    US20220350015A1