Method and system for extracting and identifying defect features of cable facilities in tunnel based on YOLOv8
Through the YOLOv8-based method, combined with convolutional neural network and attention mechanism, the accuracy and real-time problems in the complex background of defect feature extraction and identification of cable facilities in the tunnel are solved, and efficient and accurate defect detection and real-time monitoring are achieved, reducing maintenance costs.
Patent Information
- Application Number
- CN202411877598.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-05-27
AI Technical Summary
In the complex context, the prior art is difficult to accurately extract and identify defective features of cable facilities in tunnels, with overfitting problems, insufficient generalization capabilities, and difficult to achieve real-time monitoring, and high maintenance costs.
Using YOLOv8-based method, the defect characteristics of the cable facility are extracted through convolutional neural networks and attention mechanisms, combined with data enhancement and robust optimization techniques, the detection accuracy and generalization capabilities of the model are improved, and the computing efficiency of the model is optimized through technologies such as lightweight processing and pruning.
It realizes efficient and accurate extraction and identification of defect characteristics of cable facilities in the tunnel under complex backgrounds, improves real-time and accuracy of detection, and reduces maintenance costs.
Smart Images

Figure CN120047379A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and particularly to a method and system for extracting and identifying defect features of cable facilities in tunnels based on YOLOv8. Background Art
[0002] The existing traditional methods have the following technical defects:
[0003] (1) Feature extraction under complex backgrounds
[0004] The environment in the tunnel is complex, with various interference factors such as humidity, temperature, and noise, seriously affecting the accurate extraction of defect features of cable facilities by traditional methods; traditional methods often can only extract certain specific features of cable facilities, such as partial discharge signals, image textures, etc., and it is difficult to comprehensively reflect the overall state and potential defects of cable facilities, resulting in the omission or misjudgment of some important defects; the extraction of defect features of cable facilities in the tunnel requires the processing and analysis of a large amount of data, and traditional methods may require high computing resources and time costs when processing these data, restricting the practical application promotion and popularization.
[0005] (2) Identification of specific defect types
[0006] Low identification accuracy: There are various types of defects in high-voltage cable facilities, including insulation aging, sheath damage, shielding layer fracture, joint heating, delamination, metal impurities, cracks, and scratches, etc. The manifestation features of different types of defects on images are different, and the model needs to be able to accurately identify and classify these defects. In the detection experiment of tiny defects, it is verified that the proposed algorithm has a lower missed detection rate, higher detection accuracy and precision in identifying subtle defects. However, the models in the existing technologies often have problems with low identification accuracy when identifying specific defect types, and may not be able to effectively detect all tiny defects; traditional identification methods are often designed for specific defect types or specific environmental conditions, and their adaptability is limited when facing new defect types or changing environmental conditions. In practical applications, it is necessary to frequently adjust or update the identification method, increasing the workload and cost; relying on manual intervention: Some traditional identification methods require manual participation in the feature extraction and identification process, increasing the workload and introducing human errors. Especially in such a complex environment as in the tunnel, manual intervention will further increase the uncertainty of the identification results.
[0007] (3) Problems of environmental adaptability and robustness
[0008] The environment in the tunnel is complex and changeable, and factors such as lighting conditions may affect the effect of defect detection. The existing technologies perform poorly in these complex environments, resulting in a decrease in the accuracy of detection results. Lacking sufficient robustness, they cannot effectively cope with interference factors such as image noise and occlusion of cable facilities in the tunnel, leading to a reduction in the reliability of detection results.
[0009] (4) Difficult to monitor in real time and high maintenance cost
[0010] Traditional methods have limitations in feature extraction and identification, making it difficult to achieve real-time monitoring of cable facilities in tunnels, restricting the ability to detect and handle potential defects in a timely manner, and increasing safety risks. Traditional methods require regular maintenance and update of equipment and technologies, increasing the cost and workload of maintaining cable facilities in tunnels. Summary of the Invention
[0011] In view of the above existing problems, the present invention aims to solve the problems that it is difficult to obtain high-quality and large-scale labeled data in the prior art, and there is also the problem of overfitting, resulting in insufficient generalization ability in actual applications. It is necessary to train strategies and optimize algorithms under limited data conditions, and at the same time introduce methods such as transfer learning, use the models that have been trained well in other related fields as pre-trained models, and then fine-tune them for the defect detection task of tunnel cable facilities to improve the detection accuracy and generalization ability of the models.
[0012] The YOLOV8 model needs to perform complex convolution operations and feature extraction when processing images, and has high requirements for computing resources. In actual application scenarios such as tunnels, the hardware conditions are limited and cannot meet the real-time operation requirements of the model. Optimize the YOLOv8 CNN model, such as adopting lightweight network structures, pruning, quantization and other technologies to reduce the number of model parameters and the amount of calculation. At the same time, according to the specific requirements of cable facility detection in tunnels, customize the design of the model, remove unnecessary parts, and improve the operation efficiency of the model.
[0013] The background of cable facilities in tunnels is complex and changeable, including interference factors such as light changes, shadows and clutter. These factors cause misdetection or missed detection in the process of feature extraction by the model. Solve how to accurately extract the defect features of cable facilities under complex backgrounds and improve the detection accuracy and stability of the model. By introducing advanced technologies such as attention mechanisms, the model can pay more attention to the key areas in the image and reduce the interference of background noise. At the same time, adopt methods such as multi-scale feature fusion to make full use of the feature information at different scales and improve the model's ability to extract defect features.
[0014] There are various types of cable facility defects, such as insulation aging, sheath damage, joint overheating and shielding layer fracture, etc. The performance characteristics of different types of defects on images are different, and the model needs to be able to accurately identify and classify them. For different types of defects, such as the color change of sheath aging and the partial discharge traces of air gaps in the insulation layer, collect more labeled data and conduct targeted training on the model. At the same time, adopt technologies such as fine-grained classification to classify the defects more carefully and improve the recognition accuracy and classification ability of the model.
[0015] The environment inside the tunnel is complex and variable, and factors such as lighting conditions and noise interference can all affect the effect of defect detection. Existing technologies perform poorly in these complex environments, resulting in a decrease in the accuracy of detection results. Data augmentation techniques are adopted to simulate the complex and variable environmental conditions inside the tunnel, such as lighting changes and noise interference, to train the model. At the same time, technologies such as robustness optimization are introduced, such as adversarial training and data cleaning, to improve the model's resistance to interference factors such as noise and occlusion.
[0016] To solve the above technical problems, a method for extracting and identifying defect features of cable facilities inside the tunnel based on YOLOv8 is proposed, including,
[0017] Use a camera to photograph the cable facilities inside the tunnel, use an automatic moving platform for data collection, and record the image position information; perform preprocessing on the collected data and images, such as denoising, enhancing contrast, cropping, and normalization; use a convolutional neural network to process the preprocessed images, design specific convolutional kernels after extracting features through convolutional operations, adopt multi-layer convolution and pooling, and use activation functions to enhance non-linear feature representation; achieve real-time detection of cable facility defects through YOLOv8 object detection, optimize the model performance using an attention mechanism, perform lightweight processing on the model, and conduct model training; use non-maximum suppression to remove redundant detection boxes, and use a dual-combination algorithm to process overlapping detection boxes; mark the specific positions and types of defects, display the confidence level, generate a visualization report, and output it in multiple formats.
[0018] As a preferred solution of the method for extracting and identifying defect features of cable facilities inside the tunnel based on YOLOv8 according to the present invention, wherein: the data collection includes using an industrial-grade high-resolution camera optimized for low-light environments to photograph the cable facilities inside the tunnel, and the camera is equipped with customized lighting equipment;
[0019] The low-light environment is optimized such that the minimum illuminance sensing ability required by the camera ≥ 0.01 lux and has a wide dynamic range function, the image resolution ≥ 1080p, the video recording frame rate ≥ 30 fps, and a lens with adjustable focal length is adopted;
[0020] Use a high-definition camera to continuously monitor the cable facilities inside the tunnel and record video data;
[0021] The acquisition method uses an automatic mobile acquisition platform, including an inspection robot or a rail mobile system, for data collection:
[0022] The inspection robot is equipped with a camera, and through path planning technology, it conducts full-coverage shooting of the tunnel. During the acquisition process, it combines an inertial navigation system and an optical SLAM technology to record the position information of each frame of the image, and performs real-time data preprocessing while collecting.
[0023] As a preferred solution of the method for extracting and identifying cable facility defect features in tunnels based on YOLOv8 according to the present invention, wherein: the preprocessing includes preprocessing the collected data, including denoising, enhancing contrast, cropping, and normalizing;
[0024] The denoising adopts a combined denoising algorithm of Gaussian noise removal, salt-and-pepper noise removal, mean filtering, and wavelet transform denoising to denoise image and video data. The wavelet transform is used to remove high-frequency interference noise, the median filter is used to eliminate salt-and-pepper noise, Gaussian filtering is used for global smoothing processing, and the signal-to-noise ratio and structural similarity index of different algorithm combinations are determined through cross-validation to determine the best combined denoising strategy;
[0025] The contrast enhancement adopts histogram equalization and Retinex theory to enhance the contrast of the image;
[0026] The cropping is to crop image and video data, remove irrelevant background information, and retain the cable facilities and defect parts;
[0027] The secondary preprocessing operation on image and video data through adaptive illumination correction includes image smoothing, sharpening, and color correction;
[0028] Calculate the global brightness value L and brightness distribution characteristics of the image, and perform normalization processing using the brightness mean and standard deviation. Let the input image be I(x, y), and its brightness component be I L (x, y):
[0029]
[0030] where M and N are the width and height of the image respectively;
[0031] Calculate the brightness standard deviation:
[0032]
[0033] Adjust the brightness distribution to the target range [L min , L max :
[0034]
[0035] Utilize local histogram equalization combined with the illumination offset model for adaptive illumination correction to improve the local area brightness and contrast. Divide the image into multiple local areas, and calculate the local illumination offset for each area:
[0036]
[0037] where ΔLi is the illumination offset of the i-th local area, and n is the number of local pixels;
[0038] According to the illumination offset ΔL i Define an adaptive illumination correction function:
[0039] I″ L (x, y) = I′ L (x, y) - α·ΔL i
[0040] where α is the correction coefficient, and local histogram equalization is performed on the corrected image to smooth the illumination transition and enhance details:
[0041]
[0042] where CDF is the cumulative distribution function of pixel values.
[0043] As a preferred solution of the method for extracting and identifying defect features of cable facilities in tunnels based on YOLOv8 according to the present invention, wherein: the convolutional neural network processes the preprocessed image, including using the preprocessed image I(x, y) as the input of the convolutional neural network. The convolutional neural network performs local perception and feature extraction on the input image through multiple convolutional kernels. Each convolutional kernel K(m, n) slides on the image to calculate the weighted sum of the local area and generate a feature map F(u, v):
[0044]
[0045] For the defect features of cable facilities, design convolutional kernels for each type of defect:
[0046] The convolutional kernel for crack feature detection aims to extract edge information and uses a gradient-based convolutional kernel:
[0047]
[0048] The convolutional kernel for corrosion and damage detection, design a small-sized convolutional kernel Ksmall:
[0049]
[0050] The convolutional kernel for aging feature detection analyzes the global texture and designs a large-sized convolutional kernel Klarge:
[0051]
[0052] where w i,j is the weight distribution of the convolutional kernel;
[0053] According to the generated feature maps, through multi-layer convolution and pooling operations, high-level features in the image are extracted. After the convolutional layer, an activation function is used to increase the non-linearity of the network. The combined technology of contrast enhancement and edge detection is adopted to extract the edge features of cable facilities and defects. The combined method of frequency domain analysis and texture analysis is used to extract the micro-defect features on the surface of cable facilities. The extracted features are input into a deep learning framework for CNN model training.
[0054] As a preferred embodiment of the method for extracting and identifying defect features of in-tunnel cable facilities based on YOLOv8 of the present invention, wherein: the YOLOv8 object detection includes real-time detection of defects of cable facilities in the image through the YOLOv8 algorithm, and multi-joint technologies such as pruning, quantization, and knowledge distillation are used to compress and accelerate the model. The sparse pruning method is used to prune the model weight matrix:
[0055]
[0056] Through quantization, 32-bit floating-point weights are compressed to the lowest precision:
[0057]
[0058] where λ is the pruning threshold, k is the quantization bit number, and W min and W max are the weight ranges;
[0059] The cable facility image to be detected is input into the optimized YOLOv8 model for training. The input image is divided into grid regions of a fixed size. Each grid region predicts a fixed number of bounding boxes, and the position, size, and confidence score of each bounding box are calculated. Each grid region also predicts the object categories contained in the region. After training, optimizing the model includes data augmentation, regularization techniques, and model pruning.
[0060] As a preferred embodiment of the method for extracting and identifying defect features of in-tunnel cable facilities based on YOLOv8 of the present invention, wherein: the removal of redundant detection boxes includes using non-maximum suppression to remove redundant detection boxes, calculating the intersection over union, and stipulating two detection boxes B 1 and B 2 :
[0061]
[0062] where ∩ represents the intersection of the detection boxes, ∪ represents the union of the detection boxes, IoU is the intersection over union. After calculating the intersection over union, confidence filtering is performed, sorted from high to low according to the confidence of the detection boxes, and a confidence threshold T c :
[0063] Filterconf = {B i ∈ D | Conf(B i ) > T c}
[0064] Through NMS suppression, for each bounding box B i , calculate its intersection over union (IoU) with the remaining bounding boxes, and keep the bounding boxes with IoU less than the set threshold T IoU :
[0065] Keep(B i ) = {B j ∈ Filter conf | IoU(B i , B j ) < T IoU}
[0066] The final set of detected bounding boxes is:
[0067]
[0068] The double combination algorithm is to merge overlapping detected bounding boxes by the weighted average method and the IOU fusion method, perform weighted averaging on the overlapping detected bounding boxes to obtain a new detected bounding box. Given n overlapping detected bounding boxes {B i} and their corresponding confidence levels {Conf(B i )}, the center coordinates of the new bounding box are:
[0069]
[0070] where x c,i and y c,i are the center coordinates of the i-th detected bounding box respectively;
[0071] The calculation formulas for the width w and height h of the new bounding box are:
[0072]
[0073] Calculate the IoU of the overlapping detected bounding boxes and perform fusion based on the IoU value to obtain a more accurate detected bounding box.
[0074] As a preferred solution of the method for extracting and identifying defect features of cable facilities in tunnels based on YOLOv8 according to the present invention, wherein: the visualization report includes marking the specific positions of the defects in the image, using rectangular boxes and circles for marking, according to the classification results of YOLOv8, using different colors to distinguish and mark different types of defects, and displaying the confidence level of each detected bounding box, summarizing all detected defects including position coordinates, types, and confidence levels in a list form, and highlighting the defects with confidence levels higher than the set threshold in red;
[0075] The post - processed detection results are automatically converted into a visual report through OpenCV and a report generation tool. After the report is automatically generated, manual review and modification are carried out, and the visual report is output in multiple formats such as images, PDFs, and HTMLs.
[0076] Another object of the present invention is to provide a system for extracting and identifying defect features of cable facilities in tunnels based on YOLOv8. The present invention aims to achieve the automatic detection and identification of defects in cable facilities in tunnels, collect data through a high - resolution camera and an automatic mobile platform, and use deep learning technology to accurately identify and locate the defects of cable facilities, and finally generate a detailed visual report to improve the efficiency and accuracy of tunnel cable facility inspections and ensure the safety of power transmission.
[0077] As a preferred solution of the system for extracting and identifying defect features of cable facilities in tunnels based on YOLOv8 according to the present invention, it is characterized in that it includes a data acquisition module, a data pre - processing module, a feature extraction module, a YOLOv8 object detection module, a post - processing module, and a visualization module;
[0078] The data acquisition module is responsible for collecting image and video data of cable facilities in the tunnel through a high - resolution camera carried by an automatic mobile platform and recording the image position information;
[0079] The data pre - processing module receives the data from the acquisition module, performs denoising, contrast enhancement, cropping, and normalization operations to optimize the image quality and prepare for feature extraction;
[0080] The feature extraction module uses a convolutional neural network to process the pre - processed image, and extracts the defect features of cable facilities through designing specific convolutional kernels and multi - layer convolutional pooling operations;
[0081] The YOLOv8 object detection module uses the YOLOv8 algorithm to perform real - time detection on the features output by the feature extraction module, identifies the defects of cable facilities, and optimizes the performance using model lightweight technology;
[0082] The post - processing module performs non - maximum suppression and double - combination algorithm processing on the results detected by YOLOv8 to remove redundant detection boxes and optimize the detection results;
[0083] The visualization module marks the defect positions and types, generates a visual report including confidence levels, and outputs the results in multiple formats.
[0084] A computer device includes a memory and a processor. The memory stores a computer program. It is characterized in that when the processor executes the computer program, the steps of the method for extracting and identifying defect features of cable facilities in tunnels based on YOLOv8 are implemented.
[0085] A computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the method for extracting and identifying cable facility defect features in a tunnel based on YOLOv8 are implemented.
[0086] Advantages of the present invention: The present invention can achieve the following effects:
[0087] (1) High-efficiency object detection and feature extraction capabilities
[0088] High efficiency of YOLOv8: The YOLOv8 algorithm, an advanced real-time object detection algorithm, is known for its high efficiency and accuracy. While maintaining high detection accuracy, YOLOv8 significantly shortens the detection time and can achieve fast and real-time cable facility defect detection in the complex environment of a tunnel.
[0089] Fine feature extraction of CNN: Combining the advantages of convolutional neural networks (CNNs) in image feature extraction, it can accurately capture the subtle features of cable facility defects, such as cracks, corrosion, aging, etc. Through multiple layers of convolution and pooling operations, CNN learns the deep features in the image, thereby improving the accuracy of defect identification.
[0090] This method innovatively integrates the advantages of the YOLOv8 algorithm, achieving efficient extraction and accurate identification of cable facility defect features in a tunnel. The combination of the fast detection ability and fine feature extraction ability of YOLOv8 improves the overall performance of the system.
[0091] (2) Customized model design
[0092] Optimization for tunnel environment: This method conducts a customized design of the YOLOv8 CNN model for the unique lighting conditions, space limitations, and background complexity in a tunnel. By adjusting model parameters, optimizing the network structure, and increasing the training of specific datasets, it is applicable to the detection of cable facility defects in a tunnel.
[0093] Accurate identification of defect types: The customized model design also includes fine classification of cable facility defect types. By training a large amount of image data containing various defect types, the model can learn the features of different defects, thereby achieving accurate identification of defect types.
[0094] (3) Real-time detection and automation
[0095] Due to the high efficiency of YOLOv8, rapid defect detection of cable facilities can be achieved in tunnels, avoiding potential safety hazards. Additionally, this method realizes the automatic detection of cable facility defects in tunnels, reducing the burden of manual inspections. Automatic detection not only improves the detection efficiency, reduces the risks and costs of manual inspections, but also efficiently manages the cable facilities in the tunnel to ensure their safe and stable operation.
[0096] (4) Enhance robustness and environmental adaptability
[0097] This method can adapt to the detection of cable facilities under different lighting, angles, and occlusion conditions, improving the robustness of the system. Through a large amount of training data, the model can learn the feature representations of cable facilities under different conditions and maintain stable detection performance in various environments. Description of the Drawings
[0098] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0099] Figure 1 It is the overall flowchart of the method for extracting and identifying cable facility defect features in tunnels based on YOLOv8 provided by an embodiment of the present invention.
[0100] Figure 2 It is the YOLOv8 network architecture diagram of the method for extracting and identifying cable facility defect features in tunnels based on YOLOv8 provided by an embodiment of the present invention.
[0101] Figure 3 It is the extraction and identification of cable facility defect features in tunnels of the method for extracting and identifying cable facility defect features in tunnels based on YOLOv8 provided by an embodiment of the present invention.
[0102] Figure 4 It is the CNN feature extraction and classification diagram of the method for extracting and identifying cable facility defect features in tunnels based on YOLOv8 provided by an embodiment of the present invention.
[0103] Figure 5 It is the system scheme module diagram of the system for extracting and identifying cable facility defect features in tunnels based on YOLOv8 provided by an embodiment of the present invention.
[0104] In the figure: 10, data acquisition module; 20, data preprocessing module; 30, feature extraction module; 40, YOLOv8 object detection module; 50, post-processing module; 60, visualization module. Detailed implementation manners
[0105] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following provides a detailed description of the specific implementation manners of the present invention in conjunction with the accompanying drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0106] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0107] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation manner of the present invention. The appearances of "in one embodiment" in different places in this specification do not all refer to the same embodiment, nor are they embodiments that are mutually exclusive of other embodiments individually or selectively.
[0108] The present invention is described in detail in conjunction with the schematic diagrams. When detailing the embodiments of the present invention, for ease of explanation, the cross-sectional views showing the device structure will be enlarged locally not in accordance with the general scale, and the schematic diagrams are only examples and should not limit the protection scope of the present invention herein. In addition, in actual production, three-dimensional spatial dimensions including length, width, and depth should be included.
[0109] Meanwhile, in the description of the present invention, it should be noted that the orientation or positional relationships indicated by terms such as "upper, lower, inner, and outer" are based on the orientation or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be construed as a limitation to the present invention. In addition, the terms "first, second, or third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0110] Unless otherwise clearly defined and limited in the present invention, the terms "mounted, connected, and coupled" shall be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can also be a mechanical connection, an electrical connection, or a direct connection, and can also be indirectly connected through an intermediate medium, or can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0111] Example 1, referring to Figures 1-4, which is the first embodiment of the present invention. This embodiment provides a method for extracting and identifying defect features of cable facilities in tunnels based on YOLOv8, including:
[0112] S1: Use a camera to photograph the cable facilities in the tunnel, use an automatic mobile platform for data collection, and record the image position information.
[0113] Furthermore, use a high-resolution camera or camera to photograph the cable facilities in the tunnel to ensure clear images with rich details. Considering that the lighting conditions in the tunnel may be poor, a camera with low-light performance or equipped with additional lighting equipment should be selected. Use a high-definition camera or camera to continuously monitor the cable facilities in the tunnel and record video data. Ensure that the frame rate, resolution, and clarity of the video data meet the requirements of subsequent processing. To achieve efficient feature extraction and identification of defects in cable facilities in the tunnel, a targeted data collection process is designed to optimize image quality and data adaptability, specifically including the following steps:
[0114] Device selection and configuration. Use an industrial-grade high-resolution camera optimized for low-light environments, and select a camera device with the following characteristics
[0115] Low-light performance. The camera should have a minimum illuminance sensing ability of ≥0.01 lux and combine a wide dynamic range (HDR) function to ensure image quality under complex lighting conditions. Resolution and frame rate: The image resolution should be ≥1080p (1920×1080), and the video recording frame rate should be ≥30fps to meet the high-resolution requirements for detailed features in defect detection. Use a lens with adjustable focal length to support accurate imaging of cable facilities at different distances; select an anti-reflection coating to reduce the interference of tunnel lights and surface reflections on imaging.
[0116] Considering the insufficient and uneven distribution of light in the tunnel, equip customized lighting equipment: adjustable LED light sources, which are distributed annularly around the camera. By controlling the light source intensity and angle, reduce the influence of light spots and shadows in the tunnel. Dynamic light compensation algorithm, combined with the real-time exposure control function of the camera device, adjusts the light intensity according to the shooting scene to ensure uniform brightness of the collected images.
[0117] The acquisition method uses an automatic mobile acquisition platform (such as an inspection robot or a rail mobile system) for data collection: The inspection robot is equipped with a camera, and through path planning technology, it realizes full-coverage shooting of the tunnel, avoiding missed shots and repeated acquisitions. During the acquisition process, combine the inertial navigation system (INS) and optical SLAM technology to record the position information of each frame of the image, ensuring the accurate correspondence between the data and the spatial coordinates, and providing a three-dimensional space reference for subsequent analysis.
[0118] Data processing standardization, real-time data preprocessing is carried out during acquisition, specifically including: removing noise points and low-frequency texture interference through a noise reduction algorithm based on convolutional filtering. Using a color correction algorithm (such as gamma correction) to correct color differences caused by uneven illumination to ensure data consistency. Automatically storing the collected video data in blocks, and quickly marking the defect positions with a real-time annotation tool to provide a high-quality data set for subsequent model training.
[0119] S2: Preprocess the collected data and images by denoising, enhancing contrast, cropping, and normalizing.
[0120] Furthermore, preprocess the collected data, including denoising, enhancing contrast, cropping, normalizing, etc., to improve the accuracy of subsequent processing, improve image quality, and reduce computational complexity.
[0121] Due to the complex tunnel environment, the collected image and video data contain various noises, such as Gaussian noise, salt-and-pepper noise, etc.
[0122] The denoising uses a combined denoising algorithm of Gaussian noise removal, salt-and-pepper noise removal, mean filtering, and wavelet transform denoising to denoise the image and video data:
[0123] Gaussian noise removal, using a Gaussian filter to eliminate Gaussian-distributed noise:
[0124]
[0125] Among them, σ is the standard deviation, reflecting the smoothness of the filter. The present invention automatically selects the optimal σ value that adapts to the texture characteristics of tunnel images, so that the filter can not only remove noise but also retain image edges.
[0126] Salt-and-pepper noise removal, using a median filtering method:
[0127]
[0128] Among them, N(x,y) is a window centered on the pixel (x,y). The present invention combines an adaptive window size adjustment strategy to dynamically select a filtering window (such as 3×3, 5×5, etc.) according to the noise density.
[0129] Wavelet transform denoising, wavelet transform is used to process non-stationary noise, especially suitable for high-frequency interference caused by illumination. Based on the discrete wavelet transform (DWT), the image signal f(x,y) is decomposed into detail subbands of different scales:
[0130]
[0131] Among them, ψ i,j is the wavelet basis function, c i,jis the decomposition coefficient.
[0132] Adjust the wavelet coefficients using the soft threshold method:
[0133]
[0134] where λ is the threshold, and λ is dynamically adjusted through statistical analysis of the noise distribution to reduce artifacts.
[0135] Specifically, use wavelet transform to remove high-frequency interference noise, eliminate salt-and-pepper noise through median filtering, perform global smoothing using Gaussian filtering, and determine the optimal joint denoising strategy by cross-validating the signal-to-noise ratio and structural similarity index of different algorithm combinations; denoise image and video data to reduce the impact of noise on subsequent processing. Considering the characteristics of tunnel images, combine multiple denoising algorithms for joint processing to achieve the best denoising effect.
[0136] Regarding the enhancement of contrast, the lighting conditions inside the tunnel are uneven, resulting in a low image contrast, which affects subsequent processing. Use histogram equalization and Retinex theory to enhance the contrast of the image; it can adjust the gray distribution of the image to make the contrast of the image more uniform and the details clearer.
[0137] The cropping is to crop image and video data, remove irrelevant background information, and retain the cable facilities and defective parts; cropping can reduce the computational amount of subsequent processing and improve processing efficiency. At the same time, cropping can make the defective features more prominent, which is beneficial for feature extraction and identification.
[0138] It should be noted that the secondary preprocessing operation on image and video data through adaptive illumination correction includes image smoothing, sharpening, and color correction; for the complex light changes inside the tunnel, use the adaptive illumination correction method to make the image maintain a consistent brightness distribution under different lighting conditions.
[0139] The calculation of the global brightness value L and brightness distribution characteristics of the image, and normalization processing using the brightness mean and standard deviation. Let the input image be I(x,y), and its brightness component be I L (x,y):
[0140]
[0141] where M and N are the width and height of the image respectively;
[0142] Calculate the brightness standard deviation:
[0143]
[0144] Adjust the brightness distribution to the target range [L min ,Lmax :
[0145]
[0146] Using local histogram equalization combined with the illumination offset model, perform adaptive illumination correction to improve the brightness and contrast of local regions. Divide the image into multiple local regions, and calculate the local illumination offset for each region:
[0147]
[0148] where ΔL i is the illumination offset of the i-th local region, and n is the number of local pixels;
[0149] According to the illumination offset ΔL i define the adaptive illumination correction function:
[0150] I″ L (x, y) = I′ L (x, y) - α·ΔL i
[0151] where α is the correction coefficient. Perform local histogram equalization on the corrected image to smooth the illumination transition and enhance details:
[0152]
[0153] where CDF is the cumulative distribution function of pixel values.
[0154] To improve the generalization ability of the model, for the problem of scarce data for defect detection of cable facilities in tunnels, it is also necessary to perform augmentation processing on the training data, such as operations like rotation, flipping, scaling, color transformation, adding noise, etc., to enhance the diversity and quantity of the training data. These preprocessing operations can improve the quality of image and video data.
[0155] S3: Use a convolutional neural network to process the preprocessed image. After extracting features through convolutional operations, design specific convolutional kernels, adopt multi-layer convolution and pooling, and use activation functions to enhance the non-linear feature representation.
[0156] Furthermore, the preprocessed image is used as the input of the CNN. The CNN performs local perception and feature extraction on the input image through multiple convolutional kernels. Each convolutional kernel slides on the image, calculates the weighted sum of the local region, and generates a feature map. Use background subtraction algorithms or deep learning methods, such as segmentation networks like U-Net, to separate the tunnel background from the cable facilities and reduce the interference of the background on the extraction of defect features.
[0157] The preprocessed image I(x, y) is used as the input of the convolutional neural network. The convolutional neural network performs local perception and feature extraction on the input image through multiple convolutional kernels. Each convolutional kernel K(m, n) slides on the image to calculate the weighted sum of the local region and generate the feature map F(u, v):
[0158]
[0159] For the defect features of cable facilities (such as cracks, damages, corrosion, etc.), convolutional kernels with different sizes, shapes, directions, and weights are designed to capture different aspects of these features, such as edges, textures, etc. For damage and corrosion defects, smaller convolutional kernels are used to capture detailed features; while for aging defects, larger convolutional kernels are needed to capture global texture changes. Through experiments and verification, the parameters of the convolutional kernels are continuously optimized to improve the accuracy of feature extraction. For different defect features (cracks, damages, corrosion, etc.), the weights K and shapes of the convolutional kernels are designed to capture specific patterns:
[0160] The convolutional kernel for crack feature detection aims to extract edge information and uses a gradient-based convolutional kernel:
[0161]
[0162] The convolutional kernel for corrosion and damage detection designs a small-sized convolutional kernel Ksmall to capture high-frequency detailed features, and the weight distribution is optimized to have a higher weight center, emphasizing the regions with strong local contrast:
[0163]
[0164] The convolutional kernel for aging feature detection analyzes the global texture and designs a large-sized convolutional kernel Klarge, whose central weighted distribution adapts to the cable texture:
[0165]
[0166] where w i,j is the weight distribution of the convolutional kernel;
[0167] First, based on the generated feature map, through multi-layer convolution and pooling operations, high-level features in the image are extracted. Each layer of convolution captures more abstract and complex features, and the pooling layer can reduce data redundancy and noise. In the deep network, the convolutional layer and the pooling layer usually appear alternately to form a deep feature extraction network.
[0168] Second, after the convolutional layer, an activation function is used to increase the non-linearity of the network, enabling the network to learn more complex feature representations.
[0169] Third, an edge feature extraction method combining contrast enhancement and edge detection is adopted to extract the edge features of cable facilities and defects.
[0170] Finally, using the combined method of frequency domain analysis and texture analysis, extract the microscopic defect features on the surface of cable facilities, and input the extracted features into the deep learning framework for CNN model training.
[0171] S4: Implement real-time detection of cable facility defects through YOLOv8 object detection, optimize the model performance using the attention mechanism, lightweight the model, and perform model training.
[0172] Furthermore, use the YOLOv8 algorithm to perform real-time detection of cable facility defects in the image, introduce strategies such as the attention mechanism and feature fusion to improve the model's ability to extract defect features.
[0173] Adopt multi-joint techniques such as pruning, quantization, and knowledge distillation to compress and accelerate the model, reduce the model's computational complexity and resource consumption. Design lightweight convolutional blocks and model architectures to adapt to the limited hardware resources in the tunnel.
[0174] Use the sparsification pruning method to trim the model weight matrix:
[0175]
[0176] Compress the 32-bit floating-point weight to the lowest precision through quantization:
[0177]
[0178] Among them, λ is the pruning threshold, k is the quantization bit number, W min and W max are the weight ranges;
[0179] It should also be noted that input the cable facility image to be detected into the optimized YOLOv8 model for training. The input image is divided into grid regions of a fixed size (such as S x S grids), each grid region predicts a fixed number of bounding boxes (such as predicting B bounding boxes for each grid), and calculate the position (center point coordinates x, y), size (width w and height h) and confidence score of each bounding box. The confidence score represents the probability that there is an object in the bounding box. In addition to the prediction of the bounding box, each grid region also predicts the object category it contains. This is achieved through a classifier, performing multi-classification prediction on each grid region and outputting the probability of each category.
[0180] After training is completed, the model is optimized to improve its accuracy and robustness. Optimization methods include data augmentation (such as rotation, scaling, flipping, etc.), regularization techniques (such as L1 / L2 regularization), and model pruning. In addition, the confidence threshold and IOU threshold of the model can be adjusted to control the precision and recall rate of the detection results; the model processes the input image in real time and outputs information such as the detected defect type, location, and confidence; for specific defect types, fine classifiers such as SVM and Softmax are designed to improve the recognition accuracy of the model. Techniques such as transfer learning are used to transfer the knowledge of the pre-trained model to the recognition task of specific defect types.
[0181] S5: Remove redundant detection boxes using non-maximum suppression and process overlapping detection boxes using a dual combination algorithm.
[0182] It should be noted that the YOLOv8 detection process will generate multiple highly overlapping detection boxes, which point to the same target object. To remove these redundant detection boxes, non-maximum suppression and confidence-based screening methods are used to reduce redundant detection boxes.
[0183] Remove redundant detection boxes using non-maximum suppression, calculate the intersection over union (IoU), and define two detection boxes B 1 and B 2 :
[0184]
[0185] where ∩ represents the intersection of the detection boxes, ∪ represents the union of the detection boxes, IoU is the intersection over union, and after calculating the intersection over union, confidence screening is performed. The detection boxes are sorted in descending order of confidence, and a confidence threshold T c :
[0186] Filter conf ={B i ∈D|Conf(B i )>T c}
[0187] Through NMS suppression, for each box B i , calculate its intersection over union with the remaining boxes and keep the boxes with an intersection over union less than the set threshold T IoU :
[0188] Keep(B i )={B j ∈Filter conf |IoU(B i , B j )<T IoU}
[0189] The final set of retained detection boxes is:
[0190]
[0191] Even after NMS processing, there may still be some overlapping detection boxes, especially when the target objects are large or have irregular shapes. A dual-combination algorithm that combines the weighted average method and the IOU fusion method is used to solve this problem.
[0192] The dual-combination algorithm combines the weighted average method and the IOU fusion method to merge overlapping detection boxes, performs a weighted average on the overlapping detection boxes to obtain a new detection box. Given n overlapping detection boxes {B i} and their corresponding confidence levels {Conf(B i ), the center coordinates of the new box are:
[0193]
[0194] where x c,i and y c,i are the center coordinates of the i-th detection box respectively;
[0195] The calculation formulas for the width w and height h of the new box are:
[0196]
[0197] Calculate the IOU of the overlapping detection boxes and perform fusion based on the IOU value to obtain a more accurate detection box.
[0198] S6: Mark the specific location and type of the defect, display the confidence level, generate a visualization report, and output it in multiple formats.
[0199] It should be noted that the specific location of the defect is marked in the image using a rectangular box or a circle. According to the classification results of YOLOv8, different colors are used to distinguish and mark different types of defects, and the confidence level of each detection box is displayed. All detected defects, including the position coordinates, type, and confidence level, are summarized in a list form. The defects with a confidence level higher than the set threshold are highlighted in red;
[0200] The post-processed detection results are automatically converted into a visualization report through OpenCV and a report generation tool. After the automated report generation, manual review and modification are carried out, and the visualization report is output in multiple formats such as images, PDFs, and HTMLs.
[0201] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
[0202] Example 2, an embodiment of the present invention, provides a method for extracting and identifying defect features of cable facilities in tunnels based on YOLOv8. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.
[0203] Experimental process and results
[0204] 1. Dataset preparation: A dataset of cable facility images in tunnels was collected, including the following data: the number of original images was 5000; the image resolution was 1920×1080; the annotation information was manually annotated defect areas, including three types of defects: cracks, damages, and corrosion, with a total of approximately 10000 annotated defect areas.
[0205] Sample division:
[0206] The training set was 70% (3500 images); the validation set was 20% (1000 images); the test set was 10% (500 images).
[0207] 2. Model training
[0208] Training settings: The learning rate was 0.001; the Batch Size was 16; the optimizer was Adam; the number of training epochs was 500.
[0209] 3. Testing phase
[0210] Test results:
[0211] The number of detected bounding boxes was a total of 1250 target defects, the detection accuracy was 94.8%, the detection recall rate was 92.5%, the mean intersection over union (mIoU) was 85.2%, the confidence threshold was set to 0.5, and all detection results below this threshold were filtered.
[0212] 4. Experimental scenario 1: Standard lighting conditions, and the test data was from a simulated tunnel section with good lighting. 100 defects were detected, among which:
[0213] Successfully detected: 95;
[0214] Missed detections: 5;
[0215] False alarms: 2.
[0216] Experimental scenario 2: Weak light and noise environment, simulating the environment of weak light and noise interference in the tunnel, 80 defects were detected, among which:
[0217] Successfully detected: 72;
[0218] Missed detections: 8;
[0219] False alarms: 4.
[0220] For this reason, a preprocessing operation of adaptive illumination correction is added, and the detection performance is improved as follows:
[0221] Successful detections: 78;
[0222] Missed detections: 2;
[0223] False alarms: 3.
[0224] The final results are shown in Table 1:
[0225] Table 1 Summary of Experimental Metrics
[0226]
[0227]
[0228] Example 3, the third example of the present invention, which is different from the previous two examples in that:
[0229] If the described function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical disks, etc., which can store program codes.
[0230] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.
[0231] More specific examples (nonexhaustive list) of computer-readable media include the following: electrical connections (electronic devices) having one or more wirings, portable computer diskettes (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber devices, and portable compact disc read-only memory (CDROM). Additionally, the computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then stored in a computer memory.
[0232] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0233] Example 4, referring to Figure 5 , is the fourth embodiment of the present invention. This embodiment provides a system for extracting and identifying defect features of cable facilities in a tunnel based on YOLOv8, including a data acquisition module 10, a data preprocessing module 20, a feature extraction module 30, a YOLOv8 object detection module 40, a post-processing module 50, and a visualization module 60;
[0234] The data acquisition module 10 takes all-round pictures in the tunnel through a high-resolution camera carried by an inspection robot or an orbital mobile system, and real-time collects image and video data of the cable facilities, and transmits the collected data together with the location information to the data preprocessing module to provide an original data source for subsequent processing.
[0235] The data preprocessing module 20 receives the image and video data transmitted by the data acquisition module 10, performs preprocessing operations such as denoising, contrast enhancement, cropping, and normalization to optimize the image quality, and then passes the processed data to the feature extraction module 30 to provide high-quality input data for feature extraction;
[0236] The feature extraction module 30 receives the preprocessed image data, extracts features through the designed convolutional neural network, and uses specific convolutional kernels and multi-layer convolutional pooling operations to extract the defect features of the cable facilities, and outputs the feature data to the YOLOv8 object detection module 40.
[0237] The YOLOv8 object detection module 40 receives the feature data output by the feature extraction module 30, performs real-time detection using the YOLOv8 algorithm, identifies the defects of the cable facilities, and improves the detection speed and accuracy through model lightweight technology, and transmits the detection results to the post-processing module 50.
[0238] The post-processing module 50 receives the detection results of the YOLOv8 object detection module 40, performs non-maximum suppression and double-combination algorithm processing, removes redundant detection frames, optimizes the detection results, ensures that each defect is accurately and uniquely marked, and then transmits the optimized results to the visualization module 60.
[0239] The visualization module 60 receives the optimized results of the post-processing module 50, marks the specific positions and types of the defects, displays the confidence level, generates a visualization report, and finally outputs the report in multiple formats such as images, PDFs, and HTMLs for the inspection personnel to analyze and make decisions.
[0240] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not restrictive. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.
Claims
1. A method for extracting and identifying cable facility defects in tunnels based on YOLOv8, characterized by: include, Use a camera to shoot the cable facilities in the tunnel, use an automatic mobile platform to collect data, and record the image location information; Preprocess the collected data and images by denoising, contrast enhancement, cropping and normalization; Use convolutional neural networks to process preprocessed images, extract features through convolution operations, design specific convolution kernels, use multi-layer convolution and pooling, and use activation functions to enhance nonlinear feature representation; Real-time detection of cable facility defects is achieved through YOLOv8 target detection, and the attention mechanism is used to optimize model performance, lightweight the model, and perform model training; Non-maximum suppression is used to remove redundant detection frames, and a dual combination algorithm is used to process overlapping detection frames; Mark the specific location and type of defects, display the confidence level, generate visual reports, and output to multiple formats.
2. The method for extracting and identifying cable facility defects in tunnels based on YOLOv8 as claimed in claim 1, characterized in that: The data collection includes photographing the cable facilities in the tunnel using an industrial-grade high-resolution camera optimized for low-light environments, the camera being equipped with customized lighting equipment; The low-light environment optimization requires that the camera has a minimum illumination sensing capability of ≥0.01 lux and a wide dynamic range function, an image resolution of ≥1080p, a video recording frame rate of ≥30fps, and uses a lens with an adjustable focal length; Use high-definition cameras to continuously monitor the cable facilities in the tunnel and record video data; The collection method uses an automatic mobile collection platform including a patrol robot or a track mobile system to collect data: The inspection robot is equipped with a camera, which uses path planning technology to capture full coverage of the tunnel. During the acquisition process, it combines the inertial navigation system and optical SLAM technology to record the location information of each frame of the image and perform real-time data preprocessing while acquiring.
3. The method for extracting and identifying cable facility defects in tunnels based on YOLOv8 as claimed in claim 2, characterized in that: The preprocessing includes preprocessing the collected data, including denoising, contrast enhancement, cropping, and normalization; The denoising adopts a joint denoising algorithm of Gaussian noise removal, salt and pepper noise removal, mean filtering, and wavelet transform denoising to denoise the image and video data, uses wavelet transform to remove high-frequency interference noise, eliminates salt and pepper noise through median filtering, uses Gaussian filtering for global smoothing, and determines the best joint denoising strategy by cross-validating the signal-to-noise ratio and structural similarity index of different algorithm combinations; The contrast enhancement is performed by combining histogram equalization and Retinex theory to perform contrast enhancement processing on the image; The cropping is to crop the image and video data to remove irrelevant background information and retain the cable facilities and defective parts; Secondary preprocessing operations on image and video data through adaptive illumination correction include image smoothing, sharpening, and color correction; The global brightness value L and brightness distribution characteristics of the calculated image are normalized using the brightness mean and standard deviation. Assume that the input image is I(x, y), and its brightness component is I L (x,y): Among them, M and N are the width and height of the image respectively; Calculate the brightness standard deviation: Adjust the brightness distribution to the target range by normalization [L min ,L max ]: Adaptive illumination correction is performed by combining local histogram equalization with an illumination offset model to improve local area brightness and contrast. The image is divided into multiple local areas, and the local illumination offset is calculated for each area: Where, ΔL i is the illumination offset of the i-th local area, and n is the number of local pixels; According to the light offset ΔL i Define the adaptive lighting correction function: I" L (x,y)=I′ L (x,y)-α·△L i Among them, α is the correction coefficient, and local histogram equalization is performed on the corrected image to smooth the lighting transition and enhance the details: Among them, CDF is the cumulative distribution function of pixel values.
4. The method for extracting and identifying cable facility defect features in tunnels based on YOLOv8 as claimed in claim 3, characterized in that: The convolutional neural network processes the preprocessed image, including taking the preprocessed image I(x, y) as the input of the convolutional neural network, and the convolutional neural network performs local perception and feature extraction on the input image through multiple convolution kernels, each convolution kernel K(m, n) slides on the image, calculates the weighted sum of the local area, and generates a feature map F(u, v): According to the defect characteristics of cable facilities, convolution kernels are designed for each defect type: The crack feature detection convolution kernel aims to extract edge information and uses a gradient-based convolution kernel: Corrosion and damage detection convolution kernel, design a small size convolution kernel Ksmall: Aging feature detection convolution kernel, analyze the global texture, and design a large-size convolution kernel Klarge: Among them, w i,j is the weight distribution of the convolution kernel; According to the generated feature map, high-level features in the image are extracted through multi-layer convolution and pooling operations. After the convolution layer, the activation function is used to increase the nonlinearity of the network. The edge features of cable facilities and defects are extracted by combining contrast enhancement and edge detection. The characteristics of tiny defects on the surface of cable facilities are extracted by combining frequency domain analysis and texture analysis. The extracted features are input into the deep learning framework for CNN model training.
5. The method for extracting and identifying cable facility defect features in tunnels based on YOLOv8 as claimed in claim 4, characterized in that: The YOLOv8 target detection includes real-time detection of defects of cable facilities in images by using the YOLOv8 algorithm, compression and acceleration of the model by using multiple joint technologies of pruning, quantization, and knowledge distillation, and pruning of the model weight matrix by using the sparse pruning method: The 32-bit floating point weights are compressed to the lowest precision by quantization: Among them, λ is the pruning threshold, k is the number of quantization bits, and W min and W max is the weight range; The cable facility image to be inspected is input into the optimized YOLOv8 model for training. The input image is divided into grid areas of fixed size. A fixed number of bounding boxes are predicted for each grid area, and the position, size and confidence score of each bounding box are calculated. Each grid area also predicts the category of objects contained in the area. After training, the model is optimized including data enhancement, regularization technology and model pruning.
6. The method for extracting and identifying cable facility defect features in tunnels based on YOLOv8 as claimed in claim 5, characterized in that: The removing of redundant detection frames includes removing redundant detection frames by using non-maximum suppression, calculating intersection-over-union ratio, and defining two detection frames B1 and B2: Among them, ∩ represents the intersection of the detection boxes, ∪ represents the union of the detection boxes, and IoU is the intersection over union ratio. After calculating the intersection over union ratio, confidence screening is performed and the detection boxes are sorted from high to low according to their confidence. The confidence threshold T is set. c : Filter conf ={B i ∈D|Conf(B i )>T c } Through NMS suppression, for each box B i , calculate the intersection-and-union ratio between it and the remaining boxes, and retain the boxes with an intersection-and-union ratio less than the set threshold T IoU The box: Keep(B i )={B j ∈Filter conf [IoU(B i ,B j )<T IoU } The final set of retained detection frames is: The dual combination algorithm combines the overlapping detection frames by weighted average method and IOU fusion method, and performs weighted average on the overlapping detection frames to obtain a new detection frame. It is specified that n overlapping detection frames {B i } and the corresponding confidence {Conf(B i )}, the center coordinates of the new frame are: Among them, x c ,i and y c ,i are the center coordinates of the i-th detection box; The width w and height h of the new box are calculated as follows: Calculate the IOU of overlapping detection boxes and fuse them based on the IOU value to get a more accurate detection box.
7. The method for extracting and identifying cable facility defects in tunnels based on YOLOv8 as claimed in claim 6, characterized in that: The visualization report includes marking the specific location of the defect in the image, using a rectangular frame or a circle to mark it, using different colors to distinguish and mark different types of defects according to the classification results of YOLOv8, and displaying the confidence of each detection frame, summarizing all detected defects including location coordinates, type, and confidence in a list form, and highlighting defects with a confidence higher than a set threshold in red; The post-processed inspection results are automatically converted into visual reports through OpenCV and report generation tools. After the report is automatically generated, it is manually reviewed and modified, and the visual report is output in multiple formats such as image, PDF, and HTML.
8. A system using the method for extracting and identifying cable facility defect features in a tunnel based on YOLOv8 as claimed in any one of claims 1 to 7, characterized in that: Including data acquisition module, data preprocessing module, feature extraction module, YOLOv8 target detection module, post-processing module, and visualization module; The data acquisition module is responsible for collecting images and video data of the cable facilities in the tunnel through a high-resolution camera carried by the automatic mobile platform, and recording image location information; The data preprocessing module receives the data from the acquisition module, performs denoising, contrast enhancement, cropping, and normalization operations, optimizes image quality, and prepares for feature extraction; The feature extraction module uses a convolutional neural network to process the preprocessed image and extracts the defect features of the cable facilities by designing a specific convolution kernel and multi-layer convolution pooling operations; The YOLOv8 target detection module uses the YOLOv8 algorithm to perform real-time detection on the features output by the feature extraction module, identifies defects in the cable facilities, and optimizes performance using model lightweight technology; The post-processing module performs non-maximum suppression and dual combination algorithm processing on the results of YOLOv8 detection, removes redundant detection frames, and optimizes the detection results; The visualization module marks the defect location and type, generates a visualization report including confidence levels, and outputs the results in multiple formats.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for extracting and identifying defect features of cable facilities in tunnels based on YOLOv8 as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for extracting and identifying defect features of cable facilities in tunnels based on YOLOv8 as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Robot inspection method for battery finished product quality detection and robot
CN120721748A
Intelligent classification garbage can, using method and identification model establishing method
CN120922493A
Lightning arrester operation state identification method based on online monitoring data
CN121164793A
Road surface defect detection method based on improved YOLOv8 model
CN121527082A
Double-moving-target defect detection method and system
CN121883434A