Coal mine vertical shaft crack detection method based on improved YOLOV8n

By improving the YOLOV8n model, combined with Ghost Module, efficient channel attention mechanism and Diverse Branch Block technology, the problems of poor robustness and low detection accuracy in underground crack detection of coal mines are solved, and more efficient and accurate crack detection is achieved.

CN119580096APending Publication Date: 2025-03-07XUZHOU DAHENG MEASUREMENT & CONTROL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411667620.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The prior art has problems such as poor robustness, low detection accuracy and high model complexity in underground crack detection of coal mines, making it difficult to achieve high accuracy and lightweight detection in harsh environments.

Method used

Using the improved YOLOV8n model, the model structure and training process are optimized by introducing technologies such as Ghost Module, efficient channel attention mechanism and Diverse Branch Block, and the model's identification ability and detection accuracy of cracks are improved.

Benefits of technology

The accuracy and efficiency of crack detection in coal mine walls is significantly improved, the detection rate of small target leakage is reduced, the mAP value of comprehensive indicators is improved, the number of model parameters and calculations is reduced, and the detection accuracy and inference speed are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580096A_ABST
    Figure CN119580096A_ABST
Patent Text Reader

Abstract

The invention discloses a coal mine vertical shaft crack detection method based on improved YOLOV8n. A shaft inspection robot is used for collecting a shaft wall image; performing data preprocessing on the image acquired by the inspection robot; labeling the preprocessed image crack by using LabelImg labeling software, and converting the image crack into a file in a VOC format for training; image data enhancement is carried out by using methods of image overturning, cutting, Mosaic and the like; a YOLOV8n model is pre-trained on the public data set SDNET2018, and model trunk parameters are obtained; an improved YOLOV8n model is built, and the main parameters of the pre-trained YOLOV8n model are migrated to the improved YOLOV8n model; the enhanced well wall crack image is input into the improved YOLOV8n model for training; and performing well wall crack detection by using the trained model to obtain a detection result. According to the invention, the ECAGCBS module is combined, so that network layer parameters are reduced; and secondly, a c2f module is optimized, and an ECAGCBS module is combined with a more efficient DBBBottleneck, so that network parameters are further reduced, the reasoning speed of the whole model is increased, and the detection precision of the network is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image visual recognition and detection, and specifically is a coal mine shaft crack detection method based on improved YOLOV8n. Background Art

[0002] During coal mining, vertical shafts are used to transport personnel, equipment, and materials, representing the "throat" of mine transportation. With the increasing intensity of coal mining, the depth of coal mine shafts has also continued to increase, which directly leads to a gradual increase in the pressure on the coal mine shafts, greatly affecting their stability and easily causing shaft damage. Shaft damage accidents occur with changes in surrounding geological conditions and the increase in shaft age. They are cumulative and are characterized by shaft deformation, cracks in the shaft walls, and deformation of internal ancillary equipment.

[0003] At present, the main method of monitoring the health of vertical shafts is still manual inspection, and the inspection work has the following main problems: (1) The cage descends at a speed of 0.3m / s, which takes a long time; (2) Due to the limitations of human vision, some minor deformation and damage of the shaft cannot be discovered in time; (3) During the inspection process, there may be problems such as foreign objects falling, and there are certain safety hazards in the work of the inspectors. (4) Generally, manual inspections are one-time and cannot be carried out anytime and anywhere. It is impossible to continuously monitor the shaft and cannot detect defects inside the shaft in time. In summary, it is urgent to carry out research on unmanned precise detection methods for shaft wall cracks to ensure the reliability of the vertical shaft and thus ensure the safety of the coal mine production system.

[0004] Traditional crack detection algorithms are mostly based on manual inspection or image segmentation techniques that extract features to identify cracks. However, in complex and changing environments, these algorithms are unable to effectively extract crack features, resulting in poor detection robustness. With the advancement of deep learning, numerous target detection technologies, such as the YOLOX series, R-CNN, FastR-CNN, FasterR-CNN, and U-net, are being used for crack detection in roads and bridges. However, the harsh underground environment of coal mines, characterized by dim lighting, low crack contrast, and high dust concentrations, requires not only highly accurate crack detection models but also a lightweight design to advance intelligent shaft wall crack detection. Summary of the Invention

