원시데이터 수집 시스템
선정목록으로

YOLO-LFPD: A Lightweight Method for Strip Surface Defect Detection

간접 관련 필름·전자재료 · (14) 드라이 필름(포토레지스트) (11) 배리어 필름(15) 디스플레이 패널재료

기본 정보

저자
  1. Jianbo Lu — Guangxi Key Lab of Human-Machine Interaction and Intelligent Decision, Nanning Normal University, Nanning 530001, China
  2. Mingrui Zhu — Guangxi Zhuang Autonomous Region Forestry Survey and Design Institute, Nanning 530011, China
  3. Kaixian Qin — Guangxi Key Lab of Human-Machine Interaction and Intelligent Decision, Nanning Normal University, Nanning 530001, China
  4. Xiaoya Ma — Department of Logistics Management and Engineering, Nanning Normal University, Nanning 530023, China
DOI
10.3390/biomimetics9100607
저널
Biomimetics
발행년도
2024
발행기관
Multidisciplinary Digital Publishing Institute
피인용수
9
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.3390/biomimetics9100607
토픽
Surface Roughness and Optical Measurements
OpenAlex ID
W4403214731

평가 내용

관련도
간접 관련
사업분야
필름·전자재료 · (14) 드라이 필름(포토레지스트)
부 분야
(11) 배리어 필름, (15) 디스플레이 패널재료
R&D 측면
분석·모델링
확신도
0.70
근거 용어
surface defect detection, deep learning, YOLO-LFPD, real-time monitoring, image processing
판단 근거
본 논문은 강판(strip steel) 표면 결함 검출을 위한 경량 딥러닝 모델 연구이나, 여기서 사용된 실시간 결함 검출 알고리즘 및 이미지 처리 기술은 코오롱인더스트리의 필름(11)이나 디스플레이 패널(15) 제조 공정 중 표면 결함 검사 자동화 시스템에 응용될 수 있습니다.
R&D 활용 포인트
필름 및 디스플레이 소재 제조 공정 내 실시간 비전 검사 시스템의 정확도 향상 및 경량화 알고리즘 도입에 활용 가능함.
평가 입력
섹션 본문 81,657자 중 30,032자 발췌

초록

Strip steel surface defect recognition research has important research significance in industrial production. Aiming at the problems of defect feature extraction, slow detection speed, and insufficient datasets, YOLOv5 is improved on the basis of YOLOv5, and the YOLO-LFPD (lightweight fine particle detection) model is proposed. By introducing the RepVGG (Re-param VGG) module, the robustness of the model is enhanced, and the expressive ability of the model is improved. FasterNet is used to replace the backbone network, which ensures accuracy and accelerates the inference speed, making the model more suitable for real-time monitoring. The use of pruning, a GA genetic algorithm with OTA loss function, further reduces the model size while better learning the strip steel defect feature information, thus improving the generalisation ability and accuracy of the model. The experimental results show that the introduction of the RepVGG module and the use of FasterNet can well improve the model performance, with a reduction of 48% in the number of parameters, a reduction of 13% in the number of GFLOPs, an inference time of 77% of the original, and an optimal accuracy compared with the network models in recent years. The experimental results on the NEU-DET dataset show that the accuracy of YOLO-LFPD is improved by 3% to 81.2%, which is better than other models, and provides new ideas and references for the lightweight strip steel surface defect detection scenarios and application deployment.

본문 82,640자

