Tunnel disease detection method based on anchor-frame-free adaptive convolutional network and inspection robot
By using an anchor-free frame-free adaptive convolutional network in tunnel disease detection and combining with the inspection robot to collect data, the problems of low efficiency and inaccurate detection in the existing technology are solved, and efficient and accurate tunnel disease detection and monitoring are achieved.
Patent Information
- Application Number
- CN202411866286.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-11
AI Technical Summary
Existing tunnel disease detection mainly relies on manual inspection, which has problems such as inefficiency and inaccurate detection and evaluation.
The detection method based on the anchor-free frame adaptive convolution network is adopted. The inspection robot is equipped with a camera to collect image data, manually label and segment the training set, verification set and test set, and feature extraction and detection are used for anchor-free frame adaptive convolution algorithm to generate accurate disease outlines.
It improves the efficiency and accuracy of tunnel disease detection, realizes real-time monitoring and identification of tunnel disease, reduces the subjectivity of manual inspection, and enhances the continuous monitoring and management of tunnel safety conditions.
Smart Images

Figure CN119810053A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image data processing, and in particular relates to a tunnel disease detection method and an inspection robot based on an anchor-free frame adaptive convolutional network. Background Art
[0002] As an important part of transportation infrastructure, the stability and safety of the tunnel structure is the basis and guarantee for vehicle traffic. However, in the long-term operation of the tunnel, it is inevitable that it will be affected by various environmental factors, resulting in defects or damage to the tunnel structure, which in turn affects traffic safety. Regular inspection of tunnel structure defects has become an indispensable part of ensuring the safe operation of the tunnel. The types and sizes of lining diseases and damage to drainage ditches are the main targets of highway tunnel inspection. At present, the main detection method for tunnel diseases is still manual inspection. However, this method has problems such as strong subjectivity and low efficiency. Therefore, it is urgent to develop an intelligent and automated method for tunnel inspection and an inspection robot that can adapt to various environments inside the tunnel to improve the efficiency and accuracy of detection, realize the monitoring of tunnel diseases, ensure the safe passage of the tunnel, and effectively avoid accidents. Summary of the invention
[0003] The present invention aims to provide a tunnel disease detection method and inspection robot based on an anchor-free adaptive convolutional network to solve the problems of low work efficiency and inaccurate detection and evaluation when tunnel diseases are currently mainly inspected manually.
[0004] In order to achieve the above object, one aspect of the present invention is to provide a technical solution: a tunnel disease detection method based on an anchor-free adaptive convolutional network, comprising the following steps:
[0005] S1. Use the inspection robot equipped with a camera to collect image data of locations where defects may occur on the inner surface of the tunnel;
[0006] S2. Manually annotate various defects of the collected image data, create the data set required for training, and divide the data set required for training into a training set, a validation set, and a test set;
[0007] S3, input the training set data set into the anchor-free adaptive convolution algorithm, and obtain the trained weights and model through feature extraction, convolution, loss function, iterative training and confidence learning;
[0008] The anchor-free adaptive convolutional network includes: an input end, a detection layer, a training layer, and an output end, wherein:
[0009] Input end, receiving and preprocessing images;
[0010] The detection layer performs feature extraction and feature fusion on the preprocessed image. Feature extraction uses convolutional layers, pooling layers, and residual connections to extract high-level features layer by layer while gradually reducing the spatial resolution.
[0011] The training layer uses the feature map after feature fusion to calculate the loss function and control the gradient, iterates the training, adjusts the confidence threshold and mask coefficient of the model according to the characteristics of the tunnel disease to obtain the detection results, and completes the model training;
[0012] The output side includes the segmentation head processing and output image. The segmentation head performs pixel-level mask prediction on the identified object bounding boxes to generate an accurate outline description of the object.
[0013] Optionally, in step S2, the manual labeling tool includes a target detection tool Labelme, and main label categories include: one or more of water leakage, lining cracks, ditch damage and tunnel wall peeling.
[0014] Optionally, at the input end in step S3, preprocessing includes one or more of adjusting the image size to the input size specified by the model, normalizing pixel values to eliminate lighting and color differences, random color space conversion to enhance certain features, applying data augmentation techniques such as rotation and scaling to improve model generalization, adjusting channel order to match model input requirements, and combining multiple images into batches to improve computational efficiency. The preprocessing operation ensures that the model can process the input data efficiently and accurately.
[0015] Optionally, in the detection layer in step S3, feature extraction determines the coordinates of the detection target through the center point, predicts the category of the target at each positive sample position in the prediction box, and uses the offset distance relative to the upper, lower, left, and right boundaries of the bounding box as the regression target, and then generates the target box through the anchor-free box algorithm, and outputs the feature map.
[0016] Optionally, when performing feature fusion in the detection layer in step S3, the feature fusion layer used includes at least five convolutional layers, at least four SA_C2f modules and one spatial pyramid pooling layer to fuse feature maps of different scales.
[0017] Optionally, the convolution layer consists of a 3×3 convolution module, each SA_C2f module includes at least two convolution layers, a channel division module, multiple full-dimensional adaptive convolution bottleneck layers and a splicing layer; the spatial pyramid pooling layer includes a 5×5 convolution module with a stride of 1, three maximum pooling layers, a Concat splicing layer and a residual connection.
[0018] Optionally, in the detection layer in step S3, the SA_C2f module adopts the full-dimensional adaptive convolution module of SAConv, which includes an average pooling layer, a fully connected layer, a ReLU activation function, and at least four convolution kernel dimension branches each including a fully connected layer and a Sigmoid activation function, wherein the average pooling layer reduces the dimension of each channel feature, and then maps the reduced dimension feature to the adaptive weight through the fully connected layer and the ReLU activation function, and finally controls the adaptive weight between 0 and 1 through the Sigmoid activation function. The full-dimensional adaptive convolution module realizes the positioning and classification performance of each target feature and improves the feature fusion capability of the model.
[0019] Optionally, in the training layer in step S3, the loss function includes classification loss and regression loss, which are defined as:
[0020] L=γ 1 L cla +γ 2 L reg
[0021] Among them, γ 1 and γ 2 They are respectively the classification loss L cla and regression loss L reg The weight coefficient of
[0022] Specifically:
[0023] Classification loss L cla The binary cross entropy loss is used to measure the difference between the probability distribution predicted by the model and the actual label, which is defined as:
[0024]
[0025] Among them, y i represents the label of sample i, positive sample is 1, negative sample is 0; p i represents the probability that sample i is a positive sample, and N represents the number of label categories;
[0026] The regression loss uses the complete intersection-over-union ratio CIoU, and the calculation formula of the regression loss is:
[0027]
[0028] Among them, |1-IoU| is the overlap between the predicted box and the real box; is the Euclidean distance between the center point of the predicted box and the true box; δ·υ is the shape loss term, b and b gtRepresent the center points of the predicted box and the real box respectively, ρ(·) represents the Euclidean distance, and c is the diagonal distance of the closed area of the two boxes; the calculation of the shape loss term δ·υ involves the difference in the aspect ratio of the two boxes, which is specifically defined as:
[0029]
[0030] Among them, (ω gt ,h gt ) and (ω,h) are the width and height of the real box and the predicted box respectively, B and B gt are the predicted box and the real box respectively, and υ is a parameter used to measure the consistency of aspect ratio.
[0031] Another aspect of the present invention is to provide an inspection robot, including a camera, a hanging rail module, a power supply module, a power module, a control system and a wireless communication module:
[0032] The hanging rail module includes a rail having a side edge;
[0033] The power module includes a main bracket, a driver and a travel wheel. The driver and the travel wheel are installed on the main bracket. The driver drives the travel wheel to rotate. The travel wheel is connected to the side edge of the track in a rolling manner. The camera is installed on the main bracket.
[0034] The power supply module is used to supply power to the camera, driver, control system and wireless communication module;
[0035] The control system is connected to the driver and camera signals through a wireless communication module. The control system is also used to execute the aforementioned tunnel disease detection method based on the anchor-free adaptive convolutional network.
[0036] Optionally, it also includes a guide auxiliary module, a trackside power supply module and an automatic cleaning module. The guide auxiliary module includes a guide frame, a steering guide wheel and an anti-slip guide wheel. The guide frame is installed on the main frame, and the guide frame is located on the side of the track. The steering guide wheel and the anti-slip guide wheel are rotatably connected to the guide frame, and the distance between the steering guide wheel and the track is greater than the distance between the anti-slip guide wheel and the track; the trackside power supply module includes a power supply conductor and a pantograph, and the pantograph is installed on the main frame; the automatic cleaning module includes a cleaning brush, and the cleaning brush faces the power supply conductor and the track.
[0037] The present invention provides an integrated detection system and a more intelligent method for detecting tunnel lining surface diseases and side ditch diseases. Using tunnel disease images taken by the camera carried by the inspection robot as the input source, various diseases can be accurately identified and located. Compared with the existing method of relying on manual identification and evaluation of diseases, its work efficiency has been greatly improved.
[0038] The inspection robot in the present invention can not only be used to monitor the structural condition of the tunnel in real time, but also to identify and record abnormal conditions in the tunnel, such as cracks, water leakage or other potential safety hazards. Through the wireless communication module, the data captured by the camera can be input into the onboard anchor-free adaptive convolutional network, and the real-time detection data can be transmitted to the control center with a control system for remote analysis and evaluation by technicians. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a schematic diagram of the structure of the inspection robot in an embodiment of the present invention;
[0040] Figure 2 A top view and a side cross-sectional view of a guide auxiliary module in an embodiment of the present invention;
[0041] Figure 3 It is a flowchart of the steps of the anchor-free adaptive convolutional network in the present invention;
[0042] Figure 4 It is the architecture diagram of the anchor-free adaptive convolutional network in the present invention;
[0043] Figure 5 It is a schematic diagram of the full-dimensional adaptive convolution layer of the anchor-free frame adaptive convolutional network in the present invention. DETAILED DESCRIPTION
[0044] The following is further described in detail through specific implementation methods:
[0045] The marks in the drawings of the specification include: track 1, main bracket 2, walking wheel 3, gear transmission mechanism 4, pantograph 5, guide frame 6, guide wheel 7, anti-slip wheel 8, cleaning brush 9, camera 10.
[0046] Example
[0047] This embodiment is basically Figures 1 to 5 As shown:
[0048] Figure 1 : is the overall structure diagram of the tunnel inspection robot in this embodiment, the inspection robot includes a camera 10, a hanging rail module, a power supply module, a power module, a control system and a wireless communication module:
[0049] The hanging rail module includes a track 1 with side edges. In the present embodiment, the track 1 is an I-beam track 1 (65mm×110mm×100mm) that provides load-bearing and guiding functions, with a maximum turning radius of 500mm and an uphill and downhill angle of 40°. A power supply conductor of a power supply module is provided under the track 1, which cooperates with the pantograph 5 on the inspection robot to supply power to the electrical devices of the entire inspection robot.
[0050] The power module includes a main support 2, a driver and a walking wheel 3. The driver and the walking wheel 3 are installed on the main support 2. The driver drives the walking wheel 3 to rotate. The walking wheel 3 is connected to the side edge of the track 1 by rolling. The camera 10 is installed on the main support 2. In this embodiment, the driver is a motor, and the motor drives the walking wheel 3 to rotate through the gear transmission mechanism 4, so that the inspection robot walks on the track 1. In other embodiments, the gear transmission mechanism 4 can also be replaced by a transmission mechanism such as a chain transmission or a belt transmission. The power module also uses a gyroscope to assist in attitude control to further ensure that the operation is controllable.
[0051] The control system in this embodiment includes an electronic computer with computing, storage, input and output functions. The wireless communication module adopts a 5G communication module. In other embodiments, wifi, Bluetooth, etc. can also be used. After the camera collects the image, it is transmitted to the electronic computer in the remote control center through the wireless communication module, and then the electronic computer realizes real-time monitoring of tunnel diseases through the anchor-free frame adaptive convolutional network. At the same time, the control instructions of the inspection car are also issued by the electronic computer through the wireless communication module. Continuous and real-time monitoring of the safety status of the tunnel is realized. The efficient detection and feedback mechanism provides strong technical support for tunnel safety management, ensures the safe operation of the tunnel, and also improves the efficiency and response speed of maintenance work.
[0052] Figure 2 It is the two-stage guide wheel 7 structure and part of the internal structure of the inspection robot in this embodiment. This embodiment designs a two-stage guide wheel 7 structure. The guide auxiliary module includes a guide frame 6, a steering guide wheel 7 and an anti-slip guide wheel 7. The guide frame is installed on the main frame 2, and the guide frame is located on the side of the track 1. The steering guide wheel 7 and the anti-slip guide wheel 7 are rotatably connected to the guide frame. The distance between the steering guide wheel 7 and the track 1 is greater than the distance between the anti-slip guide wheel 7 and the track 1. The guide wheel 7 is located on both sides of the track 1, far away from the track 1. It assists the entire inspection robot to complete a large turn and prevent oversteering. The anti-slip wheel 8 is arranged on the inner side of the guide wheel 7, close to the track 1, to ensure that the inspection robot can be accurately reset and avoid derailment. The two work together to improve the steering stability and safety of the inspection robot.
[0053] The automatic cleaning module equipped with the inspection robot in this embodiment includes a cleaning brush 9, which faces the power conductor and the track 1. The cleaning brush 9 can clean foreign matter such as dust, debris and other obstacles accumulated on the running surface of the I-beam and the power conductor of the inspection robot, so that the inspection robot can run normally and smoothly on the track 1, ensuring the quality of the robot's tunnel data collection, and indirectly improving the inspection accuracy and evaluation credibility of the inspection robot's tunnel inspection.
[0054] Figure 3 and Figure 4They are respectively a step diagram and a model architecture diagram of anchor-free frame adaptive convolutional network detection in this embodiment. In this embodiment, the training based on anchor-free frame adaptive convolutional network includes the following steps:
[0055] S1. The inspection robot is equipped with a high-definition camera 10 to collect a set of sufficient and clear image data along the arch crown, arch shoulder, arch waist and wall edge line and tunnel ditch in the upward and downward directions of the tunnel.
[0056] S2. The images captured by the inspection robot were manually annotated with defects using the Labelme tool. The main label categories included water leakage, lining cracks, ditch damage, and tunnel wall peeling. They were divided into training set, validation set, and test set in a ratio of 7:2:1.
[0057] S3. Input the training set data set into the anchor-free adaptive convolutional network, and obtain the trained weights and model through feature extraction, convolution, loss function, iterative training and confidence learning. The model consists of an image input terminal, a detection layer, a training layer and an output terminal. After the model is processed, the segmentation mask image and the confidence of the diseased area in the image are output, and the detection result is finally output through fusion.
[0058] In this embodiment, the input end is used to input pictures and corresponding label files marked with Labelme. The input pictures are preprocessed, including adjusting the image resolution to the input size predetermined by the model to ensure the compatibility of the image with the model input layer; normalizing the image pixel values to eliminate the influence of different lighting and color conditions to achieve consistency under environmental changes; converting the image from one color space to another color space according to specific application requirements to enhance or suppress certain features; applying data enhancement techniques, such as image rotation and scaling, to enhance the model's generalization ability for new scenes; adjusting the image channel order to match the model's input requirements; and combining multiple images into batches for processing to optimize the use of computing resources. Through preprocessing operations, it is ensured that the model can process input data in an efficient and accurate manner, thereby improving the performance of the convolutional neural network.
[0059] In this embodiment, the detection layer is used for feature extraction and feature fusion of the image. The network is connected through a series of convolution layers, pooling layers and residual connections, and the full-dimensional adaptive mechanism of SAConv is realized. The full-dimensional adaptive mechanism can automatically select the most appropriate convolution strategy according to the different inputs, including the spatial size of the convolution, the input channel, the output channel and the number of convolution kernels, so as to dig deep into the high-level features of the image layer by layer. In this process, the spatial resolution of the feature is gradually reduced, which not only helps to reduce the computational complexity, but also enhances the expressive power of the feature. Further, the detection layer determines the coordinate position of the target through the center point positioning mechanism. At the positive sample position of each prediction box, the layer not only predicts the category of the target, but also predicts the offset distance of the target relative to the upper, lower, left and right boundaries of the bounding box, thereby realizing accurate regression of the target position, and directly predicting the center position or key point of the target through the anchor-free frame detection technology, and regressing the size and shape of the target box. Through non-maximum suppression, the center point with high confidence is retained, the redundant points are filtered out, and the feature map is output.
[0060] In this embodiment, the feature fusion layer consists of 5 convolutional layers, 4 SA_C2f modules and 1 spatial pyramid pooling layer to fuse feature maps of different scales. The specific convolutional layer is a conventional 3×3 convolutional module; each SA_C2f module consists of two convolutional layers, a channel division module, multiple full-dimensional adaptive convolution bottleneck layers and a splicing layer; the spatial pyramid pooling layer consists of a conventional 5×5 convolutional module with a step size of 1, three maximum pooling layers, a Concat splicing layer and a residual connection. The specific function of the SA_C2f module is to fuse high-level semantic features with low-level detail features, and the SA_C2f module in this embodiment introduces a full-dimensional adaptive mechanism, as shown in the attached figure. Figure 5 As shown in the figure, the mechanism module consists of an average pooling layer, a fully connected layer, a ReLU activation function, and four convolution kernel dimension branches, each of which contains a fully connected layer and a Sigmoid activation function. The specific SA_C2f module first uses the average pooling layer to reduce the dimension of each channel feature, and then maps the reduced dimension features to adaptive weights through a fully connected layer and a ReLU activation function. Finally, the adaptive weight is controlled between 0 and 1 through the Sigmoid activation function, and the adaptive mechanism is used to achieve the positioning and classification performance of each target feature, thereby improving the feature fusion capability of the model.
[0061] In the training layer, the loss function consists of two parts: classification loss and regression loss, which are defined as:
[0062] L=γ 1 L cla +γ 2 L reg
[0063] Among them, γ1 and γ 2 They are respectively the classification loss L cla and regression loss L reg The weight coefficient of . Specifically:
[0064] Classification loss L cla The binary cross entropy loss is used to measure the difference between the probability distribution predicted by the model and the actual label, which is defined as:
[0065]
[0066] Among them, y i represents the label of sample i, positive sample is 1, negative sample is 0; p i represents the probability that sample i is a positive sample, and N represents the number of label categories. Classification loss L cla Used to judge "whether it is of this type" and output the maximum confidence value under each category.
[0067] The regression loss uses the complete intersection over union (CIoU), which is an optimization of the traditional intersection over union (IoU). It not only considers the overlapping area between the predicted box and the real box, but also considers the center point distance and aspect ratio difference between the two. The calculation formula of the regression loss is as follows:
[0068]
[0069] The formula consists of three parts: first, |1-IoU| measures the overlap between the predicted box and the true box; second, The Euclidean distance between the center point of the predicted box and the true box is calculated, and the diagonal length is normalized to balance the influence of boxes of different sizes and ensure the consistency of predicted boxes of various sizes in regression loss; finally, δ·υ is the shape loss term, which is used to measure the difference in aspect ratio between the predicted box and the true box to improve the accuracy of the model in the regression process. gt Represent the center points of the predicted box and the real box respectively, ρ(·) represents the Euclidean distance, and c is the diagonal distance of the closed area of the two boxes. The calculation of the shape loss term δ·υ involves the difference in the aspect ratio of the two boxes, which is specifically defined as:
[0070]
[0071] Among them, (ω gt ,h gt ) and (ω,h) are the width and height of the real box and the predicted box respectively; B and B gtRepresent the predicted box and the real box respectively; υ is a parameter used to measure the consistency of the aspect ratio, that is, the aspect ratio (length-to-width ratio) of the predicted box and the real box; by comprehensively considering the loss calculation of the overlapping area, the center point distance and the aspect ratio, the model learning can be more effectively guided to improve the accuracy of target detection. After the gradient update obtains the prediction result through forward propagation, the model calculates the loss between the prediction and the real label, and then determines the gradient of the loss for each parameter through the back-propagation algorithm and is used for the model parameters of the subsequent gradient update to minimize the loss function during the training process.
[0072] The loss function is calculated to control the gradient and iterate the training. Its characteristics are that the loss function calculates the error between the predicted value and the true value, and transmits the error back to each layer of the network through the back-propagation algorithm to adjust the weights and biases in the network. Specifically, the gradient of the loss function is used to guide the weight update. The gradient is calculated layer by layer through the chain rule and back-propagated to each layer. The weight is adjusted according to the gradient, and the training process is iterated to gradually reduce the loss function value and improve the prediction accuracy of the model.
[0073] SA_C2f is the full-dimensional adaptive convolution module added in this embodiment, which combines the full-dimensional adaptive convolution with the original C2f module of the model, so that the SA_C2f module can also realize the extraction of various information and features in the context through an integrated adaptive mechanism. It adaptively adjusts the convolution kernel weights in the spatial dimension, input and output channel dimension and convolution kernel dimension according to different input features, realizes the adaptive aggregation of multiple convolution kernels, significantly improves the expression ability and adaptability of the model, and reduces some parameter calculation costs. This method not only improves the operating efficiency and generalization ability of the network, but also supports end-to-end training, so that the convolution kernel and adaptive weights in the network can be optimized collaboratively, achieving fast and accurate recognition targets while achieving low parameter quantity.
[0074] like Figure 5 The full-dimensional adaptive convolution layer shown in the figure first compresses the input x into a length c through the average pooling layer (channel-wise Global Average Pooling, GAP) operation. in The activation function (ReLU) is located after the FC layer. The fully connected layer maps the compressed feature vector to a lower-dimensional space with a reduction rate r, which helps to reduce the amount of subsequent calculations and avoid excessive model complexity. At the same time, it also extracts more representative features for calculating α si , α ci , α fi , α wi Four dimensions, and finally a specific output feature map y is calculated through a convolution operation*.
[0075] Based on traditional dynamic convolution, full-dimensional adaptive convolution further takes the entire network learning process into comprehensive consideration. By incorporating adaptive mechanisms in three dimensions: spatial size, input channel, and output channel, the network learning process is made more flexible and dynamic, giving SAConv a stronger ability to capture complex contextual information. SAConv achieves comprehensive and fine-tuning of the convolution kernel weights by learning four complementary adaptive weights, significantly improving the feature extraction performance of the basic convolution operation of the convolutional neural network. Therefore, even if SAConv only uses a single convolution kernel, it can be comparable to or even surpass the existing multi-core dynamic convolution method, while greatly reducing the increase in additional parameters. The specific mathematical expression is as follows:
[0076] y=(α w1 ⊙α f1 ⊙α c1 ⊙α s1 ⊙W 1 +...+α wn ⊙α fn ⊙α cn ⊙α sn ⊙W n )*x
[0077] Where W i is the convolution kernel, α si , α ci , α fi Represents three newly introduced attentions, respectively along the convolution kernel W i The spatial dimension of the kernel space, the input channel dimension and the output channel dimension are calculated; α wi Represents the calculation of the convolution kernel; it represents the multiplication operation along different dimensions of the kernel space. It can be given an adaptive scalar from four different perspectives: (1) in the k×k spatial dimension, a unique adaptive scalar is assigned to each convolution parameter (i.e., each filter); (2) different adaptive scalars are assigned to each channel of the convolution filter; (3) different adaptive scalars are assigned to different convolution filters; (4) a unified adaptive scalar is assigned to the entire convolution kernel. The four adaptive mechanisms are complementary to each other in principle. They act on the convolution kernel in sequence, first on the spatial position, then on the channel, then on the filter, and finally on the kernel itself, and gradually multiply these adaptive scalars with the convolution kernel. This allows the convolution operation to flexibly adjust the convolution kernel to adapt to different inputs x, whether in terms of spatial position, input channel, filter selection or overall kernel level, and can effectively capture rich contextual information, thereby improving performance. Specifically:
[0078] Spatial dimension: In the spatial dimension, SAConv uses a spatial adaptation mechanism (α si) Dynamically assign weights to each spatial position of the input feature map. This allows each convolution kernel to have different weights at different spatial positions, thereby better capturing local spatial features.
[0079] Channel dimension: In the input channel dimension, SAConv uses a channel adaptation mechanism (α ci ) gives different weights to each input channel. This allows the model to perform differentiated processing based on the importance of features between channels and optimize the feature extraction process. This enhances the ability of feature extraction.
[0080] Output channel dimension: In the output channel dimension, SAConv uses a filter adaptation mechanism (α fi ) assigns specific weights to each output channel. The model will adjust the response of the convolution kernel according to different output channel requirements to better meet the diverse feature extraction requirements.
[0081] Convolution kernel dimension: In terms of convolution kernel dimension, SAConv uses a convolution kernel adaptive mechanism (α wi ) performs weighted combination of multiple convolution kernels. This enables the model to flexibly select and combine different convolution kernels to adapt to the diversity of input data and improve the expressiveness and adaptability of the model.
[0082] By introducing adaptive mechanisms in these four dimensions, SAConv can significantly enhance the feature extraction capability of the convolutional neural network, while improving the feature expression capability while maintaining low computational overhead and parameter volume. The multi-dimensional adaptive mechanism enables SAConv to be used in the anchor-free adaptive convolution algorithm of this embodiment to greatly improve the accuracy and efficiency of detecting various tunnel diseases while reducing the computational complexity of some parameters.
[0083] After introducing the full-dimensional adaptive convolution technology, the SA_C2f module can autonomously adjust the aggregation of convolution kernels and the adaptive selection of spatial dimensions and input and output channels by learning to use adaptive mechanisms, thereby flexibly integrating multiple convolution kernels, enhancing the representation ability and adaptability of the model, while maintaining computational efficiency, so that the model can extract features for different inputs more adaptively and flexibly. In the field of tunnel disease detection, the full-dimensional adaptive convolution module can dynamically select convolution kernels suitable for identifying specific diseases and appropriate spatial dimensions and input and output channels according to data input. For example, when detecting cracks in tunnel linings, the module can achieve efficient and accurate identification of cracks by learning to select appropriate spatial dimensions, input and output channels and selectively fusing small-sized convolution kernels and deformable convolution kernels according to the irregular shape and slender characteristics of the cracks. For other tunnel diseases, such as ditch damage, water leakage, wall peeling, etc., the full-dimensional adaptive convolution module can also learn specific adaptive mechanisms and corresponding convolution weights and biases based on the characteristics of the input data. The adaptive learning process gives the model greater flexibility and accuracy, enabling it to effectively and flexibly identify and detect various tunnel diseases without significantly increasing the model size and computational complexity, thereby improving the model's detection speed and accuracy for tunnel diseases.
[0084] In this embodiment, the spatial pyramid pooling layer (Spatial Pyramid Pooling Fast, SPPF) integrates the maximum pooling layer, splicing layer and convolution layer of different sizes, effectively fuses multi-scale features, and enhances the model's detection ability for targets of different sizes. The main function of the SPPF module is to fuse feature maps of different sizes together through pooling operations of different scales to obtain more global information, thereby improving the performance of target detection. Compared with SPP (Spatial Pyramid Pooling), SPPF provides faster speed and less calculation without sacrificing detection accuracy. At the same time, SPPF allows the model to capture a wider range of contextual information while retaining image details, thereby improving the recognition accuracy of small and large targets. Moreover, the SPPF module unifies the distribution of feature maps of different scales through feature normalization technology, such as batch normalization, enhances the feature fusion effect, and enhances the model's detection ability for multi-scale targets, thereby accelerating training and improving the overall performance of the model.
[0085] The segmentation head, or output end, is designed to convert low-resolution feature maps into high-resolution segmentation masks through a series of components working together to accurately identify the target object. Specifically, the segmentation head includes multiple convolutional layers to extract multi-scale features of the image, which are then passed to the SA_C2f module for deep fusion. The design of the SA_C2f module allows features of different scales to interact with each other, enhancing the expressiveness and robustness of the features. The fused feature map then passes through a series of upsampling layers to gradually increase its spatial resolution until it reaches the same resolution level as the original input image. In this process, the upsampling layer not only restores the details of the feature map, but also retains the key segmentation information of the target object. Finally, the segmentation head outputs a high-quality segmentation mask that accurately depicts the contours and shapes of the target objects. It achieves classification of the categories of each object in the image and accurately locates their positions, and distinguishes and segments the contours of each object at the pixel level, making the detection results more accurate and obvious. Finally, the detection results are output.
[0086] Instance segmentation can identify all objects and their categories in an image, and accurately segment pixel-level contours for each independent object. This method not only involves object detection and localization, but also needs to distinguish different instances within the same category and generate accurate masks for each object. It provides detailed spatial and semantic information for the model to detect objects. Unlike instance segmentation, semantic segmentation focuses on identifying the category of each pixel in the image, aiming to provide a pixel-level classification map for the entire scene, indicating the category label to which each pixel belongs. In contrast, instance segmentation not only identifies the category of each pixel, but also further distinguishes different instances within the same category, and generates accurate contours for each independent object, which can distinguish objects of the same category but belonging to different individuals. The ability to distinguish instances gives instance segmentation an advantage in identifying and distinguishing scenes with multiple similar or overlapping objects in images. Instance segmentation provides richer information, making it more effective in applications that require accurate positioning and distinction of objects. For example, in tunnel defect detection, instance segmentation can perfectly play its advantages and more accurately divide the same defect instances in the same image. The defect instances include water leakage, lining cracks, ditch damage, etc. Ultimately, instance segmentation can achieve more accurate detection than semantic segmentation.
[0087] Finally, this embodiment integrates the data acquisition equipment and the anchor-free frame adaptive convolution algorithm well through a tunnel disease detection hoisting robot equipped with an anchor-free frame adaptive convolution network. The tunnel image collected by the high-definition camera carried by the inspection robot is used as the data source, and the tunnel image data collected by the robot is then detected through the onboard anchor-free frame adaptive convolution network. Finally, the detection results of the model are output to realize the detection of tunnel diseases.
[0088] The above are only embodiments of the present invention. The invention is not limited to the fields involved in this implementation case. The common sense such as the known specific structures and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field to which the invention belongs before the application date or the priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to explain the content of the claims.
Claims
1. A tunnel disease detection method based on anchor-free adaptive convolutional network, characterized by: The following steps are involved: S1. Use the inspection robot equipped with a camera to collect image data of locations where defects may occur on the inner surface of the tunnel; S2. Manually annotate various defects of the collected image data, create the data set required for training, and divide the data set required for training into a training set, a validation set, and a test set; S3, input the training set data set into the anchor-free adaptive convolution algorithm, and obtain the trained weights and model through feature extraction, convolution, loss function, iterative training and confidence learning; The anchor-free adaptive convolutional network includes: an input end, a detection layer, a training layer, and an output end, wherein: Input end, receiving and preprocessing images; The detection layer performs feature extraction and feature fusion on the preprocessed image. Feature extraction uses convolutional layers, pooling layers, and residual connections to extract high-level features layer by layer while gradually reducing the spatial resolution. The training layer uses the feature map after feature fusion to calculate the loss function and control the gradient, iterates the training, adjusts the confidence threshold and mask coefficient of the model according to the characteristics of the tunnel disease to obtain the detection results, and completes the model training; The output side includes the segmentation head processing and output image. The segmentation head performs pixel-level mask prediction on the identified object bounding boxes to generate an accurate outline description of the object.
2. According to claim 1, a tunnel disease detection method based on anchor-free adaptive convolutional network is characterized in that: In step S2, the manual labeling tool includes the target detection tool Labelme, and the main label categories include: one or more of water leakage, lining cracks, ditch damage and tunnel wall peeling.
3. The tunnel defect detection method based on anchor-free adaptive convolutional network according to claim 1 is characterized in that: At the input end in step S3, preprocessing includes one or more of adjusting the image size to the input size specified by the model, normalizing pixel values to eliminate lighting and color differences, random color space conversion to enhance certain features, applying data augmentation techniques such as rotation and scaling to improve model generalization ability, adjusting channel order to match model input requirements, and combining multiple images into batches to improve computational efficiency.
4. The tunnel defect detection method based on anchor-free adaptive convolutional network according to claim 3 is characterized by: In the detection layer in step S3, feature extraction determines the coordinates of the detection target through the center point, predicts the category of the target at each positive sample position in the prediction box, and uses the offset distance relative to the upper, lower, left, and right boundaries of the bounding box as the regression target. The target box is then generated through the anchor-free box algorithm and the feature map is output.
5. The tunnel defect detection method based on anchor-free adaptive convolutional network according to claim 4 is characterized in that: When performing feature fusion in the detection layer in step S3, the feature fusion layer used includes at least five convolutional layers, at least four SA_C2f modules and one spatial pyramid pooling layer to fuse feature maps of different scales.
6. The tunnel defect detection method based on anchor-free adaptive convolutional network according to claim 5 is characterized by: The convolution layer consists of 3×3 convolution modules. Each SA_C2f module includes at least two convolution layers, a channel division module, multiple full-dimensional adaptive convolution bottleneck layers and a splicing layer. The spatial pyramid pooling layer contains a 5×5 convolution module with a stride of 1, three maximum pooling layers, a Concat splicing layer and a residual connection.
7. The tunnel defect detection method based on anchor-free adaptive convolutional network according to claim 6 is characterized by: In the detection layer in step S3, the SA_C2f module adopts the full-dimensional adaptive convolution module of SAConv (self-adaption convolution), which includes an average pooling layer, a fully connected layer, a ReLU activation function, and at least four convolution kernel dimension branches, each of which contains a fully connected layer and a Sigmoid activation function. The average pooling layer reduces the dimension of the features of each channel, and then maps the reduced features to the adaptive weights through the fully connected layer and the ReLU activation function. Finally, the adaptive weights are controlled between 0 and 1 through the Sigmoid activation function.
8. The method for tunnel defect detection based on anchor-free adaptive convolutional network according to claim 7 is characterized in that: In the training layer in step S3, the loss function contains classification loss and regression loss, which is defined as: L=γ1L cla +γ2L reg Among them, γ1 and γ2 are the classification loss L cla and the regression loss L reg The weight coefficient of Specifically: Classification loss L cla The binary cross entropy loss is used to measure the difference between the probability distribution predicted by the model and the actual label, which is defined as: Among them, y i represents the label of sample i, positive sample is 1, negative sample is 0; p i represents the probability that sample i is a positive sample, and N represents the number of label categories; The regression loss uses the complete intersection-over-union ratio CIoU, and the calculation formula of the regression loss is: Among them, |1-IoU| is the overlap between the predicted box and the real box; is the Euclidean distance between the center point of the predicted box and the true box; δ·υ is the shape loss term, b and b gt Represent the center points of the predicted box and the real box respectively, ρ(·) represents the Euclidean distance, and c is the diagonal distance of the closed area of the two boxes; the calculation of the shape loss term δ·υ involves the difference in the aspect ratio of the two boxes, which is specifically defined as: Among them, (ω gt ,h gt ) and (ω,h) are the width and height of the real box and the predicted box respectively, B and B gt are the predicted box and the real box respectively, and υ is a parameter used to measure the consistency of aspect ratio.
9. A patrol robot, characterized in that: Including camera, hanging rail module, power supply module, power module, control system and wireless communication module: The hanging rail module includes a rail having a side edge; The power module includes a main bracket, a driver and a travel wheel. The driver and the travel wheel are installed on the main bracket. The driver drives the travel wheel to rotate. The travel wheel is connected to the side edge of the track in a rolling manner. The camera is installed on the main bracket. The power supply module is used to supply power to the camera, driver, control system and wireless communication module; The control system is connected to the driver and the camera signal through a wireless communication module. The control system is also used to execute the tunnel disease detection method based on the anchor-free adaptive convolutional network as described in any one of claims 1 to 8.
10. The inspection robot according to claim 8, characterized in that: It also includes a guide auxiliary module, a trackside power supply module and an automatic cleaning module. The guide auxiliary module includes a guide frame, a steering guide wheel and an anti-slip guide wheel. The guide frame is installed on the main frame, and the guide frame is located on the side of the track. The steering guide wheel and the anti-slip guide wheel are rotatably connected to the guide frame, and the distance between the steering guide wheel and the track is greater than the distance between the anti-slip guide wheel and the track; the trackside power supply module includes a power supply conductor and a pantograph, and the pantograph is installed on the main frame; the automatic cleaning module includes a cleaning brush, and the cleaning brush faces the power supply conductor and the track.
Citation Information
Cited By
Tunnel anomaly detection model establishment and detection early warning method
CN120388294A
Tunnel anomaly detection model establishment and detection and early warning method
CN120388294B
Railway bridge intelligent inspection method and system based on unmanned aerial vehicle
CN120913109A
Tunnel abnormal condition detection method based on image adaptive enhancement and multi-scale cascade attention network and inspection fire extinguishing robot
CN121921304A