Gear surface defect detection method and system based on improved CSP-YOLOv8
Patent Information
- Application Number
- CN202610851890.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-09-11
AI Technical Summary
[0006]本发明目的之一在于提供了一种基于改进CSP-YOLOv8的齿轮表面缺陷检测方法及系统,旨在解决现有齿轮表面缺陷检测方法在轻量化部署、边界框定位稳定性及小目标检测精度方面的核心瓶颈,实现从图像采集、特征提取、多尺度融合、缺陷定位到结果输出的全流程高精度实时检测
从轻量化部署、定位精度、小目标检测、综合性能及工程应用多维度完成优化。轻量化层面,C2f_DualConv双路并行卷积结构大幅削减计算开销,保留多尺度特征提取能力,适配边缘设备实时推理,满足工业产线运行节拍。定位优化层面,引入SIoU四维损失约束,矫正预测框方向偏差,杜绝训练震荡与框体游荡问题,稳步提升回归精度与训练稳定性。小目标检测层面,增设P2高分辨率检测头并结合FASFF自适应特征融合,缓解下采样造成的微小缺陷特征丢失,有效降低小尺寸缺陷漏检率。实验验证表明,改进 CSP-YOLOv8整体检测指标全面优于基线模型与多款主流检测算法,综合精度与鲁棒性显著提升。同时该方案兼容性强、集成便捷,参数调试无需改动底层代码,部署灵活,可快速适配工业现场检测场景,具备良好实用价值与产业化应用前景。
Smart Images