[0005] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a coal mine shaft crack detection method based on improved YOLOV8n to at least partially solve the above technical problems.

[0006] The technical solution adopted by the present invention is as follows:

[0007] The present invention proposes a coal mine shaft crack detection method based on improved YOLOV8n, which includes the following steps:

[0008] Step 1: The coal mine shaft inspection robot collects shaft wall images: The inspection robot moves with the shaft cage, collects shaft wall videos at different positions, sizes, and backgrounds, and segments the collected videos to generate shaft wall image data;

[0009] Step 2: Image preprocessing: Screen the images in step 1 and manually remove images with poor image quality;

[0010] Step 3: Create an image dataset: annotate the images in step 2 and expand the dataset using image enhancement techniques.

[0011] Step 4: Pre-train the YOLOV8n model: Pre-train the YOLOV8n model on a public dataset to obtain the model backbone parameters;

[0012] Step 5: Build an improved YOLOV8n model: Improve the structure of the YOLOV8n model;

[0013] Step 6: Train the improved YOLOV8n model: Migrate the YOLOV8n model backbone parameters obtained in step 4 to the improved YOLOV8n model, and use the dataset obtained in step 3 to train the model.

[0014] Step 7: Target detection: Use the improved YOLOV8n model to detect cracks in the shaft wall of the coal mine shaft and obtain the shaft wall crack image detection results.

[0015] In one embodiment of the present invention, the pre-processing of the wellbore fracture image in step 2 includes the following sub-steps:

[0016] Step 2.1: The wellbore image data collected by the vertical well inspection robot was screened to obtain a total of 2,860 wellbore images at different positions, sizes, and backgrounds, including 2,232 images with cracks and 628 normal images.

[0017] In one embodiment of the present invention, the step 3 of preparing the image dataset includes the following sub-steps:

[0018] Step 3.1: Use LabelImg annotation software to annotate the preprocessed image, and create the corresponding XML format file to generate a VOC format dataset;

[0019] Step 3.2: Use image flipping, cropping, mosaic and other methods to perform image data enhancement and expand the data sample to 11,440 images;

[0020] Step 3.3: Divide the expanded dataset into training set and test set in a ratio of 8:2.

[0021] In one embodiment of the present invention, the pre-training YOLOv8n model in step 4 includes the following sub-steps:

[0022] Step 4.1: Create a YOLOV8n model;

[0023] Step 4.2: Import the SDNET2018 dataset and divide it into training and test sets in a ratio of 8:2.

[0024] Step 4.3: Use the training set to train the model and the test set to test the model to obtain the model backbone parameters.

[0025] In one embodiment of the present invention, improving the structure of the YOLOV8n model in step 5 includes the following sub-steps:

[0026] Step 5.1: Introduce the Ghost Module (GM) and the Efficient Channel Attention (ECA) mechanism to generate the ECA_GCBS module;

[0027] Step 5.2: Introduce Diverse Branch Block (DBB) into Bottleneck to generate a new DBB_Bottleneck module;

[0028] Step 5.3: Combine the ECA_GCBS module with the DBB_Bottleneck module to generate a new DBB_c2f module.

[0029] In one embodiment of the present invention, generating the ECA_GCBS module in step 5.1 includes the following sub-steps:

[0030] Step 5.1.1: First, the input feature X is calculated using a common two-dimensional 11 convolution to obtain F1. The purpose is to retain the original feature information of the characteristic map. The process is shown in Formula 1:

[0031] F1=Conv 1×1 (X) (1)

[0032] Among them, Conv 1×1 (·) represents a 1×1 convolution operation;

[0033] Step 5.1.2: Input the convolutional feature map F1 into the Ghost Module to obtain the feature F2. The purpose is to reduce the operation parameters of the model. The operation process is shown in Formula 2:

[0034] F2=GM(F1) (2)

[0035] Where GM(·) represents the Ghost module operation;

[0036] Step 5.1.3: Input the feature map F2 after the two convolution operations into the ECA module to obtain the output F3 of the ECA_GCBS module. The purpose is to obtain richer feature information. The operation process is shown in Formula 3:

[0037] F3=ECA(F2) (3)

[0038] Among them, ECA(·) represents the efficient channel attention operation module operation;

[0039] Step 5.1.4: Replace most of the CBS modules in the YOLOV8n model with the ECA_GCBS module to reduce the model parameters and make the model pay more attention to crack information.

[0040] In one embodiment of the present invention, the step 5.2 of introducing the DBB module into the Bottleneck module comprises the following sub-steps:

[0041] Step 5.2.1: Input the original feature map X into the DBB module to obtain the feature map F1. The operation flow is shown in Formula 4:

[0042] F1=DBB(X) (4)

[0043] Wherein, DBB(·) represents the DBB module operation;

[0044] Step 5.2.2: Input F1 obtained in step 5.2.1 into the DBB module again to obtain the feature map output F2. The operation flow is shown in Formula 5:

[0045] F2=DBB(F1) (5)

[0046] Wherein, DBB(·) represents the DBB module operation;

[0047] Step 5.2.3: Perform a residual connection between F2 obtained in step 5.2.2 and the original feature map X to obtain the DBB_Bottleneck output F3. The operation flow is shown in Formula 6:

[0048]

[0049] in, Represents element-wise addition operation.

[0050] In one embodiment of the present invention, the sub-steps of generating a new DBB_c2f module in step 5.3 are:

[0051] Step 5.3.1: Input the feature map X into the ECA_GCBS module, and output F1. The purpose is to mine the shallow features of the image. The operation process is shown in Formula 7:

[0052] F1=ECA_GCBS(X)(7)

[0053] Wherein, ECA_GCBS(·) represents the ECA_GCBS module operation.

[0054] Step 5.3.2: Split feature F1 evenly along the channel direction. The split features are F2 and F3, and the number of channels is half of that of F1. The calculation process is shown in Formula 8:

[0055] F2, F3=Split(F1) (8)

[0056] Among them, Split(·) means splitting the feature map in the channel direction;

[0057] Step 5.3.3: Input feature F3 into the DBB_Bottleneck module. The number of DBB_Bottlenecks is generally 3, 6, or 9. Here, the number is set to 3. The calculation process is shown in Formula 9:

[0058] DF i =DBB_Bottleneck(DF i-1 ) (9)

[0059] Among them, DBB_Bottleneck(·) represents the DBB_Bottleneck operation of segmenting the feature map in the channel direction, i=1,2,3 represents the i-th DBB_Bottleneck operation, where DF0=F3.

[0060] Step 5.3.4: Fuse the output of each DBB_Bottleneck with F2. The operation flow is shown in Formula 10:

[0061] F4=Concat(F2,DF1,DF2,DF3,DF3) (10)

[0062] Among them, Concat(·) represents the feature fusion operation.

[0063] Step 5.3.5: Finally, the feature F4 obtained in step 5.3.4 is input into the ECA_GCBS module again to obtain the output F5 of the DBB_c2f module. The calculation process is shown in formula 11:

[0064] F5=ECA_GCBS(F4) (11)

[0065] Wherein, ECA_GCBS(·) represents the ECA_GCBS module operation.

[0066] In one embodiment of the present invention, training the target detection network model using the training set in step 6 includes the following sub-steps:

[0067] Step 6.1: Use Precision (P), Recall (R), Average Precision (AP), and Mean Average Precision (mAP) as model evaluation indicators. Among them, mAP50 and mAP50:95 are selected to measure the performance of the model in all categories. mAP50 represents the average accuracy of the detection model when the IoU is set to 0.50, and mAP50:95 represents the average accuracy of the detection model when the IoU is set to 0.50-0.95.