본문 펼치기
Strip steel surface defect recognition research has important research significance in industrial production.Aiming at the problems of defect feature extraction, slow detection speed, and insufficient datasets, YOLOv5 is improved on the basis of YOLOv5, and the YOLO-LFPD (lightweight fine particle detection) model is proposed.By introducing the RepVGG (Re-param VGG) module, the robustness of the model is enhanced, and the expressive ability of the model is improved.FasterNet is used to replace the backbone network, which ensures accuracy and accelerates the inference speed, making the model more suitable for real-time monitoring.The use of pruning, a GA genetic algorithm with OTA loss function, further reduces the model size while better learning the strip steel defect feature information, thus improving the generalisation ability and accuracy of the model.The experimental results show that the introduction of the RepVGG module and the use of FasterNet can well improve the model performance, with a reduction of 48% in the number of parameters, a reduction of 13% in the number of GFLOPs, an inference time of 77% of the original, and an optimal accuracy compared with the network models in recent years.The experimental results on the NEU-DET dataset show that the accuracy of YOLO-LFPD is improved by 3% to 81.2%, which is better than other models, and provides new ideas and references for the lightweight strip steel surface defect detection scenarios and application deployment. Introduction Machine learning techniques are commonly employed in the detection of surface defects in steel.For instance, to enhance the usability of the original image, operations like denoising and enhancement are performed.Next, features such as texture and shape features are extracted to describe the feature information of steel surface defects.Finally, a classifier like support vector machines (SVMs) [1], random forests (Random Forests) [2], etc. is used to classify and recognize the extracted features.These methods can detect steel surface defects to some extent.However, they rely on hand-designed features and require a separate design of feature extractors and classifiers for defects of different types and scales.Therefore, they have limited generalisation capability.The emergence of deep learning methods in recent years has led to a significant breakthrough in steel surface defect detection technology.Deep learning methods can automatically learn feature representations in images with better generalisation ability and robustness by constructing deep neural network models.The convolutional neural network (CNN) [3] is widely used in steel surface defect detection due to its excellent performance in image processing.These methods are capable of extracting feature representations of steel surface defects effectively. Introduction They are also capable of end-to-end training and optimization, resulting in more accurate and efficient defect detection. Introduction The current task of detecting defects in strip steel using deep learning models presents several challenges.These models typically require a large amount of labelled data for training, but the acquisition and labelling of strip steel defect images in practical applications are costly.As a result, there are limited training samples available, which makes it difficult to train the models.Secondly, strip steel defects come in various types and have complex morphology.Differentiating between these types of defects often requires a lightweight and highly efficient method of constructing a strip steel defect detection model based on deep learning.The deep learning model utilises feature learning and generalisation to improve the accuracy and efficiency of strip steel defect detection.This reduces manpower costs and promotes intelligent processes in strip steel production. Introduction Currently, there are three mainstream strip defect detection algorithms: Mask R-CNN [4], EfficientDet [5], and YOLO (you only look once) [6].The two-stage target detection algorithms typically involve two phases: candidate frame generation and frame classification.During the candidate frame generation phase, the algorithm extracts potential target regions from the input image using techniques such as the region proposal network (RPN).In the frame classification stage, the generated candidate frames undergo target category judgement through a classifier and are adjusted as necessary to obtain the final target detection result.Compared to the one-phase detection algorithm, the twophase detection algorithm requires more computational resources and time to perform the two-phase operation, resulting in slower detection speed.This makes it unsuitable for application scenarios with high real-time requirements.Secondly, the generation of candidate boxes typically involves methods such as sliding windows or region proposal networks.These methods can result in significant computational and storage overheads when dealing with a large number of candidate boxes, which can limit the scalability of the algorithm.Furthermore, two-stage detection algorithms are not effective in detecting small targets due to the challenge of generating candidate frames efficiently in the candidate frame generation stage.This often leads to missed or false detections.As a result, one-stage detection algorithms, such as the YOLO algorithm, demonstrate better performance and generalisability in industrial applications. Introduction YOLO (you only look once) [6] is a series of classical single-stage target detection algorithms designed to achieve fast and accurate target detection.The evolved versions of YOLO, including YOLOv5, YOLOX [7], YOLOv7 [8], and YOLOv8, employ a lightweight backbone network with high feature extraction and parameter efficiency.The model's feature extraction process primarily consists of bottleneck structures.Terven, J.R. et al. [9] provide a comprehensive analysis of the development of YOLOv1 to YOLOv8.The authors argue that all official YOLO models from YOLOv5 onwards have fine-tuned the trade-off between speed and accuracy, with the aim of better adapting to specific applications and hardware requirements.There is no significant difference in accuracy from YOLOv5 to YOLOv8, and YOLOv5 has greater scalability and community resources than YOLOv8.During the testing of the NEU-DET dataset with YOLOv8, it was observed that the detection results for small targets were unsatisfactory and the training time was longer compared to YOLOv5.As a result, YOLOv5 was chosen over YOLOv8. Introduction In order to achieve better results in strip defect detection with insufficient datasets, the YOLO-LFPD model is proposed in this paper.The Fasternet backbone network and RepVGG (Re-param VGG) are introduced on the basis of the YOLO-LFPD model with the aim of reducing redundant computations and memory accesses.RepVGG is a lightweight convolutional neural network structure with a simple but effective design, which aims to maintain high performance with a small number of parameters and low computational cost.In addition, the YOLO-LFPD model can be made lightweight by pruning techniques, which reduces the number of parameters and the amount of computation required.This greatly improves the inference speed of the model, reduces the deployment cost, and allows it to be used in resource-limited devices or environments while maintaining detection accuracy.The main contributions of this paper are as follows: Introduction 1. Introduction In this paper, the pruning method is used to enable the model to select the appropriate parameter size for actual detection.When the parameter size is reduced to half of the original, the accuracy rate of mAP50 can still reach 75.6%.In addition, the replacement loss function and hyperparameter evolution methods can improve the accuracy of mAP50 by 6.5% when the model parameters are reduced. 2. The RepVGG module simplifies the inference process while allowing the model to acquire more surface defect feature information, with a 0.8% increase in mAP50 accuracy, which reduces the depth of the model while being able to improve the extraction of surface defect image features from the strip.A better fusion effect was obtained by testing the location of the FasterNet module, with a 0.2% increase in mAP50 accuracy. 2. In addition, the FasterNet module allows the model to ignore unimportant feature information, reducing the amount of computation while preventing model overfitting, and reducing the number of parameters and the amount of computation of the model, with the number of parameters being 63.6% of the original, and the GFLOPs being 73.8% of the original. 3. Performance tests were conducted on the NEU dataset, GC10-DET dataset, and PKU-Market-PCB dataset.The experimental results demonstrate that the model's accuracy and number of parameters in this paper are optimal compared to network models from the past two years.Additionally, the model's ability to perform inference speed is also noteworthy, providing a reference for the application of surface defect detection of strip steel and the deployment of the model in actual production scenarios.The model serves as a reference for applying and deploying it in real production scenarios. 3. The article is structured into several sections.Section 2 compares the strip defect object detection model, the strip defect dataset, and the YOLO method.Section 3 describes some architectural details of the improved algorithm's backbone network.Section 4 analyses the data experiments, and Sections 5 and 6 conclude the article. Strip Defect Detection Technology Traditional image processing methods are significant in detecting defects on steel surfaces.These methods employ image processing techniques to enhance image data and locate defect regions.Juan et al. [10] employed a histogram thresholding method that integrated empirical knowledge to detect residual oxide skins in stainless steel production.Neogi et al. [11] developed a global adaptive thresholding technique for defect detection in steel strips, which adjusts the threshold adaptively based on the number of pixels with grey values in the gradient image.Li et al. [12] and Chen et al. [13] used a region-growing algorithm for the detection of defects in steel plates with high accuracy. Strip Defect Detection Technology Deep learning methods achieve end-to-end learning.This means that feature representation and target detection tasks are learned directly from raw data.In contrast, traditional methods require the manual design of feature extractors and classifiers, which can be a cumbersome and error-prone process.Furthermore, the deep learning model is highly adaptable and can effectively handle target detection tasks of varying scales, shapes, and poses.In contrast, traditional methods often require manual parameter adjustments and threshold settings. Strip Defect Detection Technology Lu et al. [14] proposed a YOLO-FPD defect detection method, which includes spatial pyramid pooling fast advance (SPPF-A) and convolutional separated bottleneck (CSBL) methods, with an accuracy improvement of 1.8%.Liu et al. [15] proposed an MSC-DNet defect detection method with an inflated convolutional PADC and a feature enhancement module FESM, which enhances the extraction of multi-scale features to reduce confusing information.Zhao et al. [16] proposed an LSD-YOLOv5 defect detection method with a smaller bidirectional feature pyramid network (BiFPN-S), which improved the detection speed by 28.7% while increasing the accuracy by 2.4%.Zhao et al. [17] proposed a lightweight efficient detection network (LEDNet), which reduces the computational complexity while adaptively extracting the effective features.Zhou et al. [18] proposed an automated surface defect detection network, DPN-Detector, and proposed a residual space pyramid, RASPP, and a dual pyramid network, DPN.Wang et al. [19] proposed a new multi-scale feature fusion module, ATPF, based on which a deep learning network, CG-Net, was constructed for surface defect detection on strips.Chen et al. [20] proposed a fast surface defect detection network, DCAM-Net, for strips based on deformable convolution and attention mechanisms, and proposed a new enhanced deformable feature extraction block, EDE-block.Chen et al. [21] proposed an improved YOLOX method using variable focal length loss to solve the foreground-background class imbalance problem and predicted the IoU perceptual classification score as the detection ranking criterion.Li et al. [22] proposed a YOLOv5s-GC detection method by applying OTSU and a normal distribution enhancement algorithm (NDEA) to extract feature greyscale and introducing the GhostBottleneck module, which reduces the computation required by 48%. Strip Defect Detection Technology The improvement of deep learning models in recent years is based on the transformer model and the YOLO model with improved convolutional neural networks.The main research direction in surface defect detection of strips is to improve the multi-scale spatial pyramid structure, the residual network structure, and the variant convolution.The reason for this is that the localisation of features in strip steel defect detection is inaccurate, and the size of the dataset restricts the depth of the model, which reduces the efficiency of the arithmetic power usage.Both the multi-scale spatial pyramid and the residual network are better at retaining the defective features and improving the accuracy of the recognition.Furthermore, the variant convolution reduces the wastage of the arithmetic power, which in turn reduces the size of the model and speeds up the detection efficiency. Pruning Pruning is a technique used to reduce the number of parameters and computational effort of a neural network model.The main idea is to improve the efficiency of the model by identifying and removing connections or parameters that contribute less to the performance of the model while maintaining its accuracy.Pruning techniques are usually classified into two types: structural pruning and weighted pruning. Pruning Structural pruning, also known as network pruning, involves reducing the number of parameters in a model by removing entire neurons, channels, or layers.This process is typically performed after training by evaluating and filtering the model to identify the parts that can be pruned.Among the structural pruning methods for YOLO models, common ones include LAMP pruning [23], SLIM pruning [24], Group_slim pruning [25], Group_sl pruning [26], Growing_reg pruning [27], Group_taylor pruning [28], and others. Pruning LAMP pruning (layer-adaptive magnitude-based pruning) is adaptive insofar as it considers the importance of each layer for pruning.This method is capable of reducing the amount of computation and number of parameters required while retaining the key feature extraction capability, which is highly suitable for target detection tasks such as YOLO with high real-time requirements.SLIM pruning (sparse learning with implicit magnitude pruning) can dynamically adjust the model complexity during the training process to adapt to the YOLO model hierarchical structure, thus significantly reducing the number of parameters and required computation under the premise of maintaining accuracy.Group_slim pruning is an effective method for reducing the redundancy of the YOLO model.It involves grouping pruning and retaining the important channels in each group while maintaining the overall structure of the model and the feature extraction capability.Group_sl pruning further optimises the Group_slim pruning strategy, which makes the pruned model more robust and efficient in practical applications.It is suitable for the deployment of YOLO models in different scenarios.Growing-reg pruning combines the advantages of pruning and regularisation, and can gradually adapt to the data distribution and task requirements during the training process.This enables the pruned YOLO model to reach a good balance between accuracy and efficiency.Group_taylor pruning employs Taylor expansion to estimate the relative importance of each channel, thereby enabling the retention of the most crucial feature channels for the YOLO model, which relies on channel features for target detection.This approach has been shown to significantly enhance the performance of the model following pruning. Pruning Weight pruning is a technique used to reduce the number of parameters in a model by setting certain weights to zero.This method is typically performed during training and involves dynamically setting weights smaller than a certain threshold to zero.Common weight pruning methods include L1 pruning [29], which prunes by absolute magnitude, and pruning by gradient magnitude. Pruning Pruning techniques offer several advantages, including reducing the number of model parameters and computations, improving model efficiency and lightweightness, reducing the risk of overfitting, and improving training and inference speed.Additionally, pruning can save storage space and energy consumption by effectively removing unnecessary parameters and connections in the model, thus reducing computational complexity and memory consumption.Pruned models are typically more lightweight and better suited for resource-constrained environments, such as mobile devices and embedded systems. Hyperparameter Evolution and the OTA Loss Function The YOLO target detection algorithm is an efficient method for detecting targets.However, its performance can be affected by the selection of hyperparameters.To optimize these hyperparameters, the genetic algorithm (GA) can be used as a heuristic search method.The GA is an optimization algorithm that involves a series of mathematical representations and operations.Firstly, a fitness function f (x) is defined to evaluate the performance of an individual x.This is usually based on the model's performance on a validation set.An individual x represents a hyperparameter combination, typically a vector or chromosome, containing multiple hyperparameter values.For example, x = (x 1 , x 2 , . . . ,x n ), where x i denotes the value of the ith hyperparameter.The initialised population P contains a collection of multiple individuals, e.g., P = {x 1 , x 2 , . . . ,x m }, where m denotes the size of the population. Hyperparameter Evolution and the OTA Loss Function During the selection operation, the parent individual is chosen based on its fitness value, f (x).This can be achieved through methods such as roulette selection or bidding tournament selection.The crossover operation involves combining the genetic information of the parent individuals, x 1 and x 2 .Finally, the mutation operation introduces a new combination of genes by randomly varying the genetic information of the individual x.For instance, an individual's hyperparameters can be randomly perturbed or replaced.New offspring individuals are generated by selection, crossover, and mutation operations to update population P and obtain P'.The final hyperparameter combination is determined by the highest fitness when the maximum number of iterations is reached or the stopping condition is satisfied.The description above includes a mathematical representation of the fitness function f (x), the individual representation x, the initialized population P, the selection operation Select(P), the crossover operation Crossover(x 1 , x 2 ), the mutation operation Mutate(x), and the update of the population P'. Hyperparameter Evolution and the OTA Loss Function OTA (optimal transport assignment for object detection) is a loss function designed to solve the problem of target assignment in target detection.It adopts an ordering-based strategy to optimise performance by pairing the bounding box output from the detector with the real target.The main idea of OTA is to transform the target detection task into a Hungarian algorithmic problem to minimise the total loss of matching.OTA consists of two components: matching loss and no matching loss. Hyperparameter Evolution and the OTA Loss Function The matching loss evaluates the quality of matching by calculating the degree of match between the bounding box output by the detector and the real target.This process utilises the intersection over union (IoU) score as the matching metric.It determines the degree of overlap between the detected and actual boxes by calculating the ratio of the intersection area of the detected box and the actual box to their combined area.The OTA loss function then pairs the detection frames with the actual target using the Hungarian algorithm to minimise the total matching loss.The Hungarian algorithm, also referred to as the Hungarian method or the Kuhn-Munkres algorithm, is an optimisation algorithm used to solve the assignment problem.The time complexity of the Hungarian algorithm is O n 3 , where n represents the number of objects and tasks.Equation (1) represents the matching loss, where N represents the number of detection frames, M represents the number of real targets, and IoU i,j represents the IoU value between the ith detection frame and the jth real target.The matching loss is shown in Equation ( 1) Hyperparameter Evolution and the OTA Loss Function The no-match loss addresses the situation where real targets are not matched, ensuring that all detection frames receive appropriate penalties.The no-match loss can be calculated by determining the confidence scores of the unmatched detection frames using Equation (2), where λ represents the weight parameter and IoU i,max represents the maximum IoU value of the ith detection frame with respect to all real targets. Hyperparameter Evolution and the OTA Loss Function The OTA loss function optimises the performance of the target detection model by minimising the total loss function, which combines matching and non-matching losses.The degree of match between the detection frame and the real target can be evaluated more accurately by introducing sorting and Hungarian algorithms. Datasets The NEU-DET dataset, the industrial metal surface defects GC10-DET dataset [30], and the circuit board surface defects PKU-Market-PCB dataset used in the experiments in this section are all from real production products, and their defects are closer to the actual situation.The images in the PKU-Market-PCB dataset are dominated by surface defects, which is suitable for the generalisation of the strip defects detection model as a test dataset.The circuit board surface defects dataset has been used in papers [31][32][33][34][35][36][37] on strip defect detection research in recent years. Datasets The NEU-DET dataset is a public dataset created at Northeastern University for strip surface defect detection and contains six common defect types: roll marks, inclusions, scratches, indentations, pits, and cracks.The dataset features high-resolution images and accurate labelling of defect categories to provide a detailed picture of the subtle defect characteristics on the strip surface.As shown in Figure 1, the NEU-DET dataset totals 1800, where each class of defects contains 300 images with a size of 200 × 200 pixels.The training set, test set, and validation set will be randomly generated at 8:1:1 for the experiment.Ten types of surface defects are included within the GC10-DET dataset as shown in Figure 2, i.e., Punch (Pu), Weld (Wl), Crescent Gap (Cg), Water Spot (WS), Oil Spot (Os), Silk Spot (Ss), Inclusions (In), Rolled Pit (Rp), Crease (Cr), and Waist Fold (Wf).The GC10-DET dataset consists of a total of 2294 images with an image size of 2048 × 1000 pixels.The experiment randomly generates the training set, test set, and validation set in 7:2:1, as shown in Figure 3.Ten types of surface defects are included within the GC10-DET dataset as shown in Figure 2, i.e., Punch (Pu), Weld (Wl), Crescent Gap (Cg), Water Spot (WS), Oil Spot (Os), Silk Spot (Ss), Inclusions (In), Rolled Pit (Rp), Crease (Cr), and Waist Fold (Wf).The GC10-DET dataset consists of a total of 2294 images with an image size of 2048 × 1000 pixels.The experiment randomly generates the training set, test set, and validation set in 7:2:1, as shown in Figure 3.Ten types of surface defects are included within the GC10-DET dataset as shown in Figure 2, i.e., Punch (Pu), Weld (Wl), Crescent Gap (Cg), Water Spot (WS), Oil Spot (Os), Silk Spot (Ss), Inclusions (In), Rolled Pit (Rp), Crease (Cr), and Waist Fold (Wf).The GC10-DET dataset consists of a total of 2294 images with an image size of 2048 × 1000 pixels.The experiment randomly generates the training set, test set, and validation set in 7:2:1, as shown in Figure 3.The PKU-Market-PCB dataset has a total of six types of defects: leakage holes, rat bites, open circuits, short circuits, stray and stray copper.As shown in Figure 4.The experiment randomly generates the training set, test set, and validation set according to 7:2:1, and the number of defects of each type is shown in Modelling Design YOLO-FPD [14] is one of our models for strip defect detection, and our proposed residual module LSTM as well as the spatial pyramid pooling module SPPF-A have achieved good results, with a 1.7% improvement in accuracy compared to the original YOLOv5 model.To cope with the possible inadequacy of the dataset images, we propose the SSIN image enhancement method, which varies the original NEU-DET dataset images and improves the accuracy by 37.5% while keeping other conditions constant.However, the YOLO-FPD model size does not decrease significantly, and there is room for improvement in lightweighting.In addition, when the SSIN image enhancement method is not used and the dataset images are not sufficient, it is prone to training overfitting, which affects the accuracy rate.Therefore, we propose the YOLO-LFPD model, which mainly introduces the Fasternet backbone network, RepVGG (Re-param VGG), and pruning techniques to maintain high performance while having a small number of parameters and low computational cost, providing a feasible application of the model in the resource-limited devices or environments. Modelling Design The YOLO-FPD [14] model mainly includes the neck network, backbone network, and ASFF detector head.In_channel denotes the number of input channels, out_channel denotes the number of output channels, kernel_size denotes the size of the convolution kernel, and stride denotes the step size.In a backbone network, CSBL greatly reduces the number of parameters and computations of the model by decomposing the standard convolution operation into two independent operations: depth convolution and point-bypoint convolution.This helps to reduce the size of the model and improves the lightweight and efficient performance of the model.With the introduction of CBAM in the neck network, a CBAM module is added at the end of each CSBL module, and a CBAM module is also added after the SPPF-A layer of the neck network. Modelling Design In order to improve lightweightness, Fasternet and RepVGG structures are introduced and the YOLO-LFPD model is proposed.As shown in Figure 5, Fasternet, as a lightweight feature fusion network with small model parameters and computational complexity, is able to effectively extract the feature information of the strip image and enhance the model's ability to detect defects at different scales through multi-scale feature fusion.RepVGG, as a simple and efficient convolutional neural network structure with good model compression effect and versatility, can effectively reduce the computational burden of the model and maintain high detection accuracy.Taken together, combining Fasternet and RepVGG into the YOLO-LFPD model can improve the lightweightness and high efficiency of the model while maintaining the superior performance of the model on the defect detection dataset.In addition, the pruning technique can reduce the number of parameters and the computation requirements of the model and improve the inference speed.The combined use of these techniques can effectively improve the performance and efficiency of the model in the strip steel surface defect detection task. Modelling Design of the model and maintain high detection accuracy.Taken together, combining Fasternet and RepVGG into the YOLO-LFPD model can improve the lightweightness and high efficiency of the model while maintaining the superior performance of the model on the defect detection dataset.In addition, the pruning technique can reduce the number of parameters and the computation requirements of the model and improve the inference speed.The combined use of these techniques can effectively improve the performance and efficiency of the model in the strip steel surface defect detection task. FasterNet Network FasterNet [38] is a new family of neural networks designed to achieve high speed and high efficiency in various visual tasks, and its efficient architecture is capable of processing large amounts of image data at high speeds in strip production lines to meet the requirements of high frame rate and low latency, thus improving productivity and quality control.It employs a novel partial convolution operator called PConv (partial convolution) and the off-the-shelf PWConv (pointwise convolution) as the main construction operators to reduce the computational redundancy and the number of memory accesses, thus improving the speed and efficiency of the network.When the input and output feature maps have the same number of channels, PConv has FLOPs of ℎ × × × .If we take the default value of c = c/4 for the c channel, the FLOPs are 1/16 of those of regular Conv.The memory access of PConv is approximately ℎ × × c + × ≈ ℎ × × 2c , if we take the default value of c = c/4, its memory access is only 1/4 of that of conventional Conv. FasterNet Network FasterNet [38] is a new family of neural networks designed to achieve high speed and high efficiency in various visual tasks, and its efficient architecture is capable of processing large amounts of image data at high speeds in strip production lines to meet the requirements of high frame rate and low latency, thus improving productivity and quality control.It employs a novel partial convolution operator called PConv (partial convolution) and the off-the-shelf PWConv (pointwise convolution) as the main construction operators to reduce the computational redundancy and the number of memory accesses, thus improving the speed and efficiency of the network.When the input and output feature maps have the same number of channels, PConv has FLOPs of h × w × k 2 × c 2 p .If we take the default value of c p = c/4 for the c p channel, the FLOPs are 1/16 of those of regular Conv.The memory access of PConv is approximately h × w × c p + k 2 × c 2 p ≈ h × w × 2c p , if we take the default value of c p = c/4, its memory access is only 1/4 of that of conventional Conv. FasterNet Network To fully and efficiently utilize the information from all channels, point-by-point convolution (PWConv) is further appended to PConv as shown in Figure 6.Their effective receptive field on the input feature map looks like a T-shaped Conv, which focuses more on the centre position than the regular Conv of a uniformly processed patch.In terms of small target detection, PConv can flexibly deal with localized regions of the feature map to enhance the recognition of small defects on the strip surface, and further improve the detection accuracy by combining with multi-scale feature extraction methods.To fully and efficiently utilize the information from all channels, point-by-point convolution (PWConv) is further appended to PConv as shown in Figure 6.Their effective receptive field on the input feature map looks like a T-shaped Conv, which focuses more on the centre position than the regular Conv of a uniformly processed patch.In terms of small target detection, PConv can flexibly deal with localized regions of the feature map to enhance the recognition of small defects on the strip surface, and further improve the detection accuracy by combining with multi-scale feature extraction methods.Different locations of FasterNet integration into the model will have different impacts on the feature extraction, fusion, and final detection performance of the model.Introducing the backbone network can make early feature extraction efficient and flexible and improve the quality of the initial feature map; introducing the neck network can improve the detection accuracy of both small and large targets; and introducing the head detection network can utilize more efficient feature representations when predicting the category and location.Through the 4.4 Fusion Location experimental test, this paper chooses to introduce FasterNet into the backbone network. FasterNet Network Figure 7a shows the original YOLO structure and Figure 7b shows the YOLO-FPD model structure after replacing the original C3 module with the C3Faster module.The FasterNet backbone network is adopted to accelerate the processing speed of target detection, enabling the system to respond to input images faster and achieve higher frame rates in real-time scenes.Furthermore, FasterNet boasts a low computational complexity and requires fewer memory accesses, making it ideal for efficient inference in resource-constrained environments, such as embedded systems and mobile devices.The DCNv2 module in YOLO-FPD was replaced with normal convolution to avoid conflicts in strategy when using the two variants of convolutional structures together.If the DCNv2 module is used, overfitting may occur, resulting in a model that performs well on the training set but poorly on the validation and test sets.It is important to note that each convolutional variant has its own specific feature extraction method and optimization goals.Combining different structures can lead to conflicts or incoherence in feature expression, which can prevent the model from effectively learning useful features or even interfere with each other, reducing the model's performance.Additionally, different convolutional structures may require distinct training strategies, regularization methods, or optimization algorithms to achieve optimal results.When combining them, the original optimization strategy may no longer be applicable, and the training process needs to be carefully adjusted and optimized. RepVGG RepVGG is a lightweight convolutional neural network architecture based on the repetitive module design idea.It aims to achieve efficient model training and inference.The network was proposed by a team of researchers at Microsoft Research Asia in 2021 as an innovative solution that departs from the traditional convolutional neural network design paradigm, offering higher efficiency and greater versatility.Convolutional neural net- The DCNv2 module in YOLO-FPD was replaced with normal convolution to avoid conflicts in strategy when using the two variants of convolutional structures together.If the DCNv2 module is used, overfitting may occur, resulting in a model that performs well on the training set but poorly on the validation and test sets.It is important to note that each convolutional variant has its own specific feature extraction method and optimization goals.Combining different structures can lead to conflicts or incoherence in feature expression, which can prevent the model from effectively learning useful features or even interfere with each other, reducing the model's performance.Additionally, different convolutional structures may require distinct training strategies, regularization methods, or optimization algorithms to achieve optimal results.When combining them, the original optimization strategy may no longer be applicable, and the training process needs to be carefully adjusted and optimized. RepVGG RepVGG is a lightweight convolutional neural network architecture based on the repetitive module design idea.It aims to achieve efficient model training and inference.The network was proposed by a team of researchers at Microsoft Research Asia in 2021 as an innovative solution that departs from the traditional convolutional neural network design paradigm, offering higher efficiency and greater versatility.Convolutional neural networks (CNNs) typically comprise convolutional, pooling, and fully connected layers.These structures contain a large number of parameters, leading to high model complexity, slow training, and low inference efficiency.RepVGG takes a concise and efficient approach by dividing the network into RepVGG blocks, each containing simple convolutional layers, BatchNormalization layers, and ReLU activation functions.The network is built by stacking these blocks.The structure of RepVGG modules is illustrated in Figure 8.The RepVGG block's core components consist of normal convolutional layers with a fixed kernel size of 3 × 3.By adjusting parameters such as the number of output channels and step size, different sensory fields and feature extraction capabilities can be achieved.The BatchNormalization layer accelerates the model's convergence process and improves its stability.The ReLU activation function introduces nonlinearities that enhance the network's expressive power.By stacking RepVGG blocks repeatedly, RepVGG networks with varying depths and complexities can be constructed.This feature enables RepVGG to operate in environments with limited computational resources and adapt to various tasks and scenarios.RepVGG's model training and inference are highly efficient.Another notable feature of RepVGG is its ability to maintain high efficiency in model training and inference.Due to its simple network structure and small number of parameters, RepVGG exhibits fast convergence during training and achieves superior model performance quickly.Additionally, RepVGG has low computational complexity and memory usage during inference, making it ideal for resource-constrained environments like mobile devices, embedded systems, and edge computing. RepVGG Figure 9a shows the original YOLO structure and Figure 9b shows the model structure of the YOLO-FPD with the integrated RepVGG module.RepVGG simplifies the computational complexity by using numerous 3 × 3 convolutional layers and eliminating the intricate branching structure.This design concept accelerates the forward inference process of the model, making it suitable for real-time detection scenarios.The language used is clear, objective, and value-neutral, and the technical terms are consistent throughout the text.The grammar, spelling, and punctuation are correct.No changes in content have been made.This not only ensures objectivity but also reduces the complexity of model maintenance and debugging.It is crucial to maintain a clear and concise writing style in technical writing.RepVGG's structure allows for easy conversion to a more efficient inference structure through reparameterisation techniques after training.This flexibility enables the full exploitation of RepVGG's structural advantages during the training phase while optimizing the model's performance and efficiency during deployment.Furthermore, RepVGG's improved feature extraction capability positively impacts YOLO-FPD's ability to detect objects of varying scales.The RepVGG block's core components consist of normal convolutional layers with a fixed kernel size of 3 × 3.By adjusting parameters such as the number of output channels and step size, different sensory fields and feature extraction capabilities can be achieved.The BatchNormalization layer accelerates the model's convergence process and improves its stability.The ReLU activation function introduces nonlinearities that enhance the network's expressive power.By stacking RepVGG blocks repeatedly, RepVGG networks with varying depths and complexities can be constructed.This feature enables RepVGG to operate in environments with limited computational resources and adapt to various tasks and scenarios.RepVGG's model training and inference are highly efficient.Another notable feature of RepVGG is its ability to maintain high efficiency in model training and inference.Due to its simple network structure and small number of parameters, RepVGG exhibits fast convergence during training and achieves superior model performance quickly.Additionally, RepVGG has low computational complexity and memory usage during inference, making it ideal for resource-constrained environments like mobile devices, embedded systems, and edge computing. RepVGG Figure 9a shows the original YOLO structure and Figure 9b shows the model structure of the YOLO-FPD with the integrated RepVGG module.RepVGG simplifies the computational complexity by using numerous 3 × 3 convolutional layers and eliminating the intricate branching structure.This design concept accelerates the forward inference process of the model, making it suitable for real-time detection scenarios.The language used is clear, objective, and value-neutral, and the technical terms are consistent throughout the text.The grammar, spelling, and punctuation are correct.No changes in content have been made.This not only ensures objectivity but also reduces the complexity of model maintenance and debugging.It is crucial to maintain a clear and concise writing style in technical writing.RepVGG's structure allows for easy conversion to a more efficient inference structure through reparameterisation techniques after training.This flexibility enables the full exploitation of RepVGG's structural advantages during the training phase while optimizing the model's performance and efficiency during deployment.Furthermore, RepVGG's improved feature extraction capability positively impacts YOLO-FPD's ability to detect objects of varying scales. Experiments and Analyses This section evaluates the performance of YOLO-FPD in detecting strip surface defects after implementing FasterNet and RepVGG. Experiments and Analyses The performance of these models is compared to other models.The experiment sets the epoch of each model to 400, with the initial learning rate set to 0.1 and then gradually converging to 0. The 400 epoch ensures that all models involved in the comparison are trained to the maximum extent possible.The optimizer uses SGD.The GC10-DET dataset has a high image resolution, but due to limitations in the experimental device's video memory, the training batch size is set to 16 for both training and testing.The NEU dataset and the PKU-Market-PCB dataset have a training batch size of 32.Please refer to Table 2 for details on the experimental environment. Experiments and Analyses The metrics used in this paper include mAP (mean accuracy), frames per second (FPS), number of model parameters (params), number of floating-point computations (GFLOPs), size of pre-trained models (MB), and number of layers of the YOLO model (LAYERS) in the COCO metric.mAP (mean average precision) is a commonly used evaluation metric in target detection tasks, providing a comprehensive measure of model performance by calculating and averaging the average precision (AP) values for each type of target under different IoU (intersection-parity ratio) thresholds.mAP is calculated by integrating the precision-recall (P-R) curve, while mAP combines the AP values for a number of IoU thresholds (from 0.5 to 0.95) of AP values, reflecting the combined performance of the model at different confidence levels and thresholds.mAP@0.5 is a commonly used simplified metric that is particularly suitable for defect detection tasks. Experiments and Analyses FPS is used to evaluate the real-time processing capability of the model, i.e., the number of image frames that can be processed per second.The number of model parameters (params) indicates the total number of trainable parameters in the model, reflecting the complexity of the model.The amount of floating point computations (GFLOPs) is used to measure the amount of computation required for each inference of the model.Pre-trained Experiments and Analyses This section evaluates the performance of YOLO-FPD in detecting strip surface defects after implementing FasterNet and RepVGG. Experiments and Analyses The performance of these models is compared to other models.The experiment sets the epoch of each model to 400, with the initial learning rate set to 0.1 and then gradually converging to 0. The 400 epoch ensures that all models involved in the comparison are trained to the maximum extent possible.The optimizer uses SGD.The GC10-DET dataset has a high image resolution, but due to limitations in the experimental device's video memory, the training batch size is set to 16 for both training and testing.The NEU dataset and the PKU-Market-PCB dataset have a training batch size of 32.Please refer to Table 2 for details on the experimental environment.The metrics used in this paper include mAP (mean accuracy), frames per second (FPS), number of model parameters (params), number of floating-point computations (GFLOPs), size of pre-trained models (MB), and number of layers of the YOLO model (LAYERS) in the COCO metric.mAP (mean average precision) is a commonly used evaluation metric in target detection tasks, providing a comprehensive measure of model performance by calculating and averaging the average precision (AP) values for each type of target under different IoU (intersection-parity ratio) thresholds.mAP is calculated by integrating the precision-recall (P-R) curve, while mAP combines the AP values for a number of IoU thresholds (from 0.5 to 0.95) of AP values, reflecting the combined performance of the model at different confidence levels and thresholds.mAP@0.5 is a commonly used simplified metric that is particularly suitable for defect detection tasks. Experiments and Analyses FPS is used to evaluate the real-time processing capability of the model, i.e., the number of image frames that can be processed per second.The number of model parameters (params) indicates the total number of trainable parameters in the model, reflecting the complexity of the model.The amount of floating point computations (GFLOPs) is used to measure the amount of computation required for each inference of the model.Pre-trained model size (MB) refers to the size of the model on the storage medium and affects the ease of deployment.The number of layers (LAYERS) of the YOLO model indicates the depth of the model and affects the capability and complexity of feature extraction. Dataset Experiments In this study, the novel model named YOLO-LFPD is proposed.The YOLO-LFPD model significantly improves the inference speed by introducing lightweight network modules such as RepVGG and FastNet while maintaining high detection speed and accuracy.Among them, the YOLO model has five different sizes and complexities from small to large: n, s (small), m (medium), l and x (extra large), with the difference only in the number of channels, where n is optimized for Nano devices (e.g., NVIDIA Jetson Nano), which is the fastest, although it sacrifices accuracy.YOLO-LFPD uses a size class of s, so YOLOv5s and YOLOv7s were chosen for comparison.The epoch is set to 400, the learning rate is initially 0.1 and then decreases to 0. The optimizer uses SGD and the batch size is set to 64. Dataset Experiments As shown in Figure 10, compared with traditional models such as YOLOv5, YOLOv7, and Faster R-CNN, our model exhibits better performance when the dataset image resources are not sufficient to meet the training requirements.Although the accuracy of YOLOv5 improves rapidly in the early stages of training, the accuracy cannot be improved further due to the overfitting situation of the model, peaking at nearly 400 epochs.YOLO-LFPD, on the other hand, reduces the depth of the model and increases the residual structure compared to YOLO-FPD, which allows better attention to defective features with an insufficient number of samples, and peaks when training reaches about 250 iterations, which suggests that the optimised structure captures the target features better. Dataset Experiments In this study, the novel model named YOLO-LFPD is proposed.The YOLO-LFPD model significantly improves the inference speed by introducing lightweight network modules such as RepVGG and FastNet while maintaining high detection speed and accuracy.Among them, the YOLO model has five different sizes and complexities from small to large: n, s (small), m (medium), l (large), and x (extra large), with the difference only in the number of channels, where n is optimized for Nano devices (e.g., NVIDIA Jetson Nano), which is the fastest, although it sacrifices accuracy.YOLO-LFPD uses a size class of s, so YOLOv5s and YOLOv7s were chosen for comparison.The epoch is set to 400, the learning rate is initially 0.1 and then decreases to 0. The optimizer uses SGD and the batch size is set to 64. Dataset Experiments As shown in Figure 10, compared with traditional models such as YOLOv5, YOLOv7, and Faster R-CNN, our model exhibits better performance when the dataset image resources are not sufficient to meet the training requirements.Although the accuracy of YOLOv5 improves rapidly in the early stages of training, the accuracy cannot be improved further due to the overfitting situation of the model, peaking at nearly 400 epochs.YOLO-LFPD, on the other hand, reduces the depth of the model and increases the residual structure compared to YOLO-FPD, which allows better attention to defective features with an insufficient number of samples, and peaks when training reaches about 250 iterations, which suggests that the optimised structure captures the target features better.The training loss and validation loss for each model are shown in Figure 11a.The experimental results can be seen from the loss function curves in Figure 11b, although YOLOv5 has a lower loss value during training compared to the other models, the value starts to rise at about 100 epochs of the validation loss, which is already overfitting, and therefore, the network accuracy starts to decrease, while the YOLO-LFPD loss curve is more stable due to the addition of more residual structure loss curves.It can be seen that when training the model using a dataset with an insufficient number of images, once overfitting occurs, it is difficult to continue to improve the accuracy. Dataset Experiments Biomimetics 2024, 9, x FOR PEER REVIEW 15 of 27 Dataset Experiments The training loss and validation loss for each model are shown in Figure 11a.The experimental results can be seen from the loss function curves in Figure 11b, although YOLOv5 has a lower loss value during training compared to the other models, the value starts to rise at about 100 epochs of the validation loss, which is already overfitting, and therefore, the network accuracy starts to decrease, while the YOLO-LFPD loss curve is more stable due to the addition of more residual structure loss curves.It can be seen that when training the model using a dataset with an insufficient number of images, once overfitting occurs, it is difficult to continue to improve the accuracy.In order to verify the enhancement of the YOLO-FPD model in target detection results, several classical algorithms for strip steel surface defect detection are selected, including FasterRCNN, SSD, Efficiendet, YOLOv5, and YOLOv8.In addition, there are also improved models for steel surface defect detection carried out in the last two years, such as WFRE-YOLOv8s, ST-YOLO, LFF-YOLO, etc., and the results are shown in Table 3, in which the number of channel parameters selected by YOLO-LFPD-n is the same as that of YOLOv5-n, which is a more lightweight version that reduces the number and size of model parameters.It can be seen that the two improved models, YOLO-LFPD and YOLO-FPD, excel in performance metrics.The YOLO-LFPD model achieves 81.2% in terms of accuracy, while YOLO-FPD also achieves a satisfactory 79.6% accuracy.In addition, both improved models perform well in terms of the number of parameters and the number of floating-point computations, which are 6.4 M parameters and 14.1 GFLOPs and 13.2 M parameters and 20.2 GFLOPs, respectively.In contrast, other models may be a little less accurate or higher in terms of the number of parameters and computations, and the WFRE-YOLOv8s, although it achieves a single accuracy of 93.8% in Pa, the accuracy in Ps is too low; ST-YOLO reaches 97% in Sc, but the number of parameters of the model is too large compared with other one-stage models.Compared with several mainstream and improved algorithms, the results of YOLO-LFPD are competitive.Compared with the YOLOv5 baseline, the accuracy is improved by 3.9%, the GFLOPs on the model size is 87% of the original, and the params is 52% of the original.It can be clearly seen that the two improved models, YOLO-LFPD and YOLO-FPD, achieve better performance on the NEU dataset, with both higher accuracy and relatively lower parameter counts and number of computations.In order to verify the enhancement of the YOLO-FPD model in target detection results, several classical algorithms for strip steel surface defect detection are selected, including FasterRCNN, SSD, Efficiendet, YOLOv5, and YOLOv8.In addition, there are also improved models for steel surface defect detection carried out in the last two years, such as WFRE-YOLOv8s, ST-YOLO, LFF-YOLO, etc., and the results are shown in Table 3, in which the number of channel parameters selected by YOLO-LFPD-n is the same as that of YOLOv5-n, which is a more lightweight version that reduces the number and size of model parameters.It can be seen that the two improved models, YOLO-LFPD and YOLO-FPD, excel in performance metrics.The YOLO-LFPD model achieves 81.2% in terms of accuracy, while YOLO-FPD also achieves a satisfactory 79.6% accuracy.In addition, both improved models perform well in terms of the number of parameters and the number of floating-point computations, which are 6.4 M parameters and 14.1 GFLOPs and 13.2 M parameters and 20.2 GFLOPs, respectively.In contrast, other models may be a little less accurate or higher in terms of the number of parameters and computations, and the WFRE-YOLOv8s, although it achieves a single accuracy of 93.8% in Pa, the accuracy in Ps is too low; ST-YOLO reaches 97% in Sc, but the number of parameters of the model is too large compared with other one-stage models.Compared with several mainstream and improved algorithms, the results of YOLO-LFPD are competitive.Compared with the YOLOv5 baseline, the accuracy is improved by 3.9%, the GFLOPs on the model size is 87% of the original, and the params is 52% of the original.It can be clearly seen that the two improved models, YOLO-LFPD and YOLO-FPD, achieve better performance on the NEU dataset, with both higher accuracy and relatively lower parameter counts and number of computations.The experimental results on the GC10-DET dataset are shown in Figure 12.In addition, since the accuracy of the model fluctuates a lot during the training process, in order to test whether there is any effect of different parameters on the model, it is adjusted in three directions, namely, increasing the confidence threshold, increasing the number of batches, and increasing the depth of the model, in which YOLO-LFPD-A, YOLO-LFPD-B, and YOLO-LFPD-C correspond to the above directions in turn. Dataset Experiments The experimental results on the GC10-DET dataset are shown in Figure 12.In addition, since the accuracy of the model fluctuates a lot during the training process, in order to test whether there is any effect of different parameters on the model, it is adjusted in three directions, namely, increasing the confidence threshold, increasing the number of batches, and increasing the depth of the model, in which YOLO-LFPD-A, YOLO-LFPD-B, and YOLO-LFPD-C correspond to the above directions in turn.Table 4 shows the accuracy of the GC10-DET dataset.YOLO-LFPD achieves 72.8% accuracy, which is a significant improvement over YOLOv5s' 65.5%.LSD-YOLOv5 achieves 67.9% accuracy, slightly higher than YOLOv5, with parameters of 2.7 M and 9.1 GFLOPs, giving it lightweight and efficient advantages.In the recent one-year model, MFAM-Net accuracy is 66.7%, and YOLOX accuracy has improved to 70.5%.In comparison, YOLO-LFPD outperforms LSD-YOLOv5 in terms of accuracy, despite having a higher number of parameters and floating-point computations.WFRE-YOLOv8s achieves a higher accuracy of 69.4% but at the cost of a higher number of parameters.Overall, YOLO-LFPD has the best performance.[16] 67.9 2.7 M params,9.1 GFLOPs MFAM-Net [46] 66.7 − TD-Net [34] 71.5 − Improved YOLOX [21] 70.5 − WFRE-YOLOv8s [45] 69. 4 13.8 M params,32.6GFLOPs YOLO-LFPD 72.8 238 layers, 6.4 M params,14.1 GFLOPs,12.5MB Table 4 shows the accuracy of the GC10-DET dataset.YOLO-LFPD achieves 72.8% accuracy, which is a significant improvement over YOLOv5s' 65.5%.LSD-YOLOv5 achieves 67.9% accuracy, slightly higher than YOLOv5, with parameters of 2.7 M and 9.1 GFLOPs, giving it lightweight and efficient advantages.In the recent one-year model, MFAM-Net accuracy is 66.7%, and YOLOX accuracy has improved to 70.5%.In comparison, YOLO-LFPD outperforms LSD-YOLOv5 in terms of accuracy, despite having a higher number of parameters and floating-point computations.WFRE-YOLOv8s achieves a higher accuracy of 69.4% but at the cost of a higher number of parameters.Overall, YOLO-LFPD has the best performance.[16] 67.9 2.7 M params, 9.1 GFLOPs MFAM-Net [46] 66.7 − TD-Net [34] 71.5 − Improved YOLOX [21] 70.5 − WFRE-YOLOv8s [45] 69. 4 13.8 M params, 32.6 GFLOPs YOLO-LFPD 72.8 238 layers, 6.4 M params, 14.1 GFLOPs, 12.5 MB Dataset Experiments The results on the PKU-Market-PCB dataset are shown in Table 5, where the accuracy of YOLO-LFPD reaches 98.2%, which is a significant improvement from 94.7% in YOLOv5s.Among the models in recent years, TDD-Net achieves an accuracy of 95.1%, YOLO-MBBi achieves an accuracy of 95.3%, and DInPNet achieves an accuracy of 95.5%.PCB-YOLO has an accuracy of 96.0%, which is higher than that of the comparative models in recent years, while YOLO-LFPD has an accuracy of 98.2, thus YOLO-LFPD has a better overall performance. Model mAP@0.5 Model Parameter Tiny RetinaNet [47] 70.0 − EfficientDet [47] 69.0 − TDD-Net [48] 95.1 − YOLOX [47] 92.[48] 95.3 415 layers, 37.2 M params, 104.8 GFLOPs, 74.9 MB YOLO-MBBi [48] 95.3 − PCB-YOLO [47] 96.0 − DInPNet [49] 95.5 − TD-Net [34] 96.2 − YOLO-LFPD 98.2 238 layers, 6.4 M params, 14.1 GFLOPs, 12.5 MB Ablation Experiment The ablation experiment environment configuration is consistent with the above experiments, and this experiment constructs the YOLO-LFPD model by replacing the FasterNet backbone network and adding the RepVGG module to examine its effect on the model recognition accuracy.The experimental results are shown in Table 6, replacing the FasterNet backbone network or adding the RepVGG module can improve the accuracy of the YOLO-LFPD model, and there is not much difference between the two improved accuracies.In terms of the number of parameters, the FasterNet backbone network uses the Frobenius paradigm for simple convolution to reduce the complexity of the model, and the number of parameters is reduced by 4.8 M, and the GFLOPs are reduced by 5.3; the RepVGG module, with its single-path architecture of high flexibility and parallelism, saves a lot of memory in the computation, and the number of parameters is reduced by 2 M, and the GFLOPs are reduced by 0.4 M. The RepVGG module's reparameterisation can make the model structure more compact and at the same time have a higher accuracy, and FasterNet can make the model ignore the feature information which is not very useful, when RepVGG and FasterNet are used together, the model's recognition accuracy is greatly improved, the accuracy is 81.2%, and the number of params is reduced to 5.3; the single path architecture of the RepVGG module is flexible and parallel, which saves a lot of memory when computing, the number of params is reduced by 2 M, and the GFLOPs are reduced by 0.8.The params parameter count is 48.5% of the original and the GFLOPs are 69.8% of the original. Experiments on Reasoning Speed The experiments on inference speed were conducted using the NEU dataset.The model's recognition speed for each image was compared.YOLO-LFPD's FasterNet backbone network is designed efficiently, resulting in a significant increase in the speed of the feature fusion and up-sampling modules of the network.This enables the model to perform better on real-time target detection and edge devices, meeting real-time requirements while reducing the computational burden on edge devices.During the training phase, YOLO-LFPD has a faster training speed compared to the original YOLO, allowing for quicker model training.Table 7 shows that YOLO-LFPD has an inference speed of 5.4 ms per image, which is a 22.9% improvement in speed compared to YOLOv5s.Additionally, the amount of parameters is reduced by 47% and the GFLOPs are reduced by 12%.YOLO-LFPD-n reduces the inference time by 16% compared to YOLOv5n's single image inference time.Additionally, the YOLO-LFPD model has a faster inference speed compared to YOLOv8s and YOLOv7-Tiny.The results demonstrate that the YOLO-LFPD model achieves outstanding performance in terms of model recognition accuracy and overall optimization. Fusion Position Experiments In this paper, the FasterNet module is introduced into the backbone network, the feature pyramid, and the detection head of the YOLO-LFPD model, respectively, and experimental comparisons are conducted on the NEU dataset.The experimental epoch is set to 400, the learning rate has an initial value of 0.1 and then decreases to 0, the optimizer uses SGD, and the batch size is set to 64.FasterNet is able to make full use of its highly efficient feature extraction capability, which significantly improves the quality of the feature maps.As shown in Table 8, the model of the backbone network fused with FasterNet has significantly improved in both mAP@0.5 and FPS, achieving higher detection accuracy and real-time performance. Parametric Experiments The experiment used YOLO-LFPD-n and YOLO-LFPD as test models, NEU as the test dataset, and trained for 400 epochs with a batch size of 32 to test the effect of the GA genetic algorithm and OTA loss function.The results are presented in Figure 13. Figure 13a shows that using both the GA genetic algorithm and OTA loss function improves the model's accuracy and convergence speed.The model's performance is largely affected by hyper-parameters such as grid size, number of a priori frames, and weight of the loss function.Optimising these parameters with the genetic algorithm can find more suitable settings for the task.The OTA loss function can improve the accuracy of target detection by more accurately matching the detection frame with the real target.Additionally, the global optimization strategy of OTA is more sensitive to the problem of sparse target detection, allowing for better handling of missed or multiple detections and resulting in improved accuracy and robustness of detection.The YOLO-LFPD-n model's accuracy is enhanced by the combined use of the GA genetic algorithm and the OTA loss function.This suggests that the two methods produce equally good results when used together.Figure 13b shows that while the GA genetic algorithm and the OTA loss function do not significantly improve the accuracy of the YOLO-LFPD model, they do improve the model's stability during the training process. Parametric Experiments hanced by the combined use of the GA genetic algorithm and the OTA loss function.This suggests that the two methods produce equally good results when used together.Figure 13b shows that while the GA genetic algorithm and the OTA loss function do not significantly improve the accuracy of the YOLO-LFPD model, they do improve the model's stability during the training process.Table 9 shows the experimental results.The YOLO-LFPD-n model, using the OTA loss function, improved mAP50 accuracy by 3.6% and mAP95 by 1.4%.The GA genetic algorithm improved mAP50 accuracy by 3.4% and mAP95 by 1.9%.The combined use of both methods resulted in an improvement of mAP50 accuracy by 4.3% and mAP95 by 2.1%, which is a significant improvement.For the YOLO-LFPD model, using both methods, mAP50 accuracy decreased by 0.7% and mAP95 accuracy improved by 0.1%.Based on the experimental data, it is suggested that the smaller YOLO-LFPD-n model can still learn effectively even when the dataset sample size is insufficient, resulting in improved accuracy.Although YOLO-LFPD is prone to overfitting, the OTA loss function and GA genetic algorithm can improve the extraction of feature information of defects during training.However, this improvement leads to overfitting during validation, which can be prevented by either expanding the dataset or reducing the model size.Table 9 shows the experimental results.The YOLO-LFPD-n model, using the OTA loss function, improved mAP50 accuracy by 3.6% and mAP95 by 1.4%.The GA genetic algorithm improved mAP50 accuracy by 3.4% and mAP95 by 1.9%.The combined use of both methods resulted in an improvement of mAP50 accuracy by 4.3% and mAP95 by 2.1%, which is a significant improvement.For the YOLO-LFPD model, using both methods, mAP50 accuracy decreased by 0.7% and mAP95 accuracy improved by 0.1%.Based on the experimental data, it is suggested that the smaller YOLO-LFPD-n model can still learn effectively even when the dataset sample size is insufficient, resulting in improved accuracy.Although YOLO-LFPD is prone to overfitting, the OTA loss function and GA genetic algorithm can improve the extraction of feature information of defects during training.However, this improvement leads to overfitting during validation, which can be prevented by either expanding the dataset or reducing the model size. Experiment on Pruning To examine the impact of various pruning methods on the model, this section conducts pruning experiments on the NEU dataset using a batch size of 32.During the experiments, it was discovered that the model's convergence was slower after pruning, resulting in an epoch change to 500.The experiments on pruning were carried out using a pre-trained YOLO-LFPD model with 400 epochs.The pruning methods used were LAMP pruning [23], SLIM pruning [24], Group_slim pruning [25], Growing_reg pruning [27], Group_taylor pruning [28], and L1 pruning [29].The compression multiplication rate of pruning is represented by ×. 2.0× is compressed to 50% of the original.The pruning strategy involves disregarding the final layer of the FasterNet backbone network module, the ASFF module, and the CARAFE module.Algorithm 1 code is as follows: Comparison of Forecast Frames To better comprehend the impact of the improved YOLO-LFPD module on actual detection, we will compare the prediction frames of YOLO-LFPD and YOLO-FPD. Comparison of Forecast Frames Figure 14 shows that YOLO-LFPD is capable of accurately detecting and classifying a wide range of irregular features, even when they overlap.In contrast, YOLO-FPD struggles to detect defects in a region as a whole due to insufficient training samples, resulting in prediction boxes with large gaps at the boundaries. Comparison of Forecast Frames As can be seen from Figure 15, YOLO-LFPD possesses a sharper judgement, and in the face of the small and dense defects in Figure 15d, it is still able to distinguish the boundaries of their shapes more clearly, whereas YOLOv5 suffers from more miss-detection and misdetection. Comparison of Forecast Frames To better comprehend the impact of the improved YOLO-LFPD module on actual detection, we will compare the prediction frames of YOLO-LFPD and YOLO-FPD. Comparison of Forecast Frames Figure 14 shows that YOLO-LFPD is capable of accurately detecting and classifying a wide range of irregular features, even when they overlap.In contrast, YOLO-FPD struggles to detect defects in a region as a whole due to insufficient training samples, resulting in prediction boxes with large gaps at the boundaries.As can be seen from Figure 15, YOLO-LFPD possesses a sharper judgement, and in the face of the small and dense defects in Figure 15(d), it is still able to distinguish the boundaries of their shapes more clearly, whereas YOLOv5 suffers from more miss-detection and misdetection.As can be seen from Figure 15, YOLO-LFPD possesses a sharper judgement, and in the face of the small and dense defects in Figure 15(d), it is still able to distinguish the boundaries of their shapes more clearly, whereas YOLOv5 suffers from more miss-detection and misdetection. Heat Map Comparison To facilitate a more intuitive understanding of the improved module of YOLO-LFPD on actual detection, we will compare the prediction frames of YOLOv5 and YOLO-LFPD. Heat Map Comparison Figure 16 shows that the heat map of YOLO-LFPD has a stronger response in the target region.A comparison of the pixel value distribution of the heat maps generated by the two models reveals that the heat map of YOLO-LFPD is brighter and more concentrated in the target region, indicating a stronger target detection response.This suggests that the model can identify the target region more accurately and with greater confidence. Heat Map Comparison on actual detection, we will compare the prediction frames of YOLOv5 and YOLO-LFPD. Heat Map Comparison Figure 16 shows that the heat map of YOLO-LFPD has a stronger response in the target region.A comparison of the pixel value distribution of the heat maps generated by the two models reveals that the heat map of YOLO-LFPD is brighter and more concentrated in the target region, indicating a stronger target detection response.This suggests that the model can identify the target region more accurately and with greater confidence. Conclusions In this paper, based on the YOLO-FPD model, the YOLO-LFPD model is improved by introducing the RepVGG module and the FasterNet backbone network to get better performance in strip surface defect detection.RepVGG has a simple and efficient network design, adopting the idea of reparameterisation, combining convolutional layers with residual structures, which makes the whole network more compact and easier to train.This design greatly reduces the number of parameters and computational complexity of the model, enabling the YOLO model to have faster inference speed and lower memory consumption while maintaining high detection accuracy.FasterNet adopts a series of innovative operators, such as partial convolution (PConv), which improves the efficiency of the model in extracting spatial features; by reducing redundant computations and memory accesses, FasterNet is able to significantly increase the running speed of the model while maintaining a high accuracy rate.Experimental results on the strip steel surface defects dataset with an insufficient or unbalanced number of images show that the inference time for a single image is reduced by 22.9%, the amount of parameters is reduced by 47%, and the GFLOPs are reduced by 12%, which indicates that the improved YOLO-LFPD model has excellent comprehensive performance and exceeds the original model YOLOv5s in inference speed.This paper carries out pruning, substitution loss function, and hyperparameter evolution experiments in three aspects, and the experimental results show that substitution loss function and hyperparameter evolution experiments have better results on the YOLO-LFPD-n model with a smaller number of parameters, and the reasonable confidence threshold and model depth avoid the model from being overfitted, so as to improve the accuracy of the model, and these experiments fully prove the reasonableness of the YOLO-LFPD model.The main research results of this paper are summarized as follows: Conclusions 1. Conclusions Pruning enables the model to choose the right parameter size for the actual detection, and the mAP50 accuracy still reaches 75.6% when the number of parameters is reduced to half of the original.In addition, the substitution loss function and hyperparameter evolution methods provide a better improvement in accuracy with smaller model parameters, and the mAP50 accuracy is improved by 6.5%. 2. The RepVGG module simplifies the inference process while allowing the model to acquire more surface defect feature information, with a 0.8% increase in mAP50 accuracy, which reduces the depth of the model while being able to improve the extraction of surface defect image features from the strip.A better fusion effect was obtained by testing the location of the FasterNet module, with a 0.2% increase in mAP50 accuracy. 2. In addition, the FasterNet module allows the model to ignore unimportant feature information, reducing the amount of computation while preventing model overfitting, and reducing the number of parameters and the amount of computation of the model, with the number of parameters being 63.6% of the original, and the GFLOPs being 73.8% of the original. 3. Performance tests were conducted on the NEU dataset, GC10-DET dataset, and PKU-Market-PCB dataset.The experimental results demonstrate that the model's accuracy and number of parameters in this paper are optimal compared to network models from the past two years.Additionally, the model's ability to perform inference speed is also noteworthy, providing a reference for the application of surface defect detection of strip steel and the deployment of the model in actual production scenarios.The model serves as a reference for applying and deploying it in real production scenarios. Prospect This paper investigates the existing deep convolutional network model structure, optimises and improves it, and achieves relevant results.However, there are still many shortcomings in the treatment. 1. This paper tests the performance of the improved model using the NEU dataset, the GC10-DET dataset, and the PKU-Market-PCB dataset.However, it is important to note that the data images used suffer from an imbalance in the number of labelled types, inaccurate labelling, and omission of labels.Subsequently, it is recommended to utilise GAN and other adversarial networks for image generation to improve and verify the model's generalisation ability.This will enable the model to detect a wider range of steel surface defects and expand its potential applications. 2. This paper focuses solely on detecting surface defects in strip steel and does not extend to other industrial production areas.Future work should explore target detection of surface defects in other workpieces and semantic segmentation of images to enrich research results in the field of steel surface defect detection. 3. The lightweight network models proposed in this paper have only been tested on public datasets and have not yet been deployed to mobile or edge devices for realworld performance testing.Future work should focus on testing and validating the models' performance in real-world scenarios of strip steel surface defect detection after deployment to devices. Figure 1 . Figure 1.NEU surface defect dataset.Ten types of surface defects are included within the GC10-DET dataset as shown in Figure 2, i.e., Punch (Pu), Weld (Wl), Crescent Gap (Cg), Water Spot (WS), Oil Spot (Os), Silk Spot (Ss), Inclusions (In), Rolled Pit (Rp), Crease (Cr), and Waist Fold (Wf).The GC10-DET dataset consists of a total of 2294 images with an image size of 2048 × 1000 pixels.The experiment randomly generates the training set, test set, and validation set in 7:2:1, as shown in Figure 3. Figure 1 . Figure 1.NEU surface defect dataset. Figure 1 . Figure 1.NEU surface defect dataset. Figure 2 . Figure 2. GC10-DET surface defect dataset. Figure 3 . Figure 3. Image distribution of GC10-DET surface defect dataset. Figure 2 . Figure 2. GC10-DET surface defect dataset. Figure 1 . Figure 1.NEU surface defect dataset. Figure 2 . Figure 2. GC10-DET surface defect dataset. Figure 3 . Figure 3. Image distribution of GC10-DET surface defect dataset.Figure 3. Image distribution of GC10-DET surface defect dataset. Figure 3 . Figure 3. Image distribution of GC10-DET surface defect dataset.Figure 3. Image distribution of GC10-DET surface defect dataset.The PKU-Market-PCB dataset has a total of six types of defects: leakage holes, rat bites, open circuits, short circuits, stray and stray copper.As shown in Figure4.The experiment randomly generates the training set, test set, and validation set according to 7:2:1, and the number of defects of each type is shown in Table1, totalling 693 images. Figure 4 . Figure 4. PKU-Market-PCB surface defect dataset. Figure 4 . Figure 4. PKU-Market-PCB surface defect dataset. Figure 5 . Figure 5. YOLO-LFPD structure. Figure 5 . Figure 5. YOLO-LFPD structure. Figure 5 . Biomimetics 2024, 9, x FOR PEER REVIEW 10 of 27 Figure 5 . PConv+PWConv (b) T-shaped Conv (c) regular Conv Figure 6 . Figure 6.Comparison of convolutional variants.Different locations of FasterNet integration into the model will have different impacts on the feature extraction, fusion, and final detection performance of the model.Introducing the backbone network can make early feature extraction efficient and flexible and improve the quality of the initial feature map; introducing the neck network can improve the Figure 6 . Figure 6.Comparison of convolutional variants. Figure 7 . Figure 7. (a) for the original structure (b) for the FasterNet replacement location. Figure 7 . Figure 7. (a) for the original structure (b) for the FasterNet replacement location. Biomimetics 2024, 9 ,Figure 8 . Figure 8. RepVGG. Figure 8 . Figure 8. RepVGG. Figure 9 . Figure 9. (a) for the original structure (b) for the RepCONV replacement position. Figure 9 . Figure 9. (a) for the original structure (b) for the RepCONV replacement position. Biomimetics 2024, 9 , x FOR PEER REVIEW 14 of 27 model size (MB) refers to the size of the model on the storage medium and affects the ease of deployment.The number of layers (LAYERS) of the YOLO model indicates the depth of the model and affects the capability and complexity of feature extraction. Figure 10 . Figure 10.Line graph displaying the experimental results of YOLO-LFPD on the NEU dataset.Figure 10.Line graph displaying the experimental results of YOLO-LFPD on the NEU dataset. Figure 10 . Figure 10.Line graph displaying the experimental results of YOLO-LFPD on the NEU dataset.Figure 10.Line graph displaying the experimental results of YOLO-LFPD on the NEU dataset. Figure 11 . Figure 11.The YOLO-LFPD loss function was applied to the NEU dataset, with (a) representing the training loss and (b) representing the validation loss. Figure 11 . Figure 11.The YOLO-LFPD loss function was applied to the NEU dataset, with (a) representing the training loss and (b) representing the validation loss. Figure 12 . Figure 12.YOLO-LFPD accuracy fold plot on GC10-DET dataset. Figure 12 . Figure 12.YOLO-LFPD accuracy fold plot on GC10-DET dataset. Figure 13 . Figure 13.(a) is the experimental diagram of the YOLO-LFPD-n parameter, and (b) is the experimental diagram of the YOLO-LFPD parameter. Figure 13 . Figure 13.(a) is the experimental diagram of the YOLO-LFPD-n parameter, and (b) is the experimental diagram of the YOLO-LFPD parameter. Figure 14 . Figure 14.Shows a comparison of the detection frames for the NEU dataset.The original labels are displayed in (a,d), while (b,e) and (c,f) show the detection frames for YOLO-LFPD and YOLO-FPD, respectively. Figure 15 . Figure 15.Shows a comparison of the detection frames for the GC10 dataset.The original labels are represented by (a,d), while (b,e) and (c,f) represent YOLOv5 and YOLO-LFPD, respectively. Figure 14 .Figure 14 . Figure 14.Shows a comparison of the detection frames for the NEU dataset.The original labels are displayed in (a,d), while (b,e) and (c,f) show the detection frames for YOLO-LFPD and YOLO-FPD, respectively. Figure 15 . Figure 15.Shows a comparison of the detection frames for the GC10 dataset.The original labels are represented by (a,d), while (b,e) and (c,f) represent YOLOv5 and YOLO-LFPD, respectively.Figure 15.Shows a comparison of the detection frames for the GC10 dataset.The original labels are represented by (a,d), while (b,e) and (c,f) represent YOLOv5 and YOLO-LFPD, respectively. Figure 15 . Figure 15.Shows a comparison of the detection frames for the GC10 dataset.The original labels are represented by (a,d), while (b,e) and (c,f) represent YOLOv5 and YOLO-LFPD, respectively.Figure 15.Shows a comparison of the detection frames for the GC10 dataset.The original labels are represented by (a,d), while (b,e) and (c,f) represent YOLOv5 and YOLO-LFPD, respectively. Figure 16 . Figure 16.Shows a heat map comparison of the NEU datasets.The left panel displays the raw labels, while the middle and right panels show the results obtained using YOLOv5 and YOLO-LFPD, respectively. Figure 16 . Figure 16.Shows a heat map comparison of the NEU datasets.The left panel displays the raw labels, while the middle and right panels show the results obtained using YOLOv5 and YOLO-LFPD, respectively. Table 1, totalling 693 images. Table 1 . PKU Table 1 . -Market-PCB Pictures. Table 1 . PKU-Market-PCB Pictures. Table 2 . Experimental environment. Table 2 . Experimental environment. Table 3 . YOLO-FPD comparison experimental results on NEU-DET. Table 4 . YOLO-LFPD comparison experiment results on GC10-DET dataset. Table 4 . YOLO-LFPD comparison experiment results on GC10-DET dataset. Table 5 . Comparison of experimental results of YOLOv5s-FPD on VOC2007. Table 6 . Comparative experiments between FasterNet and RepVGG on NEU dataset. Table 7 . Shows the results of the experiment comparing the inference speed of models on the NEU dataset. Table 8 . FasterNet module fusion location results. Table 9 . Shows the results of the parameter experiment conducted on the NEU dataset. Table 9 . Shows the results of the parameter experiment conducted on the NEU dataset. Table 10 [50]s the pruning effect, with L1 representing weight pruning, Group_norm[50]representing a normalization method, and the rest representing structural pruning.The table indicates that the overall effect of structural pruning is not ideal, with SLIM being the worst performer, achieving only 68.5% accuracy, while Group_taylor achieves 73.1% accuracy.On the other hand, L1 pruning and Group_norm achieve good results at compression rates around 1.5×. Table 10 . Shows the results of the pruning experiments conducted on the NEU dataset.