Figure CN122736995A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of machine vision and industrial intelligent inspection technology, and in particular to a method and system for detecting surface defects in gears based on an improved CSP-YOLOv8. Background Technology
[0002] As a key transmission component in intelligent manufacturing, gears are widely used in core equipment in fields such as aviation, metallurgy, transportation, agriculture, mining, and engineering machinery. Due to various factors such as process fluctuations, material defects, and machining errors during gear production, the gear surface is prone to surface defects such as tooth breakage, scratches, cracks, and pitting, which seriously affect the overall machine's operating quality and service life. Therefore, comprehensive and efficient defect detection of gears is a crucial step in ensuring product qualification rates.
[0003] Currently, mainstream inspection methods include manual visual inspection, gear meshing inspection, magnetic flux leakage detection, ultrasonic flaw detection, and laser inspection. With the development of machine vision and deep learning technologies, target detection algorithms, represented by YOLOv8, have been gradually introduced into industrial defect detection scenarios. However, when existing algorithms are directly applied to gear tooth surface defect detection, the following three typical defects are still exposed: Defect 1: The feature extraction module has a heavy computational burden, making it difficult to meet the real-time deployment requirements of edge devices. The C2f module in the standard YOLOv8 Neck network uses a large number of Bottleneck stacked structures and standard convolutions. As the network depth increases, the number of model parameters and floating-point operations rises significantly. On edge inference devices with limited computing power (such as industrial embedded controllers), the inference latency is too high, failing to meet the speed requirements of real-time production line detection. On the other hand, excessive compression of model parameters leads to a decrease in feature extraction capabilities and a significant loss of accuracy, making it difficult to reconcile the contradiction between detection accuracy and inference speed.
[0004] Defect 2: The bounding box regression loss function does not model directional bias, leading to unstable convergence paths for predicted boxes. Current YOLOv8 uses the CIoU loss function to guide bounding box regression training. While CIoU introduces center point distance and aspect ratio constraints, it does not explicitly model the directional vector angle information between the predicted and ground truth boxes. This results in a "wandering" phenomenon during training—the predicted boxes converge along non-optimal paths, which is particularly pronounced in scenarios with complex tooth surface defects and variable orientations. This leads to poor positioning stability and low bounding box regression accuracy, ultimately affecting the accurate calibration of defect areas.
[0005] Defect 3: The three-head detection structure severely dilutes the features of small target defects, resulting in a high rate of missed detections for minute defects. Standard YOLOv8 employs a three-layer detection head structure (P3 / P4 / P5), with the highest resolution detection head (P3) having a step size of 8. For minute defects such as cracks and pitting on tooth surfaces, the spatial resolution is significantly reduced after multiple levels of downsampling, leading to severe dilution or even loss of fine-grained features of small targets in the deep network. Furthermore, the fixed fusion weights between feature maps of different scales cannot adaptively adjust based on the input image content, resulting in insufficient multi-scale feature fusion efficiency and a persistently high rate of missed detections for small target defects. Summary of the Invention
[0006] One of the objectives of this invention is to provide a gear surface defect detection method and system based on an improved CSP-YOLOv8, which aims to solve the core bottlenecks of existing gear surface defect detection methods in terms of lightweight deployment, bounding box positioning stability, and small target detection accuracy, and to achieve high-precision real-time detection throughout the entire process from image acquisition, feature extraction, multi-scale fusion, defect localization to result output.
[0007] This invention provides a method for detecting surface defects in gears based on an improved CSP-YOLOv8, comprising: Online acquisition of gear surface images as the images to be inspected; The image to be detected is input into a pre-trained improved CSP-YOLOv8 neural network model to obtain the detection result; The improved CSP-YOLOv8 neural network model involves replacing the standard convolution in the original C2f module with a lightweight DualConv convolution structure in the YOLOv8 Neck network; replacing the bounding box regression loss function in model training with SIoU; and changing the original three-head detection structure to a FASFF_Head four-head detection structure based on an adaptive spatial feature fusion mechanism.
[0008] Preferably, when training the improved CSP-YOLOv8 neural network model, the input image size is set to 640×640 pixels, the number of training rounds is 150, the batch size is 8, and the initial learning rate is 0.01 for end-to-end training. After each round, the evaluation index is calculated on the validation set, and the convergence curve of each evaluation index with the training rounds is monitored to verify whether the model has overfitting or underconvergence. The optimal weight file is saved according to the validation results.
[0009] Preferably, the online acquisition of gear surface images adopts a highly consistent image acquisition platform consisting of a dome integrating sphere light source, a light source controller, a CMOS industrial camera, and a fixed-focus lens.
[0010] Preferably, the detection results include: structured detection results containing defect category labels, bounding box coordinates, and confidence scores, and / or, a visually labeled image with visually labeled boxes superimposed on the original image.
[0011] Preferably, the optimal weights of a pre-trained improved CSP-YOLOv8 neural network model are deployed to an industrial inspection server equipped with an NVIDIA GPU or an edge inference accelerator.
[0012] This invention also provides a gear surface defect detection system based on an improved CSP-YOLOv8, comprising: an online acquisition module and a detection module; wherein, the online acquisition module acquires gear surface images online as images to be detected; the detection module inputs the images to be detected into a pre-trained improved CSP-YOLOv8 neural network model to obtain detection results; The improved CSP-YOLOv8 neural network model involves replacing the standard convolution in the original C2f module with a lightweight DualConv convolution structure in the YOLOv8 Neck network; replacing the bounding box regression loss function in model training with SIoU; and changing the original three-head detection structure to a FASFF_Head four-head detection structure based on an adaptive spatial feature fusion mechanism.
[0013] Preferably, when training the improved CSP-YOLOv8 neural network model, the input image size is set to 640×640 pixels, the number of training rounds is 150, the batch size is 8, and the initial learning rate is 0.01 for end-to-end training. After each round, the evaluation index is calculated on the validation set, and the convergence curve of each evaluation index with the training rounds is monitored to verify whether the model has overfitting or underconvergence. The optimal weight file is saved according to the validation results.
[0014] Preferably, the online acquisition of gear surface images adopts a highly consistent image acquisition platform consisting of a dome integrating sphere light source, a light source controller, a CMOS industrial camera, and a fixed-focus lens.
[0015] Preferably, the detection results include: structured detection results containing defect category labels, bounding box coordinates, and confidence scores, and / or, a visually labeled image with visually labeled boxes superimposed on the original image.
[0016] Preferably, the optimal weights of a pre-trained improved CSP-YOLOv8 neural network model are deployed to an industrial inspection server equipped with an NVIDIA GPU or an edge inference accelerator.
[0017] The beneficial effects of this invention are as follows: The improved CSP-YOLOv8 is optimized across multiple dimensions, including lightweight deployment, positioning accuracy, small target detection, overall performance, and engineering applications. In terms of lightweighting, the C2f_DualConv dual-path parallel convolutional structure significantly reduces computational overhead while retaining multi-scale feature extraction capabilities, adapting to real-time inference on edge devices and meeting the operational pace of industrial production lines. Regarding positioning optimization, a SIoU four-dimensional loss constraint is introduced to correct prediction box orientation deviations, eliminate training oscillations and box wandering issues, and steadily improve regression accuracy and training stability. For small target detection, a P2 high-resolution detection head is added, combined with FASFF adaptive feature fusion, mitigating the loss of minor defect features caused by downsampling and effectively reducing the false negative rate for small-sized defects. Experimental results show that the improved CSP-YOLOv8 outperforms the baseline model and several mainstream detection algorithms in overall detection metrics, with significantly improved comprehensive accuracy and robustness. Furthermore, this solution boasts strong compatibility, convenient integration, parameter tuning without modifying the underlying code, flexible deployment, and rapid adaptation to industrial field inspection scenarios, demonstrating significant practical value and promising prospects for industrial application.
[0018] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.
[0019] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of a gear surface defect detection method based on an improved CSP-YOLOv8 in an embodiment of the present invention; Figure 2 This is a schematic diagram of a gear surface defect detection system based on an improved CSP-YOLOv8 according to an embodiment of the present invention. Detailed Implementation
[0021] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0022] This invention provides a method for detecting surface defects in gears based on an improved CSP-YOLOv8, such as... Figure 1 As shown, it includes: Step 1: Acquire an online image of the gear surface as the image to be inspected; The online acquisition of gear surface images adopts a highly consistent image acquisition platform consisting of a dome integrating sphere light source, a light source controller, a CMOS industrial camera, and a fixed-focus lens; the relative position of the camera and the light source is fixed by an adjustable bracket to ensure that the online acquired surface images have stable illumination uniformity and depth of field consistency. Step 2: Input the image to be detected into the pre-trained improved CSP-YOLOv8 neural network model to obtain the detection results; The improved CSP-YOLOv8 neural network model involves replacing the standard convolution in the original C2f module with a lightweight DualConv convolution structure in the YOLOv8 Neck network; replacing the bounding box regression loss function in model training with SIoU; and changing the original three-head detection structure to a FASFF_Head four-head detection structure based on an adaptive spatial feature fusion mechanism.
[0023] For acquiring the dataset used for model training, it can also be obtained through a high-consistency image acquisition platform consisting of a dome integrating sphere light source (DBS-WD240), a light source controller, a CMOS industrial camera (MV-CS050-10GC), and a fixed-focus lens (MVL-MF0824M-5MPE). The acquired high-resolution gear images are manually annotated using the LabelImg tool, drawing rectangular bounding boxes and assigning category labels to defect areas such as chipped teeth, scratches, cracks, and pitting, generating YOLO format annotation files. Subsequently, random horizontal flipping, vertical flipping, and rotation are performed on the original dataset to expand sample diversity, reduce the risk of model overfitting, and finally construct a dedicated dataset for gear surface defects covering multiple defect types and working conditions. The standard convolutions in the Neck network are replaced with the C2f_DualConv module to achieve lightweight feature extraction. In the YOLOv8 Neck network, the standard convolutions in the original C2f module are replaced with the lightweight DualConv convolutional structure. DualConv employs a dual-path parallel design of 3×3 group convolutions and 1×1 heterogeneous convolutions: the 3×3 group convolutions divide the input channels into G groups for independent processing by grouping and arranging convolutional filters, significantly reducing the amount of multiply-accumulate operations (FLOPs) while maintaining efficient perception of local spatial features; the 1×1 heterogeneous convolutions integrate and transform all channel dimensional information without changing the feature map spatial size, preserving the global semantic information of the input feature map and enhancing gradient flow. The outputs of the two convolutions are concatenated in the channel dimension and then compressed by 50% through a bottleneck structure before being merged with another branch through Concat to form the complete C2f_DualConv module. Theoretical analysis shows that when the number of integral groups G is large enough, the number of floating-point operations of the C2f_DualConv module is only 1 / 9 of that of the original C2f module. While maintaining sufficient feature extraction capabilities, it significantly reduces the computational burden and provides feasibility for real-time deployment of edge devices. When aligning the code with tensor channels, the number of groups in the group convolution. The value is determined by the number of channels in the input feature map. Dynamic proportional configuration, preferably, is fixed at half the number of input channels (i.e. This ensures effective decoupling between feature groups and perfect alignment of the output channel dimensions. Under this channel allocation rule, the number of parameters for a 3×3 convolution is only a fraction of that of a standard convolution. Furthermore, by combining the dimensionality reduction operation (compression of 50%) of 1×1 heterogeneous convolution in the channel dimension, the overall architecture after merging the parallel branches of the two reduces the number of floating-point operations to about one-ninth of the original C2f module, thereby supporting real-time forward inference of edge devices at the mathematical logic and underlying code levels.
[0024] The CIoU loss function is replaced with SIoU, and four-dimensional regression constraints are introduced to optimize bounding box localization. The bounding box regression loss function in model training is replaced with SIoU (SCYLLA-IoU). The SIoU loss function explicitly models the angular information of the direction vector connecting the center points of the predicted box and the ground truth box through the collaborative constraints of four components: Angle Cost, Distance Cost, Shape Cost, and IoU Cost. When the angle deviation is large, the angle loss is minimized first to guide the predicted box to complete the orientation alignment; when the angles tend to be consistent, the distance and shape losses are minimized to ensure that the predicted box converges stably to the ground truth box along the optimal path, fundamentally eliminating the "wandering" problem of the predicted box during training. Adjustable weight parameters are introduced into the shape loss to control the model's attention to shape constraints, avoiding excessive shape penalty from interfering with the displacement optimization of the predicted box, effectively improving localization stability and bounding box regression accuracy in scenarios with complex tooth surface defects. Specifically, this adjustable weight parameter acts as an exponential factor, directly affecting the side length difference penalty term in the original SIoU shape loss calculation model. The value of this weight parameter is limited to the interval [2, 4]. In practical applications, when the proportion of aspect ratio defects such as tooth surface scratches is high in the detection task, this parameter is configured to a constant value close to 4 to amplify the derivative gradient of the shape penalty; when regular shape defects such as pitting are predominant, it is configured to be close to 2, thus flexibly constructing a smooth backpropagation calculation graph of the loss function and avoiding excessive shape penalty interference with displacement optimization.
[0025] Based on the Adaptive Spatial Feature Fusion (ASFF) mechanism, a secondary innovation is made to the original three-head detection structure, designing the FASFF_Head four-head detection structure. In addition to the original P3 / P4 / P5 detection heads, a new high-resolution small target detection head, P2 (with a stride of 4), is added. High-resolution feature input is provided to the P2 detection head through multi-scale feature upsampling and fusion operations, enabling secondary feature extraction for minute defects. The ASFF mechanism independently generates learnable fusion weights for each spatial location of the four detection layers. After Softmax normalization, the weights are satisfied with a sum of 1, allowing the model to autonomously select the optimal feature representation from different scale feature layers at each spatial location. This mechanism effectively solves the problem of small target feature dilution caused by multi-level stacked downsampling, significantly improving the model's detection sensitivity and recall for defects such as micro-cracks and pitting on tooth surfaces. The three improvements mentioned above—lightweight convolution, loss function, and multi-scale detection head—are not isolated additions, but rather an organic whole designed collaboratively for gear defect detection scenarios. While the Dual Conv structure significantly reduces computational load, it inevitably leads to a certain attenuation in feature extraction capability. FASFF_Head, by adding a P2 detection head and fusing adaptive spatial features, precisely compensates for the loss of small target features caused by downsampling in the lightweight network. Simultaneously, the angle constraint introduced by SIoU effectively solves the problem of unstable bounding box localization that easily occurs in lightweight models after feature dimension compression. These three aspects are coupled together, achieving an optimal balance between detection accuracy, localization stability, and real-time performance under strict constraints on edge device computing resources.
[0026] When training the improved CSP-YOLOv8 neural network model, the training dataset was divided into training, validation, and test sets in proportion. Using the constructed CSP-YOLOv8 network as the backbone, end-to-end training was performed with an input image size of 640×640 pixels, 150 training epochs, a batch size of 8, and an initial learning rate of 0.01. After each epoch, precision (P), recall (R), mAP@0.5, and mAP@0.5:0.95 were calculated on the validation set. The convergence curves of each metric with each training epoch were monitored to verify whether the model exhibited overfitting or underconvergence. The optimal weight file was then saved based on the validation results.
[0027] The detection results include: structured detection results containing defect category labels, bounding box coordinates, and confidence scores, and / or, a visually labeled image with overlaid visual annotation boxes on the original image. The optimal weights of the pre-trained improved CSP-YOLOv8 neural network model are deployed to an industrial inspection server equipped with an NVIDIA GPU or edge inference accelerator. The pre-trained optimal weights are then deployed to an industrial inspection server equipped with an NVIDIA GPU or edge inference accelerator; the server receives real-time gear image streams from an industrial camera, calls the CSP-YOLOv8 inference engine to complete forward computation, and outputs structured detection results containing defect category labels, bounding box coordinates, and confidence scores; simultaneously, visually labeled boxes are overlaid on the original image to generate an intuitive inspection report for quality inspectors, supporting result filtering and statistical summarization by defect type, confidence threshold, and other dimensions. Furthermore, the effectiveness of each improved module was confirmed. Under the premise of ensuring complete consistency between the experimental environment and hyperparameter configuration, an ablation experiment scheme was designed to introduce each module sequentially: using the original YOLOv8n as a baseline, the C2f_DualConv, SIoU, and FASFF_Head modules were introduced individually in turn, recording changes in metrics such as mAP at each stage to quantify the independent contribution of each module to detection performance; simultaneously, the synergistic effect of the three modules being jointly introduced was verified, analyzing the complementarity and gain relationship between the modules. In comparative experiments, CSP-YOLOv8 was compared horizontally with mainstream algorithms such as YOLOv5, YOLOv6, YOLOv9c, YOLOv10n, YOLOv11, Faster R-CNN, and SSD under the same dataset and training configuration, comprehensively verifying the superiority of the proposed method. Actual validation data shows that, on a self-built gear defect dataset, compared to the original YOLOv8n baseline model, the introduction of C2f_DualConv reduces the number of model parameters by approximately 36% and the inference latency is reduced to 12 milliseconds. Introducing SIoU alone improves the bounding box regression mAP@0.5:0.95 by 2.8 percentage points. Combining FASFF_Head significantly reduces the false negative rate of extremely small pitting defects from 15.4% to 3.1%. The final improved model, with the combined effect of the three modules, achieves a comprehensive mAP@0.5 of 96.5%, a 6.2% improvement over the baseline model. Furthermore, its inference speed on the same industrial server outperforms mainstream comparison algorithms such as YOLOv9c and Faster R-CNN, confirming the practicality of this approach.
[0028] The dataset used during training directly affects the applicability of the improved CSP-YOLOv8 gear surface defect detection model after training. Therefore, in one embodiment, the gear surface defect detection method based on the improved CSP-YOLOv8 further includes: an application environment analysis module to obtain defective detection records from historical production records corresponding to the configured detection line; analyzing the defective detection records to determine the proportion of each defect item in the detection results; and configuring the sample proportion of each defect type in the dataset based on the determined proportion.
[0029] In practical applications of online inspection systems, production line defects are typically caused by one or more defects occurring repeatedly. To facilitate adaptive updates, a triggering device is configured at the online inspection end. Operators can use this device to retrain the model. During this retraining process, a backup inspection model is configured. While retraining the commonly used model, the system takes over inspection of the production line. When triggering the system, operators must provide one or more defective parts, which are then captured by the image acquisition device of the triggering module. Based on the captured image, the sample proportions corresponding to each defect type in the dataset are reconfigured. After retraining is complete, the retrained model takes over production line inspection, and the inspection results are statistically analyzed within a preset time period. When the statistical results meet pre-configured conditions, the backup model is set as the primary model. Furthermore, since there is more than one production line in the factory, before retraining, we can communicate with the online detection systems of other production lines to determine if there are already trained models that can be directly copied and called, thus reducing retraining time. Specifically, we can construct the identifier vector based on the reconfiguration of the sample ratio. We can then match the identifier vector of the model that needs to be retrained with the identifier vector of the model used in other online systems, and directly copy and call the matched model used in other online systems.
[0030] When reconfiguring the proportion of samples in the dataset, the algorithm logic is as follows: the reciprocal of the frequency of each defect type in the historical bad records is used as the resampling weight, the minority defect samples are enhanced by high-frequency replication, and the majority defect samples are randomly removed, so that the sample size of each defect type is kept in a 1:1 balanced distribution.
[0031] When the retrained model takes over the production line, the pre-configured condition threshold is as follows: within five consecutive production shifts, the defect miss rate of the standby model during the takeover period is consistently below 0.3% and the false alarm rate is below 1%. When this indicator is met, the system automatically triggers the error-proofing verification and sets the standby model as the primary model.
[0032] For model replication across multiple production lines, the identifier vector is a one-dimensional array of floating-point numbers (e.g., [0.2, 0.5, 0.1, 0.2]) composed of the reconfiguration ratios of various defect samples. The system uses a cosine similarity algorithm as the distance metric to match the identifier vectors of the model to be retrained with other online models. When the cosine similarity value calculated for two vectors is greater than or equal to the matching threshold of 0.92, the defect distribution characteristics of the production lines are determined to be consistent, and the model of the matching system is directly copied and deployed.
[0033] This invention also provides a gear surface defect detection system based on an improved CSP-YOLOv8, such as... Figure 2As shown, it includes: an online acquisition module 1 and a detection module 2; wherein, the online acquisition module 1 acquires an image of the gear surface online as the image to be detected; the detection module 2 inputs the image to be detected into a pre-trained improved CSP-YOLOv8 neural network model to obtain the detection result; The improved CSP-YOLOv8 neural network model involves replacing the standard convolution in the original C2f module with a lightweight DualConv convolution structure in the YOLOv8 Neck network; replacing the bounding box regression loss function in model training with SIoU; and changing the original three-head detection structure to a FASFF_Head four-head detection structure based on an adaptive spatial feature fusion mechanism.
[0034] When training the improved CSP-YOLOv8 neural network model, the input image size was set to 640×640 pixels, the number of training rounds was 150, the batch size was 8, and the initial learning rate was 0.01 for end-to-end training. After each round, the evaluation index was calculated on the validation set, and the convergence curve of each evaluation index with the training rounds was monitored to verify whether the model had overfitting or underconvergence. The optimal weight file was saved according to the validation results.
[0035] The online acquisition of gear surface images uses a highly consistent image acquisition platform consisting of a dome integrating sphere light source, a light source controller, a CMOS industrial camera, and a fixed-focus lens.
[0036] The detection results include: structured detection results containing defect category labels, bounding box coordinates, and confidence scores, and / or, a visually labeled image with visually labeled boxes superimposed on the original image.
[0037] The optimal weights of the pre-trained improved CSP-YOLOv8 neural network model are deployed to an industrial inspection server equipped with an NVIDIA GPU or edge inference accelerator.
[0038] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for detecting surface defects in gears based on an improved CSP-YOLOv8, characterized in that, include: Online acquisition of gear surface images as the images to be inspected; The image to be detected is input into a pre-trained improved CSP-YOLOv8 neural network model to obtain the detection result; The improved CSP-YOLOv8 neural network model involves replacing the standard convolution in the original C2f module with a lightweight DualConv convolution structure in the YOLOv8 Neck network; replacing the bounding box regression loss function in model training with SIoU; and changing the original three-head detection structure to a FASFF_Head four-head detection structure based on an adaptive spatial feature fusion mechanism.
2. The gear surface defect detection method based on the improved CSP-YOLOv8 as described in claim 1, characterized in that, When training the improved CSP-YOLOv8 neural network model, the input image size was set to 640×640 pixels, the number of training rounds was 150, the batch size was 8, and the initial learning rate was 0.01 for end-to-end training. After each round, the evaluation index was calculated on the validation set, and the convergence curve of each evaluation index with the training rounds was monitored to verify whether the model had overfitting or underconvergence. The optimal weight file was saved according to the validation results.
3. The gear surface defect detection method based on the improved CSP-YOLOv8 as described in claim 1, characterized in that, The online acquisition of gear surface images uses a highly consistent image acquisition platform consisting of a dome integrating sphere light source, a light source controller, a CMOS industrial camera, and a fixed-focus lens.
4. The gear surface defect detection method based on the improved CSP-YOLOv8 as described in claim 1, characterized in that, The detection results include: structured detection results containing defect category labels, bounding box coordinates, and confidence scores, and / or, a visually labeled image with visually labeled boxes superimposed on the original image.
5. The gear surface defect detection method based on the improved CSP-YOLOv8 as described in claim 1, characterized in that, The optimal weights of the pre-trained improved CSP-YOLOv8 neural network model are deployed to an industrial inspection server equipped with an NVIDIA GPU or edge inference accelerator.
6. A gear surface defect detection system based on an improved CSP-YOLOv8, characterized in that, include: The system includes an online acquisition module and a detection module. The online acquisition module acquires images of the gear surface online as images to be detected. The detection module inputs the images to be detected into a pre-trained improved CSP-YOLOv8 neural network model to obtain detection results. The improved CSP-YOLOv8 neural network model involves replacing the standard convolution in the original C2f module with a lightweight DualConv convolution structure in the YOLOv8 Neck network; replacing the bounding box regression loss function in model training with SIoU; and changing the original three-head detection structure to a FASFF_Head four-head detection structure based on an adaptive spatial feature fusion mechanism.
7. The gear surface defect detection system based on the improved CSP-YOLOv8 as described in claim 6, characterized in that, When training the improved CSP-YOLOv8 neural network model, the input image size was set to 640×640 pixels, the number of training rounds was 150, the batch size was 8, and the initial learning rate was 0.01 for end-to-end training. After each round, the evaluation index was calculated on the validation set, and the convergence curve of each evaluation index with the training rounds was monitored to verify whether the model had overfitting or underconvergence. The optimal weight file was saved according to the validation results.
8. The gear surface defect detection system based on the improved CSP-YOLOv8 as described in claim 6, characterized in that, The online acquisition of gear surface images uses a highly consistent image acquisition platform consisting of a dome integrating sphere light source, a light source controller, a CMOS industrial camera, and a fixed-focus lens.
9. The gear surface defect detection system based on the improved CSP-YOLOv8 as described in claim 6, characterized in that, The detection results include: structured detection results containing defect category labels, bounding box coordinates, and confidence scores, and / or, a visually labeled image with visually labeled boxes superimposed on the original image.
10. The gear surface defect detection system based on the improved CSP-YOLOv8 as described in claim 6, characterized in that, The optimal weights of the pre-trained improved CSP-YOLOv8 neural network model are deployed to an industrial inspection server equipped with an NVIDIA GPU or edge inference accelerator.