[0068] Step 6.2: Create the test set file path, including the GT file path and the corresponding label file path;

[0069] Step 6.3: Migrate the main parameters of the YOLOv8n model trained in step 4 to the improved YOLOv8n model backbone obtained in step 5, and train it using the training set. The image input size is set to 640×640, the initial learning rate is 0.0001, the learning rate adjustment strategy selects the cosine return algorithm, the optimizer selects the SGD optimizer, the image input batch size is 8, and the training cycle is 300.

[0070] In one embodiment of the present invention, obtaining the wellbore crack detection result in step 7 includes the following sub-steps:

[0071] Step 7.1: Deploy the optimal network weights of the improved YOLOV8n model obtained in step 6 to the wellbore inspection robot server;

[0072] Step 7.2: The inspection robot sends the image of the well wall to be inspected to the server for crack detection to determine whether there are cracks on the well wall. If there are cracks, the result is saved.

[0073] Beneficial effects of the present invention:

[0074] The present invention pre-learns network weight parameters through transfer learning, thereby improving detection accuracy. It proposes an ECA_GCBS module that combines ordinary convolution, Ghost Module, and efficient channel attention (Efficient Channel Attention) mechanism, which reduces network layer parameters and enhances the model's ability to identify cracks. The ECA_GCBS module is combined with the more efficient DBB_Bottleneck to generate a new c2f module DBB_c2f, which further reduces network parameters, accelerates the inference speed of the entire model, and improves the network's detection accuracy.

[0075] The proposed model's backbone network uses an improved ECA_GCBS module instead of the traditional convolutional module, effectively reducing the number of network parameters and floating-point operations while also facilitating the extraction of shallow image structures. The improved DBB_c2f module further reduces the number of network parameters. In the Neck network, this not only accelerates network inference but also helps extract structural information about cracks, mitigating the problem of small targets being easily missed during target detection. When performing shaft wall crack detection in the complex environment of a coal mine, the improved YOLOV8n model, compared to the original YOLOV8n model, reduced the missed detection rate of small targets from 28% in the basic network to 16%, significantly improving the detection accuracy of small targets. The comprehensive mAP value increased from 76.5% to 84.2%, reducing the number of network model parameters and floating-point operations by 38.9% and 36.2%, respectively, while also improving both Precision and Recall.

[0076] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0078] Figure 1 This is a flow chart of a coal mine shaft crack detection method based on improved YOLOV8n.

[0079] Figure 2 This is the overall network structure diagram of the improved YOLOV8n of the present invention;

[0080] Figure 3 It is the ECA_GCBS module of the present invention;

[0081] Figure 4 The DBB_Bottleneck module of the present invention;

[0082] Figure 5 This is the DBB_c2f module in the present invention. DETAILED DESCRIPTION

[0083] The following describes embodiments of the present invention in detail, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and are not to be construed as limiting the present invention.

[0084] The following describes a coal mine shaft crack detection method based on improved YOLOV8n according to an embodiment of the present invention with reference to the accompanying drawings.

[0085] like Figures 1 to 5 As shown, an embodiment of the present invention provides a coal mine shaft crack detection method based on improved YOLOV8n, comprising the following steps:

[0086] Step 1: The coal mine shaft inspection robot collects shaft wall images: The inspection robot moves with the shaft cage, collects shaft wall videos at different positions, sizes, and backgrounds, and segments the collected videos to generate shaft wall image data;

[0087] Step 2: Image preprocessing: Screen the images in step 1 and manually remove images with poor image quality;

[0088] Step 3: Create an image dataset: annotate the images in step 2 and expand the dataset using image enhancement techniques.

[0089] Step 4: Pre-train the YOLOV8n model: Pre-train the YOLOV8n model on a public dataset to obtain the model backbone parameters;

[0090] Step 5: Build an improved YOLOV8n model: Improve the structure of the YOLOV8n model;

[0091] Step 6: Train the improved YOLOV8n model: Migrate the YOLOV8n model backbone parameters obtained in step 4 to the improved YOLOV8n model, and use the dataset obtained in step 3 to train the model.

