Workpiece surface defect detection based on YOLOv11 and edge computing
간접 관련 엔지니어링 플라스틱 · (23) 컴파운드 (3) 자동차 인테리어 소재(17) 스펀본드 부직포
기본 정보
- 저자
- DOI
- 10.1371/journal.pone.0327546
- 저널
- PLoS ONE
- 발행년도
- 2025
- 발행기관
- Public Library of Science
- 피인용수
- 4
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1371/journal.pone.0327546
- 토픽
- Surface Roughness and Optical Measurements
- OpenAlex ID
- W4412124039
평가 내용
- 관련도
- 간접 관련
- 사업분야
- 엔지니어링 플라스틱 · (23) 컴파운드
- 부 분야
- (3) 자동차 인테리어 소재, (17) 스펀본드 부직포
- R&D 측면
- 분석·모델링
- 확신도
- 0.70
- 근거 용어
- workpiece surface defect detection, YOLOv11, edge computing, deep learning, SA-GAN
- 판단 근거
- 본 논문은 딥러닝(YOLOv11)과 엣지 컴퓨팅을 이용한 산업용 가공품(workpiece)의 표면 결함 검출 기술을 다룹니다. 이는 코오롱인더스트리의 제조 공정(컴파운드, 섬유, 필름 등) 내 품질 관리 자동화 및 스마트 팩토리 구현에 응용 가능한 기술입니다.
- R&D 활용 포인트
- 필름, 섬유, 화학 제품 등 주요 제품의 제조 공정 라인에 실시간 표면 결함 검출 시스템을 도입하여 품질 관리 효율성을 높이고 불량률을 낮추는 데 활용 가능합니다.
- 평가 입력
- 본문 56,798자 중 30,032자 발췌
초록
본문 56,798자
본문 펼치기
섹션 본문 67문단 · 33,459자
(제목 없음)
1The rapid development of modern industry has significantly raised the demand for workpieces.To ensure the quality of workpieces, workpiece surface defect detection has become an indispensable part of industrial production.Most workpiece surface defect detection technologies rely on cloud computing.However, transmitting large volumes of data via wireless networks places substantial computational burdens on cloud servers, significantly reducing defect detection speed.Therefore, to enable efficient and precise detection, this paper proposes a workpiece surface defect detection method based on YOLOv11 and edge computing.First, the NEU-DET dataset was expanded using random flipping, cropping, and the self-attention generative adversarial network (SA-GAN).Then, the accuracy indicators of the YOLOv7-YOLOv11 models were compared on NEU-DET and validated on the Tianchi aluminium profile surface defect dataset.Finally, the cloud-based YOLOv11 model, which achieved the highest accuracy, was converted to the edge-based YOLOv11-RKNN model and deployed on the RK3568 edge device to improve the detection speed.Results indi-cate that YOLOv11 with SA-GAN achieved mAP@0.5 improvements of 7.7%, 3.1%, 5.9%, and 7.0% over YOLOv7, YOLOv8, YOLOv9, and YOLOv10, respectively, on the NEU-DET dataset.Moreover, YOLOv11 with SA-GAN achieved an 87.0%
Introduction
2With the rapid development of the manufacturing industry, the production efficiency of workpieces, which are used in large numbers in automotive manufacturing, aerospace, precision machining, and medical device manufacturing, has been constantly improving [1][2][3][4].However, the mass production of workpieces inevitably involves surface defects.Most defects are caused by factors such as unstable machine tool equipment and unqualified workpiece raw materials [5].Such defects not only reduce the production compliance rate of workpieces but also affect equipment safety [6].
3In recent years, deep learning-based methods have gradually started being used in workpiece surface defect detection due to their high accuracy and reliability [7].Chen et al. [8] proposed a small-defect detection model for workpiece surfaces, which comprises a parallel convolution module, serial convolution module, and feature fusion module.Although this model achieves high-precision detection on a local cable dataset and a public printed circuit board dataset, the detection time is relatively long.Wei et al. [9] constructed a multi-scale defect detection network based on deep learning.While the network achieves a 75.8% mean Average Precision (mAP@0.5) on an aluminium material surface dataset, its detection speed is inadequate.Xing et al. [10] developed a workpiece surface defect detection model based on a convolutional neural network (CNN), which achieves a 79.89% mAP@0.5 on NEU-DET.Qiu et al. [11] developed an enhanced single-shot multi-box detector algorithm based on MobileNetV2, which effectively avoids missed and false detection of workpiece defects.Tabernik et al. [12] proposed a model that can detect cracks on workpiece surfaces based on segmentation deep learning; however, it is trained on insufficient samples and exhibits weak generalisability.Cheng et al. [13] constructed the RetinaNet neural network model, which utilises differential channel attention and adaptive spatial feature fusion to achieve a 78.25% mAP@0.5 on the NEU-DET dataset.Zhang et al. [14] proposed a steel-strip surface defect detection method based on the classification priority YOLOv3 DenseNet neural network.Liu et al. [15] proposed the Double Loss Guided Residual Attention and Feature Enhancement Network to segment polyp images, which exhibits a greatly enhanced feature-fitting ability and can segment polyp images effectively.Li et al. [16] proposed a random cropping augmentation based on an optimised YOLOv8 algorithm, which can precisely detect micropore-type surface defects on the inner walls of high-precision cylindrical parts.
4Although the abovementioned workpiece surface defect detection methods offer strong accuracy, these deep learning-based technologies are completed in the cloud.Centralised cloud computing requires a massive volume of data to be sent to cloud servers via wireless networks, which imposes a significant computational burden on the cloud, thus reducing the model's detection speed [17].
5Edge computing technology was introduced to solve the aforementioned problem [18,19].It represents an open platform that sinks computing power and storage devices to the side closer to users or data sources, effectively limiting broadband costs, transmission delays, and data congestion [20,21].Li et al. [22] improved the YOLOv5s framework and combined it with edge computing to detect surface defects on small targets, thereby achieving a shorter detection delay.Wang et al. [23] optimised the YOLOv3 model to reduce its size and deployed it to edge computing devices, which allowed the model to achieve a 6.72-fold higher Frames Per Second (FPS) in pedestrian and vehicle detection.However, as this model is designed for large targets, it cannot be used for workpiece surface detection.Bonam et al. [24] combined a lightweight CNN model with transfer learning methods to achieve efficient and precise detection of fabric surface defects.Wang et al. [25] used the Faster R-CNN algorithm in a cloud-edge computing environment to identify defects in complex product images, thus achieving faster defect detection.However, the size of this model is not optimised, which may cause excessive memory usage during deployment.Li et al. [26] used edge computing to build a fast attention segmentation classification model that can accurately and rapidly detect small-sized industrial parts.Wang et al. [27] used edge computing devices to process road-monitoring images and used deep learning models to monitor the processed images with better detection accuracy.
6The foregoing literature review shows that deep learning-based workpiece surface defect detection methods have relatively long detection times.Although the use of edge computing has alleviated this problem, the detection accuracy of such models must be improved.To this end, we propose a workpiece surface defect detection method based on YOLOv11 and edge computing.
7The main contributions of this paper are as follows:
81) A SA-GAN-based data augmentation strategy is proposed, which improves the mAP@0.5 of YOLOv11 from 83.52% to 91.23% on the NEU-DET dataset.
92) Real-time edge inference is demonstrated on the RKNN platform, using INT8 quantization, reducing the model latency to 33.6 milliseconds and the model size to 18.3 MB.
103) The proposed pipeline is validated on two public datasets, and ablation studies are provided to confirm the impact of SA-GAN.
Data augmentation based on GAN
11GAN-based data augmentation technology has been applied in various fields due to its powerful data generation capabilities.Wicaksono et al. [28] used the DCGAN data augmentation network to enhance sleep apnea data, the enhanced data improved the training effect of the deep learning model.McGibbon et al. [29] used CycleGAN to eliminate the precipitation bias simulated by the fast coarse grid atmospheric model, demonstrating the effectiveness of the GAN network in climate data augmentation.Melnik et al. [30] discussed the application of StyleGAN in face image generation.Fatima et al. [31] introduced the SA-GAN network to enhance lung ultrasound images, which improved the robustness and reliability of the AI model in alleviating class imbalance in lung ultrasound analysis.Chien et al. [32] proposed NGGAN for generating noise in narrowband powerline communications, demonstrating the versatility of GANs in augmenting data for communication systems.Deng et al. [33] introduced DG2GAN to improve defect recognition performance by generating diverse defect samples.Xu et al. [34] presented Scarcity-GAN for augmenting scarce data in defect detection, showcasing the effectiveness of GANs in addressing data scarcity challenges.Chen et al. [35] This paper chooses SA-GAN to enhance the workpiece surface defect image.The core advantage of choosing SA-GAN is that it can effectively deal with key challenges such as defect diversity, small sample learning, and context relevance.Compared with the problem that traditional GAN is limited by local convolution operations and has difficulty in establishing a global defect feature model, SA-GAN captures long-term dependencies through the self-attention mechanism and can generate more realistic and diverse defect samples.In addition, SA-GAN can dynamically model the relationship between pixels through self-attention without paired data, and generate defects coordinated with the background texture.
YOLOv11 model
12The YOLO series of object detection algorithms have been widely used in various industrial scenarios and practical applications due to their excellent detection performance and efficient inference speed.Mao et al. [36] used the YOLOv7 model with ConSinGAN to achieve high-precision detection of electronic components.Zhao et al. [37] applied the enhanced YOLOv8n to indoor smart retail detection.EL-YOLO [38] and improved YOLOv9 [39] were customized for maritime monitoring.The YOLOv10 [40] model also achieved good detection accuracy and speed in textile detection.Zhang et al. [41] further integrated the attention mechanism into YOLO for industrial safety monitoring.
13To enhance defect detection, the YOLOv11 model was employed in this paper.Compared with its predecessors (YOLOv7, YOLOv8, YOLOv9, and YOLOv10), YOLOv11 demonstrates superior feature extraction, improved training efficiency, broader task adaptability, and enhanced compatibility with edge computing.YOLOv11 comprises three main parts: Backbone, Neck, and Head.'Backbone' denotes the backbone network, which processes input images and extracts image features.Compared with YOLOv10, YOLOv11 includes three additional modules.The first is the C3K2 module, which optimises the information flow in the network by segmenting the feature map and applying a series of smaller kernel convolutions to improve the efficiency and accuracy of feature extraction.The second is the spatial pyramid pooling fusion module, which pools features from different regions of the image at different scales, thereby preserving the model's detection speed while enhancing its ability to detect images across multiple scales.The third is the C2 pyramid slice attention module, which introduces an attention mechanism to enhance the model's ability to detect images with small pixels or partial occlusions.
14'Neck' represents the neck network, which further processes and fuses the feature maps from Backbone to generate more powerful features.Neck also uses the C3K2 module to further integrate image information features at different scales.
15'Head' represents the detection part, which predicts the detection results based on the feature map generated by Neck.Head includes a depthwise separable convolution module, which decomposes a convolution layer into a depthwise convolution and a pointwise convolution, thereby preserving the dimensions of the input and output feature maps.This significantly reduces the number of parameters and calculations.
Edge computing architecture
16Edge computing is a distributed computing architecture with the core objective of placing data processing and computing resources on edge devices, sensors, or user devices close to the source of data generation to provide fast, real-time computing and data analysis capabilities.control machine tools.The edge is the core of the edge computing architecture and is located between the cloud and the field.The edge can interact with the IoT devices on the field, receive data from processing equipment such as machine tools, and complete data processing and analysis tasks at the edge close to the data source.Simultaneously, it can interact with the cloud and upload data with analytical value to the cloud while retaining sensitive data locally to ensure secure data transmission.
Workpiece surface defect detection
17To achieve accurate and rapid detection of workpiece surface defects, this paper proposes a method based on YOLOv11 and edge computing.
Dataset expansion
18To verify the effectiveness of the proposed model, multiple experiments were conducted on the NEU-DET dataset, which contains three categories of labels: 'scratches', 'inclusions', and 'patches'.As the dataset was small, with only 300 images in each category, it was expanded using random cropping, flipping, and SA-GAN to improve model robustness [42].
19(1) Data Augmentation: The expansion operations included random cropping and flipping.After removing redundant data, the dataset was expanded to 2450 images, comprising 996 scratches, 795 inclusions, and 659 patches.
20(2) SA-GAN: SA-GAN is an improved version of GAN, which leverages the self-attention mechanism to address the limitations of traditional GANs in handling long-distance dependencies.The concept of SA-GAN is shown in Fig 4.
21The self-attention mechanism of SA-GAN significantly improves the effectiveness of data augmentation.Its core advantage is that it can capture the global dependencies in the image and generate high-quality and diverse synthetic data, thereby expanding the training dataset effectively.The self-attention mechanism dynamically generates attention weights by calculating the relationship between the query (Q ), key (K), and value (V) based on the following equation:
22where
YOLOv11 model conversion
23The RK3568 edge computing development board was used as the edge computing device.After YOLOv11 had been trained in the cloud, the model was converted into a YOLOv11-RKNN model that could be deployed on the edge.This Step 1: RKNN-Toolkit2 is used to create an RKNN object and initialise the RKNN SDK environment.
24Step 2: The model conversion parameters are configured as shown in Table 2.The mean value and normalised value of the input image data are set to [0,0,0] and [255,255,255], respectively, to ensure that the pixel values of the model's input image are standardised from the range 0-255 to the range 0-1.The corresponding equations for normalisation and standardisation are as follows:
25where X input is the original pixel value ([0, 255]), µ is the mean value of the training set, and σ is the standard deviation of the training set.The asymmetric INT8 quantisation method provided by RKNN-Toolkit2 is used to convert the float32 model into a more efficient INT8 model by calculating Scale (S) and Zero point (Z ).This not only reduces memory usage but also accelerates the inference process.The model quantisation method is set to Channel to ensure that each channel of each conversion is set to the RK3568 edge computing device to ensure that the model can run successfully on this edge platform.The quantisation equation is as follows:
26where S is the proportional factor, which determines the magnitude of the value change during quantisation, Z is the offset value, which indicates the offset of the quantised data, X max and X min are the maximum and minimum values of the tensor data, respectively, and 2 8 -1 is the maximum value of the INT8 type data (255).
27Step 3: The YOLOv11 model is imported from the cloud, and the YOLOv11-RKNN model is created according to the preset parameters.The Inference interface is used to infer the input data, and the Eval_perf and Eval_memory interfaces are employed to evaluate the model's performance and memory usage, respectively.
28Step 4: The model conversion is completed by exporting the YOLOv11-RKNN model and releasing the RKNN object.Fig 7 compares the structures of the cloud and edge models.As can be seen, the model changed from a complex multi-layer structure to a three-layer structure comprising an input layer, intermediate operation layer, and output layer, which reduced the amount of calculation.Moreover, the change in the model's data type from float32 to int8 reduced memory usage.The model's execution platform was the RK3568 edge computing device, which meets the requirements for deployment on the edge.
YOLOv11-RKNN model deployment
29Converting the cloud-side YOLOV11 model to the YOLOV11-RKNN model and deploying it on edge computing devices can not only alleviate the model's dependence on the cloud and reduce the data transmission cost and delay but also significantly increase the target detection speed, thereby enabling rapid detection of workpieces at industrial sites.
30Fig 8 illustrates the model deployment process.After converting the cloud-side YOLOv11 model to the edge-side YOLOv11-RKNN model, the RKNN-Toolkit lite model deployment tool was first configured in the edge computing device, and the Python interface in RK3568 was used for model deployment programming.Then, the RKNPU2 driver was configured, and the neural processing unit (NPU) in RK3568 -a hardware unit specifically for accelerating neural network calculations -was utilised to load and run the YOLOv11-RKNN model.Finally, the YOLOv11-RKNN model deployed on the edge was used to detect surface defect images from a workpiece, and the model's detection accuracy and speed were evaluated.
31In the actual processing environment, the industrial camera can be installed above the machine tool workbench to collect the workpiece surface image in real time without interfering with the processing, and transmit it to the edge via Ethernet.The YOLOv11-RKNN model deployed on the edge is used to achieve accurate defect detection with the field end to the edge end delay of less than 150ms (acquisition transmission <50ms, inference <50ms, result return <50ms) to meet the real-time requirements of the industrial site.
Experimental analysis
32To verify the superiority of the proposed method, the training results of the cloud-based YOLOv11 model were compared with those of the YOLOv8, YOLOv9, and YOLOv10 models.Additionally, the detection accuracy and speed of the cloud-based YOLOv11 model and the edge-based YOLOv11-RKNN model were compared to evaluate the effect of edge deployment on model performance.
33The software environment included the Linux operating system and the Pytorch2.0deep learning framework.All cloud experiments were performed on a cloud server with 32 GB of memory and an NVIDIA GeForce RTX 4090 GPU.All edge experiments were performed on the Rockchip RK3568 edge computing development board, which uses the Linux operating system and is equipped with a high-performance quad-core ARM Cortex-A55 processor having a main frequency of up to 2.0 GHz.It also integrates multiple modules, such as an ARM Mali-G52 2EE GPU and an NPU with 1.0 TOPS of computing power, thereby meeting the experimental requirements for this study.
Dataset partitioning
34The expanded dataset was divided into three parts: 80% for training, 10% for validation, and 10% for testing.Table 3 summarises the division of the three types of surface defect data across the training, validation, and test sets.
Model training parameters and evaluation indicators
35To ensure a fair comparison, the YOLOv7, YOLOv8, YOLOv9, YOLOv10, and YOLOv11 models were trained on the same dataset and in the same environment.All models were trained from scratch without using any official pre-trained weights.The number of epochs was set to 300, Stochastic Gradient Descent (SGD) was used as the optimiser, and the batch size was set to 16 to ensure that all models would converge.Table 4 lists the hyperparameters for model training.The evaluation indicators for this experiment included the model's detection accuracy and detection speed.The indicators of detection accuracy included precision (PRE), recall rate (REC), F1 score (F1), true negative rate (TNR), average precision (AP), and mAP@0.5.Additionally, the detection time for a single image was used to evaluate the detection speeds before and after the model was deployed.The corresponding calculation formula is as follows:
36where TP and TN represent the number of defective and non-defective samples correctly identified by the model, respectively, FP represents the number of non-defective samples that are mistakenly detected as defective samples by the model, FN represents the number of defective samples that are mistakenly detected as non-defective samples by the model, AP C represents the average precision for each defect type, C represents the defect type, and N represents the total number of categories.
Model training effectiveness
37According to the parameters specified in Section 4.2, the models with and without SA-GAN were trained separately on the workpiece surface defect datasets.Table 5 compares the performance of all the YOLO models with and without SA-GAN, based on mAP@0.5,PRE, REC, F1, and TNR as the evaluation indicators.The results in Table 5 highlight the superiority of the YOLOv7, v8, v9, v10, and v11 models with SA-GAN over the corresponding models without SA-GAN, in terms of various accuracy indicators.Among the models, YOLOv11 with SA-GAN performed particularly well, as evidenced by its mAP@0.5 (85.1%) being better than that of the other models.
38The loss curve and precision-recall curve of YOLOv11 with SA-GAN are shown in 6. 6 show that the mAP@0.5 of YOLOv11 with SA-GAN on NEU-DET was 7.7%, 3.1%, 5.9%, and 7.0% higher than that of YOLOv7, YOLOv8, YOLOv9, and YOLOv10, respectively.The APs of the YOLOv11 model for inclusions, patches, and scratches were 86.6%, 80.1%, and 88.7%, respectively, while the mAP@0.5 was 85.1%; this indicates that YOLOv11 with SA-GAN has better detection accuracy than the other models.
39Moreover, to verify the generalisability of the proposed model, the Tianchi aluminium profile surface defect dataset was used for experimental verification.First, the SA-GAN network was used to augment the data on the four types of defects ('bruise', 'dirty', 'raised', and 'scratches') in the dataset; this yielded a dataset containing 872 defect images (208 bruise images, 188 dirty images, 168 raised images, and 308 scratch images).Subsequently, YOLOv7-YOLOv11 models were trained on the expanded dataset, and the training results are shown in Table 7.
40The results in Table 7 show that SA-GAN enhanced the accuracy of the YOLOv7, v8, v9, v10, and v11 models.The YOLOv11 model with SA-GAN performed particularly well, achieving a higher mAP@0.5 (87.0%) than the other models.This confirms the generalisability of the YOLOv11 model across different datasets.
Model conversion and deployment results
41After converting the cloud-side YOLOv11 model to the edge-side YOLOv11-RKNN model and deploying it on the RK3568 edge development board, the two platform models were tested on the same test set.Figs 14 and 15 compare the model sizes and detection speeds.Table 8 shows the input and output tensors of the models, the detection image pixels, and the model FLOPs.8 shows that after the model was quantised, the input and output tensors were converted from float32 to int8 type, the FLOPS of the model did not change, and the model size was reduced from 10,156 kB to 4194 kB, which greatly reduced the memory occupied by the model on the edge computing device.For an image with a pixel size of 200 × 200, the detection time of the cloud-side YOLOv11 model was 52.1ms, while that on the RK3568 edge was only 33.6ms.Thus, the detection time for a single image on the edge was shortened by 35.5%, which represents a substantial improvement in detection speed.
42To verify the detection accuracy of the YOLOv11-RKNN model deployed on the edge, it was compared with the corresponding cloud-based model on the NEU-DET and Tianchi aluminium profile surface defect datasets.The results are shown in Figs 16 and 17.
43As seen in Fig 16, when detecting inclusion-type defects on NEU-DET, the YOLOv11 model with SA-GAN achieved accuracies of 84.45% and 88.40%, while the YOLOv11-RKNN model achieved accuracies of 84.69% and 85.89%; when detecting patch-type defects, the YOLOv11 model with SA-GAN achieved accuracies of 76.31% and 88.35%, while the YOLOv11-RKNN model achieved accuracies of 75.92% and 88.47%; when detecting scratch-type defects, the YOLOv11 model with SA-GAN achieved accuracies of 90.97% and 88.09%, while the YOLOv11-RKNN model achieved accuracies of 90.85% and 88.19%.Thus, the detection accuracy of the edge-side model was basically the same as that of the cloudside model.This verifies that the proposed method can maintain a high detection accuracy while improving the model's detection speed for workpiece surface defects.Fig 17 also shows that on the Tianchi aluminium profile surface defect dataset, the accuracy of the cloud-based YOLOv11 model in detecting the four types of defect images was higher than that of the cloud-based YOLOv7, v8, v9, and v10 models.Additionally, the accuracies of the cloud-based YOLOv11 model and the edge-based YOLOv11-RKNN model were basically consistent, which confirms the effectiveness of the proposed method.
Conclusions
44This paper proposed a workpiece surface defect detection method based on YOLOv11 and edge computing.First, random cropping, flipping, and SA-GAN were used to expand the workpiece surface defect dataset.Then, the performance of the YOLOv7-YOLOv11 models trained on the NEU-DET and Tianchi aluminium profile surface defect datasets was compared to verify the superiority and generalisability of the YOLOv11 model.Finally, the cloud-side YOLOv11 model was quantised, converted, and deployed on the RK3568 edge computing device to reduce its footprint and improve its detection speed.The results show that the cloud-based YOLOv7-YOLOv10 models with SA-GAN achieved mAP@0.5 values of 77.4%, 82.0%, 79.2%, and 78.1%, respectively, on the NEU-DET dataset, while the YOLOv11 model exhibited an mAP@0.5 of 85.1%, which was the best.On the Tianchi aluminium profile surface defect dataset, the YOLOv7-YOLOv10 models achieved mAP@0.5 values of 80.1%, 83.7%, 78.5%, and 74.8%, respectively, while the YOLOv11 model exhibited an mAP@0.5 of 87.0%, thus outperforming the other models again.Additionally, the edge-based YOLOv11-RKNN model's detection accuracy was basically consistent with that of the cloud-based YOLOv11 model with SA-GAN, while edge deployment shortened the detection time for a single defect image from 52.1ms to 33.6ms.Thus, the model's speed and accuracy in detecting workpiece surface defects were greatly improved.In future research, we will collect images of workpiece in different processing environments to improve the diversity of the datasets, and solve the resource limitation problem of the model on edge devices through lightweight models, edgecloud collaboration, and optimization of edge devices, thereby achieving efficient detection of workpiece surface defects in complex industrial scenarios.
45Fig 1 shows its main structure.
46Fig 2 illustrates the application of edge computing in workpiece surface defect detection.The edge computing architecture (Fig 2) usually comprises three parts: the cloud, the field, and the edge.The cloud is the most powerful data computing and processing centre, usually composed of multiple high-performance server clusters.The field includes various Internet of Things (IoT) terminals, such as industrial sensors, cameras, and computer numerical
Fig 1 .
47Fig 1. Main structure of YOLOv11.https://doi.org/10.1371/journal.pone.0327546.g001
48Fig 3 presents the overall framework of this method.First, the dataset used to train the YOLOv11 model was expanded in the cloud to enhance data diversity and improve model training.Thereafter, a high-precision YOLOv11 model was obtained.Second, the RKNN-Toolkit2 model conversion tool, deployed on the edge, was used to convert the cloud-side YOLOv11 model to the edge-side YOLOv11-RKNN model.Finally, the converted model was deployed on the edge computing device to achieve accurate and rapid detection of workpiece surface defects.
Fig 2 .Fig 3 .
49Fig 2. Application of edge computing in workpiece surface defect detection.https://doi.org/10.1371/journal.pone.0327546.g002
50and W V are learnable weight matrices, x is the input feature map, C ′ is the number of channels after transformation, A is the attention weight matrix, and O is the self-attention output.SA-GAN compresses the input image into a latent vector through the encoder and generates a conditional latent vector based on the label information.The decoder then reconstructs a high-quality image from the latent space.Generating images in this manner can significantly improve the model's generalisability and robustness.The data obtained through rotation, random cropping, and other methods were used to train the SA-GAN model and generate a new dataset.Finally, the dataset was expanded to 3463 images, including 1063 inclusions, 1200 patches, and 1200 scratches.The expanded data were relabelled to improve model training.Fig 5 shows the expanded dataset.
Fig 4 .
51Fig 4. Concept of SA-GAN.https://doi.org/10.1371/journal.pone.0327546.g004
Fig 5 .
52Fig 5. NEU-DET dataset: (a) inclusion, (b) patches, and (c) scratches.https://doi.org/10.1371/journal.pone.0327546.g005
Fig 6 .
53Fig 6.Model conversion process.https://doi.org/10.1371/journal.pone.0327546.g006
Fig 7 .Fig 8 .
54Fig 7. Comparison of structures before and after model conversion.https://doi.org/10.1371/journal.pone.0327546.g007
Figs 9 and 10 .
55Figs 11 and 12 compare the test-set labels with the corresponding predictions by YOLOv11 with SA-GAN.Fig 9 shows that the loss of the YOLOv11 model with SA-GAN dropped rapidly after 50 epochs of training.After 200 epochs, the loss stabilised at 0.075, which indicates that the model had converged and reached a better learning state.Additionally, as seen in Fig 10, the precision-recall curve of the YOLOv11 model with SA-GAN covered a wide range, and the precision rate remained above 0.8 in most intervals from 0 to 0.8; this reflects the model's high true positive rate and low false positive rate.
Fig 9 .
56Fig 9. YOLOv11 model Loss Curve.https://doi.org/10.1371/journal.pone.0327546.g009
Figs 11 and 12
57Figs 11 and 12 that after the training, the predictions of YOLOv11 model with SA-GAN on the test set were essentially consistent with the test-set image labels, which indicates that the model could accurately detect defects.This verifies the effectiveness of the YOLOv11 model with SA-GAN in workpiece surface defect detection.To further verify the effectiveness of the SA-GAN-enhanced YOLOv11 model in workpiece surface defect detection, the AP values of the YOLOv7, v8, v9, v10, and v11 models were compared and analysed in different workpiece surface defect detection tasks.The comparison results are shown in Fig 13 and Table6.Fig13and Table6show that the mAP@0.5 of YOLOv11 with SA-GAN on NEU-DET was 7.7%, 3.1%, 5.9%, and 7.0% higher than that of YOLOv7, YOLOv8, YOLOv9, and YOLOv10, respectively.The APs of the YOLOv11 model for inclusions, patches, and scratches were 86.6%, 80.1%, and 88.7%, respectively, while the mAP@0.5 was 85.1%; this indicates that YOLOv11 with SA-GAN has better detection accuracy than the other models.Moreover, to verify the generalisability of the proposed model, the Tianchi aluminium profile surface defect dataset was used for experimental verification.First, the SA-GAN network was used to augment the data on the four types of defects ('bruise', 'dirty', 'raised', and 'scratches') in the dataset; this yielded a dataset containing 872 defect images (208 bruise
Fig 13 and Table
58Figs 11 and 12 that after the training, the predictions of YOLOv11 model with SA-GAN on the test set were essentially consistent with the test-set image labels, which indicates that the model could accurately detect defects.This verifies the effectiveness of the YOLOv11 model with SA-GAN in workpiece surface defect detection.To further verify the effectiveness of the SA-GAN-enhanced YOLOv11 model in workpiece surface defect detection, the AP values of the YOLOv7, v8, v9, v10, and v11 models were compared and analysed in different workpiece surface defect detection tasks.The comparison results are shown in Fig 13 and Table6.Fig13and Table6show that the mAP@0.5 of YOLOv11 with SA-GAN on NEU-DET was 7.7%, 3.1%, 5.9%, and 7.0% higher than that of YOLOv7, YOLOv8, YOLOv9, and YOLOv10, respectively.The APs of the YOLOv11 model for inclusions, patches, and scratches were 86.6%, 80.1%, and 88.7%, respectively, while the mAP@0.5 was 85.1%; this indicates that YOLOv11 with SA-GAN has better detection accuracy than the other models.Moreover, to verify the generalisability of the proposed model, the Tianchi aluminium profile surface defect dataset was used for experimental verification.First, the SA-GAN network was used to augment the data on the four types of defects ('bruise', 'dirty', 'raised', and 'scratches') in the dataset; this yielded a dataset containing 872 defect images (208 bruise
Fig 10 .
59Fig 10.YOLOv11 model Precision-Recall Curve.https://doi.org/10.1371/journal.pone.0327546.g010
Fig 11 .
60Fig 11.YOLOv11 model training labels.https://doi.org/10.1371/journal.pone.0327546.g011
Fig 12 .Fig 13 .Table 6 .
61Fig 12. YOLOv11 model prediction results.https://doi.org/10.1371/journal.pone.0327546.g012
Fig 14
62Fig 14 shows that after quantisation and format conversion, the YOLOv11 model became more compact than the other models.Fig 15 shows that due to quantisation, the YOLOv11 model achieved faster inference at the edge than the other models.Table8shows that after the model was quantised, the input and output tensors were converted from float32 to int8 type, the FLOPS of the model did not change, and the model size was reduced from 10,156 kB to 4194 kB, which
Fig 14 .Fig 15 .
63Fig 14.Comparison of model size before and after edge deployment.https://doi.org/10.1371/journal.pone.0327546.g014
Fig 16 .Fig 17 .
64Fig 16.Detection accuracy of edge-based YOLOv11-RKNN model and cloud-based YOLOv11 model on NEU-DET.https://doi.org/10.1371/journal.pone.0327546.g016
Table 4 . Model training hyperparameters.
65https://doi.org/10.1371/journal.pone.0327546.t004
Table 5 . Performance comparison between YOLO models on NEU-DET.
66https://doi.org/10.1371/journal.pone.0327546.t005
Table 7 . Performance comparison between YOLO models on Tianchi aluminum profile surface defect dataset.
67https://doi.org/10.1371/journal.pone.0327546.t007
참고문헌 43건
- Optimal workpiece orientation to reduce the energy consumption of a milling process International Journal of Precision Engineering and Manufacturing-Green Technology · Springer Science+Business Media · 2015 10.1007/s40684-015-0001-3
- Automated inspection of engineering ceramic grinding surface damage based on image recognition The International Journal of Advanced Manufacturing Technology · Springer Science+Business Media · 2012 10.1007/s00170-012-4338-2
- Influence Factor Analysis of Medical Device Manufacturing Industry Journal of Scientific & Industrial Research · NISCAIR · 2016
- Failure Management for Reliable Cloud Computing: A Taxonomy, Model, and Future Directions Computing in Science & Engineering · AIP Publishing · 2018 10.1109/mcse.2018.2873866
- Edge computing: A survey Future Generation Computer Systems · Elsevier BV · 2019 10.1016/j.future.2019.02.050
- Segmentation-based deep-learning approach for surface-defect detection Journal of Intelligent Manufacturing · Springer Science+Business Media · 2019 10.1007/s10845-019-01476-x
- Manufacturing technologies toward extreme precision International Journal of Extreme Manufacturing · IOP Publishing · 2019 10.1088/2631-7990/ab1ff1
- Research on Recognition Technology of Aluminum Profile Surface Defects Based on Deep Learning Materials · Multidisciplinary Digital Publishing Institute · 2019 10.3390/ma12101681
- A smart surface inspection system using faster R-CNN in cloud-edge computing environment Advanced Engineering Informatics · Elsevier BV · 2020 10.1016/j.aei.2020.101037
- Deep anomaly detection in expressway based on edge computing and deep learning Journal of Ambient Intelligence and Humanized Computing · Springer Science+Business Media · 2020 10.1007/s12652-020-02574-y
- Surface defect detection of steel strips based on classification priority YOLOv3-dense network Ironmaking & Steelmaking Processes Products and Applications · Taylor & Francis · 2020 10.1080/03019233.2020.1816806
- Segmentation-based deep-learning approach for surface-defect detection Journal of Intelligent Manufacturing · Springer Science+Business Media · 2019 10.1007/s10845-019-01476-x
- RetinaNet With Difference Channel Attention and Adaptively Spatial Feature Fusion for Steel Surface Defect Detection IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2020 10.1109/tim.2020.3040485
- Edge computing: current trends, research challenges and future directions Computing · Springer Science+Business Media · 2021 10.1007/s00607-020-00896-5
- A convolutional neural network-based method for workpiece surface defect detection Measurement · Elsevier BV · 2021 10.1016/j.measurement.2021.109185
- Edge-Oriented Computing: A Survey on Research and Use Cases Energies · Multidisciplinary Digital Publishing Institute · 2022 10.3390/en15020452
- ESDDNet: efficient small defect detection network of workpiece surface Measurement Science and Technology · IOP Publishing · 2022 10.1088/1361-6501/ac793d
- Dealing with Imbalanced Sleep Apnea Data Using DCGAN Traitement du signal · International Information and Engineering Technology Association · 2022 10.18280/ts.390509
- Development and application of magnesium alloy parts for automotive OEMs: A review Journal of Magnesium and Alloys · Elsevier BV · 2023 10.1016/j.jma.2022.12.015
- Efficient heterogeneous signcryption scheme based on Edge Computing for Industrial Internet of Things Journal of Systems Architecture · Elsevier BV · 2023 10.1016/j.sysarc.2023.102836
- SA-GAN: A Second Order Attention Generator Adversarial Network with Region Aware Strategy for Real Satellite Images Super Resolution Reconstruction Remote Sensing · Multidisciplinary Digital Publishing Institute · 2023 10.3390/rs15051391
- Lightweight CNN Models for Product Defect Detection with Edge Computing in Manufacturing Industries Journal of Scientific & Industrial Research · NISCAIR · 2023 10.56042/jsir.v82i04.72390
- Pedestrian and Vehicle Detection Based on Pruning YOLOv4 with Cloud-Edge Collaboration Computer Modeling in Engineering & Sciences · Tech Science Press · 2023 10.32604/cmes.2023.026910
- Global Precipitation Correction Across a Range of Climates Using CycleGAN 2023 10.22541/essoar.168881853.36817507/v1
- Fault propagation analysis of computer numerically controlled machine tools Journal of Manufacturing Systems · Elsevier BV · 2023 10.1016/j.jmsy.2023.07.006
- Transfer Learning for Real-Time Surface Defect Detection With Multi-Access Edge-Cloud Computing Networks IEEE Transactions on Network and Service Management · Institute of Electrical and Electronics Engineers · 2023 10.1109/tnsm.2023.3301718
- FASCNet: An Edge-Computational Defect Detection Model for Industrial Parts IEEE Internet of Things Journal · Institute of Electrical and Electronics Engineers · 2023 10.1109/jiot.2023.3313164
- Scarcity-GAN: Scarce data augmentation for defect detection via generative adversarial nets Neurocomputing · Elsevier BV · 2023 10.1016/j.neucom.2023.127061
- Single-Stage Related Object Detection for Intelligent Industrial Surveillance IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2023 10.1109/tii.2023.3331545
- Face Generation and Editing With StyleGAN: A Survey IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2024 10.1109/tpami.2024.3350004
- Global Precipitation Correction Across a Range of Climates Using CycleGAN Geophysical Research Letters · American Geophysical Union · 2024 10.1029/2023gl105131
- RCA: YOLOv8-Based Surface Defects Detection on the Inner Wall of Cylindrical High-Precision Parts Arabian Journal for Science and Engineering · Springer Science+Business Media · 2024 10.1007/s13369-023-08483-4
- DG2GAN: improving defect recognition performance with generated defect image sample Scientific Reports · Nature Portfolio · 2024 10.1038/s41598-024-64716-y
- Automated Defect Detection for Mass-Produced Electronic Components Based on YOLO Object Detection Models IEEE Sensors Journal · IEEE Sensors Council · 2024 10.1109/jsen.2024.3418618
- A streamlined approach for intelligent ship object detection using EL-YOLO algorithm Scientific Reports · Nature Portfolio · 2024 10.1038/s41598-024-64225-y
- A comprehensive survey for generative data augmentation Neurocomputing · Elsevier BV · 2024 10.1016/j.neucom.2024.128167
- Maritime Electro-Optical Image Object Matching Based on Improved YOLOv9 Electronics · Multidisciplinary Digital Publishing Institute · 2024 10.3390/electronics13142774
- DLGRAFE-Net: A double loss guided residual attention and feature enhancement network for polyp segmentation PLoS ONE · Public Library of Science · 2024 10.1371/journal.pone.0308237
- Efficient Fabric Classification and Object Detection Using YOLOv10 Electronics · Multidisciplinary Digital Publishing Institute · 2024 10.3390/electronics13193840
- Object detection in smart indoor shopping using an enhanced YOLOv8n algorithm IET Image Processing · Institution of Engineering and Technology · 2024 10.1049/ipr2.13284
- MODEL COMPRESSION FOR REAL-TIME OBJECT DETECTION USING RIGOROUS GRADATION PRUNING iScience · Cell Press · 2024 10.1016/j.isci.2024.111618
- NGGAN: Noise Generation GAN Based on the Practical Measurement Dataset for Narrowband Powerline Communications IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2024 10.1109/tim.2024.3523361
- Synthetic Lung Ultrasound Data Generation Using Autoencoder With Generative Adversarial Network IEEE Transactions on Ultrasonics Ferroelectrics and Frequency Control · Institute of Electrical and Electronics Engineers · 2025 10.1109/tuffc.2025.3555447