섹션 본문 140문단 · 80,247자

(제목 없음)

1Strip steel surface defect recognition research has important research significance in industrial production.Aiming at the problems of defect feature extraction, slow detection speed, and insufficient datasets, YOLOv5 is improved on the basis of YOLOv5, and the YOLO-LFPD (lightweight fine particle detection) model is proposed.By introducing the RepVGG (Re-param VGG) module, the robustness of the model is enhanced, and the expressive ability of the model is improved.FasterNet is used to replace the backbone network, which ensures accuracy and accelerates the inference speed, making the model more suitable for real-time monitoring.The use of pruning, a GA genetic algorithm with OTA loss function, further reduces the model size while better learning the strip steel defect feature information, thus improving the generalisation ability and accuracy of the model.The experimental results show that the introduction of the RepVGG module and the use of FasterNet can well improve the model performance, with a reduction of 48% in the number of parameters, a reduction of 13% in the number of GFLOPs, an inference time of 77% of the original, and an optimal accuracy compared with the network models in recent years.The experimental results on the NEU-DET dataset show that the accuracy of YOLO-LFPD is improved by 3% to 81.2%, which is better than other models, and provides new ideas and references for the lightweight strip steel surface defect detection scenarios and application deployment.

Introduction

2Machine learning techniques are commonly employed in the detection of surface defects in steel.For instance, to enhance the usability of the original image, operations like denoising and enhancement are performed.Next, features such as texture and shape features are extracted to describe the feature information of steel surface defects.Finally, a classifier like support vector machines (SVMs) [1], random forests (Random Forests) [2], etc. is used to classify and recognize the extracted features.These methods can detect steel surface defects to some extent.However, they rely on hand-designed features and require a separate design of feature extractors and classifiers for defects of different types and scales.Therefore, they have limited generalisation capability.The emergence of deep learning methods in recent years has led to a significant breakthrough in steel surface defect detection technology.Deep learning methods can automatically learn feature representations in images with better generalisation ability and robustness by constructing deep neural network models.The convolutional neural network (CNN) [3] is widely used in steel surface defect detection due to its excellent performance in image processing.These methods are capable of extracting feature representations of steel surface defects effectively.