[0092] Step 7: Target detection: Use the improved YOLOV8n model to detect cracks in the shaft wall of the coal mine shaft and obtain the shaft wall crack image detection results.

[0093] In one embodiment of the present invention, the pre-processing of the wellbore fracture image in step 2 includes the following sub-steps:

[0094] Step 2.1: The wellbore image data collected by the vertical well inspection robot was screened to obtain a total of 2,860 wellbore images at different positions, sizes, and backgrounds, including 2,232 images with cracks and 628 normal images.

[0095] In one embodiment of the present invention, the step 3 of preparing the image dataset includes the following sub-steps:

[0096] Step 3.1: Use LabelImg annotation software to annotate the preprocessed image, and create the corresponding XML format file to generate a VOC format dataset;

[0097] Step 3.2: Use image flipping, cropping, mosaic and other methods to perform image data enhancement and expand the data sample to 11,440 images;

[0098] Step 3.3: Divide the expanded dataset into training set and test set in a ratio of 8:2.

[0099] In one embodiment of the present invention, the pre-training YOLOv8n model in step 4 includes the following sub-steps:

[0100] Step 4.1: Create a YOLOV8n model;

[0101] Step 4.2: Import the SDNET2018 dataset and divide it into training and test sets in a ratio of 8:2.

[0102] Step 4.3: Use the training set to train the model and the test set to test the model to obtain the model backbone parameters.

[0103] In one embodiment of the present invention, improving the structure of the YOLOV8n model in step 5 includes the following sub-steps:

[0104] Step 5.1: Introduce the Ghost Module (GM) and the Efficient Channel Attention (ECA) mechanism to generate the ECA_GCBS module;

[0105] Step 5.2: Introduce Diverse Branch Block (DBB) into Bottleneck to generate a new DBB_Bottleneck module;

[0106] Step 5.3: Combine the ECA_GCBS module with the DBB_Bottleneck module to generate a new DBB_c2f module.

[0107] In one embodiment of the present invention, generating the ECA_GCBS module in step 5.1 includes the following sub-steps:

[0108] Step 5.1.1: First, the input feature X is calculated using a common two-dimensional 11 convolution to obtain F1. The purpose is to retain the original feature information of the characteristic map. The process is shown in Formula 1:

[0109] F1=Conv 1×1 (X) (1)

[0110] Among them, Conv 1×1 (·) represents a 1×1 convolution operation;

[0111] Step 5.1.2: Input the convolutional feature map F1 into the Ghost Module to obtain the feature F2. The purpose is to reduce the operation parameters of the model. The operation process is shown in Formula 2:

[0112] F2=GM(F1) (2)

[0113] Where GM(·) represents the Ghost module operation;

[0114] Step 5.1.3: Input the feature map F2 after the two convolution operations into the ECA module to obtain the output F3 of the ECA_GCBS module. The purpose is to obtain richer feature information. The operation process is shown in Formula 3:

[0115] F3=ECA(F2) (3)

[0116] Among them, ECA(·) represents the efficient channel attention operation module operation;

[0117] Step 5.1.4: Replace most of the CBS modules in the YOLOV8n model with the ECA_GCBS module to reduce the model parameters and make the model pay more attention to crack information.

[0118] In one embodiment of the present invention, the step 5.2 of introducing the DBB module into the Bottleneck module comprises the following sub-steps:

[0119] Step 5.2.1: Input the original feature map X into the DBB module to obtain the feature map F1. The operation flow is shown in Formula 4:

[0120] F1=DBB(X) (4)

[0121] Wherein, DBB(·) represents the DBB module operation;

[0122] Step 5.2.2: Input F1 obtained in step 5.2.1 into the DBB module again to obtain the feature map output F2. The operation flow is shown in Formula 5:

[0123] F2=DBB(F1) (5)

[0124] Wherein, DBB(·) represents the DBB module operation;

