Road surface well lid defect automatic detection method and system based on improved YOLOv8 model
By improving the YOLOv8 model, using the Mish activation function and CGA attention mechanism, the problems of unstable accuracy and inefficiency of traditional road manhole cover defect detection methods are solved, and efficient and accurate defect detection is achieved.
Patent Information
- Application Number
- CN202510080034.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-19
- Publication Date
- 2025-05-16
AI Technical Summary
Traditional pavement manhole cover defect detection methods rely on manual inspection, and there are problems such as missed inspection, false inspection, and unstable accuracy, which is difficult to meet the efficient requirements of modern urban infrastructure maintenance.
The improved YOLOv8 model is adopted, and the SiLU activation function is replaced as the Mish activation function and the CGA attention mechanism is introduced to improve the network's ability to capture and detect defect characteristics of the road manhole cover.
It realizes efficient and accurate detection of road manhole cover defects, significantly reduces the possibility of false inspection and missed inspection, and meets the real-time monitoring needs of urban infrastructure inspection.
Smart Images

Figure CN120013888A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an automatic detection method and system for road manhole cover defects based on an improved YOLOv8 model, and specifically to the fields of computer vision, deep learning and infrastructure detection, in particular to defect detection technology used in urban road maintenance, public facility management and traffic facility detection. Background Art
[0002] Traditional methods for detecting defects in road manhole covers mainly rely on manual inspections and basic image analysis technology. Although manual inspections can rely on experience to determine whether road manhole covers have defects, the inspection process is time-consuming and labor-intensive, and it is prone to missed inspections and false inspections. In addition, manual inspections are affected by factors such as lighting and fatigue of inspectors, and the detection accuracy is unstable, making it difficult to meet the high-efficiency requirements of large-scale manhole cover inspections in cities. Traditional methods have difficulty accurately identifying complex defects, especially those that are similar to the road surface background. This method is sensitive to environmental conditions such as lighting and the surface material of the manhole cover, and is easily disturbed, resulting in fluctuations in the detection results. Therefore, traditional methods for detecting defects in road manhole covers cannot meet the requirements of modern urban infrastructure maintenance and transportation facility management in terms of accuracy and stability.
[0003] In the detection of road manhole cover defects, the YOLOv8 model replaces the SiLU activation function in the original network with the Mish activation function, and uses the advantages of the Mish function in alleviating gradient vanishing and promoting information flow to improve the stability and effectiveness of network training. At the same time, the CGA attention mechanism is introduced, which can enhance the network's attention to important features, suppress irrelevant information, and significantly improve the ability to capture road manhole cover defect features. Compared with the traditional CNN model, YOLOv8 performs better in balancing computational efficiency and detection accuracy, and is particularly suitable for real-time defect detection in large-scale urban infrastructure detection. It can maintain high detection accuracy and robustness under the complex surface texture, color differences and lighting changes of road manhole covers.
[0004] This paper proposes an automatic detection method and system for road manhole cover defects based on an improved YOLOv8 model. By innovatively adjusting the model architecture, the application effect of the system in road manhole cover defect detection is further improved. This method provides a more efficient and accurate automated detection solution for the field of urban infrastructure maintenance, which can meet the needs of modern urban construction and management and improve the automation level of infrastructure detection. Summary of the invention
[0005] The object of the present invention is to provide a method and system for automatic detection of road manhole cover defects based on an improved YOLOv8 model.
[0006] The present invention comprises the following steps:
[0007] S1: In the road manhole cover defect detection system, a suitable camera (such as a high-resolution camera) is used to photograph the road manhole cover. To ensure full coverage of the manhole cover surface, image acquisition is performed from different angles and multiple viewing angles to obtain image information containing different parts and different states of the manhole cover.
[0008] S2: Perform preprocessing operations on the collected images, including illumination equalization, to make the illumination distribution in the image more uniform, so as to avoid the influence of uneven illumination on subsequent detection results. At the same time, the image enhancement algorithm is used to improve the contrast and sharpness of the image, which helps to improve the model's ability to identify defects.
[0009] S3: Improved on the original YOLOv8 network, using the Mish activation function to replace the SiLU activation function to alleviate the gradient vanishing problem, promote better information flow in the network, and improve the stability of network training.
[0010] S4: Using the trained improved YOLOv8 model’s network weights, by adding the CGA attention mechanism, the network pays more attention to important feature information, suppresses irrelevant information, and enhances the ability to capture the characteristics of road manhole cover defects. The model can better learn and express the characteristics of road manhole cover defects.
[0011] S5: Use the trained improved YOLOv8 model’s network weights to accurately identify different types of road manhole cover defects. Use bounding boxes to mark the area where the defects are located, and output the corresponding severity level based on the different features of the defects (such as shape, texture, color, etc.) to classify the road manhole cover defects.
[0012] S6: Use the trained and optimized network, combined with bounding box regression technology, to accurately locate the defects of road manhole covers, and accurately indicate the specific location and severity of the defects through output parameters. At the same time, a joint loss function combining bounding box regression and classification loss is used to further improve the positioning accuracy and detection effect of the model, ensuring that various defects of road manhole covers can be accurately detected, providing accurate information support for subsequent maintenance and management.
[0013] The object of the present invention is achieved in that:
[0014] The method for automatically detecting road manhole cover defects based on the improved YOLOv8 model and the image enhancement algorithm used by the system locally optimize the contrast, sharpness and other features of the image to enhance the detail information in the image.
[0015] The method and system for automatic detection of road manhole cover defects based on the improved YOLOv8 model have significant advantages. At the network structure level, the model shows good performance through innovative improvements. The system uses the advantages of the Mish function in alleviating gradient vanishing and promoting information flow to improve the stability and effectiveness of network training. At the same time, the CGA attention mechanism is introduced, which can enhance the network's attention to important features, suppress irrelevant information, and significantly improve the ability to capture road manhole cover defect features. On the one hand, the improved network structure significantly improves the detection accuracy, and can achieve more accurate identification and judgment for the various types of defects that may exist in road manhole covers and the four types of defects that may exist in road manhole covers (intact, damaged, missing, and uncovered). On the other hand, this model greatly improves the computational efficiency. When dealing with large-scale urban road manhole cover detection tasks, it can complete the work at a higher speed, fully meet the real-time monitoring needs of urban infrastructure detection, ensure that large-area detection tasks can be completed in a short time, and avoid the impact of long detection time on the normal maintenance of urban traffic and infrastructure.
[0016] The method and system for automatic detection of road manhole cover defects based on the improved YOLOv8 model mainly include the following core modules:
[0017] The image acquisition module is used to obtain the image data of the road manhole cover in real time. By using professional image acquisition equipment with high pixel and high resolution characteristics, the image acquisition module can accurately and clearly obtain the surface condition information of the road manhole cover, including the texture, color and various possible defects of the manhole cover surface. The acquired image will then be transmitted to the preprocessing unit, where a series of preprocessing operations will be performed.
[0018] The data preprocessing module processes the input image by removing noise, enhancing contrast, and correcting geometric distortion to make it meet the standards suitable for the subsequent feature extraction stage. After these processes, the preprocessed image is passed as input data to the next processing stage, thus providing a reliable image basis for subsequent defect analysis and detection operations.
[0019] The defect recognition module plays a key role in the entire system. It conducts a comprehensive and in-depth analysis of the network output features, comprehensively considers complex factors such as different lighting conditions, surface wear of manhole covers, and different materials, and accurately classifies and locates defects. At the same time, the module can provide real-time feedback on detection information, whether it is presented through a visual interface or data transmission, which can provide timely and strong support for subsequent intelligent maintenance and management, helping urban management departments to make quick decisions and take corresponding maintenance measures.
[0020] The method and system for automatically detecting road manhole cover defects based on the improved YOLOv8 model, wherein the module uses the improved YOLOv8 convolutional neural network model to extract deep features from images;
[0021] The method and system for automatic detection of road manhole cover defects based on the improved YOLOv8 model can significantly improve the detection accuracy and computational efficiency of road manhole cover defects by optimizing the network, replacing the SiLU activation function with the Mish activation function and adding the CGA attention mechanism and other technologies, thereby achieving efficient and accurate automatic detection.
[0022] The method and system for automatic detection of road manhole cover defects based on the improved YOLOv8 model mainly rely on the target detection algorithm of deep learning. By building a deep neural network model, using a large amount of labeled data for training, learning the feature representation of manhole cover defects, and optimizing the loss function to improve the detection accuracy and speed.
[0023] The method and system for automatic detection of road manhole cover defects based on the improved YOLOv8 model provide real-time feedback of detection results to operators or automated control systems through a display module, intuitively presenting the location and type of road manhole cover defects, assisting decision-making and subsequent processing, and triggering an emergency plan or notifying relevant maintenance personnel to carry out timely repairs if serious defects are found.
[0024] The improved YOLOv8 model enables the system to maintain high detection accuracy and robustness when facing complex road manhole cover surface conditions and various defects, making it particularly suitable for large-scale urban infrastructure detection scenarios.
[0025] Working principle: A road manhole cover defect automatic detection method and system based on the improved YOLOv8 model focuses on optimizing the architecture of the YOLOv8 model and replaces the original SiLU activation function with the Mish activation function. In the process of neural network training, gradient disappearance is an important problem that needs to be solved, which will affect the training effect of the network. The Mish activation function has better characteristics and its curve is smoother. Using it can alleviate the gradient disappearance phenomenon and enable information to flow more smoothly in the network, thereby enhancing the stability and effectiveness of network training.
[0026] The improved YOLOv8 model introduces the CGA attention mechanism, which captures the relationship between features more effectively through layering and grouping, improves the model's ability to focus on feature information, and enables the network to focus on important parts when processing features. For road manhole cover images, manhole cover defects usually only occupy a small part of the image. The CGA attention mechanism can help the network focus on features related to defects, improve the ability to capture manhole cover defect features, reduce the interference of irrelevant information, and enable the network to more accurately extract feature information related to defects.
[0027] The improved YOLOv8 model achieves efficient and high-precision automatic detection of road manhole cover defects by optimizing architecture, extracting features, detecting defects and outputting results, providing a more advantageous solution for manhole cover defect detection.
[0028] The beneficial effects produced by the present invention are:
[0029] 1. An automatic detection method and system for road manhole cover defects based on the improved YOLOv8 model can accurately identify various defects of road manhole covers, classify the severity levels according to the four defect characteristics of intact, damaged, missing and uncovered, and complete the classification of manhole cover defects, which greatly reduces the possibility of false detection and missed detection, and provides a reliable guarantee for the quality control of urban infrastructure.
[0030] 2. An automatic detection method and system for road manhole cover defects based on the improved YOLOv8 model uses the Mish activation function instead of the original SiLU activation function, which alleviates the gradient vanishing problem and ensures the smooth flow of information in the network, thereby enhancing the stability and effectiveness of network training.
[0031] 3. An automatic detection method and system for road manhole cover defects based on an improved YOLOv8 model adds a CGA attention mechanism to the network architecture. It aims to more effectively capture the relationship between features through layering and grouping, and improve the model's ability to focus on feature information. This ensures that the model has strong real-time performance while ensuring a high level of detection accuracy, which can well meet the needs of rapid detection of road manhole covers in practical applications and provide efficient technical support for the maintenance and management of urban infrastructure.
[0032] 4. The present invention adopts the improved YOLOv8 model to realize the automatic detection of road manhole covers, showing many significant advantages. It can not only significantly reduce the detection cost, greatly reduce the input of manpower, and effectively reduce the intensity of manual labor, but also rely on its precise detection capabilities to ensure the safety of urban infrastructure. This is of great significance to promoting the vigorous development of cities, and at the same time, it has strongly promoted the construction of smart cities and greatly improved the efficiency and intelligence level of urban management. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0034] Figure 1 is a system architecture diagram of the present invention;
[0035] Figure 2 is a structural diagram of the attention mechanism of the present invention;
[0036] Figure 3 is a system performance indicator of the present invention;
[0037] Figure 4 is the confusion matrix normalization of the present invention;
[0038] Figure 5 The overall flow chart of the road manhole cover defect image processing of the present invention. Figure 6 An image dataset of road manhole cover defects of the present invention; DETAILED DESCRIPTION
[0039] The specific implementation modes of the present invention are further described in detail below in conjunction with the accompanying drawings.
[0040] like Figure 1 As shown, a method and system for automatically detecting road manhole cover defects based on an improved YOLOv8 model include:
[0041] The method and system for automatically detecting road manhole cover defects based on the improved YOLOv8 model adopts a sharpness adaptive adjustment method to locally adjust the contrast, brightness and other features of the image to enhance the details in the image. I sharp (x,y)=I in (x,y)+k sharp ·(I in (x,y)*L) (1) Among them, I sharp (x, y) is the sharpened image, I in (x,y) is the original image, k sharp is the sharpening coefficient and L is the Laplace operator.
[0042] The method and system for automatically detecting defects in road manhole covers based on the improved YOLOv8 model adopt the Mish nonlinear activation function to provide a smooth, non-monotonic and positive nonlinear transformation for the neural network, thereby avoiding the problem of gradient disappearance or explosion and enhancing the learning ability and performance of the network. Mish(x) = x·tanh(ln(1+e x )) (2)
[0043] Here, x is the variable that is input to the activation function, usually the output from the previous layer of the neural network.
[0044] The method and system for automatic detection of road manhole cover defects based on the improved YOLOv8 model mainly include the following core modules:
[0045] The image acquisition module is used to obtain the image data of the road manhole cover in real time. By using professional image acquisition equipment with high pixel and high resolution characteristics, the image acquisition module can accurately and clearly obtain the surface condition information of the road manhole cover, including the texture, color and various possible defects of the manhole cover surface. The acquired image will then be transmitted to the preprocessing unit, where a series of preprocessing operations will be performed.
[0046] The data preprocessing module processes the input image by removing noise, enhancing contrast, and correcting geometric distortion to make it meet the standards suitable for the subsequent feature extraction stage. After these processes, the preprocessed image is passed as input data to the next processing stage, thus providing a reliable image basis for subsequent defect analysis and detection operations.
[0047] The defect recognition module plays a key role in the entire system. It conducts a comprehensive and in-depth analysis of the network output features, comprehensively considers complex factors such as different lighting conditions, surface wear of manhole covers, and different materials, and accurately classifies and locates defects. At the same time, the module can provide real-time feedback on detection information, whether it is presented through a visual interface or data transmission, which can provide timely and strong support for subsequent intelligent maintenance and management, helping urban management departments to make quick decisions and take corresponding maintenance measures.
[0048] The core of the automatic detection method and system for road manhole cover surface defects based on the improved YOLOv8 model is to optimize the model architecture to improve detection accuracy and computational efficiency. The improved YOLOv8 model replaces the SiLU activation function with the Mish activation function and introduces the CGA attention mechanism. The Mish function alleviates the gradient vanishing and promotes stable and effective network training. The CGA mechanism enhances the capture of defect features and combines learning rate scheduling optimization to achieve efficient computing and high-precision detection, providing a better solution for manhole cover defect detection.
[0049] The method and system for automatically detecting surface defects of road manhole covers based on the improved YOLOv8 model accurately identify different types of road manhole cover defects. The defect area is marked by a bounding box, and the corresponding severity level is output according to the different characteristics of the defect to classify the road manhole cover defects.
[0050] The method and system for automatic detection of road manhole cover defects based on the improved YOLOv8 model provide real-time feedback of detection results to operators or automated control systems through a display module, intuitively presenting the location and type of road manhole cover defects, assisting decision-making and subsequent processing, and triggering an emergency plan or notifying relevant maintenance personnel to carry out timely repairs if serious defects are found.
[0051] The improved YOLOv8 model enables the system to maintain high detection accuracy and robustness when facing complex road manhole cover surface conditions and various defects, making it particularly suitable for large-scale urban infrastructure detection scenarios.
[0052] like Figure 2 As shown, the method and system for automatic detection of road manhole cover defects based on the improved YOLOv8 model introduces the CGA attention mechanism. CGA aims to more effectively capture the relationship between features through layering and grouping, and improve the model's ability to pay attention to feature information. Compared with the traditional attention mechanism, all attention heads share the same input features. The CGA mechanism divides the input features into different parts, and each attention head focuses on a different subset of features, which increases the diversity of the attention mechanism and reduces computational redundancy. The input features will be divided into multiple parts, each of which corresponds to an attention head. Each head can process data independently and generate three vectors: Q (query), K (key), and V (value). In Token Interaction, each input feature will interact and calculate their mutual relationship. Finally, the attention weight is calculated by Self-attention. The calculation formula of the weight g is as follows: Where σ is the activation function, W is the learnable weight matrix, and d k is the dimension of the key vector, and b is the bias term. Based on the generated weight g, the original feature map is channel-weighted. The weighted results are then connected together and projected through a linear transformation to generate the final output feature map. The CGA attention mechanism significantly reduces the demand for computing resources by splitting the input features, making the model more efficient when learning features. And by allowing the attention head to receive different input features for parallel learning, the diversity of features is increased, which helps the model better capture the key features of small targets, thereby improving the detection effect of the model.
[0053] like Figure 3As shown in the figure, an automatic detection method and system for road manhole cover defects based on the improved YOLOv8 model, during the training process, the evaluation indicators such as precision, recall, mAP@50 and mAP@50-95 all showed a steady improvement trend, indicating the continuous optimization of the model performance.
[0054] like Figure 4 As shown, the method and system for automatic detection of road manhole cover defects based on the improved YOLOv8 model further calculates the recall rate (Recall) and precision (Precision) of the detection results through the confusion matrix.
[0055] The method and system for automatically detecting defects on road manhole covers based on the improved YOLOv8 model uses high-definition and high-resolution image acquisition equipment to photograph road manhole covers and obtain image data on the manhole cover surface. A professional camera with a high-pixel sensor and a high-quality optical lens is used to ensure that various defect information on the surface of road manhole covers can be clearly captured under different lighting conditions, including strong light during the day, cloudy days, and weak light at night.
[0056] The method and system for automatically detecting road manhole cover defects based on the improved YOLOv8 model will perform detailed annotation operations on the images after the images are collected, providing accurate supervision information for subsequent model training. The annotation of defect types will be based on pre-set classification standards, including but not limited to various possible defect categories such as manhole cover rupture, deformation, displacement, corrosion, missing parts, etc. The annotation information will accurately record the spatial position of the manhole cover defect in the image, usually in the form of a bounding box, that is, the coordinates of the upper left and lower right corners of the defect are marked to provide a clear position reference for the model.
[0057] The method and system for automatic detection of road manhole cover defects based on the improved YOLOv8 model perform data enhancement processing on the image data in order to improve the generalization ability of the model. This process uses a series of data enhancement techniques, such as random cropping, rotation, flipping, color conversion, adding noise and other operations. These operations are intended to simulate changes that may occur in various real-life scenarios, so that the model can be exposed to more diverse data samples during the training process, thereby enhancing its adaptability to different detection scenarios and conditions. Through data enhancement, the model can better learn the characteristics of manhole cover defects under different viewing angles, different lighting, and different environmental noise interference, and improve its detection performance in complex real-life environments.
[0058] The method and system for automatically detecting defects in road manhole covers based on the improved YOLOv8 model realizes automatic monitoring of road manhole covers. Once a defect in a manhole cover is detected, the system will automatically generate a detailed inspection report, including information such as the location, type, severity, and inspection time of the defect, so that maintenance personnel can take corresponding repair or maintenance measures in a timely manner, improve the maintenance efficiency and quality of urban infrastructure, and reduce safety hazards and economic losses caused by defects in manhole covers.
Claims
1. A method and system for automatic detection of road manhole cover defects based on an improved YOLOv8 model, characterized in that: The method comprises the following steps: S1: In the road manhole cover defect detection system, a suitable camera is used to photograph the road manhole cover. To ensure full coverage of the manhole cover surface, images are collected from different angles and multiple viewing angles to obtain image information containing different parts and different states of the manhole cover. S2: Perform preprocessing operations on the collected images, including illumination equalization, to make the illumination distribution in the image more uniform, so as to avoid the influence of uneven illumination on subsequent detection results. At the same time, image enhancement algorithms (such as histogram equalization, contrast stretching, etc.) are used to improve the contrast and sharpness of the image, highlight the details of the surface of the road manhole cover, and help improve the model's ability to identify defects. S3: Improved on the basis of the original YOLOv8 network, using the Mish activation function to replace the SiLU activation function to alleviate the gradient vanishing problem, promote better information flow in the network, and improve the stability of network training. S4: Using the trained network weights of the improved YOLOv8 model and adding the CGA attention mechanism, the network pays more attention to important feature information, suppresses irrelevant information, and enhances the ability to capture the characteristics of road manhole cover defects. The model can better learn and express the characteristics of road manhole cover defects. S5: Use the trained improved YOLOv8 model’s network weights to accurately identify different types of road manhole cover defects. Use bounding boxes to mark the area where the defects are located, and output the corresponding severity level based on the different features of the defects to classify the road manhole cover defects. S6: Use the trained and optimized network, combined with bounding box regression technology, to accurately locate the defects of road manhole covers, and accurately indicate the specific location and severity of the defects through output parameters. At the same time, a joint loss function combining bounding box regression and classification loss is used to further improve the positioning accuracy and detection effect of the model, ensuring that various defects of road manhole covers can be accurately detected, providing accurate information support for subsequent maintenance and management.
2. The method according to claim 1, characterized in that The acquisition system adopts multi-angle image enhancement technology, which can effectively avoid the loss of image information caused by the angle difference of the texture or defects of the road manhole cover, and ensure the integrity and high quality of the acquired data.
3. The method according to claim 1, characterized in that The image enhancement algorithm uses adaptive adjustment means to locally optimize features such as image contrast and sharpness, thereby enhancing detail information in the image.
4. The method according to claim 1, characterized in that: The improved YOLOv8 model uses a new activation function in the network architecture. This function can improve gradient flow, alleviate the gradient vanishing problem, and enhance the stability of network training. Improve feature learning capabilities and increase the detection accuracy of road manhole cover defects.
5. The method according to claim 1, characterized in that The activation function is the Mish function, and the system replaces the SiLU activation function in the original network with the Mish activation function. The Mish function is used to alleviate the vanishing gradient and promote the flow of information, enhance the stability and effectiveness of network training, provide better conditions for subsequent network training, and help improve the overall performance of the model.
6. The method according to claim 1, characterized in that The improved YOLOv8 model introduces an attention mechanism in the network architecture. This mechanism can guide the network to focus on the key information of road manhole cover defects, enhance feature expression, optimize feature fusion, improve detection performance, and enhance robustness in different environments.
7. The method according to claim 1, characterized in that The attention mechanism adopts the CGA attention mechanism, which can guide the network to focus on important features, suppress irrelevant information, and significantly improve the ability to capture the characteristics of road manhole cover defects. By focusing on important features, the model can more accurately extract and utilize key information when processing road manhole cover defect detection tasks, thereby improving the accuracy and reliability of detection.
Citation Information
Patent Citations
CIM well lid state visual detection system based on deep learning and multiple visual angles
CN111339905A
Industrial part defect detection method based on improved YOLOv8 model
CN118967602A
Cited By
System for inspecting and assessing the condition of the pavement of a roadway segment
US12694502B1