3They are also capable of end-to-end training and optimization, resulting in more accurate and efficient defect detection.

4The current task of detecting defects in strip steel using deep learning models presents several challenges.These models typically require a large amount of labelled data for training, but the acquisition and labelling of strip steel defect images in practical applications are costly.As a result, there are limited training samples available, which makes it difficult to train the models.Secondly, strip steel defects come in various types and have complex morphology.Differentiating between these types of defects often requires a lightweight and highly efficient method of constructing a strip steel defect detection model based on deep learning.The deep learning model utilises feature learning and generalisation to improve the accuracy and efficiency of strip steel defect detection.This reduces manpower costs and promotes intelligent processes in strip steel production.

5Currently, there are three mainstream strip defect detection algorithms: Mask R-CNN [4], EfficientDet [5], and YOLO (you only look once) [6].The two-stage target detection algorithms typically involve two phases: candidate frame generation and frame classification.During the candidate frame generation phase, the algorithm extracts potential target regions from the input image using techniques such as the region proposal network (RPN).In the frame classification stage, the generated candidate frames undergo target category judgement through a classifier and are adjusted as necessary to obtain the final target detection result.Compared to the one-phase detection algorithm, the twophase detection algorithm requires more computational resources and time to perform the two-phase operation, resulting in slower detection speed.This makes it unsuitable for application scenarios with high real-time requirements.Secondly, the generation of candidate boxes typically involves methods such as sliding windows or region proposal networks.These methods can result in significant computational and storage overheads when dealing with a large number of candidate boxes, which can limit the scalability of the algorithm.Furthermore, two-stage detection algorithms are not effective in detecting small targets due to the challenge of generating candidate frames efficiently in the candidate frame generation stage.This often leads to missed or false detections.As a result, one-stage detection algorithms, such as the YOLO algorithm, demonstrate better performance and generalisability in industrial applications.