[0125] Step 5.2.3: Perform a residual connection between F2 obtained in step 5.2.2 and the original feature map X to obtain the DBB_Bottleneck output F3. The operation flow is shown in Formula 6:

[0126]

[0127] in, Represents element-wise addition operation.

[0128] In one embodiment of the present invention, the sub-steps of generating a new DBB_c2f module in step 5.3 are:

[0129] Step 5.3.1: Input the feature map X into the ECA_GCBS module, and output F1. The purpose is to mine the shallow features of the image. The operation process is shown in Formula 7:

[0130] F1=ECA_GCBS(X)(7)

[0131] Wherein, ECA_GCBS(·) represents the ECA_GCBS module operation.

[0132] Step 5.3.2: Split feature F1 evenly along the channel direction. The split features are F2 and F3, and the number of channels is half of that of F1. The calculation process is shown in Formula 8:

[0133] F2, F3=Split(F1) (8)

[0134] Among them, Split(·) means splitting the feature map in the channel direction;

[0135] Step 5.3.3: Input feature F3 into the DBB_Bottleneck module. The number of DBB_Bottlenecks is generally 3, 6, or 9. Here, the number is set to 3. The calculation process is shown in Formula 9:

[0136] DF i =DBB_Bottleneck(DF i-1 ) (9)

[0137] Among them, DBB_Bottleneck(·) represents the DBB_Bottleneck operation of segmenting the feature map in the channel direction, i=1,2,3 represents the i-th DBB_Bottleneck operation, where DF0=F3.

[0138] Step 5.3.4: Fuse the output of each DBB_Bottleneck with F2. The operation flow is shown in Formula 10:

[0139] F4=Concat(F2,DF1,DF2,DF3,DF3) (10)

[0140] Among them, Concat(·) represents the feature fusion operation.

[0141] Step 5.3.5: Finally, the feature F4 obtained in step 5.3.4 is input into the ECA_GCBS module again to obtain the output F5 of the DBB_c2f module. The calculation process is shown in formula 11:

[0142] F5=ECA_GCBS(F4) (11)

[0143] Wherein, ECA_GCBS(·) represents the ECA_GCBS module operation.

[0144] In one embodiment of the present invention, training the target detection network model using the training set in step 6 includes the following sub-steps:

[0145] Step 6.1: Use Precision (P), Recall (R), Average Precision (AP), and Mean Average Precision (mAP) as model evaluation indicators. Among them, mAP50 and mAP50:95 are selected to measure the performance of the model in all categories. mAP50 represents the average accuracy of the detection model when the IoU is set to 0.50, and mAP50:95 represents the average accuracy of the detection model when the IoU is set to 0.50-0.95.

[0146] Step 6.2: Create the test set file path, including the GT file path and the corresponding label file path;

[0147] Step 6.3: Migrate the main parameters of the YOLOv8n model trained in step 4 to the improved YOLOv8n model backbone obtained in step 5, and train it using the training set. The image input size is set to 640×640, the initial learning rate is 0.0001, the learning rate adjustment strategy selects the cosine return algorithm, the optimizer selects the SGD optimizer, the image input batch size is 8, and the training cycle is 300.

[0148] In one embodiment of the present invention, obtaining the wellbore crack detection result in step 7 includes the following sub-steps:

[0149] Step 7.1: Deploy the optimal network weights of the improved YOLOV8n model obtained in step 6 to the wellbore inspection robot server;

[0150] Step 7.2: The inspection robot sends the image of the well wall to be inspected to the server for crack detection to determine whether there are cracks on the well wall. If there are cracks, the result is saved.

[0151] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0152] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

[0153] The present invention and its embodiments are described above. This description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs structures and embodiments similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.

Claims

