An efficient and lightweight algorithm for detecting surface defects of steel based on SCCI-YOLO
산업용 섬유 · (9) 타이어코드
기본 정보
- 저자
- DOI
- 10.1038/s41598-025-20154-y
- 저널
- Scientific Reports
- 발행년도
- 2025
- 발행기관
- Nature Portfolio
- 피인용수
- 2
- 라이선스
- cc-by-nc-nd
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1038/s41598-025-20154-y
- 토픽
- Surface Roughness and Optical Measurements
- OpenAlex ID
- W4415241935
평가 내용
- 관련도
- 사업분야
- 산업용 섬유 · (9) 타이어코드
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '산업용 섬유 > 타이어코드' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 71,367자
본문 펼치기
섹션 본문 78문단 · 51,003자
(제목 없음)
1Steel is a crucial raw material in the industrial sector, and its surface defects significantly impact product quality.These defects are diverse in type, complex in shape, uneven in distribution, and varied in size, posing substantial challenges for performance and detection.Addressing the limitations of current deep learning-based steel surface defect detection algorithms in feature extraction, feature fusion, and multi-scale defect recognition-leading to high false detection rates, frequent missed detections, and low detection accuracy-this paper proposes a steel surface defect detection algorithm based on an improved YOLOv8n, named SCCI-YOLO.Firstly, the SPD-Conv module is introduced into the backbone network, utilizing adaptive weight allocation to focus convolutional kernels more on critical regions of the image, thereby improving detection accuracy for low-resolution and small objects.Secondly, we designed the C2f_EMA module, aimed at extracting more useful feature information and enhancing feature fusion effects.To further enhance the detection capability for small defects, a lightweight cross-scale feature fusion module (CCFM) is incorporated into the Neck network.This module integrates features from different scales, enhancing the model's adaptability to scale variations and improving detection accuracy for small-scale objects.Finally, to address the weak generalization and slow convergence issues of existing IoU loss functions across different detection tasks, we employed the Inner-IoU loss function, which improves the model's convergence speed and regression accuracy.The experimental results show that SCCI-YOLO achieves a mAP of 78.6% on the NEU-DET dataset, which improves the detection accuracy by 2.2% and 5.9% compared to YOLOv8n and YOLOv7, respectively, and reduces the number of model parameters by 43.9% compared to the original model, and the study demonstrates that the algorithm exhibits an excellent overall performance in the detection of defects on steel surfaces.
2were computationally inefficient and limited in detection accuracy, yet they played a crucial role in the early stages of computer vision, laying the foundation for the development of modern deep-learning methods.
3Deep learning-based object detection algorithms have made significant progress and can be divided into single-stage and two-stage methods.Single-stage methods like the YOLO series and SSD directly predict bounding boxes and categories on feature maps, enabling fast detection suitable for real-time applications 12 .Twostage methods like R-CNN, Fast R-CNN, and Faster R-CNN achieve higher precision by generating candidate regions first and then classifying them, making them suitable for complex scenes and small object detection 13 .The YOLO series simplifies object detection by treating it as a regression problem, using a single neural network to simultaneously predict bounding boxes and categories for real-time detection.YOLOv2 introduced batch normalization and anchor mechanisms to improve detection accuracy and speed 14 .YOLOv3 enhanced the ability to detect objects of different sizes through multi-scale feature prediction and residual networks 15 .YOLOv4 combined CSPDarknet53 and Mosaic data augmentation to improve performance and stability.YOLOv5 further optimized code implementation and performance 16 .YOLOv7 maintained a leading edge in speed and efficiency.These improvements have achieved a good balance between speed and accuracy for the YOLO series, making them widely used in real-time detection fields like autonomous driving and security monitoring.For example, Li et al. 17 based on YOLOv7 proposed EFC-YOLO, which adopts BiFPN structure to realize high-speed and highprecision steel defect detection.Zhang et al. 18 proposed ESI-YOLOv8, which enhances the detection accuracy and speed through EP module and SPPF-LSKA module.Yuan et al. 19 proposed GDCP-YOLO, which enhances the detection accuracy and speed through the DCNV2 module and the channel attention in the C2f mechanism, enhancing the YOLOv8n architecture, optimizing feature extraction and processing, and improving detection performance.
4In the steel defect detection field, YOLO models are preferred for their fast, accurate, and automated characteristics, precisely detecting and locating various defects, and widely used to improve product quality and safety.To address the sample imbalance problem in the detection of surface defects in industrial products, several methods can be used to improve the recognition of defective samples.Data enhancement techniques increase the number of defective samples by rotating, flipping, cropping, etc., and cost-sensitive learning makes the model more focused on sparse categories by giving higher weights to defective samples.In addition, Generative Adversarial Networks (GANs) can be used to synthesise realistic defective samples, thus alleviating the problem of uneven data distribution.Unsupervised methods use reconstruction error or embedding similarity for detection, while weakly supervised methods combine a small amount of labelled data with unlabelled data to improve the generalisation ability of the model.In practice, multiple strategies, such as data augmentation combined with cost-sensitive learning or augmenting data with GAN, are usually combined to improve the performance of the detection system in unbalanced sample scenarios 20 .However, existing deep learning-based industrial defect detection methods are not fully optimized for feature fusion and small defect detection.Traditional methods perform poorly for small defects due to their small size and indistinct features.Additionally, model complexity and computational resource requirements are challenges in practical applications.Therefore, to improve detection accuracy, it is necessary to optimize feature fusion, enhance the model's detection ability for small defects, and achieve model lightweight to reduce computational complexity and resource consumption 21 .
5In this paper, we propose an efficient and lightweight defect detection model for the key problems in steel defect detection.We first systematically investigate the performance of existing target detection algorithms on steel defect detection and analyze their limitations.On this basis, we optimize based on YOLOv8n and design a series of improvement strategies.Specifically, we thoroughly investigate the difficulties of defect feature extraction, propose SPD-Conv (Symmetric Positive Definite Convolution) to enhance the ability of local feature extraction, and construct C2f_EMA module by combining C2f and EMA attention mechanism to improve the feature expression ability.In addition, based on a large number of experiments and comparative analyses, we optimize the multi-scale information interaction mechanism and propose a lightweight cross-scale feature fusion module, CCFM, to enhance the model's ability to perceive steel defects.Meanwhile, we revisit the limitations of the existing IoU computation methods and construct the Inner-IoU loss function to more reasonably measure the degree of target overlap and improve the bounding box regression accuracy.In the experimental part, we performed extensive data preprocessing and model training tuning to ensure the rigour and reproducibility of the experiments.We extensively tested the improved model on multiple public datasets, and manually annotated and organised some of the experimental data to enhance the generalisation ability of the model.Meanwhile, we conducted in-depth comparative experiments with several mainstream target detection algorithms under the same hardware environment to evaluate the detection accuracy, inference speed and computational cost of the model.In addition, we designed a series of ablation experiments to remove or replace each improvement module respectively, to analyse the specific contribution of SPD-Conv, C2f_EMA, CCFM and Inner-IoU loss functions to the detection performance, and to continuously optimise the model structure to ensure the effectiveness and stability of the final scheme.Overall, this study not only introduces a number of improvement strategies in the methodology, but also invests a lot of work in experimental validation and optimisation, and finally constructs a more efficient, accurate and lightweight steel defect detection model.The model can significantly improve the performance of steel defect detection and reduce the computational cost and resource consumption, as well as have good adaptability and generalisation, providing new methods and ideas for the target detection task.The main contributions of this paper include:
6• We propose a new steel defect detection model, SCCI-YOLO, which efficiently detects small defects in steel while achieving more efficient and lightweight detection performance.Extensive comparative and generalization experiments verify the model's effectiveness and superiority.
7• For small defects in detection, we replace the convolution in the backbone feature extraction network with the SPD-Conv module, which removes redundant information in small target detection and mitigates the impact of fine-grained information loss and poor feature learning.• We incorporate the EMA attention mechanism into the C2f module, which can weight average feature maps and reduce computation in calculating attention weights.Additionally, we introduce the lightweight crossscale feature fusion module CCFM in the Neck network, strengthening feature fusion effects and reducing model parameters.• We replace the loss function with Inner-IoU to enhance the model's generalization ability.
8The remainder of this paper is organized as follows: Sect."Related work" introduces and discusses the basic principles and structure of the YOLOv8n model and current research on industrial defect detection methods.Section "Methods" analyzes and discusses the new detection model proposed in this paper and introduces our innovative work.Section "Datasets and evaluation metrics" introduces and analyzes the datasets and evaluation indicators used to evaluate model advantages and disadvantages."Results Analysis" presents experimental results of model deployment and analyzes comparative, generalization, and ablation experiments.The final section summarizes the entire work of this paper and provides outlooks for future research and innovation directions.
YOLOv8 model structure
9YOLOv8 is an advanced SOTA (State Of The Art) model built on the successful YOLO version, introducing several new features and improvements designed to further enhance performance and flexibility.
10It includes a new backbone network, Ancher-Free detection header, and loss function, and it provides five pretrained model sizes: n, s, m, l, and x, which are categorized into different sizes based on the number of parameters and computational size to support fast, accurate, and easy-to-use target detection, image segmentation, and image categorization tasks.The YOLOv8 network architecture is shown in Fig. 1.
11The workflow of YOLOv8 is as follows: first, the input image is preprocessed and then multi-scale features are extracted using a new backbone network.Next, these features are fused by a feature pyramid network or a path aggregation network, and target center prediction and bounding box regression are performed using an unanchored box detection head.In the training phase, a new loss function is used to optimize the model parameters.In the inference stage, non-maximal suppression techniques are applied to eliminate duplicate detected frames and finally output the detected bounding boxes and the corresponding category labels.
12The network structure of YOLOv8 consists of three main parts.The Backbone backbone network consists of a series of convolutional and anti-convolutional layers for feature extraction.From Fig. 2, we can see that the backbone network adopts a structure similar to CSPDarknet, which consists of five convolutional modules (Conv) and four C2f modules, and one SPPF module, and the overall residual connection and bottleneck structure are used to reduce the network size and improve the performance.The convolution module (Conv), also known as the CBS module, has the main structure of a 2D convolution (Conv2d), a BatchNorm2d, and a SiLU activation function.The Conv2d convolution model performs a 2D convolution operation on the input signal consisting of multiple input planes, and the BatchNorm2d normalizes the data.The BatchNorm2d function is formulated as follows:
13The SiLU activation function enhances the nonlinear capability of the model and the function is formulated as follows:
14The role of the whole Conv module is as follows: (1) Downsampling: Each convolutional layer in the convolutional module uses a convolutional kernel with a step size of 2 for downsampling operation to reduce the size of the feature map and increase the number of channels.The Backbone of YOLOv8 uses the C2f module as the basic building block, which has fewer parameters and stronger feature extraction capability than the C3 module of YOLOv5 while retaining the SPPF (Spatial Pyramid Pooling) module.The Neck part employs a multi-scale feature fusion technique, which fuses feature maps from different stages of the Backbone to enhance the feature representation capability.The Neck part of YOLOv8 still follows the idea of PAN-FPN, which is an architecture that combines a Feature Pyramid Network (FPN) and a Path Aggregation Network (PAN) to improve the target detection accuracy and efficiency.FPN is used to extract features from images of different scales, while PAN is used to aggregate these features across different layers of the network, enabling the network to handle objects of different sizes and resolutions, as well as multiple objects in complex scenes 22 .The flow of the Neck part is schematically shown in Fig. 3:
15The Head part of YOLOv8 is responsible for the final target detection and classification tasks.Compared with YOLOv5, YOLOv8 has made a big change by adopting the Decoupled Head structure, separating the classification and detection heads, and shifting from the Anchor-Based to the Anchor-Free approach.The Detection Head contains a series of convolutional and anti-convolutional layers for generating detection results, while the Classification Head uses global average pooling to classify each feature map.This design enables YOLOv8 to efficiently perform target detection and image classification tasks, providing accurate detection results and classification labels.
16The loss function is a key training component in YOLOv8, which directly affects the effectiveness of the model.The loss function of YOLOv8 consists of two parts: the positive and negative sample allocation strategy and the loss calculation.In order to improve the model performance, YOLOv8 uses BCE Loss as the classification loss and DFL+ CIoU Loss as the regression loss.The dynamic allocation strategy is used to dynamically adjust the proportion of positive and negative samples, so that the model pays more attention to the samples that are difficult to categorize, and thus improves the model's recognition ability.The BCE (Binary Cross-Entropy) formula is as follows: where yi is the actual label (0 or 1) of the i-th sample, ŷi is the predicted probability of the i-th sample, denoted as the probability that the label is 1, and N is the total number of samples.Second, YOLOv8 introduces the Distribution Focal Loss (DFL) in integral form in the regression branch.This loss function can handle the imbalance problem in the regression task more effectively and significantly improve the robustness and prediction accuracy of the model.
17The DFL loss function formula is as follows:
18CIoU By combining the information from the three aspects of IoU, centroid distance, and aspect ratio consistency, it is possible to measure the difference between the predicted frame and the real frame more comprehensively, thus improving the performance of the target detection model.The IoU and centroid distance ρ formulas are as follows:
19where (x, y) and (x g , y g ) are the coordinates of the centroids of the predicted and real frames, respectively.The formulas for the aspect ratio consistency measure v and CIoU are as follows:
20With these improvements, YOLOv8 demonstrates enhanced performance and higher accuracy in target detection tasks.
Related research
21In recent years, industrial steel defect detection has made significant progress in deep learning, multimodal data fusion, weakly supervised and unsupervised learning, real-time online inspection systems, and data enhancement and migration learning.In terms of deep learning, Zhang et al. 23 improved convolutional neural networks for steel surface defect detection, and Chen et al. 24 utilized Generative Adversarial Networks (GANs) for defect image synthesis to expand data and improve model generalization.In terms of multimodal data fusion, Wang et al. 25 combined visual and infrared images to enhance surface defect detection, and Li et al. 26 combined ultrasonic and visual images to achieve comprehensive detection of internal and surface defects.For real-time online inspection system, Liu et al. 27 developed a real-time steel defect detection system based on edge computing to improve response time and processing efficiency.Sun et al. 28 investigated efficient target detection algorithms in industrial environments to optimize the accuracy and real-time performance of steel defect detection.In terms of data enhancement and migration learning, Gao et al. 29 introduced image enhancement and migration learning for optimizing steel defect detection models, and Yang et al. 30 explored migration learning techniques for extracting useful features from data in other domains to improve detection accuracy and generalization ability.These studies focused on improving detection accuracy, reducing cost, realizing real-time and enhancing system robustness to effectively address the complex and changing steel defect detection needs in industrial production.
Methods
22YOLOv8 is a state-of-the-art real-time target detection model that combines advanced backbone networks such as EfficientNet and CSPDarknet, and optimizes neck networks such as PANet and FPN to dramatically improve feature extraction and fusion capabilities.The improved detection head refinement design enhances bounding box localization and classification accuracy.The model uses data enhancement techniques such as Mosaic Enhancement, Hybrid Enhancement, CutMix, and optimized Balance Loss and IOU Loss to improve generalization capability and accuracy.Despite its outstanding performance, YOLOv8 is deficient in handling small targets and targets with insignificant features.Its large sensory field makes it difficult to accurately locate and recognize small targets,the model may not be able to accurately classify non-significant target features or when they are similar to the environment,and the feature pyramid structure is simpler, leading to under-representation of features at different scales.To solve these problems, we propose a new defect detection model, SCCI-YOLO.SCCI-YOLO introduces the SPD-Conv module, which replaces the traditional convolutional operation to retain more details and feature information, and is especially suitable for low-resolution images and small objects.In addition, the EMA attention mechanism is added to the C2f module of the backbone network to form the new C2f_EMA module.EMA extracts more useful feature information by weighted averaging of the feature maps, reduces the overfitting of the model to the training data, and improves the performance on unseen data.To enhance the feature representation capability, we introduce a lightweight cross-scale feature fusion module, CCFM, which provides powerful cross-scale feature fusion capability and reduces the need for C2f_EMA enhancement features, thus reducing the computation and memory overheads while maintaining a high feature representation capability.SCCI-YOLO also employs the Inner-IoU loss function, which introduces a scale factor ratio to control the scale of the auxiliary bounding box.SCCI-YOLO also employs the Inner-IoU loss function to introduce a scale factor ratio to control the scale size of the auxiliary bounding box.By using different scales of auxiliary bounding boxes for different datasets and detectors, the limitations of the existing methods in terms of generalization ability can be overcome.Combining the above, we design a more efficient and lightweight detection model, and the overall flowchart of the SCCI-YOLO model is shown in Fig. 4:
SPD-Conv
23Small target detection is challenging, mainly due to the low resolution of small targets and the limited contextual information they provide.In addition, small targets usually coexist with large objects that dominate the feature learning process, making it difficult for small targets to be effectively detected.In complex tasks where images are blurred or objects are very small, traditional cross-row convolution and pooling are ineffective.To address these problems, we introduce SPD-Conv as an alternative architecture, which consists of a space-to-depth (SPD) layer and a non-spanning convolutional layer.the SPD layer downsamples the feature map but retains all the information in the channel dimensions.Although the spatial resolution of the feature map is reduced, no information is lost.The SPD layer achieves efficient transfer and compression of information by rearranging the information in the spatial dimension into the channel dimension.Specifically, the SPD layer generates a new feature map by rearranging each block of the input feature map into the channel dimension.This operation not only reduces the spatial dimension of the feature map, but also increases the number of channels, thus ensuring complete retention of information.In general, given any (original) feature graph X, subgraph f (x,y) is formed by all entries X(i, j) that satisfy the conditions i+x and j+y that are divisible by the scale factor.Thus, each subgraph downsamples X according to the scale factor.Figure 5a,b,c shows an example when the scale factor is 2. Four sub-maps f0,0 , f1,0 , f0,1 and f1,1 are generated, each of which has the shape (S/2, S/2, C1) and a downsampling factor of 2. These sub-feature mappings are then concatenated along the channel dimensions, yielding a feature mapping X ′ that decreases in spatial dimension by a scaling factor and the channel dimension is increased by the square of a scaling factor.In other words, SPD transforms the feature mapping X(S, S, C1) into the intermediate feature mapping
24).An illustration is given in Fig. 5d for a scale of 2.
25After the SPD feature transformation layer, a non-spanning convolution layer with a C2 filter and C2 < scale 2 C1 is added as shown in Fig. 5e,and then further transformed X ′ ( S scale , S scale , scale 2 C1) → X ′′ ( S scale , S scale , C2).The reason for using non-spanning convolution is to retain as much information as possible about all discriminative features 31 .
C2f_EMA module
26To address the problem of different sizes and fuzzy features in steel defects, we introduced the EMA attention mechanism into the C2f module to form a new C2f_EMA module to enhance feature extraction and detection.The C2f (CSP2f) module is based on the CSPNet (Cross Stage Partial Network) design, which aims to reduce computation and memory usage while maintaining the accuracy of the model.The C2f module transforms the features, increases the nonlinear capability, and performs feature fusion through two convolutional layers (cv1 and cv2) and multiple Bottleneck modules.The forward propagation process of C2f starts with the input data first passing through the convolutional layer cv1, and then the output is divided into two parts, one part is passed directly to the output and the other part is processed by multiple Bottleneck modules.Finally, the two parts are spliced in the channel dimension and the final output is obtained by the convolutional layer cv2.
27To enhance the capability of the C2f module, we add the EMA attention mechanism before Bottleneck, and the EMA structure is shown in Fig. 6.The EMA attention mechanism automatically selects and suppresses unimportant features before entering Bottleneck, which makes the features more effective and improves the model efficiency.By calculating the attention weights through exponential moving averages, the EMA mechanism smooths the noise in the feature map and enhances the robustness of the feature map.In combination with the C2f module, the EMA attention mechanism is even more effective.The C2f module enhances feature features.The output feature maps are aggregated by matrix dot product operations and Sigmoid functions to generate spatial attention maps that capture the global context.Finally, the output features of the C2f module are further processed by the feature fusion method to combine features of different scales and depths.This design not only improves the feature expression capability and model robustness, but also enhances the overall performance, especially in small target detection and low-resolution image processing.
CCFM module
28Although YOLOv8 performs well in terms of accuracy and speed, its larger number of model parameters requires more computational resources and high-performance hardware.This not only increases the training time and cost, but also makes the model tuning complex, requiring more detailed hyperparameter optimization and longer experiment time.To improve detection performance and speed up training and inference, we introduce a multi-scale feature fusion module, CCFM, at the Neck layer.
29CCFM is a technique used to improve the performance of CNNs when dealing with multi-scale features.It enhances the model's adaptability to scale changes and the detection of small-scale objects by fusing features from different scales.CCFM can effectively integrate detailed features and contextual information, which improves the feature extraction capability while realizing a balance between model complexity and computational efficiency, thus enhancing the overall performance.The structure of the CCFM model is shown in Fig. 7.
30CCFM enhances feature representation by fusing features at different scales, and its structure includes multi-scale feature extraction, feature fusion, and feature compression and adjustment.First, multiscale feature extraction utilizes multilayer convolution or other transform operations to extract features at different scales from the input feature map, ensuring that the feature map captures rich information at different scales.CCFM optimizes feature fusion by inserting multiple fusion blocks consisting of convolutional layers in the fusion path.Each fusion block contains multiple convolutional layers that interact between feature maps at different scales, integrating features from neighboring scales to generate a new feature map.The fusion block progressively aggregates multi-scale information to improve feature representation 33 .Finally, feature compression and tuning use operations such as 1 × 1 convolution to compress the number of channels in the fused feature map, control the amount of computation, and adjust the dimensionality of the feature map for subsequent processing.Through these steps, CCFM improves the feature representation capability of the model while maintaining computational efficiency for resource-constrained environments and real-time applications.
Inner-IoU loss function
31Target detection is a fundamental task in computer vision, including target classification and localization, in which the bounding box regression (BBR) loss function is crucial in the localization branch.Existing IoU loss functions accurately characterize how well the predicted bounding box matches the GT box, but in steel defect detection, the traditional CIOU loss function often leads to slow convergence and inaccurate regression due to the small size of the target.We adopt the Inner-IoU loss, which calculates the loss by introducing scale factor ratios and generating auxiliary bounding boxes with different scales.Without adding new loss terms, Inner-IoU accelerates the regression process and improves the detection performance, which is especially suitable for small-target detection and significantly improves the effectiveness of steel defect detection 18 .The Inner-IoU schematic is shown in Fig. 8.
32The GT frame and the anchor frame are denoted by B gt and B , respectively, and the centers of the GT frame and the inner GT frame are denoted by
33and (xc, yc), respectively.The width and height of the GT frame are denoted by W gt and h gt , respectively, and those of the anchor frame are denoted by w and h, respectively, and the value of the ratio factor ratio is in the range of 0.5-1.
34Compared with IoU loss, when the scale factor is less than 1 and the auxiliary bounding box size is smaller than the actual bounding box, the effective range of the regression shrinks, but the absolute value of the gradient is larger than that obtained by IoU loss, which accelerates the convergence of the high IoU samples.On the contrary, when the scaling factor is greater than 1, the larger size of the auxiliary bounding box expands the effective range of the regression, which enhances the regression of the low IoU samples and thus improves the detection results 34 .
35w gt After introducing the Inner-IoU loss function, and after repeated experimental validation, we found that our SCCI-YOLO steel defect detection model can achieve the best detection results when the scale is 1.3.
Dataset
36The dataset used in this experiment is the NEU-DET steel surface defects dataset, which contains six types of typical surface defects of hot rolled steel strip, i.e., rolled oxide skins (Rs), patches (Pa), cracks (Cr), pitting surfaces (Ps), inclusions (In), and scratches (Sc), and Fig. 9 illustrates a schematic diagram of the six types of defects.The database includes 1800 grayscale images: six different types of typical surface defects, and each type of defect contains 300 samples, which we randomly divided into training, validation, and test sets in the ratio of 6:2:2.Table 1 describes the distribution of labels in each dataset.For the defect detection task, the datasets provide annotations indicating the class and location of defects in each image.
Experimental environment
37The internal parameters of the model are set, according to the system resources, model and dataset size, etc.The batch size is set to 16, the input image resolution size is adjusted to 640 × 640 pixels, the number of working threads for data loading is 8, the initial learning rate is 0.01, the weight attenuation of the adjusting optimizer is 0.0005 to prevent overfitting, the intersection and concatenation ratio (IoU) threshold for non-maximum suppression (NMS) is 0.7, etc., in addition to the total number of cycles for all model training is 300 epochs.additional other experimental environment configurations are shown in Table 2.
Evaluation metrics
38Target detection is a core task in the field of computer vision, aiming at accurately recognizing and locating target objects in images or videos.In steel defect detection, it is crucial to choose appropriate evaluation metrics which should objectively measure the accuracy and stability of the algorithm.In industrial production, the accuracy and speed of detection are critical.If the recognition accuracy is insufficient, it may lead to misjudgment and failure to correctly identify defective workpieces, which may lead to production problems.Therefore, the evaluation metrics must accurately reflect the detection performance and ensure the reliability of the algorithms under various conditions to meet stringent production requirements.Evaluation metrics in target inspection are usually, Recall (R), Precision (P), Average Precision (AP), Mean Average Precision (mAP), Frames per Second (FPS), etc. Recall (R) measures the proportion of samples that the model correctly recognizes as positive class among the samples that are actually positive class with the following formula:
39Where TP (True Positive) is the number of samples correctly classified as positive by the model, and FN (False Negative) is the number of samples incorrectly classified as negative by the model but are actually positive.Recall reflects the detection ability of the model, i.e., the proportion of all samples that the model can correctly detect among all samples that are actually positive classes.A high recall indicates that the model is able to identify most of the positive class samples, reducing the risk of missed detections.Precision (P) is another important indicator of model performance, which measures the proportion of positive class samples predicted by the model that are actually positive, i.e., the accuracy of the model in identifying positive classes, with the following formula:
40where FP (False Positive) is the number of samples misclassified as positive by the model but are actually negative.Average Precision (AP) is the area under the Precision-Recall Curve (AUC).AP integrates the overall performance of the model by integrating the precision and recall under different thresholds.The formula for calculating AP is as follows:
41The mAP (mean Average Precision) is a comprehensive metric used to evaluate the performance of multi-class classification or detection models.It is calculated by determining the average precision (AP) for each class and then averaging these AP values across all classes.In this paper, we select mAP@0.5 and mAP@0.5:0.95 as the evaluation metrics to validate the effectiveness of the proposed method.mAP is calculated as follows:
42where N is the total number of categories and APi is the average precision of the i-th category.FPS (Frames FPS (Frames Per Second) is an important measure of video or graphics processing performance, indicating the number of frames processed or displayed per second, which is used to evaluate the smoothness, real-time processing capability, and performance of a model system.Per Second) is an important measure of video or graphics processing performance, indicating the number of frames processed or displayed per second, which is used to evaluate the smoothness, real-time processing capability, and performance of a model system.
43In this paper, we mainly use evaluation metrics such as mAP, FPS, and the number of model parameters to validate the effectiveness of the proposed method.
Result analysis
44The precision-recall (PR) plot generated from the results of our experimental data, as shown in Fig. 10, shows that the average accuracy of the model in detecting plaques and scratches is above 92%, with a maximum of 94%, and that most defects are detected with an average accuracy of about 80%, and there are a small number of defects that are detected with poorer results.As shown in Table 3, SCCI-YOLO outperforms YOLOv8 in detecting small-scale defects (Cr, In, Sc).Although the improvement ranges from 0.004 to 0.016, it is significant for small object detection tasks.The enhanced model demonstrates superior localization and classification performance for defects such as cracks and scratches, which are typically small in size and have blurred edges.This improvement can be attributed to the SPD-Conv, C2f_EMA, CCFM, and Inner-IoU modules, which effectively strengthen fine-grained feature extraction and cross-scale information fusion.The overall mAP0.5 increases by 0.022, indicating that the proposed modifications substantially enhance the model's performance on small object detection and overall detection accuracy.
45The average detection performance of all categories, mAP@0.5 is 0.786, indicates that the model has high detection accuracy in general.For defect categories with poor detection performance, the model's detection performance in this category can be improved by data enhancement, sample enhancement, or model tuning for this category.
46Figure 11 shows the changes of different metrics in the training and validation during the experimental process, the chart has the training set loss, validation set loss, and the changes in metrics such as precision, recall, and average precision.From the figure, we can observe that all the losses (box_loss, cls_loss, dfl_loss) show a gradual decrease in the training and validation sets, indicating that the model gradually converges during the training process, and the performance gradually improves.The trend of the loss on the validation set is basically the same as that on the training set, indicating that the model is not overfitting and the performance on the validation set is gradually improving.Precision and recall gradually improve during the training process, indicating that the performance of the model in predicting positive samples and recognizing all positive samples gradually improves.mAP50 and mAP50-95 improve indicating that the average precision of the model under different IoU thresholds gradually improves, and the detection performance of the model is continuously enhanced.
47Overall, the graphical content demonstrates the model's good convergence and gradually improving performance during training.The model shows significant improvement in both bounding box localization and classification tasks, and the performance on the validation set is consistent with the training set, indicating that the model has good generalization ability.In addition, the improvement in precision and recall further demonstrates the effectiveness of the model on the target detection task.
Experimental comparison of different detection models
48To verify the effectiveness of our proposed model, we conducted a comparison experiment by comparing it with other mainstream target detection models, the results of which are shown in Fig. 12.
49The NEU-DET dataset demonstrates significant performance differences and unique advantages across various object detection models.SCCI-YOLO achieves the highest detection accuracy with mAP@0.5 of 78.6% and a real-time processing speed of 270.2 FPS, using only 1.68 million parameters.Its lightweight design and efficient feature fusion techniques make it particularly effective for tasks requiring high accuracy and real-time performance.
50YOLOv3, despite its large number of parameters (103.6 million), shows excellent mAP@0.5 (65.4%) and FPS (71.3), indicating a good balance between complexity and accuracy.Its deep network structure and multi-scale feature detection capabilities maintain its competitiveness in complex scenarios.YOLOv4, with a significantly reduced parameter count (24.1 million), achieves a mAP@0.5 of 66.2%.Although its FPS (54.3) is relatively low, it shows effectiveness improvements under limited computational resources.The enhanced feature extraction network and improved detection head contribute to YOLOv4's performance gains.The YOLOv5 series, especially YOLOv5m and YOLOv5l, exhibit efficiency and lightweight advantages.YOLOv5m, with a moderate parameter count (25 million), achieves a mAP@0.5 of 72% and 162.7 FPS.YOLOv5l further improves to a mAP@0.5 of 73.6% and 202.4 FPS, demonstrating a superior balance between accuracy and real-time performance.The optimized architecture and adaptive anchor generation significantly enhance YOLOv5's detection efficiency and accuracy.In scenarios with extremely high real-time requirements, YOLOX-tiny and YOLOv8n excel.YOLOX-tiny, with only 6.5 million parameters, achieves a mAP@0.5 of 74.3% and 264.3 FPS, showcasing its outstanding real-time detection performance and lightweight characteristics.Its efficient feature pyramid network and dynamic input size strategy are key factors in its success.YOLOv8n, with 3 million parameters, achieves a mAP@0.5 of 76.4% and 294.1 FPS.Its novel deep aggregated network with attention boosts both accuracy and speed.The experimental results and analysis provide strong evidence of SCCI-YOLO's superior performance in steel defect detection tasks.Compared to other state-of-the-art YOLO models, SCCI-YOLO achieves the highest mAP@0.5 and extremely high FPS while maintaining a minimal parameter count.These outstanding performances indicate SCCI-YOLO's immense potential in various object detection tasks.The lightweight design and efficient feature fusion techniques of SCCI-YOLO not only enhance detection accuracy and speed but also effectively reduce computational resource consumption.Therefore, SCCI-YOLO is an accurate and efficient method for steel defect detection, offering valuable reference for other detection models.The results of the improved algorithm for detecting defect categories are shown in Fig. 13.
51To evaluate the effectiveness of the Inner-IoU loss function in the proposed model, we use other different loss functions for comparison experiments and the results are shown in Table 4.
52Table 4 compares the detection performance and convergence efficiency of different IoU-based loss functions.It can be observed that CIoU, DIoU, and GIoU achieve mAP@0.5 values of 74.6%, 74.5%, and 75.3%, respectively, while Inner-IoU achieves the highest accuracy of 78.6%.This indicates that Inner-IoU provides a clear performance advantage in detection accuracy.In terms of convergence speed, Inner-IoU also demonstrates superior efficiency.It requires only 120 epochs to reach 95% of its best performance and 170 epochs to achieve full convergence, which are significantly fewer than those required by CIoU (150/200), DIoU (160/210), and GIoU (175/230).These results highlight that Inner-IoU not only improves detection accuracy but also accelerates model convergence.
53Overall, by emphasizing the maximization of the internal intersection relative to the union, Inner-IoU effectively reduces bounding box misalignment and provides both faster optimization and higher localization precision compared with conventional IoU variants.
Analysis of ablation experiment results
54To better analyze and validate the improvements and effectiveness made by our proposed new model, we designed and implemented a series of ablation experiments and analyzed them for module comparison and result rating.
55In Table 5, through the analysis of experimental data and the characteristics of each module, it is evident that each module plays a significant role in the original model, improving detection accuracy, lightweighting the model, and optimizing real-time processing performance.In Experiment Group 1, the introduction of the SPD-Conv module slightly reduced the parameter count compared to the original model, but both mAP@0.5 and FPS decreased.This indicates that while SPD-Conv reduces model complexity, it does not significantly enhance performance when used alone.In Experiment Group 2, the standalone introduction of the C2f_EMA module significantly improved detection accuracy, though FPS decreased.Experiment Group 3, which only introduced the CCFM module, improved detection accuracy but increased computational load, resulting in a decreased frame rate.Experiment Group 4, combining the SPD-Conv and C2f_EMA modules, slightly reduced the parameter count while significantly boosting both detection accuracy and FPS, with accuracy 2.1% higher than the original model.This indicates a synergistic effect in performance enhancement when these two modules are combined.In Experiment Group 5, combining the SPD-Conv and CCFM modules resulted in a reduction in parameter count but only limited improvement in accuracy, suggesting that this combination contributes to parameter optimization but has a limited effect on accuracy enhancement.Experiment Group 6, which combined the C2f_EMA and CCFM modules, saw improvements in both detection accuracy and FPS, though not as effective as the optimal combination.Finally, Experiment Group 7, which combined the SPD-Conv, C2f_EMA, and CCFM modules, exhibited the best performance across all metrics, showing the highest mAP@0.5 (78.6%), the lowest parameter count (1.68M), and a relatively high FPS (270.2).Although the FPS was lower than the original model, the SPD-Conv module improved feature extraction efficiency, the C2f_EMA module smoothed prediction results, and the CCFM module enhanced multi-scale object detection capability.The combination of these three modules ensures high detection accuracy while maintaining a low parameter count and high frame rate through their synergistic effects.The proposed new model demonstrates significant effectiveness in enhancing detection accuracy, optimizing model complexity, and maintaining a high frame rate.
Analysis of generalization experiment results
56In order to fully evaluate the generalisation capability of our proposed model, we tested it on several datasets with different features and data distributions, including the Aluminum, PASCAL VOC2012, GC10-DET, COCO and PASCAL VOC2007 datasets.The Aluminum dataset contains samples of aluminium surface defects and can be used to validate the model's suitability for cross-material defect detection tasks, the PASCAL VOC2012 and VOC2007 are classical target detection datasets covering 20 classes of objects, which can evaluate the model's ability to migrate to generic target detection tasks, and the GC10-DET dataset contains 10 classes of steel surface defects, which is similar to NEU-DET but with different acquisition conditions and data distribution, and can be used to validate the model's ability to generalise across datasets in the steel defect detection task, and the COCO dataset, which covers 80 classes of objects and contains complex backgrounds and multi-scale targets, helps to analyse the model's detection performance in complex scenes.By experimenting on these different datasets, we are able to evaluate the model's performance on unseen data more systematically, thus validating its effectiveness, stability and adaptability.
57Based on the data in Tables 6 and 7, we can analyze that the proposed new model achieves good detection results across the tested datasets, indicating that effective progress has been made in model compression and optimization.The experimental results show that the mAP@0.5 of the improved model on NEU-DET, GC10-DET, Aluminum and VOC datasets are enhanced, indicating its increased generalisation ability in defect detection and target detection tasks.Among them, the enhancement of mAP@0.5 on the NEU-DET, GC10-DET and Aluminum datasets by 2.2%, 2.5% and 2.1%, respectively, verifies the adaptability of the model for steel and aluminium defects detection, while the enhancement of VOC2007 and VOC2012 suggests its enhanced migration capability.However, the COCO dataset showed a slight decrease in performance, due to the limited adaptability of the model to complex backgrounds after optimisation for defect detection.In addition, the enhancement of mAP@0.5:0.95 is lower than that of mAP@0.5, indicating that there is still room for optimising the detection capability under high IoU standards.Overall, the improved model has better generalisation ability on the defect detection task, and the generic target detection performance is also improved, which is overall better than the original model.
Conclusion
58In this paper, we analyze and study the limitations of steel surface defect detection, including poor detection of small defects, insufficient feature extraction capability, large number of model parameters, and low average detection accuracy.To this end, we propose a new algorithm, SCCI-YOLO, based on the YOLOv8n model, which introduces SPD-Conv, which contains an improved convolution operation that not only reduces the computational complexity, but also enhances the feature extraction capability, and improves the resolution and expressive ability of the feature map.To enhance the feature fusion capability, we combine the C2f module with the EMA attention mechanism.The C2f module, through efficient feature fusion, is combined with the multiscale feature perception capability of the EMA, which enables the model to understand and express the image information more comprehensively, significantly improving the feature expression capability and detection accuracy while maintaining efficient computational performance.In addition, we introduce a lightweight crossscale feature fusion module, CCFM, which effectively integrates detailed features and contextual information, while the module uses lightweight convolutional operations and feature selection techniques to avoid the problem of large parameter redundancy in traditional feature fusion methods.Aiming at the problem that the existing IoU loss function has poor generalization ability and slow convergence speed in different detection tasks, we introduce a new loss function Inner-IoU.Experimental results show that compared with the original model, the average detection accuracy of our model improves by 2.2%, and successfully reduces the number of model parameters by 43.9%.Moreover,a large number of experiments further validate the generalisation and effectiveness of the model in detection, especially on the GC10, Aluminum and VOC2007 datasets, which show significant improvement in effectiveness.Despite the overall improvement of the SCCI-YOLO model compared with the original model, its performance and generalization ability still highly depend on high-quality training Dataset mAP@0.5(%)mAP@0.data and accurate annotation.When facing complex scenes or new datasets, especially when dealing with small or dense targets, its generalization ability needs to be further improved.In the future, we will work on solving the problem of small defects in steel defect detection, further improving the detection accuracy and real-time processing speed of the model, and exploring its applicability in other application scenarios.
Fig. 2 .
59Fig. 2. YOLOv8 backbone network structure diagram.
Fig. 1 .
60Fig. 1.YOLOv8 model structure diagram.
( 2 )
61Nonlinear representation: The batch Normalization layer and ReLU activation function are added after each convolutional layer to enhance the nonlinear representation of the model.The Conv module of YOLOv8 serves two main purposes: First, a downsampling operation is performed by a convolution kernel with a step size of 2 to reduce the size of the feature map and increase the number of channels.Second, a Batch Normalization layer and a ReLU activation function are added after each convolutional layer to enhance the nonlinear representation of the model.
)Fig. 3 .
62Fig. 3. Schematic diagram of Neck process.
Fig. 4 .
63Fig. 4. Schematic of the SCCI-YOLO modeling process.
Fig. 6 .
64Fig. 6.C2f_EMA structural map and EMA structural map.
Fig. 5 .
65Fig. 5. SPD-Conv plot at a scale of 2.
Fig. 7 .
66Fig. 7. CCFM structure diagram and its sub-structures.
Fig. 9 .
67Fig. 9. Map of classical steel defects in the dataset.
Fig. 10 .
68Fig. 10.Detection accuracy by category and overall accuracy.
Fig. 12 .
69Fig. 12. Experimental results of comparison with other models.
Fig. 11 .
70Fig. 11.Loss function and performance metrics changes.
Fig. 13 .
71Fig. 13.Defect detection category labelling chart.
Table 2 .
72Experimental environment configuration.
Table 1 .
73Distribution of labels in training, validation and test sets.
Table 3 .
74Comparison of defect category detection.
Table 5 .
75Results of ablation experiments.
Table 4 .
76Comparison of results with different loss functions.
Table 7 .
77Experimental results for each dataset on the improved model.
Table 6 .
78Experimental results for each dataset on the original model.
참고문헌 23건
- Selective Search for Object Recognition International Journal of Computer Vision · Springer Science+Business Media · 2013 10.1007/s11263-013-0620-5
- Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation 2014 10.1109/cvpr.2014.81
- SSD: Single Shot MultiBox Detector Lecture notes in computer science · Springer Science+Business Media · 2016 10.1007/978-3-319-46448-0_2
- Automatic surface defect detection for mobile phone screen glass based on machine vision Applied Soft Computing · Elsevier BV · 2016 10.1016/j.asoc.2016.10.030
- Feature Pyramid Networks for Object Detection 2017 10.1109/cvpr.2017.106
- YOLO9000: Better, Faster, Stronger 2017 10.1109/cvpr.2017.690
- Focal Loss for Dense Object Detection IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2018 10.1109/tpami.2018.2858826
- You Only Look Once: Unified, Real-Time Object Detection 2016 10.1109/cvpr.2016.91
- Mask R-CNN 2017 10.1109/iccv.2017.322
- Cascade R-CNN: Delving Into High Quality Object Detection 2018 10.1109/cvpr.2018.00644
- Deep Regression Neural Network for Industrial Surface Defect Detection IEEE Access · Institute of Electrical and Electronics Engineers · 2020 10.1109/access.2020.2975030
- Bridging the Gap Between Anchor-Based and Anchor-Free Detection via Adaptive Training Sample Selection 2020 10.1109/cvpr42600.2020.00978
- SSD: Single Shot MultiBox Detector Lecture notes in computer science · Springer Science+Business Media · 2016 10.1007/978-3-319-46448-0_2
- Scaled-YOLOv4: Scaling Cross Stage Partial Network 2021 10.1109/cvpr46437.2021.01283
- Automated surface defect detection framework using machine vision and convolutional neural networks Journal of Intelligent Manufacturing · Springer Science+Business Media · 2022 10.1007/s10845-021-01878-w
- Guest Editorial Special Section for ICSMD 2021 IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2022 10.1109/tim.2022.3219307
- No More Strided Convolutions or Pooling: A New CNN Building Block for Low-Resolution Images and Small Objects Lecture notes in computer science · Springer Science+Business Media · 2023 10.1007/978-3-031-26409-2_27
- Efficient Multi-Scale Attention Module with Cross-Spatial Learning 2023 10.1109/icassp49357.2023.10096516
- A deep learning model for steel surface defect detection Complex & Intelligent Systems · Springer Science+Business Media · 2023 10.1007/s40747-023-01180-7
- EFC-YOLO: An Efficient Surface-Defect-Detection Algorithm for Steel Strips Sensors · Multidisciplinary Digital Publishing Institute · 2023 10.3390/s23177619
- Surface defect detection methods for industrial products with imbalanced samples: A review of progress in the 2020s Engineering Applications of Artificial Intelligence · Elsevier BV · 2023 10.1016/j.engappai.2023.107697
- GDCP-YOLO: Enhancing Steel Surface Defect Detection Using Lightweight Machine Learning Approach Electronics · Multidisciplinary Digital Publishing Institute · 2024 10.3390/electronics13071388
- Steel surface defect detection algorithm based on ESI-YOLOv8 Materials Research Express · IOP Publishing · 2024 10.1088/2053-1591/ad46ec