6YOLO (you only look once) [6] is a series of classical single-stage target detection algorithms designed to achieve fast and accurate target detection.The evolved versions of YOLO, including YOLOv5, YOLOX [7], YOLOv7 [8], and YOLOv8, employ a lightweight backbone network with high feature extraction and parameter efficiency.The model's feature extraction process primarily consists of bottleneck structures.Terven, J.R. et al. [9] provide a comprehensive analysis of the development of YOLOv1 to YOLOv8.The authors argue that all official YOLO models from YOLOv5 onwards have fine-tuned the trade-off between speed and accuracy, with the aim of better adapting to specific applications and hardware requirements.There is no significant difference in accuracy from YOLOv5 to YOLOv8, and YOLOv5 has greater scalability and community resources than YOLOv8.During the testing of the NEU-DET dataset with YOLOv8, it was observed that the detection results for small targets were unsatisfactory and the training time was longer compared to YOLOv5.As a result, YOLOv5 was chosen over YOLOv8.

7In order to achieve better results in strip defect detection with insufficient datasets, the YOLO-LFPD model is proposed in this paper.The Fasternet backbone network and RepVGG (Re-param VGG) are introduced on the basis of the YOLO-LFPD model with the aim of reducing redundant computations and memory accesses.RepVGG is a lightweight convolutional neural network structure with a simple but effective design, which aims to maintain high performance with a small number of parameters and low computational cost.In addition, the YOLO-LFPD model can be made lightweight by pruning techniques, which reduces the number of parameters and the amount of computation required.This greatly improves the inference speed of the model, reduces the deployment cost, and allows it to be used in resource-limited devices or environments while maintaining detection accuracy.The main contributions of this paper are as follows:

81.

9In this paper, the pruning method is used to enable the model to select the appropriate parameter size for actual detection.When the parameter size is reduced to half of the original, the accuracy rate of mAP50 can still reach 75.6%.In addition, the replacement loss function and hyperparameter evolution methods can improve the accuracy of mAP50 by 6.5% when the model parameters are reduced.

2.

10The RepVGG module simplifies the inference process while allowing the model to acquire more surface defect feature information, with a 0.8% increase in mAP50 accuracy, which reduces the depth of the model while being able to improve the extraction of surface defect image features from the strip.A better fusion effect was obtained by testing the location of the FasterNet module, with a 0.2% increase in mAP50 accuracy.

11In addition, the FasterNet module allows the model to ignore unimportant feature information, reducing the amount of computation while preventing model overfitting, and reducing the number of parameters and the amount of computation of the model, with the number of parameters being 63.6% of the original, and the GFLOPs being 73.8% of the original.

3.

12Performance tests were conducted on the NEU dataset, GC10-DET dataset, and PKU-Market-PCB dataset.The experimental results demonstrate that the model's accuracy and number of parameters in this paper are optimal compared to network models from the past two years.Additionally, the model's ability to perform inference speed is also noteworthy, providing a reference for the application of surface defect detection of strip steel and the deployment of the model in actual production scenarios.The model serves as a reference for applying and deploying it in real production scenarios.

13The article is structured into several sections.Section 2 compares the strip defect object detection model, the strip defect dataset, and the YOLO method.Section 3 describes some architectural details of the improved algorithm's backbone network.Section 4 analyses the data experiments, and Sections 5 and 6 conclude the article.

Strip Defect Detection Technology

14Traditional image processing methods are significant in detecting defects on steel surfaces.These methods employ image processing techniques to enhance image data and locate defect regions.Juan et al. [10] employed a histogram thresholding method that integrated empirical knowledge to detect residual oxide skins in stainless steel production.Neogi et al. [11] developed a global adaptive thresholding technique for defect detection in steel strips, which adjusts the threshold adaptively based on the number of pixels with grey values in the gradient image.Li et al. [12] and Chen et al. [13] used a region-growing algorithm for the detection of defects in steel plates with high accuracy.

15Deep learning methods achieve end-to-end learning.This means that feature representation and target detection tasks are learned directly from raw data.In contrast, traditional methods require the manual design of feature extractors and classifiers, which can be a cumbersome and error-prone process.Furthermore, the deep learning model is highly adaptable and can effectively handle target detection tasks of varying scales, shapes, and poses.In contrast, traditional methods often require manual parameter adjustments and threshold settings.

16Lu et al. [14] proposed a YOLO-FPD defect detection method, which includes spatial pyramid pooling fast advance (SPPF-A) and convolutional separated bottleneck (CSBL) methods, with an accuracy improvement of 1.8%.Liu et al. [15] proposed an MSC-DNet defect detection method with an inflated convolutional PADC and a feature enhancement module FESM, which enhances the extraction of multi-scale features to reduce confusing information.Zhao et al. [16] proposed an LSD-YOLOv5 defect detection method with a smaller bidirectional feature pyramid network (BiFPN-S), which improved the detection speed by 28.7% while increasing the accuracy by 2.4%.Zhao et al. [17] proposed a lightweight efficient detection network (LEDNet), which reduces the computational complexity while adaptively extracting the effective features.Zhou et al. [18] proposed an automated surface defect detection network, DPN-Detector, and proposed a residual space pyramid, RASPP, and a dual pyramid network, DPN.Wang et al. [19] proposed a new multi-scale feature fusion module, ATPF, based on which a deep learning network, CG-Net, was constructed for surface defect detection on strips.Chen et al. [20] proposed a fast surface defect detection network, DCAM-Net, for strips based on deformable convolution and attention mechanisms, and proposed a new enhanced deformable feature extraction block, EDE-block.Chen et al. [21] proposed an improved YOLOX method using variable focal length loss to solve the foreground-background class imbalance problem and predicted the IoU perceptual classification score as the detection ranking criterion.Li et al. [22] proposed a YOLOv5s-GC detection method by applying OTSU and a normal distribution enhancement algorithm (NDEA) to extract feature greyscale and introducing the GhostBottleneck module, which reduces the computation required by 48%.

17The improvement of deep learning models in recent years is based on the transformer model and the YOLO model with improved convolutional neural networks.The main research direction in surface defect detection of strips is to improve the multi-scale spatial pyramid structure, the residual network structure, and the variant convolution.The reason for this is that the localisation of features in strip steel defect detection is inaccurate, and the size of the dataset restricts the depth of the model, which reduces the efficiency of the arithmetic power usage.Both the multi-scale spatial pyramid and the residual network are better at retaining the defective features and improving the accuracy of the recognition.Furthermore, the variant convolution reduces the wastage of the arithmetic power, which in turn reduces the size of the model and speeds up the detection efficiency.

Pruning

18Pruning is a technique used to reduce the number of parameters and computational effort of a neural network model.The main idea is to improve the efficiency of the model by identifying and removing connections or parameters that contribute less to the performance of the model while maintaining its accuracy.Pruning techniques are usually classified into two types: structural pruning and weighted pruning.

19Structural pruning, also known as network pruning, involves reducing the number of parameters in a model by removing entire neurons, channels, or layers.This process is typically performed after training by evaluating and filtering the model to identify the parts that can be pruned.Among the structural pruning methods for YOLO models, common ones include LAMP pruning [23], SLIM pruning [24], Group_slim pruning [25], Group_sl pruning [26], Growing_reg pruning [27], Group_taylor pruning [28], and others.

20LAMP pruning (layer-adaptive magnitude-based pruning) is adaptive insofar as it considers the importance of each layer for pruning.This method is capable of reducing the amount of computation and number of parameters required while retaining the key feature extraction capability, which is highly suitable for target detection tasks such as YOLO with high real-time requirements.SLIM pruning (sparse learning with implicit magnitude pruning) can dynamically adjust the model complexity during the training process to adapt to the YOLO model hierarchical structure, thus significantly reducing the number of parameters and required computation under the premise of maintaining accuracy.Group_slim pruning is an effective method for reducing the redundancy of the YOLO model.It involves grouping pruning and retaining the important channels in each group while maintaining the overall structure of the model and the feature extraction capability.Group_sl pruning further optimises the Group_slim pruning strategy, which makes the pruned model more robust and efficient in practical applications.It is suitable for the deployment of YOLO models in different scenarios.Growing-reg pruning combines the advantages of pruning and regularisation, and can gradually adapt to the data distribution and task requirements during the training process.This enables the pruned YOLO model to reach a good balance between accuracy and efficiency.Group_taylor pruning employs Taylor expansion to estimate the relative importance of each channel, thereby enabling the retention of the most crucial feature channels for the YOLO model, which relies on channel features for target detection.This approach has been shown to significantly enhance the performance of the model following pruning.

21Weight pruning is a technique used to reduce the number of parameters in a model by setting certain weights to zero.This method is typically performed during training and involves dynamically setting weights smaller than a certain threshold to zero.Common weight pruning methods include L1 pruning [29], which prunes by absolute magnitude, and pruning by gradient magnitude.

22Pruning techniques offer several advantages, including reducing the number of model parameters and computations, improving model efficiency and lightweightness, reducing the risk of overfitting, and improving training and inference speed.Additionally, pruning can save storage space and energy consumption by effectively removing unnecessary parameters and connections in the model, thus reducing computational complexity and memory consumption.Pruned models are typically more lightweight and better suited for resource-constrained environments, such as mobile devices and embedded systems.

Hyperparameter Evolution and the OTA Loss Function

23The YOLO target detection algorithm is an efficient method for detecting targets.However, its performance can be affected by the selection of hyperparameters.To optimize these hyperparameters, the genetic algorithm (GA) can be used as a heuristic search method.The GA is an optimization algorithm that involves a series of mathematical representations and operations.Firstly, a fitness function f (x) is defined to evaluate the performance of an individual x.This is usually based on the model's performance on a validation set.An individual x represents a hyperparameter combination, typically a vector or chromosome, containing multiple hyperparameter values.For example, x = (x 1 , x 2 , . . . ,x n ), where x i denotes the value of the ith hyperparameter.The initialised population P contains a collection of multiple individuals, e.g., P = {x 1 , x 2 , . . . ,x m }, where m denotes the size of the population.

24During the selection operation, the parent individual is chosen based on its fitness value, f (x).This can be achieved through methods such as roulette selection or bidding tournament selection.The crossover operation involves combining the genetic information of the parent individuals, x 1 and x 2 .Finally, the mutation operation introduces a new combination of genes by randomly varying the genetic information of the individual x.For instance, an individual's hyperparameters can be randomly perturbed or replaced.New offspring individuals are generated by selection, crossover, and mutation operations to update population P and obtain P'.The final hyperparameter combination is determined by the highest fitness when the maximum number of iterations is reached or the stopping condition is satisfied.The description above includes a mathematical representation of the fitness function f (x), the individual representation x, the initialized population P, the selection operation Select(P), the crossover operation Crossover(x 1 , x 2 ), the mutation operation Mutate(x), and the update of the population P'.

25OTA (optimal transport assignment for object detection) is a loss function designed to solve the problem of target assignment in target detection.It adopts an ordering-based strategy to optimise performance by pairing the bounding box output from the detector with the real target.The main idea of OTA is to transform the target detection task into a Hungarian algorithmic problem to minimise the total loss of matching.OTA consists of two components: matching loss and no matching loss.

26The matching loss evaluates the quality of matching by calculating the degree of match between the bounding box output by the detector and the real target.This process utilises the intersection over union (IoU) score as the matching metric.It determines the degree of overlap between the detected and actual boxes by calculating the ratio of the intersection area of the detected box and the actual box to their combined area.The OTA loss function then pairs the detection frames with the actual target using the Hungarian algorithm to minimise the total matching loss.The Hungarian algorithm, also referred to as the Hungarian method or the Kuhn-Munkres algorithm, is an optimisation algorithm used to solve the assignment problem.The time complexity of the Hungarian algorithm is O n 3 , where n represents the number of objects and tasks.Equation (1) represents the matching loss, where N represents the number of detection frames, M represents the number of real targets, and IoU i,j represents the IoU value between the ith detection frame and the jth real target.The matching loss is shown in Equation ( 1)

27The no-match loss addresses the situation where real targets are not matched, ensuring that all detection frames receive appropriate penalties.The no-match loss can be calculated by determining the confidence scores of the unmatched detection frames using Equation (2), where λ represents the weight parameter and IoU i,max represents the maximum IoU value of the ith detection frame with respect to all real targets.

28The OTA loss function optimises the performance of the target detection model by minimising the total loss function, which combines matching and non-matching losses.The degree of match between the detection frame and the real target can be evaluated more accurately by introducing sorting and Hungarian algorithms.

Datasets

29The NEU-DET dataset, the industrial metal surface defects GC10-DET dataset [30], and the circuit board surface defects PKU-Market-PCB dataset used in the experiments in this section are all from real production products, and their defects are closer to the actual situation.The images in the PKU-Market-PCB dataset are dominated by surface defects, which is suitable for the generalisation of the strip defects detection model as a test dataset.The circuit board surface defects dataset has been used in papers [31][32][33][34][35][36][37] on strip defect detection research in recent years.

30The NEU-DET dataset is a public dataset created at Northeastern University for strip surface defect detection and contains six common defect types: roll marks, inclusions, scratches, indentations, pits, and cracks.The dataset features high-resolution images and accurate labelling of defect categories to provide a detailed picture of the subtle defect characteristics on the strip surface.As shown in Figure 1, the NEU-DET dataset totals 1800, where each class of defects contains 300 images with a size of 200 × 200 pixels.The training set, test set, and validation set will be randomly generated at 8:1:1 for the experiment.Ten types of surface defects are included within the GC10-DET dataset as shown in Figure 2, i.e., Punch (Pu), Weld (Wl), Crescent Gap (Cg), Water Spot (WS), Oil Spot (Os), Silk Spot (Ss), Inclusions (In), Rolled Pit (Rp), Crease (Cr), and Waist Fold (Wf).The GC10-DET dataset consists of a total of 2294 images with an image size of 2048 × 1000 pixels.The experiment randomly generates the training set, test set, and validation set in 7:2:1, as shown in Figure 3.Ten types of surface defects are included within the GC10-DET dataset as shown in Figure 2, i.e., Punch (Pu), Weld (Wl), Crescent Gap (Cg), Water Spot (WS), Oil Spot (Os), Silk Spot (Ss), Inclusions (In), Rolled Pit (Rp), Crease (Cr), and Waist Fold (Wf).The GC10-DET dataset consists of a total of 2294 images with an image size of 2048 × 1000 pixels.The experiment randomly generates the training set, test set, and validation set in 7:2:1, as shown in Figure 3.Ten types of surface defects are included within the GC10-DET dataset as shown in Figure 2, i.e., Punch (Pu), Weld (Wl), Crescent Gap (Cg), Water Spot (WS), Oil Spot (Os), Silk Spot (Ss), Inclusions (In), Rolled Pit (Rp), Crease (Cr), and Waist Fold (Wf).The GC10-DET dataset consists of a total of 2294 images with an image size of 2048 × 1000 pixels.The experiment randomly generates the training set, test set, and validation set in 7:2:1, as shown in Figure 3.The PKU-Market-PCB dataset has a total of six types of defects: leakage holes, rat bites, open circuits, short circuits, stray and stray copper.As shown in Figure 4.The experiment randomly generates the training set, test set, and validation set according to 7:2:1, and the number of defects of each type is shown in

Modelling Design

31YOLO-FPD [14] is one of our models for strip defect detection, and our proposed residual module LSTM as well as the spatial pyramid pooling module SPPF-A have achieved good results, with a 1.7% improvement in accuracy compared to the original YOLOv5 model.To cope with the possible inadequacy of the dataset images, we propose the SSIN image enhancement method, which varies the original NEU-DET dataset images and improves the accuracy by 37.5% while keeping other conditions constant.However, the YOLO-FPD model size does not decrease significantly, and there is room for improvement in lightweighting.In addition, when the SSIN image enhancement method is not used and the dataset images are not sufficient, it is prone to training overfitting, which affects the accuracy rate.Therefore, we propose the YOLO-LFPD model, which mainly introduces the Fasternet backbone network, RepVGG (Re-param VGG), and pruning techniques to maintain high performance while having a small number of parameters and low computational cost, providing a feasible application of the model in the resource-limited devices or environments.