1. A coal mine shaft crack detection method based on improved YOLOV8n, characterized in that: The following steps are involved: Step 1: The coal mine shaft inspection robot collects shaft wall images: The inspection robot moves with the shaft cage, collects shaft wall videos at different positions, sizes, and backgrounds, and segments the collected videos to generate shaft wall image data; Step 2: Image preprocessing: Screen the images in step 1 and manually remove images with poor image quality; Step 3: Create an image dataset: annotate the images in step 2 and expand the dataset using image enhancement technology; Step 4: Pre-train the YOLOV8n model: Pre-train the YOLOV8n model on a public dataset to obtain the model backbone parameters; Step 5: Build an improved YOLOV8n model: Improve the structure of the YOLOV8n model; Step 6: Train the improved YOLOV8n model: Migrate the backbone parameters of the YOLOV8n model obtained in step 4 to the improved YOLOV8n model, and use the data set obtained in step 3 to train the model; Step 7: Target detection: Use the improved YOLOV8n model to detect the cracks on the shaft wall of the coal mine shaft and obtain the shaft wall crack image detection results.

2. The method for detecting cracks in a coal mine shaft based on improved YOLOV8n according to claim 1, characterized in that: The preprocessing of the wellbore fracture image in step 2 includes the following sub-steps: Step 2.1: The wellbore image data collected by the vertical well inspection robot were screened to obtain a total of 2860 wellbore images of different positions, sizes, and backgrounds, including 2232 images with cracks and 628 normal images.

3. The method for detecting cracks in a coal mine shaft based on improved YOLOV8n according to claim 1, characterized in that: The creation of the image dataset in step 3 includes the following sub-steps: Step 3.1: Use LabelImg annotation software to annotate the preprocessed images, and create corresponding XML format files to generate VOC format data sets; Step 3.2: Use image flipping, cropping, Mosaic and other methods to enhance image data and expand the data sample to 11,440 images; Step 3.3: Divide the expanded dataset into training set and test set in a ratio of 8:

2.

4. The method for detecting cracks in a coal mine shaft based on improved YOLOV8n according to claim 1, characterized in that: The pre-trained YOLOV8n model in step 4 includes the following sub-steps: Step 4.1: Create a YOLOV8n model; Step 4.2: Import the SDNET2018 dataset and divide it into training set and test set in a ratio of 8:2; Step 4.3: Use the training set to train the model and the test set to test the model to obtain the model backbone parameters.

5. The method for detecting cracks in a coal mine shaft based on improved YOLOV8n according to claim 1, characterized in that: The structure of improving the YOLOV8n model in step 5 includes the following sub-steps: Step 5.1: Introduce Ghost Module (GM) and the Efficient Channel Attention (ECA) mechanism to generate the ECA_GCBS module; Step 5.2: Introduce Diverse Branch Block (DBB) into Bottleneck to generate a new DBB_Bottleneck module; Step 5.3: Combine the ECA_GCBS module with the DBB_Bottleneck to generate a new DBB_c2f module.

6. The method for detecting cracks in a coal mine shaft based on improved YOLOV8n according to claim 5, characterized in that: The generation of the ECA_GCBS module in step 5.1 includes the following sub-steps: Step 5.1.1: First, the input feature X is operated using ordinary two-dimensional 11 convolution to obtain F1, the purpose is to retain the original feature information of the characteristic feature map, and the process is shown in Formula 1: F1=Conv 1×1 (X) (1) Among them, Conv 1×1 (·) represents a 1×1 convolution operation; Step 5.1.2: Input the convolutional feature map F1 into the Ghost Module to obtain the feature F2. The purpose is to reduce the operation parameters of the model. The operation process is shown in Formula 2: F2=GM(F1) (2) Among them, GM(·) represents the Ghost module operation; Step 5.1.3: Input the feature map F2 after the two convolution operations into the ECA module to obtain the output F3 of the ECA_GCBS module. The purpose is to obtain richer feature information. The operation process is shown in Formula 3: F3=ECA(F2) (3) Among them, ECA(·) represents the efficient channel attention operation module operation; Step 5.1.4: Replace most of the CBS modules in the YOLOV8n model with the ECA_GCBS module to reduce the parameters of the model and make the model pay more attention to crack information.

