Tunnel detection system based on image processing and deep learning
Through image processing technology and deep learning based on YOLOv5, combined with the triangular grid method, the problems of cumbersome operations and time-consuming data processing in traditional tunnel monitoring methods are solved, and fast, automated and low-cost monitoring of tunnel convergence detection is achieved, which is suitable for Unattended scenarios improve monitoring accuracy and efficiency.
Patent Information
- Application Number
- CN202410928070.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-10
AI Technical Summary
Traditional tunnel monitoring methods have problems such as cumbersome operations and time-consuming data processing, which cannot meet the needs of rapid and continuous monitoring of tunnels. It is especially difficult to achieve low-cost tunnel convergence detection in unattended and low-light environments.
Image processing and deep learning technology based on YOLOv5 are used to collect data in the tunnel by installing targets and industrial cameras, perform data preprocessing, train models, and calculate deformation using the triangular grid method to achieve automated and rapid tunnel convergence detection.
It realizes fast, continuous and automated monitoring of tunnels at low cost, is suitable for unattended scenarios, improves monitoring accuracy and efficiency, and reduces equipment costs.
Smart Images

Figure CN118628476A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a tunnel crack and convergence detection method based on image processing and deep learning. Background Art
[0002] With the rapid development of the economy, the pace of road construction in my country is getting faster and faster. As an important part of it, the number of subway tunnels is also increasing. While new projects are being completed, more and more tunnels are entering the "aging" stage. After a long period of operation, the soft soil layer under the subway tunnel continues to soften under the action of long-term vibration loads, resulting in overall settlement of the inner wall of the tunnel along the axis and local cross-sectional deformation. At the same time, the deep foundation pits along the periphery of the subway tunnel will also cause these deformations. Once the deformation is too large, the arch will sink, and in severe cases, it will cause collapse, and the consequences are immeasurable. The deformation of subway tunnels under construction due to the construction process is also an important reason for the frequent occurrence of engineering accidents. Monitoring of subway tunnels under construction is also a top priority.
[0003] Traditional monitoring requires a dedicated person to complete the measurement within a certain period, and the person in charge will fill in the measurement results and make safety judgments. Such monitoring frequency and human errors will cause some uncontrollable safety factors in the monitoring results.
[0004] In some operating tunnels, monitoring tunnel deformation becomes more difficult, and when surveyors are absolutely not allowed to enter the tunnel during operation, a simple, unattended, automatic monitoring method is needed to quickly complete tunnel deformation monitoring in a short time. Traditional monitoring methods include:
[0005] Total station method: The total station is used to measure the horizontal and vertical angles of various positions in the tunnel, thereby indirectly inferring the convergence of the tunnel. Although the total station has the advantages of high accuracy and long-distance measurement, it requires professional personnel for operation and data analysis, and cannot achieve continuous monitoring.
[0006] Laser scanning method: The laser scanner is used to obtain 3D point cloud data at various locations in the tunnel, which enables fast and accurate monitoring and analysis of tunnel convergence. Although this method has the advantages of high precision and non-contact, the equipment cost is relatively high.
[0007] Sensor network: A large number of sensors are deployed inside the tunnel using a distributed sensor network to monitor the deformation and convergence of the tunnel in real time. The sensor network can achieve real-time and continuous monitoring of the tunnel, but issues such as sensor deployment density and communication need to be considered.
[0008] However, the traditional method has problems such as cumbersome operation and time-consuming data processing, and cannot meet the needs of fast and continuous monitoring of tunnels. Therefore, the present invention proposes a video monitoring method, which monitors the interior of the tunnel in real time through a camera or a camera array, and uses image processing and computer vision technology to extract the characteristics of the tunnel structure, so as to judge the convergence of the tunnel. This method is not only relatively low-cost, but also can realize automatic, fast and continuous monitoring of the tunnel, and is suitable for scenarios that require unattended monitoring. Summary of the invention
[0009] The present invention aims to solve the deficiencies of the above existing methods and proposes a method for performing tunnel convergence detection in a low-cost manner under a dim light environment.
[0010] To achieve the above objectives, the present invention proposes a tunnel detection technology based on YOLOv5.
[0011] Step S1, data acquisition module:
[0012] Five targets are installed on each section, with five monitoring points designed on both sides of the arch bottom, both sides of the arch shoulders and the arch top. Each target is made of a 15cm×15cm PVC board with a 10cm×10cm black part glued in the middle.
[0013] Industrial cameras are used to collect data. To achieve better results, different cameras are used for crack detection and convergence detection. Convergence detection uses a 4K high-definition autofocus USB camera, and crack detection uses two low-light autofocus high-definition cameras.
[0014] In a dim light environment, the reflection effect is not obvious. In order to better realize convergence detection, a 20w fill light is installed in front of the camera. Since the detection is carried out in a tunnel, the present invention uses a timing switch to control the fill light to realize data collection.
[0015] Step S2, data preprocessing module:
[0016] First, the collected data needs to be enhanced. The present invention adopts the following technologies:
[0017] (1) capturePictureOnTimes time interval frame extraction: The collected raw data is in video format. Use the capturePictureOnTimes function to extract image frames from the video at time intervals as raw data. These image frames will be used for subsequent data enhancement processing.
[0018] (2) Frame screening: The collected image frames are screened and images with tunnel scenes are selected as processing objects. Possible screening conditions include lighting conditions, viewing angle, clarity, etc., to ensure that the selected images are representative and usable.
[0019] (3) Image denoising in tunnel scenes: In tunnel scenes, images may be affected by noise, such as insufficient camera sensitivity or uneven ambient light. Various denoising techniques, such as mean filtering, median filtering or Gaussian filtering, are used to denoise images to improve image quality and clarity.
[0020] (4) Image sharpening: Image sharpening can highlight the details and edge features in an image, making the image clearer. Commonly used image sharpening methods include the Laplace operator, Sobel operator, etc. By applying these operators, the edge and detail information of the image can be enhanced.
[0021] (5) Contrast enhancement: Contrast enhancement can increase the difference between pixel values in an image, making the image more vivid and clear. The contrast of an image can be enhanced through techniques such as histogram equalization and contrast stretching to improve the readability and recognition of the image.
[0022] (6) Image feature annotation:
[0023] Use Labelme software to annotate the images after step preprocessing, label each image, generate feature files for target detection, and construct wall crack datasets and convergence detection datasets.
[0024] Step S3, training update module:
[0025] 80% of the prepared dataset is used as the training set, and the remaining 20% is used as the validation set. First, the self-made dataset is used for secondary training on the YOLOv5 official model, and then fine-tuned on the fine-tuning dataset.
[0026] Step S4, crack detection module:
[0027] Perform batch crack detection on the collected images, mark the images containing cracks, and record the image position information.
[0028] Step S5: Convergence detection module:
[0029] The deformation calculation unit uses a triangular mesh method to perform deformation calculation. The deformation calculation unit calculates the deformation degree of the inner wall of the tunnel by comparing the positions of feature points in multiple images; the deformation analysis unit determines the convergence of the tunnel based on the deformation calculation results.
[0030] Step S6, monitoring module:
[0031] The monitoring module is a key component of the tunnel detection system based on image processing and deep learning. It is responsible for handling the interaction between back-end services and front-end interfaces, as well as providing user management, data display and processing functions.
[0032] In terms of the back-end services of the system, the present invention adopts the Express framework based on Node.js for development. This choice is based on the efficiency and scalability of Node.js, which can meet the operation requirements of the system. The present invention also uses a variety of npm packages to simplify the development process, improve development efficiency and code quality. Considering the specific needs of the system, only two types of user roles, ordinary users and administrators, are considered in the design stage. In the implementation stage of the back-end code, the static resource hosting of the test results facilitates users to view the test results and improves the user experience. In order to optimize the platform loading speed and user experience, Multer.js is used to partially compress the test result image. In addition, the present invention realizes the data transmission of the remote development board through shell scripts, ensuring the security and integrity of the data. In order to improve the reliability and performance of the system, Nginx is used as a reverse proxy to achieve load balancing of access.
[0033] In terms of the front-end interface, Vue+ElementUI+Echarts was used for platform development. This technology stack combines the responsiveness of Vue.js, the rich component library of ElementUI, and the data visualization function of Echarts to build a user-friendly front-end interface. The front-end page mainly includes three functional modules: convergence management, crack management, and user management. The convergence management module provides convergence data analysis and detailed information viewing functions, including the changing trend of convergence judgment basis and the statistical information display of daily detection results. The crack management module provides the display and analysis functions of crack detection data, including the display of detection result images and related statistical information. The user management module provides the authority management function for ordinary users and administrators, ensuring the security of the system and the confidentiality of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0035] Figure 1 It is a method flow chart of the tunnel detection system of the present invention.
[0036] Figure 2 It is the design drawing of the target device of the present invention.
[0037] Figure 3 This is a diagram of the installation of the target in the tunnel of the present invention.
[0038] Figure 4 This is a picture randomly selected from the detection results of the crack detection test set. The left picture shows the original crack picture, and the right picture shows the crack picture detected by the algorithm of the present invention.
[0039] Figure 5 This is a randomly selected image from the detection results of the tunnel convergence detection test set.
[0040] Figure 6 System architecture diagram.
[0041] Figure 7 An instance of the monitoring platform. DETAILED DESCRIPTION
[0042] The technical solution of the present invention is further described below in conjunction with the accompanying drawings, but is not limited thereto. Any modification or equivalent replacement of the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention should be included in the protection scope of the present invention.
[0043] Reference Figure 1 , a tunnel detection system based on image processing and deep learning, mainly includes data acquisition, processing module, training and updating module, crack detection module, convergence detection module, and monitoring module. The following is an introduction to each module.
[0044] Step S1, data acquisition module:
[0045] The first step is to set up equipment in the tunnel. In order to achieve convergence detection and crack detection in the tunnel, a complete monitoring system is installed in the tunnel, including:
[0046] A total of 5 targets were installed in each section of the tunnel, fixed on both sides of the arch bottom, both sides of the arch shoulders and the arch top, forming five monitoring points. Each target is made of a 15cm × 15cm PVC board, with a 10cm × 10cm black part glued in the middle, and the rest covered with reflective film to improve visibility. The design is shown in the figure below. Figure 2 As shown, the installation in the tunnel is as follows Figure 3 shown.
[0047] Convergence detection uses a 4K HD autofocus USB camera to obtain high-resolution images and is able to implement autofocus function to adapt to targets at different distances, while crack detection uses two low-light autofocus HD cameras to ensure clear images can be obtained even in low-light environments.
[0048] A 20w fill light is installed in front of each monitoring point to provide sufficient lighting in dim light environments. In order to avoid the long-term use of the fill light affecting vehicle driving, a timer switch is used to control the fill light and turn it on during specific time periods every day as needed.
[0049] Then comes data collection. The data collection module is responsible for taking images at set time intervals and filtering the collected images according to preset conditions to ensure that images with tunnel scenes are selected as processing objects. The specific steps are as follows: the camera takes images at set times, extracts image frames from the video as raw data at preset time intervals, and these image frames will serve as the raw data source for subsequent processing; the captured images are filtered, and images with tunnel scenes are selected as processing objects. The filtering conditions include lighting conditions, viewing angles, clarity, etc. to ensure that the selected images are representative and usable.
[0050] Step S2, image preprocessing module:
[0051] The image at this time may also have the following problems: the original image may be affected by factors such as ambient light, sensor noise, motion blur, etc., resulting in various types of noise in the image, affecting the clarity and quality of the image; the image contrast may be insufficient, making the difference between the target object and the background unclear, resulting in difficulty in target detection and segmentation, especially in dim or uneven light conditions; the image scale may be inconsistent, resulting in different sizes of targets in different images, which will affect subsequent feature extraction and model training and reduce the generalization ability of the model; the details and edges in the image may not be clear enough, resulting in blurred boundaries of the target object, making it difficult to accurately extract features and perform target detection; the original image may have category imbalance or uneven data distribution, which will affect the training effect and performance of the model; the original image may lack diversity and cannot cover all possible scenarios and situations, resulting in insufficient generalization ability of the model in practical applications.
[0052] Therefore, the collected images are subjected to operations such as noise removal, contrast enhancement, image size and scale adjustment, image detail enhancement, and data augmentation to solve the above problems, thereby providing a better data foundation for subsequent data analysis and model training.
[0053] Step S3, training update module:
[0054] The models of crack detection and convergence detection are trained and updated to ensure that their performance and accuracy reach the expected level. The following is a detailed description of the training and updating module, including the separate training process of crack detection and convergence detection:
[0055] (1) Labelme software is used to annotate cracks in preprocessed images, label each image, generate feature files for target detection, and construct a tunnel crack dataset. The constructed tunnel crack dataset is imported into the yolov5 model. By setting training parameters, the pre-trained weights are used as the basis for training using the crack dataset, and the performance is verified on the test set to obtain the network weights with tunnel crack detection function. The trained weight file is loaded into the yolov5 network, and new image data is input for crack detection.
[0056] (2) Labelme software is used to mark the four corners of the target in the preprocessed target image, generate feature files for target detection, and construct a tunnel convergence detection dataset. The dataset contains 100 original images, and 2000 images are obtained after data enhancement. They are divided into training set and test set according to 8:2. The self-made dataset is first used for secondary training on the YOLOv5 official model. According to the training results and performance evaluation feedback, the model parameters are adjusted and updated to improve the accuracy and stability of convergence detection.
[0057] Step S4, crack detection module:
[0058] Use the optimal model to detect crack images in the test set. The specific detection steps are as follows:
[0059] Put the optimal model pt file into the detect.py file and configure the remaining hyperparameters, including the dataset file, input size, etc. Use this model to detect cracks in the test set and record the detection accuracy and speed. Use the detect.py file to detect the images in the test set. Figure 4 It is a picture randomly selected from the detection results of the test set. Figure 4 The left image in the figure shows the original crack image. Figure 4 The right picture in the figure shows a crack image detected by the algorithm of the present invention. It can be seen from the figure that the original crack image contains many shadows and noises, and the algorithm of the present invention can accurately and precisely frame the location of the crack.
[0060] Step S5: Convergence detection module:
[0061] The algorithm idea of convergence detection is to draw a triangle composed of a set of points on a given image and display the length of each side; calculate the center of the black pixels in the image and determine whether the image is complete (that is, whether there are black pixels on the boundary of the image); calculate the leftmost, rightmost and topmost points in a set of coordinates, and draw straight line segments with these points and a fixed point as endpoints on the image, and then calculate and display the distance of these line segments. Set a suitable displacement threshold to determine whether the target center displacement is within an acceptable range. When the calculated displacement is greater than the set threshold, it is considered that the target has not yet converged; otherwise, it is considered that the target has converged. Figure 5 As shown, Figure 5 It is a picture randomly selected from the test results of the test set, and is a picture that has been converged and detected by the algorithm of the present invention.
[0062] Step S6, monitoring module:
[0063] The backend of the system uses the Express framework based on Node.js as the operating environment to develop backend services, and uses a variety of npm packages to simplify the development process. The system architecture diagram is as follows Figure 6 shown.
[0064] Based on the specific needs of the internal use of the system, only two user roles, ordinary users and administrators, were considered during the system design phase. In the implementation phase of the backend code, static resource hosting of the test results facilitates users to view the test results. Multer.js is used to partially compress the test result images to optimize the platform loading speed and user experience. For the processing of test data, shell scripts are used to realize data transmission of remote development boards. The local server mainly reads the transmitted txt documents and writes the corresponding data into the database; for the transmitted images, direct server resource hosting is used for processing.
[0065] The overall backend service uses Nginx as a reverse proxy to perform access load balancing. The front end of the system uses Vue+ElementUI+Echarts for platform development, and the front end page mainly has three major functional modules, including convergence management, crack management, and user management.
[0066] Convergence management includes convergence data analysis and detailed information viewing of convergence. Data analysis mainly checks the basis for convergence (changing trend of ordinate, abscissa, slope, and ordinate mean). Detailed information viewing of convergence is the specific detection situation of a certain day. ElementUI's table is used to change the results. There will be four tests per day, and 5 test images will be saved for each test. Each row of the table is the average of each test result. The first row is used as the standard, and the subsequent change trend is displayed. Figure 7 shown.
[0067] The above description of the present invention is only to explain the model and process of the present invention in detail, and is not to limit the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made on the basis of the above description. It is impossible to list all the implementation methods here. All obvious changes or modifications derived from the technical solution of the present invention are still within the scope of protection of the present invention.
Claims
1. A tunnel detection system based on image processing and deep learning, characterized in that: include: Image acquisition module, image preprocessing module, crack detection module, convergence detection module, data storage module, and monitoring platform module.
2. The tunnel detection system based on image processing and deep learning according to claim 1, characterized in that: The image preprocessing module comprises: Denoising unit: uses median filtering or Gaussian filtering method to denoise the image; Contrast enhancement unit: Enhances image contrast through histogram equalization or adaptive histogram equalization method.
3. The tunnel detection system based on image processing and deep learning according to claim 1, characterized in that: The crack detection module comprises: Crack recognition unit: Based on the YOLOV5 target detection model, it recognizes cracks in the image; Crack measurement unit: measures the length, width and direction of identified cracks.
4. The tunnel detection system based on image processing and deep learning according to claim 3, characterized in that: The crack identification unit uses a pre-trained deep learning model and performs transfer learning optimization in a specific tunnel environment.
5. The tunnel detection system based on image processing and deep learning according to claim 1, characterized in that: The convergence detection module comprises: Deformation calculation unit: calculates the deformation degree of the tunnel inner wall by comparing the positions of feature points in multiple images; Deformation analysis unit: Determine the convergence of the tunnel based on the deformation calculation results.
6. The tunnel detection system based on image processing and deep learning according to claim 5, characterized in that: The deformation calculation unit uses a triangular mesh method to perform deformation calculation.
7. The tunnel detection system based on image processing and deep learning according to claim 1, characterized in that: The data storage module comprises: Image storage unit: used to store preprocessed images; Result storage unit: used to store the results of crack detection and convergence detection.
8. The tunnel detection system based on image processing and deep learning according to claim 1, characterized in that: The monitoring platform module includes: Front-end display unit: uses a Web-based visual interface to display the test results; Backend service unit: provides data processing and interface services, and is developed using the Express framework with Node.js as the operating environment.
9. The tunnel detection system based on image processing and deep learning according to claim 8, characterized in that: The front-end display unit is developed using Vue.js and ElementUI, and integrates Echarts for data visualization.
10. The tunnel detection system based on image processing and deep learning according to claim 1, characterized in that: The system further comprises: User management module: used to manage system user information and permission settings; Alarm module: When an abnormal situation is detected, an alarm message is sent to the user.
Citation Information
Patent Citations
Tunnel disease real-time detection and early warning system
CN116164704A
Cited By
Tunnel environment safety risk assessment method and system based on deep learning
CN121365875A