32The YOLO-FPD [14] model mainly includes the neck network, backbone network, and ASFF detector head.In_channel denotes the number of input channels, out_channel denotes the number of output channels, kernel_size denotes the size of the convolution kernel, and stride denotes the step size.In a backbone network, CSBL greatly reduces the number of parameters and computations of the model by decomposing the standard convolution operation into two independent operations: depth convolution and point-bypoint convolution.This helps to reduce the size of the model and improves the lightweight and efficient performance of the model.With the introduction of CBAM in the neck network, a CBAM module is added at the end of each CSBL module, and a CBAM module is also added after the SPPF-A layer of the neck network.

33In order to improve lightweightness, Fasternet and RepVGG structures are introduced and the YOLO-LFPD model is proposed.As shown in Figure 5, Fasternet, as a lightweight feature fusion network with small model parameters and computational complexity, is able to effectively extract the feature information of the strip image and enhance the model's ability to detect defects at different scales through multi-scale feature fusion.RepVGG, as a simple and efficient convolutional neural network structure with good model compression effect and versatility, can effectively reduce the computational burden of the model and maintain high detection accuracy.Taken together, combining Fasternet and RepVGG into the YOLO-LFPD model can improve the lightweightness and high efficiency of the model while maintaining the superior performance of the model on the defect detection dataset.In addition, the pruning technique can reduce the number of parameters and the computation requirements of the model and improve the inference speed.The combined use of these techniques can effectively improve the performance and efficiency of the model in the strip steel surface defect detection task.

34of the model and maintain high detection accuracy.Taken together, combining Fasternet and RepVGG into the YOLO-LFPD model can improve the lightweightness and high efficiency of the model while maintaining the superior performance of the model on the defect detection dataset.In addition, the pruning technique can reduce the number of parameters and the computation requirements of the model and improve the inference speed.The combined use of these techniques can effectively improve the performance and efficiency of the model in the strip steel surface defect detection task.

FasterNet Network

35FasterNet [38] is a new family of neural networks designed to achieve high speed and high efficiency in various visual tasks, and its efficient architecture is capable of processing large amounts of image data at high speeds in strip production lines to meet the requirements of high frame rate and low latency, thus improving productivity and quality control.It employs a novel partial convolution operator called PConv (partial convolution) and the off-the-shelf PWConv (pointwise convolution) as the main construction operators to reduce the computational redundancy and the number of memory accesses, thus improving the speed and efficiency of the network.When the input and output feature maps have the same number of channels, PConv has FLOPs of ℎ × × × .If we take the default value of c = c/4 for the c channel, the FLOPs are 1/16 of those of regular Conv.The memory access of PConv is approximately ℎ × × c + × ≈ ℎ × × 2c , if we take the default value of c = c/4, its memory access is only 1/4 of that of conventional Conv.

36FasterNet [38] is a new family of neural networks designed to achieve high speed and high efficiency in various visual tasks, and its efficient architecture is capable of processing large amounts of image data at high speeds in strip production lines to meet the requirements of high frame rate and low latency, thus improving productivity and quality control.It employs a novel partial convolution operator called PConv (partial convolution) and the off-the-shelf PWConv (pointwise convolution) as the main construction operators to reduce the computational redundancy and the number of memory accesses, thus improving the speed and efficiency of the network.When the input and output feature maps have the same number of channels, PConv has FLOPs of h × w × k 2 × c 2 p .If we take the default value of c p = c/4 for the c p channel, the FLOPs are 1/16 of those of regular Conv.The memory access of PConv is approximately h × w × c p + k 2 × c 2 p ≈ h × w × 2c p , if we take the default value of c p = c/4, its memory access is only 1/4 of that of conventional Conv.

37To fully and efficiently utilize the information from all channels, point-by-point convolution (PWConv) is further appended to PConv as shown in Figure 6.Their effective receptive field on the input feature map looks like a T-shaped Conv, which focuses more on the centre position than the regular Conv of a uniformly processed patch.In terms of small target detection, PConv can flexibly deal with localized regions of the feature map to enhance the recognition of small defects on the strip surface, and further improve the detection accuracy by combining with multi-scale feature extraction methods.To fully and efficiently utilize the information from all channels, point-by-point convolution (PWConv) is further appended to PConv as shown in Figure 6.Their effective receptive field on the input feature map looks like a T-shaped Conv, which focuses more on the centre position than the regular Conv of a uniformly processed patch.In terms of small target detection, PConv can flexibly deal with localized regions of the feature map to enhance the recognition of small defects on the strip surface, and further improve the detection accuracy by combining with multi-scale feature extraction methods.Different locations of FasterNet integration into the model will have different impacts on the feature extraction, fusion, and final detection performance of the model.Introducing the backbone network can make early feature extraction efficient and flexible and improve the quality of the initial feature map; introducing the neck network can improve the detection accuracy of both small and large targets; and introducing the head detection network can utilize more efficient feature representations when predicting the category and location.Through the 4.4 Fusion Location experimental test, this paper chooses to introduce FasterNet into the backbone network.

38Figure 7a shows the original YOLO structure and Figure 7b shows the YOLO-FPD model structure after replacing the original C3 module with the C3Faster module.The FasterNet backbone network is adopted to accelerate the processing speed of target detection, enabling the system to respond to input images faster and achieve higher frame rates in real-time scenes.Furthermore, FasterNet boasts a low computational complexity and requires fewer memory accesses, making it ideal for efficient inference in resource-constrained environments, such as embedded systems and mobile devices.The DCNv2 module in YOLO-FPD was replaced with normal convolution to avoid conflicts in strategy when using the two variants of convolutional structures together.If the DCNv2 module is used, overfitting may occur, resulting in a model that performs well on the training set but poorly on the validation and test sets.It is important to note that each convolutional variant has its own specific feature extraction method and optimization goals.Combining different structures can lead to conflicts or incoherence in feature expression, which can prevent the model from effectively learning useful features or even interfere with each other, reducing the model's performance.Additionally, different convolutional structures may require distinct training strategies, regularization methods, or optimization algorithms to achieve optimal results.When combining them, the original optimization strategy may no longer be applicable, and the training process needs to be carefully adjusted and optimized.

RepVGG

39RepVGG is a lightweight convolutional neural network architecture based on the repetitive module design idea.It aims to achieve efficient model training and inference.The network was proposed by a team of researchers at Microsoft Research Asia in 2021 as an innovative solution that departs from the traditional convolutional neural network design paradigm, offering higher efficiency and greater versatility.Convolutional neural net- The DCNv2 module in YOLO-FPD was replaced with normal convolution to avoid conflicts in strategy when using the two variants of convolutional structures together.If the DCNv2 module is used, overfitting may occur, resulting in a model that performs well on the training set but poorly on the validation and test sets.It is important to note that each convolutional variant has its own specific feature extraction method and optimization goals.Combining different structures can lead to conflicts or incoherence in feature expression, which can prevent the model from effectively learning useful features or even interfere with each other, reducing the model's performance.Additionally, different convolutional structures may require distinct training strategies, regularization methods, or optimization algorithms to achieve optimal results.When combining them, the original optimization strategy may no longer be applicable, and the training process needs to be carefully adjusted and optimized.

40RepVGG is a lightweight convolutional neural network architecture based on the repetitive module design idea.It aims to achieve efficient model training and inference.The network was proposed by a team of researchers at Microsoft Research Asia in 2021 as an innovative solution that departs from the traditional convolutional neural network design paradigm, offering higher efficiency and greater versatility.Convolutional neural networks (CNNs) typically comprise convolutional, pooling, and fully connected layers.These structures contain a large number of parameters, leading to high model complexity, slow training, and low inference efficiency.RepVGG takes a concise and efficient approach by dividing the network into RepVGG blocks, each containing simple convolutional layers, BatchNormalization layers, and ReLU activation functions.The network is built by stacking these blocks.The structure of RepVGG modules is illustrated in Figure 8.The RepVGG block's core components consist of normal convolutional layers with a fixed kernel size of 3 × 3.By adjusting parameters such as the number of output channels and step size, different sensory fields and feature extraction capabilities can be achieved.The BatchNormalization layer accelerates the model's convergence process and improves its stability.The ReLU activation function introduces nonlinearities that enhance the network's expressive power.By stacking RepVGG blocks repeatedly, RepVGG networks with varying depths and complexities can be constructed.This feature enables RepVGG to operate in environments with limited computational resources and adapt to various tasks and scenarios.RepVGG's model training and inference are highly efficient.Another notable feature of RepVGG is its ability to maintain high efficiency in model training and inference.Due to its simple network structure and small number of parameters, RepVGG exhibits fast convergence during training and achieves superior model performance quickly.Additionally, RepVGG has low computational complexity and memory usage during inference, making it ideal for resource-constrained environments like mobile devices, embedded systems, and edge computing.

41Figure 9a shows the original YOLO structure and Figure 9b shows the model structure of the YOLO-FPD with the integrated RepVGG module.RepVGG simplifies the computational complexity by using numerous 3 × 3 convolutional layers and eliminating the intricate branching structure.This design concept accelerates the forward inference process of the model, making it suitable for real-time detection scenarios.The language used is clear, objective, and value-neutral, and the technical terms are consistent throughout the text.The grammar, spelling, and punctuation are correct.No changes in content have been made.This not only ensures objectivity but also reduces the complexity of model maintenance and debugging.It is crucial to maintain a clear and concise writing style in technical writing.RepVGG's structure allows for easy conversion to a more efficient inference structure through reparameterisation techniques after training.This flexibility enables the full exploitation of RepVGG's structural advantages during the training phase while optimizing the model's performance and efficiency during deployment.Furthermore, RepVGG's improved feature extraction capability positively impacts YOLO-FPD's ability to detect objects of varying scales.The RepVGG block's core components consist of normal convolutional layers with a fixed kernel size of 3 × 3.By adjusting parameters such as the number of output channels and step size, different sensory fields and feature extraction capabilities can be achieved.The BatchNormalization layer accelerates the model's convergence process and improves its stability.The ReLU activation function introduces nonlinearities that enhance the network's expressive power.By stacking RepVGG blocks repeatedly, RepVGG networks with varying depths and complexities can be constructed.This feature enables RepVGG to operate in environments with limited computational resources and adapt to various tasks and scenarios.RepVGG's model training and inference are highly efficient.Another notable feature of RepVGG is its ability to maintain high efficiency in model training and inference.Due to its simple network structure and small number of parameters, RepVGG exhibits fast convergence during training and achieves superior model performance quickly.Additionally, RepVGG has low computational complexity and memory usage during inference, making it ideal for resource-constrained environments like mobile devices, embedded systems, and edge computing.

42Figure 9a shows the original YOLO structure and Figure 9b shows the model structure of the YOLO-FPD with the integrated RepVGG module.RepVGG simplifies the computational complexity by using numerous 3 × 3 convolutional layers and eliminating the intricate branching structure.This design concept accelerates the forward inference process of the model, making it suitable for real-time detection scenarios.The language used is clear, objective, and value-neutral, and the technical terms are consistent throughout the text.The grammar, spelling, and punctuation are correct.No changes in content have been made.This not only ensures objectivity but also reduces the complexity of model maintenance and debugging.It is crucial to maintain a clear and concise writing style in technical writing.RepVGG's structure allows for easy conversion to a more efficient inference structure through reparameterisation techniques after training.This flexibility enables the full exploitation of RepVGG's structural advantages during the training phase while optimizing the model's performance and efficiency during deployment.Furthermore, RepVGG's improved feature extraction capability positively impacts YOLO-FPD's ability to detect objects of varying scales.

Experiments and Analyses

43This section evaluates the performance of YOLO-FPD in detecting strip surface defects after implementing FasterNet and RepVGG.

44The performance of these models is compared to other models.The experiment sets the epoch of each model to 400, with the initial learning rate set to 0.1 and then gradually converging to 0. The 400 epoch ensures that all models involved in the comparison are trained to the maximum extent possible.The optimizer uses SGD.The GC10-DET dataset has a high image resolution, but due to limitations in the experimental device's video memory, the training batch size is set to 16 for both training and testing.The NEU dataset and the PKU-Market-PCB dataset have a training batch size of 32.Please refer to Table 2 for details on the experimental environment.

45The metrics used in this paper include mAP (mean accuracy), frames per second (FPS), number of model parameters (params), number of floating-point computations (GFLOPs), size of pre-trained models (MB), and number of layers of the YOLO model (LAYERS) in the COCO metric.mAP (mean average precision) is a commonly used evaluation metric in target detection tasks, providing a comprehensive measure of model performance by calculating and averaging the average precision (AP) values for each type of target under different IoU (intersection-parity ratio) thresholds.mAP is calculated by integrating the precision-recall (P-R) curve, while mAP combines the AP values for a number of IoU thresholds (from 0.5 to 0.95) of AP values, reflecting the combined performance of the model at different confidence levels and thresholds.mAP@0.5 is a commonly used simplified metric that is particularly suitable for defect detection tasks.

46FPS is used to evaluate the real-time processing capability of the model, i.e., the number of image frames that can be processed per second.The number of model parameters (params) indicates the total number of trainable parameters in the model, reflecting the complexity of the model.The amount of floating point computations (GFLOPs) is used to measure the amount of computation required for each inference of the model.Pre-trained

47This section evaluates the performance of YOLO-FPD in detecting strip surface defects after implementing FasterNet and RepVGG.

48The performance of these models is compared to other models.The experiment sets the epoch of each model to 400, with the initial learning rate set to 0.1 and then gradually converging to 0. The 400 epoch ensures that all models involved in the comparison are trained to the maximum extent possible.The optimizer uses SGD.The GC10-DET dataset has a high image resolution, but due to limitations in the experimental device's video memory, the training batch size is set to 16 for both training and testing.The NEU dataset and the PKU-Market-PCB dataset have a training batch size of 32.Please refer to Table 2 for details on the experimental environment.The metrics used in this paper include mAP (mean accuracy), frames per second (FPS), number of model parameters (params), number of floating-point computations (GFLOPs), size of pre-trained models (MB), and number of layers of the YOLO model (LAYERS) in the COCO metric.mAP (mean average precision) is a commonly used evaluation metric in target detection tasks, providing a comprehensive measure of model performance by calculating and averaging the average precision (AP) values for each type of target under different IoU (intersection-parity ratio) thresholds.mAP is calculated by integrating the precision-recall (P-R) curve, while mAP combines the AP values for a number of IoU thresholds (from 0.5 to 0.95) of AP values, reflecting the combined performance of the model at different confidence levels and thresholds.mAP@0.5 is a commonly used simplified metric that is particularly suitable for defect detection tasks.

49FPS is used to evaluate the real-time processing capability of the model, i.e., the number of image frames that can be processed per second.The number of model parameters (params) indicates the total number of trainable parameters in the model, reflecting the complexity of the model.The amount of floating point computations (GFLOPs) is used to measure the amount of computation required for each inference of the model.Pre-trained model size (MB) refers to the size of the model on the storage medium and affects the ease of deployment.The number of layers (LAYERS) of the YOLO model indicates the depth of the model and affects the capability and complexity of feature extraction.

Dataset Experiments

50In this study, the novel model named YOLO-LFPD is proposed.The YOLO-LFPD model significantly improves the inference speed by introducing lightweight network modules such as RepVGG and FastNet while maintaining high detection speed and accuracy.Among them, the YOLO model has five different sizes and complexities from small to large: n, s (small), m (medium), l and x (extra large), with the difference only in the number of channels, where n is optimized for Nano devices (e.g., NVIDIA Jetson Nano), which is the fastest, although it sacrifices accuracy.YOLO-LFPD uses a size class of s, so YOLOv5s and YOLOv7s were chosen for comparison.The epoch is set to 400, the learning rate is initially 0.1 and then decreases to 0. The optimizer uses SGD and the batch size is set to 64.

51As shown in Figure 10, compared with traditional models such as YOLOv5, YOLOv7, and Faster R-CNN, our model exhibits better performance when the dataset image resources are not sufficient to meet the training requirements.Although the accuracy of YOLOv5 improves rapidly in the early stages of training, the accuracy cannot be improved further due to the overfitting situation of the model, peaking at nearly 400 epochs.YOLO-LFPD, on the other hand, reduces the depth of the model and increases the residual structure compared to YOLO-FPD, which allows better attention to defective features with an insufficient number of samples, and peaks when training reaches about 250 iterations, which suggests that the optimised structure captures the target features better.

52In this study, the novel model named YOLO-LFPD is proposed.The YOLO-LFPD model significantly improves the inference speed by introducing lightweight network modules such as RepVGG and FastNet while maintaining high detection speed and accuracy.Among them, the YOLO model has five different sizes and complexities from small to large: n, s (small), m (medium), l (large), and x (extra large), with the difference only in the number of channels, where n is optimized for Nano devices (e.g., NVIDIA Jetson Nano), which is the fastest, although it sacrifices accuracy.YOLO-LFPD uses a size class of s, so YOLOv5s and YOLOv7s were chosen for comparison.The epoch is set to 400, the learning rate is initially 0.1 and then decreases to 0. The optimizer uses SGD and the batch size is set to 64.

53As shown in Figure 10, compared with traditional models such as YOLOv5, YOLOv7, and Faster R-CNN, our model exhibits better performance when the dataset image resources are not sufficient to meet the training requirements.Although the accuracy of YOLOv5 improves rapidly in the early stages of training, the accuracy cannot be improved further due to the overfitting situation of the model, peaking at nearly 400 epochs.YOLO-LFPD, on the other hand, reduces the depth of the model and increases the residual structure compared to YOLO-FPD, which allows better attention to defective features with an insufficient number of samples, and peaks when training reaches about 250 iterations, which suggests that the optimised structure captures the target features better.The training loss and validation loss for each model are shown in Figure 11a.The experimental results can be seen from the loss function curves in Figure 11b, although YOLOv5 has a lower loss value during training compared to the other models, the value starts to rise at about 100 epochs of the validation loss, which is already overfitting, and therefore, the network accuracy starts to decrease, while the YOLO-LFPD loss curve is more stable due to the addition of more residual structure loss curves.It can be seen that when training the model using a dataset with an insufficient number of images, once overfitting occurs, it is difficult to continue to improve the accuracy.