7. The method for detecting cracks in a coal mine shaft based on improved YOLOV8n according to claim 1, characterized in that: In step 5.2, introducing the DBB module into the Bottleneck module includes the following sub-steps: Step 5.2.1: Input the original feature map X into the DBB module to obtain the feature map F1. The operation flow is shown in Formula 4: F1=DBB(X) (4) Wherein, DBB(·) represents DBB module operation; Step 5.2.2: Input F1 obtained in step 5.2.1 into the DBB module again to obtain the feature map output F2. The calculation process is shown in formula 5: F2=DBB(F1) (5) Wherein, DBB(·) represents DBB module operation; Step 5.2.3: Perform a residual connection between F2 obtained in step 5.2.2 and the original feature map X to obtain the DBB_Bottleneck output F3. The operation flow is shown in Formula 6: in, Represents an element-wise addition operation.

8. The method for detecting cracks in a coal mine shaft based on improved YOLOV8n according to claim 1, characterized in that: Sub-steps for generating a new DBB_c2f module in step 5.3: Step 5.3.1: Input the feature map X into the ECA_GCBS module, and the output is F1. The purpose is to mine the shallow features of the image. The operation process is shown in Formula 7: F1=ECA_GCBS(X)(7) Wherein, ECA_GCBS(·) represents the ECA_GCBS module operation. Step 5.3.2: Split feature F1 evenly along the channel direction. The split features are F2 and F3, and the number of channels is half of that of F1. The calculation process is shown in Formula 8: F2, F3 = Split (F1) (8) Among them, Split(·) means splitting the feature map in the channel direction; Step 5.3.3: Input feature F3 into the DBB_Bottleneck module. The number of DBB_Bottlenecks is generally 3, 6, or 9. Here, the number is set to 3. The calculation process is shown in Formula 9: DF i =DBB_Bottleneck(DF i-1 ) (9) Among them, DBB_Bottleneck(·) represents the DBB_Bottleneck operation of segmenting the feature map in the channel direction, i=1,2,3 represents the i-th DBB_Bottleneck operation, and DF0=F3. Step 5.3.4: Fuse the output of each DBB_Bottleneck with F2. The operation flow is shown in Formula 10: F4=Concat(F2,DF1,DF2,DF3,DF3) (10) Among them, Concat(·) represents the feature fusion operation. Step 5.3.5: Finally, the feature F4 obtained in step 5.3.4 is input into the ECA_GCBS module again to obtain the output F5 of the DBB_c2f module. The calculation process is shown in formula 11: F5=ECA_GCBS(F4) (11) Wherein, ECA_GCBS(·) represents the ECA_GCBS module operation.

9. The method for detecting cracks in a coal mine shaft based on improved YOLOV8n according to claim 1, characterized in that: In step 6, training the target detection network model using the training set includes the following sub-steps: Step 6.1: Use Precision (P), Recall (R), Average Precision (AP) and Mean average Precision (mAP) as model evaluation indicators. Among them, mAP50 and mAP50:95 are selected to measure the performance of the model in all categories. mAP50 represents the average accuracy of the detection model when the IoU is set to 0.50, and mAP50:95 represents the average accuracy of the detection model when the IoU is set to 0.50-0.

95. Step 6.2: Create the test set file path, including the GT file path and the corresponding label file path; Step 6.3: Migrate the main parameters of the YOLOV8n model trained in step 4 to the improved YOLOV8n model backbone obtained in step 5, and use the training set for training. The image input size is set to 640×640, the initial learning rate is 0.0001, the learning rate adjustment strategy selects the cosine return algorithm, the optimizer selects the SGD optimizer, the image input batch size is 8, and the training cycle is 300.

10. The method for detecting cracks in a coal mine shaft based on improved YOLOV8n according to claim 1, characterized in that: Obtaining the wellbore crack detection results in step 7 includes the following sub-steps: Step 7.1: Deploy the optimal network weights of the improved YOLOV8n model obtained in step 6 to the wellbore machine room inspection robot server; Step 7.2: The inspection robot sends the image of the well wall to be inspected to the server for crack detection to determine whether there are cracks on the well wall. If there are cracks, the result is saved.