54Biomimetics 2024, 9, x FOR PEER REVIEW 15 of 27

55The training loss and validation loss for each model are shown in Figure 11a.The experimental results can be seen from the loss function curves in Figure 11b, although YOLOv5 has a lower loss value during training compared to the other models, the value starts to rise at about 100 epochs of the validation loss, which is already overfitting, and therefore, the network accuracy starts to decrease, while the YOLO-LFPD loss curve is more stable due to the addition of more residual structure loss curves.It can be seen that when training the model using a dataset with an insufficient number of images, once overfitting occurs, it is difficult to continue to improve the accuracy.In order to verify the enhancement of the YOLO-FPD model in target detection results, several classical algorithms for strip steel surface defect detection are selected, including FasterRCNN, SSD, Efficiendet, YOLOv5, and YOLOv8.In addition, there are also improved models for steel surface defect detection carried out in the last two years, such as WFRE-YOLOv8s, ST-YOLO, LFF-YOLO, etc., and the results are shown in Table 3, in which the number of channel parameters selected by YOLO-LFPD-n is the same as that of YOLOv5-n, which is a more lightweight version that reduces the number and size of model parameters.It can be seen that the two improved models, YOLO-LFPD and YOLO-FPD, excel in performance metrics.The YOLO-LFPD model achieves 81.2% in terms of accuracy, while YOLO-FPD also achieves a satisfactory 79.6% accuracy.In addition, both improved models perform well in terms of the number of parameters and the number of floating-point computations, which are 6.4 M parameters and 14.1 GFLOPs and 13.2 M parameters and 20.2 GFLOPs, respectively.In contrast, other models may be a little less accurate or higher in terms of the number of parameters and computations, and the WFRE-YOLOv8s, although it achieves a single accuracy of 93.8% in Pa, the accuracy in Ps is too low; ST-YOLO reaches 97% in Sc, but the number of parameters of the model is too large compared with other one-stage models.Compared with several mainstream and improved algorithms, the results of YOLO-LFPD are competitive.Compared with the YOLOv5 baseline, the accuracy is improved by 3.9%, the GFLOPs on the model size is 87% of the original, and the params is 52% of the original.It can be clearly seen that the two improved models, YOLO-LFPD and YOLO-FPD, achieve better performance on the NEU dataset, with both higher accuracy and relatively lower parameter counts and number of computations.In order to verify the enhancement of the YOLO-FPD model in target detection results, several classical algorithms for strip steel surface defect detection are selected, including FasterRCNN, SSD, Efficiendet, YOLOv5, and YOLOv8.In addition, there are also improved models for steel surface defect detection carried out in the last two years, such as WFRE-YOLOv8s, ST-YOLO, LFF-YOLO, etc., and the results are shown in Table 3, in which the number of channel parameters selected by YOLO-LFPD-n is the same as that of YOLOv5-n, which is a more lightweight version that reduces the number and size of model parameters.It can be seen that the two improved models, YOLO-LFPD and YOLO-FPD, excel in performance metrics.The YOLO-LFPD model achieves 81.2% in terms of accuracy, while YOLO-FPD also achieves a satisfactory 79.6% accuracy.In addition, both improved models perform well in terms of the number of parameters and the number of floating-point computations, which are 6.4 M parameters and 14.1 GFLOPs and 13.2 M parameters and 20.2 GFLOPs, respectively.In contrast, other models may be a little less accurate or higher in terms of the number of parameters and computations, and the WFRE-YOLOv8s, although it achieves a single accuracy of 93.8% in Pa, the accuracy in Ps is too low; ST-YOLO reaches 97% in Sc, but the number of parameters of the model is too large compared with other one-stage models.Compared with several mainstream and improved algorithms, the results of YOLO-LFPD are competitive.Compared with the YOLOv5 baseline, the accuracy is improved by 3.9%, the GFLOPs on the model size is 87% of the original, and the params is 52% of the original.It can be clearly seen that the two improved models, YOLO-LFPD and YOLO-FPD, achieve better performance on the NEU dataset, with both higher accuracy and relatively lower parameter counts and number of computations.The experimental results on the GC10-DET dataset are shown in Figure 12.In addition, since the accuracy of the model fluctuates a lot during the training process, in order to test whether there is any effect of different parameters on the model, it is adjusted in three directions, namely, increasing the confidence threshold, increasing the number of batches, and increasing the depth of the model, in which YOLO-LFPD-A, YOLO-LFPD-B, and YOLO-LFPD-C correspond to the above directions in turn.

56The experimental results on the GC10-DET dataset are shown in Figure 12.In addition, since the accuracy of the model fluctuates a lot during the training process, in order to test whether there is any effect of different parameters on the model, it is adjusted in three directions, namely, increasing the confidence threshold, increasing the number of batches, and increasing the depth of the model, in which YOLO-LFPD-A, YOLO-LFPD-B, and YOLO-LFPD-C correspond to the above directions in turn.Table 4 shows the accuracy of the GC10-DET dataset.YOLO-LFPD achieves 72.8% accuracy, which is a significant improvement over YOLOv5s' 65.5%.LSD-YOLOv5 achieves 67.9% accuracy, slightly higher than YOLOv5, with parameters of 2.7 M and 9.1 GFLOPs, giving it lightweight and efficient advantages.In the recent one-year model, MFAM-Net accuracy is 66.7%, and YOLOX accuracy has improved to 70.5%.In comparison, YOLO-LFPD outperforms LSD-YOLOv5 in terms of accuracy, despite having a higher number of parameters and floating-point computations.WFRE-YOLOv8s achieves a higher accuracy of 69.4% but at the cost of a higher number of parameters.Overall, YOLO-LFPD has the best performance.[16] 67.9 2.7 M params,9.1 GFLOPs MFAM-Net [46] 66.7 − TD-Net [34] 71.5 − Improved YOLOX [21] 70.5 − WFRE-YOLOv8s [45] 69. 4 13.8 M params,32.6GFLOPs YOLO-LFPD 72.8 238 layers, 6.4 M params,14.1 GFLOPs,12.5MB Table 4 shows the accuracy of the GC10-DET dataset.YOLO-LFPD achieves 72.8% accuracy, which is a significant improvement over YOLOv5s' 65.5%.LSD-YOLOv5 achieves 67.9% accuracy, slightly higher than YOLOv5, with parameters of 2.7 M and 9.1 GFLOPs, giving it lightweight and efficient advantages.In the recent one-year model, MFAM-Net accuracy is 66.7%, and YOLOX accuracy has improved to 70.5%.In comparison, YOLO-LFPD outperforms LSD-YOLOv5 in terms of accuracy, despite having a higher number of parameters and floating-point computations.WFRE-YOLOv8s achieves a higher accuracy of 69.4% but at the cost of a higher number of parameters.Overall, YOLO-LFPD has the best performance.[16] 67.9 2.7 M params, 9.1 GFLOPs MFAM-Net [46] 66.7 − TD-Net [34] 71.5 − Improved YOLOX [21] 70.5 − WFRE-YOLOv8s [45] 69. 4 13.8 M params, 32.6 GFLOPs YOLO-LFPD 72.8 238 layers, 6.4 M params, 14.1 GFLOPs, 12.5 MB

57The results on the PKU-Market-PCB dataset are shown in Table 5, where the accuracy of YOLO-LFPD reaches 98.2%, which is a significant improvement from 94.7% in YOLOv5s.Among the models in recent years, TDD-Net achieves an accuracy of 95.1%, YOLO-MBBi achieves an accuracy of 95.3%, and DInPNet achieves an accuracy of 95.5%.PCB-YOLO has an accuracy of 96.0%, which is higher than that of the comparative models in recent years, while YOLO-LFPD has an accuracy of 98.2, thus YOLO-LFPD has a better overall performance.

Model mAP@0.5 Model Parameter

58Tiny RetinaNet [47] 70.0 − EfficientDet [47] 69.0 − TDD-Net [48] 95.1 − YOLOX [47] 92.[48] 95.3 415 layers, 37.2 M params, 104.8 GFLOPs, 74.9 MB YOLO-MBBi [48] 95.3 − PCB-YOLO [47] 96.0 − DInPNet [49] 95.5 − TD-Net [34] 96.2 − YOLO-LFPD 98.2 238 layers, 6.4 M params, 14.1 GFLOPs, 12.5 MB

Ablation Experiment

59The ablation experiment environment configuration is consistent with the above experiments, and this experiment constructs the YOLO-LFPD model by replacing the FasterNet backbone network and adding the RepVGG module to examine its effect on the model recognition accuracy.The experimental results are shown in Table 6, replacing the FasterNet backbone network or adding the RepVGG module can improve the accuracy of the YOLO-LFPD model, and there is not much difference between the two improved accuracies.In terms of the number of parameters, the FasterNet backbone network uses the Frobenius paradigm for simple convolution to reduce the complexity of the model, and the number of parameters is reduced by 4.8 M, and the GFLOPs are reduced by 5.3; the RepVGG module, with its single-path architecture of high flexibility and parallelism, saves a lot of memory in the computation, and the number of parameters is reduced by 2 M, and the GFLOPs are reduced by 0.4 M. The RepVGG module's reparameterisation can make the model structure more compact and at the same time have a higher accuracy, and FasterNet can make the model ignore the feature information which is not very useful, when RepVGG and FasterNet are used together, the model's recognition accuracy is greatly improved, the accuracy is 81.2%, and the number of params is reduced to 5.3; the single path architecture of the RepVGG module is flexible and parallel, which saves a lot of memory when computing, the number of params is reduced by 2 M, and the GFLOPs are reduced by 0.8.The params parameter count is 48.5% of the original and the GFLOPs are 69.8% of the original.

Experiments on Reasoning Speed

60The experiments on inference speed were conducted using the NEU dataset.The model's recognition speed for each image was compared.YOLO-LFPD's FasterNet backbone network is designed efficiently, resulting in a significant increase in the speed of the feature fusion and up-sampling modules of the network.This enables the model to perform better on real-time target detection and edge devices, meeting real-time requirements while reducing the computational burden on edge devices.During the training phase, YOLO-LFPD has a faster training speed compared to the original YOLO, allowing for quicker model training.Table 7 shows that YOLO-LFPD has an inference speed of 5.4 ms per image, which is a 22.9% improvement in speed compared to YOLOv5s.Additionally, the amount of parameters is reduced by 47% and the GFLOPs are reduced by 12%.YOLO-LFPD-n reduces the inference time by 16% compared to YOLOv5n's single image inference time.Additionally, the YOLO-LFPD model has a faster inference speed compared to YOLOv8s and YOLOv7-Tiny.The results demonstrate that the YOLO-LFPD model achieves outstanding performance in terms of model recognition accuracy and overall optimization.

Fusion Position Experiments

61In this paper, the FasterNet module is introduced into the backbone network, the feature pyramid, and the detection head of the YOLO-LFPD model, respectively, and experimental comparisons are conducted on the NEU dataset.The experimental epoch is set to 400, the learning rate has an initial value of 0.1 and then decreases to 0, the optimizer uses SGD, and the batch size is set to 64.FasterNet is able to make full use of its highly efficient feature extraction capability, which significantly improves the quality of the feature maps.As shown in Table 8, the model of the backbone network fused with FasterNet has significantly improved in both mAP@0.5 and FPS, achieving higher detection accuracy and real-time performance.

Parametric Experiments

62The experiment used YOLO-LFPD-n and YOLO-LFPD as test models, NEU as the test dataset, and trained for 400 epochs with a batch size of 32 to test the effect of the GA genetic algorithm and OTA loss function.The results are presented in Figure 13. Figure 13a shows that using both the GA genetic algorithm and OTA loss function improves the model's accuracy and convergence speed.The model's performance is largely affected by hyper-parameters such as grid size, number of a priori frames, and weight of the loss function.Optimising these parameters with the genetic algorithm can find more suitable settings for the task.The OTA loss function can improve the accuracy of target detection by more accurately matching the detection frame with the real target.Additionally, the global optimization strategy of OTA is more sensitive to the problem of sparse target detection, allowing for better handling of missed or multiple detections and resulting in improved accuracy and robustness of detection.The YOLO-LFPD-n model's accuracy is enhanced by the combined use of the GA genetic algorithm and the OTA loss function.This suggests that the two methods produce equally good results when used together.Figure 13b shows that while the GA genetic algorithm and the OTA loss function do not significantly improve the accuracy of the YOLO-LFPD model, they do improve the model's stability during the training process.

63hanced by the combined use of the GA genetic algorithm and the OTA loss function.This suggests that the two methods produce equally good results when used together.Figure 13b shows that while the GA genetic algorithm and the OTA loss function do not significantly improve the accuracy of the YOLO-LFPD model, they do improve the model's stability during the training process.Table 9 shows the experimental results.The YOLO-LFPD-n model, using the OTA loss function, improved mAP50 accuracy by 3.6% and mAP95 by 1.4%.The GA genetic algorithm improved mAP50 accuracy by 3.4% and mAP95 by 1.9%.The combined use of both methods resulted in an improvement of mAP50 accuracy by 4.3% and mAP95 by 2.1%, which is a significant improvement.For the YOLO-LFPD model, using both methods, mAP50 accuracy decreased by 0.7% and mAP95 accuracy improved by 0.1%.Based on the experimental data, it is suggested that the smaller YOLO-LFPD-n model can still learn effectively even when the dataset sample size is insufficient, resulting in improved accuracy.Although YOLO-LFPD is prone to overfitting, the OTA loss function and GA genetic algorithm can improve the extraction of feature information of defects during training.However, this improvement leads to overfitting during validation, which can be prevented by either expanding the dataset or reducing the model size.Table 9 shows the experimental results.The YOLO-LFPD-n model, using the OTA loss function, improved mAP50 accuracy by 3.6% and mAP95 by 1.4%.The GA genetic algorithm improved mAP50 accuracy by 3.4% and mAP95 by 1.9%.The combined use of both methods resulted in an improvement of mAP50 accuracy by 4.3% and mAP95 by 2.1%, which is a significant improvement.For the YOLO-LFPD model, using both methods, mAP50 accuracy decreased by 0.7% and mAP95 accuracy improved by 0.1%.Based on the experimental data, it is suggested that the smaller YOLO-LFPD-n model can still learn effectively even when the dataset sample size is insufficient, resulting in improved accuracy.Although YOLO-LFPD is prone to overfitting, the OTA loss function and GA genetic algorithm can improve the extraction of feature information of defects during training.However, this improvement leads to overfitting during validation, which can be prevented by either expanding the dataset or reducing the model size.

Experiment on Pruning

64To examine the impact of various pruning methods on the model, this section conducts pruning experiments on the NEU dataset using a batch size of 32.During the experiments, it was discovered that the model's convergence was slower after pruning, resulting in an epoch change to 500.The experiments on pruning were carried out using a pre-trained YOLO-LFPD model with 400 epochs.The pruning methods used were LAMP pruning [23], SLIM pruning [24], Group_slim pruning [25], Growing_reg pruning [27], Group_taylor pruning [28], and L1 pruning [29].The compression multiplication rate of pruning is represented by ×. 2.0× is compressed to 50% of the original.The pruning strategy involves disregarding the final layer of the FasterNet backbone network module, the ASFF module, and the CARAFE module.Algorithm 1 code is as follows:

Comparison of Forecast Frames

65To better comprehend the impact of the improved YOLO-LFPD module on actual detection, we will compare the prediction frames of YOLO-LFPD and YOLO-FPD.

66Figure 14 shows that YOLO-LFPD is capable of accurately detecting and classifying a wide range of irregular features, even when they overlap.In contrast, YOLO-FPD struggles to detect defects in a region as a whole due to insufficient training samples, resulting in prediction boxes with large gaps at the boundaries.

67As can be seen from Figure 15, YOLO-LFPD possesses a sharper judgement, and in the face of the small and dense defects in Figure 15d, it is still able to distinguish the boundaries of their shapes more clearly, whereas YOLOv5 suffers from more miss-detection and misdetection.

68To better comprehend the impact of the improved YOLO-LFPD module on actual detection, we will compare the prediction frames of YOLO-LFPD and YOLO-FPD.

69Figure 14 shows that YOLO-LFPD is capable of accurately detecting and classifying a wide range of irregular features, even when they overlap.In contrast, YOLO-FPD struggles to detect defects in a region as a whole due to insufficient training samples, resulting in prediction boxes with large gaps at the boundaries.As can be seen from Figure 15, YOLO-LFPD possesses a sharper judgement, and in the face of the small and dense defects in Figure 15(d), it is still able to distinguish the boundaries of their shapes more clearly, whereas YOLOv5 suffers from more miss-detection and misdetection.As can be seen from Figure 15, YOLO-LFPD possesses a sharper judgement, and in the face of the small and dense defects in Figure 15(d), it is still able to distinguish the boundaries of their shapes more clearly, whereas YOLOv5 suffers from more miss-detection and misdetection.

Heat Map Comparison

70To facilitate a more intuitive understanding of the improved module of YOLO-LFPD on actual detection, we will compare the prediction frames of YOLOv5 and YOLO-LFPD.

71Figure 16 shows that the heat map of YOLO-LFPD has a stronger response in the target region.A comparison of the pixel value distribution of the heat maps generated by the two models reveals that the heat map of YOLO-LFPD is brighter and more concentrated in the target region, indicating a stronger target detection response.This suggests that the model can identify the target region more accurately and with greater confidence.

72on actual detection, we will compare the prediction frames of YOLOv5 and YOLO-LFPD.

73Figure 16 shows that the heat map of YOLO-LFPD has a stronger response in the target region.A comparison of the pixel value distribution of the heat maps generated by the two models reveals that the heat map of YOLO-LFPD is brighter and more concentrated in the target region, indicating a stronger target detection response.This suggests that the model can identify the target region more accurately and with greater confidence.

Conclusions

74In this paper, based on the YOLO-FPD model, the YOLO-LFPD model is improved by introducing the RepVGG module and the FasterNet backbone network to get better performance in strip surface defect detection.RepVGG has a simple and efficient network design, adopting the idea of reparameterisation, combining convolutional layers with residual structures, which makes the whole network more compact and easier to train.This design greatly reduces the number of parameters and computational complexity of the model, enabling the YOLO model to have faster inference speed and lower memory consumption while maintaining high detection accuracy.FasterNet adopts a series of innovative operators, such as partial convolution (PConv), which improves the efficiency of the model in extracting spatial features; by reducing redundant computations and memory accesses, FasterNet is able to significantly increase the running speed of the model while maintaining a high accuracy rate.Experimental results on the strip steel surface defects dataset with an insufficient or unbalanced number of images show that the inference time for a single image is reduced by 22.9%, the amount of parameters is reduced by 47%, and the GFLOPs are reduced by 12%, which indicates that the improved YOLO-LFPD model has excellent comprehensive performance and exceeds the original model YOLOv5s in inference speed.This paper carries out pruning, substitution loss function, and hyperparameter evolution experiments in three aspects, and the experimental results show that substitution loss function and hyperparameter evolution experiments have better results on the YOLO-LFPD-n model with a smaller number of parameters, and the reasonable confidence threshold and model depth avoid the model from being overfitted, so as to improve the accuracy of the model, and these experiments fully prove the reasonableness of the YOLO-LFPD model.The main research results of this paper are summarized as follows:

751.

76Pruning enables the model to choose the right parameter size for the actual detection, and the mAP50 accuracy still reaches 75.6% when the number of parameters is reduced to half of the original.In addition, the substitution loss function and hyperparameter evolution methods provide a better improvement in accuracy with smaller model parameters, and the mAP50 accuracy is improved by 6.5%.

2.

77The RepVGG module simplifies the inference process while allowing the model to acquire more surface defect feature information, with a 0.8% increase in mAP50 accuracy, which reduces the depth of the model while being able to improve the extraction of surface defect image features from the strip.A better fusion effect was obtained by testing the location of the FasterNet module, with a 0.2% increase in mAP50 accuracy.

78In addition, the FasterNet module allows the model to ignore unimportant feature information, reducing the amount of computation while preventing model overfitting, and reducing the number of parameters and the amount of computation of the model, with the number of parameters being 63.6% of the original, and the GFLOPs being 73.8% of the original.

3.

79Performance tests were conducted on the NEU dataset, GC10-DET dataset, and PKU-Market-PCB dataset.The experimental results demonstrate that the model's accuracy and number of parameters in this paper are optimal compared to network models from the past two years.Additionally, the model's ability to perform inference speed is also noteworthy, providing a reference for the application of surface defect detection of strip steel and the deployment of the model in actual production scenarios.The model serves as a reference for applying and deploying it in real production scenarios.

Prospect

80This paper investigates the existing deep convolutional network model structure, optimises and improves it, and achieves relevant results.However, there are still many shortcomings in the treatment.

1.

81This paper tests the performance of the improved model using the NEU dataset, the GC10-DET dataset, and the PKU-Market-PCB dataset.However, it is important to note that the data images used suffer from an imbalance in the number of labelled types, inaccurate labelling, and omission of labels.Subsequently, it is recommended to utilise GAN and other adversarial networks for image generation to improve and verify the model's generalisation ability.This will enable the model to detect a wider range of steel surface defects and expand its potential applications.

2.

82This paper focuses solely on detecting surface defects in strip steel and does not extend to other industrial production areas.Future work should explore target detection of surface defects in other workpieces and semantic segmentation of images to enrich research results in the field of steel surface defect detection.

3.

83The lightweight network models proposed in this paper have only been tested on public datasets and have not yet been deployed to mobile or edge devices for realworld performance testing.Future work should focus on testing and validating the models' performance in real-world scenarios of strip steel surface defect detection after deployment to devices.

Figure 1 .

84Figure 1.NEU surface defect dataset.Ten types of surface defects are included within the GC10-DET dataset as shown in Figure 2, i.e., Punch (Pu), Weld (Wl), Crescent Gap (Cg), Water Spot (WS), Oil Spot (Os), Silk Spot (Ss), Inclusions (In), Rolled Pit (Rp), Crease (Cr), and Waist Fold (Wf).The GC10-DET dataset consists of a total of 2294 images with an image size of 2048 × 1000 pixels.The experiment randomly generates the training set, test set, and validation set in 7:2:1, as shown in Figure 3.

85Figure 1.NEU surface defect dataset.

86Figure 1.NEU surface defect dataset.

Figure 2 .

87Figure 2. GC10-DET surface defect dataset.

Figure 3 .

88Figure 3. Image distribution of GC10-DET surface defect dataset.

Figure 2 .

89Figure 2. GC10-DET surface defect dataset.

Figure 1 .

90Figure 1.NEU surface defect dataset.

Figure 2 .

91Figure 2. GC10-DET surface defect dataset.

Figure 3 .

92Figure 3. Image distribution of GC10-DET surface defect dataset.Figure 3. Image distribution of GC10-DET surface defect dataset.

93Figure 3. Image distribution of GC10-DET surface defect dataset.Figure 3. Image distribution of GC10-DET surface defect dataset.The PKU-Market-PCB dataset has a total of six types of defects: leakage holes, rat bites, open circuits, short circuits, stray and stray copper.As shown in Figure4.The experiment randomly generates the training set, test set, and validation set according to 7:2:1, and the number of defects of each type is shown in Table1, totalling 693 images.

Figure 4 .

94Figure 4. PKU-Market-PCB surface defect dataset.

95Figure 4. PKU-Market-PCB surface defect dataset.

Figure 5 .

96Figure 5. YOLO-LFPD structure.

97Figure 5. YOLO-LFPD structure.

98Biomimetics 2024, 9, x FOR PEER REVIEW 10 of 27

99PConv+PWConv (b) T-shaped Conv (c) regular Conv

Figure 6 .

100Figure 6.Comparison of convolutional variants.Different locations of FasterNet integration into the model will have different impacts on the feature extraction, fusion, and final detection performance of the model.Introducing the backbone network can make early feature extraction efficient and flexible and improve the quality of the initial feature map; introducing the neck network can improve the

101Figure 6.Comparison of convolutional variants.

Figure 7 .

102Figure 7. (a) for the original structure (b) for the FasterNet replacement location.

103Figure 7. (a) for the original structure (b) for the FasterNet replacement location.

Biomimetics 2024, 9 ,Figure 8 .

104Figure 8. RepVGG.

Figure 8 .

105Figure 8. RepVGG.

Figure 9 .

106Figure 9. (a) for the original structure (b) for the RepCONV replacement position.

107Figure 9. (a) for the original structure (b) for the RepCONV replacement position.

Biomimetics 2024, 9 ,

108x FOR PEER REVIEW 14 of 27 model size (MB) refers to the size of the model on the storage medium and affects the ease of deployment.The number of layers (LAYERS) of the YOLO model indicates the depth of the model and affects the capability and complexity of feature extraction.

Figure 10 .

109Figure 10.Line graph displaying the experimental results of YOLO-LFPD on the NEU dataset.Figure 10.Line graph displaying the experimental results of YOLO-LFPD on the NEU dataset.

110Figure 10.Line graph displaying the experimental results of YOLO-LFPD on the NEU dataset.Figure 10.Line graph displaying the experimental results of YOLO-LFPD on the NEU dataset.

Figure 11 .

111Figure 11.The YOLO-LFPD loss function was applied to the NEU dataset, with (a) representing the training loss and (b) representing the validation loss.

112Figure 11.The YOLO-LFPD loss function was applied to the NEU dataset, with (a) representing the training loss and (b) representing the validation loss.

Figure 12 .

113Figure 12.YOLO-LFPD accuracy fold plot on GC10-DET dataset.

114Figure 12.YOLO-LFPD accuracy fold plot on GC10-DET dataset.

Figure 13 .

115Figure 13.(a) is the experimental diagram of the YOLO-LFPD-n parameter, and (b) is the experimental diagram of the YOLO-LFPD parameter.

116Figure 13.(a) is the experimental diagram of the YOLO-LFPD-n parameter, and (b) is the experimental diagram of the YOLO-LFPD parameter.

Figure 14 .

117Figure 14.Shows a comparison of the detection frames for the NEU dataset.The original labels are displayed in (a,d), while (b,e) and (c,f) show the detection frames for YOLO-LFPD and YOLO-FPD, respectively.

Figure 15 .

118Figure 15.Shows a comparison of the detection frames for the GC10 dataset.The original labels are represented by (a,d), while (b,e) and (c,f) represent YOLOv5 and YOLO-LFPD, respectively.

Figure 14 .Figure 14 .

119Figure 14.Shows a comparison of the detection frames for the NEU dataset.The original labels are displayed in (a,d), while (b,e) and (c,f) show the detection frames for YOLO-LFPD and YOLO-FPD, respectively.

Figure 15 .

120Figure 15.Shows a comparison of the detection frames for the GC10 dataset.The original labels are represented by (a,d), while (b,e) and (c,f) represent YOLOv5 and YOLO-LFPD, respectively.Figure 15.Shows a comparison of the detection frames for the GC10 dataset.The original labels are represented by (a,d), while (b,e) and (c,f) represent YOLOv5 and YOLO-LFPD, respectively.

121Figure 15.Shows a comparison of the detection frames for the GC10 dataset.The original labels are represented by (a,d), while (b,e) and (c,f) represent YOLOv5 and YOLO-LFPD, respectively.Figure 15.Shows a comparison of the detection frames for the GC10 dataset.The original labels are represented by (a,d), while (b,e) and (c,f) represent YOLOv5 and YOLO-LFPD, respectively.

Figure 16 .

122Figure 16.Shows a heat map comparison of the NEU datasets.The left panel displays the raw labels, while the middle and right panels show the results obtained using YOLOv5 and YOLO-LFPD, respectively.

123Figure 16.Shows a heat map comparison of the NEU datasets.The left panel displays the raw labels, while the middle and right panels show the results obtained using YOLOv5 and YOLO-LFPD, respectively.

Table

1241, totalling 693 images.

Table 1 .

125PKU

126-Market-PCB Pictures.

127PKU-Market-PCB Pictures.

Table 2 .

128Experimental environment.

129Experimental environment.

Table 3 .

130YOLO-FPD comparison experimental results on NEU-DET.

Table 4 .

131YOLO-LFPD comparison experiment results on GC10-DET dataset.

132YOLO-LFPD comparison experiment results on GC10-DET dataset.

Table 5 .

133Comparison of experimental results of YOLOv5s-FPD on VOC2007.

Table 6 .

134Comparative experiments between FasterNet and RepVGG on NEU dataset.

Table 7 .

135Shows the results of the experiment comparing the inference speed of models on the NEU dataset.

Table 8 .

136FasterNet module fusion location results.

Table 9 .

137Shows the results of the parameter experiment conducted on the NEU dataset.

138Shows the results of the parameter experiment conducted on the NEU dataset.

Table 10

139[50]s the pruning effect, with L1 representing weight pruning, Group_norm[50]representing a normalization method, and the rest representing structural pruning.The table indicates that the overall effect of structural pruning is not ideal, with SLIM being the worst performer, achieving only 68.5% accuracy, while Group_taylor achieves 73.1% accuracy.On the other hand, L1 pruning and Group_norm achieve good results at compression rates around 1.5×.

Table 10 .

140Shows the results of the pruning experiments conducted on the NEU dataset.

참고문헌 45건

  1. Segmentation Algorithm of Armor Plate Surface Images Based on Improved Visual Attention Mechanism The Open Cybernetics & Systemics Journal · Bentham Science Publishers · 2015 10.2174/1874110x01509011385
  2. Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position Biological Cybernetics · Springer Science+Business Media · 1980 10.1007/bf00344251
  3. Sequential Minimal Optimization : A Fast Algorithm for Training Support Vector Machines Microsoft Research Technical Report · 1998
  4. Pruning Filters for Efficient ConvNets arXiv (Cornell University) · Cornell University · 2016
  5. Defect Detection of Steel Surfaces with Global Adaptive Percentile Thresholding of Gradient Image Journal of The Institution of Engineers (India) Series B · Springer Science+Business Media · 2017 10.1007/s40031-017-0296-2
  6. Learning Efficient Convolutional Networks through Network Slimming 2017 10.1109/iccv.2017.298
  7. You Only Look Once: Unified, Real-Time Object Detection 2016 10.1109/cvpr.2016.91
  8. Mask R-CNN 2017 10.1109/iccv.2017.322
  9. Importance Estimation for Neural Network Pruning 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · 2019 10.1109/cvpr.2019.01152
  10. A comparative study of image processing thresholding algorithms on residual oxide scale detection in stainless steel production lines Procedia Manufacturing · Elsevier BV · 2019 10.1016/j.promfg.2019.07.049
  11. Steel plate corrugation defect intelligent detection method based on picture cropping and region growing algorithm 2019 10.1109/iciea.2019.8834382
  12. Deep Metallic Surface Defect Detection: The New Benchmark and Detection Network Sensors · Multidisciplinary Digital Publishing Institute · 2020 10.3390/s20061562
  13. EfficientDet: Scalable and Efficient Object Detection 2020 10.1109/cvpr42600.2020.01079
  14. Development of a YOLO-V3-based model for detecting defects on steel strip surface Measurement · Elsevier BV · 2021 10.1016/j.measurement.2021.109454
  15. MSFT-YOLO: Improved YOLOv5 Based on Transformer for Detecting Defects of Steel Surface Sensors · Multidisciplinary Digital Publishing Institute · 2022 10.3390/s22093467
  16. ES-Net: Efficient Scale-Aware Network for Tiny Defect Detection IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2022 10.1109/tim.2022.3168897
  17. Random Forest Journal of Insurance Medicine · 2017 10.17849/insm-47-01-31-39.1
  18. Group Normalization Lecture notes in computer science · Springer Science+Business Media · 2018 10.1007/978-3-030-01261-8_1
  19. Surface Defect Detection Algorithm Based on Feature-Enhanced YOLO Cognitive Computation · Springer Science+Business Media · 2022 10.1007/s12559-022-10061-z
  20. LFF-YOLO: A YOLO Algorithm With Lightweight Feature Fusion Network for Multi-Scale Defect Detection IEEE Access · Institute of Electrical and Electronics Engineers · 2022 10.1109/access.2022.3227205
  21. Surface Defect Detection of Steel Strip with Double Pyramid Network Applied Sciences · Multidisciplinary Digital Publishing Institute · 2023 10.3390/app13021054
  22. MSC-DNet: An efficient detector with multi-scale context for defect detection on strip steel surface Measurement · Elsevier BV · 2023 10.1016/j.measurement.2023.112467
  23. DCAM-Net: A Rapid Detection Network for Strip Steel Surface Defects Based on Deformable Convolution and Attention Mechanism IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2023 10.1109/tim.2023.3238698
  24. A Lightweight Network for Defect Detection in Nickel-Plated Punched Steel Strip Images IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2023 10.1109/tim.2023.3237844
  25. EDDNet: An Efficient and Accurate Defect Detection Network for the Industrial Edge Environment 2022 10.1109/qrs57517.2022.00090
  26. RDD-YOLO: A modified YOLO for detection of steel surface defects Measurement · Elsevier BV · 2023 10.1016/j.measurement.2023.112776
  27. PCB-YOLO: An Improved Detection Algorithm of PCB Surface Defects Based on YOLOv5 Sustainability · Multidisciplinary Digital Publishing Institute · 2023 10.3390/su15075963
  28. An improved YOLOX method for surface defect detection of steel strips 2023 10.1109/icpeca56706.2023.10075827
  29. Strip Surface Defect Detection Algorithm Based on YOLOv5 Materials · Multidisciplinary Digital Publishing Institute · 2023 10.3390/ma16072811
  30. A One‐Stage Deep Learning Model for Industrial Defect Detection Advanced Theory and Simulations · Wiley · 2023 10.1002/adts.202200853
  31. Dilated Involutional Pyramid Network (DInPNet): A Novel Model for Printed Circuit Board (PCB) Components Classification 2023 10.1109/isqed57927.2023.10129388
  32. YOLO-MBBi: PCB Surface Defect Detection Method Based on Enhanced YOLOv5 Electronics · Multidisciplinary Digital Publishing Institute · 2023 10.3390/electronics12132821
  33. LSD-YOLOv5: A Steel Strip Surface Defect Detection Algorithm Based on Lightweight Network and Enhanced Feature Fusion Mode Sensors · Multidisciplinary Digital Publishing Institute · 2023 10.3390/s23146558
  34. Run, Don't Walk: Chasing Higher FLOPS for Faster Neural Networks 2023 10.1109/cvpr52729.2023.01157
  35. YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors 2023 10.1109/cvpr52729.2023.00721
  36. DepGraph: Towards Any Structural Pruning 2023 10.1109/cvpr52729.2023.01544
  37. Application of Task-Aligned Model Based on Defect Detection Automation · Multidisciplinary Digital Publishing Institute · 2023 10.3390/automation4040019
  38. A Novel ST-YOLO Network for Steel-Surface-Defect Detection Sensors · Multidisciplinary Digital Publishing Institute · 2023 10.3390/s23229152
  39. WFRE-YOLOv8s: A New Type of Defect Detector for Steel Surfaces Coatings · Multidisciplinary Digital Publishing Institute · 2023 10.3390/coatings13122011
  40. LDD-Net: Lightweight printed circuit board defect detection network fusing multi-scale features Engineering Applications of Artificial Intelligence · Elsevier BV · 2023 10.1016/j.engappai.2023.107628
  41. Steel Strip Surface Defect Detection Method Based on Improved YOLOv5s Biomimetics · Multidisciplinary Digital Publishing Institute · 2024 10.3390/biomimetics9010028
  42. YOLOv5s‐GC‐Based Surface Defect Detection Method of Strip Steel steel research international · Wiley · 2024 10.1002/srin.202300421
  43. MFAM-Net:A Surface Defect Detection Network for Strip Steel via Multiscale Feature Fusion and Attention Mechanism 2023 10.1109/ntci60157.2023.10403686
  44. Joining Spatial Deformable Convolution and a Dense Feature Pyramid for Surface Defect Detection IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2024 10.1109/tim.2024.3370962
  45. TD-Net:tiny defect detection network for industrial products Complex & Intelligent Systems · Springer Science+Business Media · 2024 10.1007/s40747-024-01362-x