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

An improved surface defect detection method based on DeepLabv3+ for piston pins

관련 필름·전자재료 · (13) 프리즘 필름

기본 정보

저자
  1. Yifan Cao — School of Artificial Intelligence and Big Data, Hefei University, Hefei 230000, Anhui, China
  2. Jianwu Zhang — School of Artificial Intelligence and Big Data, Hefei University, Hefei 230000, Anhui, China
  3. Yunlong Xu — School of Artificial Intelligence and Big Data, Hefei University, Hefei 230000, Anhui, China
  4. Bangqi Yu — Changzhou Yiguan Intelligent Technology Co., Ltd., Changzhou 213000, Jiangsu, China
  5. Hong Li — School of Artificial Intelligence and Big Data, Hefei University, Hefei 230000, Anhui, China
DOI
10.1088/1742-6596/2819/1/012059
저널
Journal of Physics Conference Series
발행년도
2024
발행기관
IOP Publishing
피인용수
0
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1088/1742-6596/2819/1/012059
토픽
Surface Roughness and Optical Measurements
OpenAlex ID
W4401711524

평가 내용

관련도
관련
사업분야
필름·전자재료 · (13) 프리즘 필름
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '필름·전자재료 > 프리즘 필름' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Abstract To address the pressing challenges of slow computation and suboptimal edge feature extraction in current piston pin surface defect detection techniques, this study introduces a refined methodology. By leveraging MobileNetV2, a streamlined convolutional backbone network, our approach accelerates processing speeds. Concurrently, the integration of an attention mechanism ensures that the model devotes increased focus to both edge irregularities and minute defect details. A tailored loss function mitigates the prevalent issue of sample imbalance, further enhancing model performance. Empirical evidence drawn from the piston pin dataset evidences the efficacy of our improvements: an MIoU of 85.41, MPA of 88.45, and a frame rate of 32.64 FPS, marking substantial gains in both accuracy and speed relative to pre-upgraded benchmarks. This optimized method not only delivers precise and timely defect delineation with a reduced parameter count, but it also contributes a novel and efficacious strategy for enhancing surface defect detection outcomes.

본문 22,236자

본문 펼치기
To address the pressing challenges of slow computation and suboptimal edge feature extraction in current piston pin surface defect detection techniques, this study introduces a refined methodology.By leveraging MobileNetV2, a streamlined convolutional backbone network, our approach accelerates processing speeds.Concurrently, the integration of an attention mechanism ensures that the model devotes increased focus to both edge irregularities and minute defect details.A tailored loss function mitigates the prevalent issue of sample imbalance, further enhancing model performance.Empirical evidence drawn from the piston pin dataset evidences the efficacy of our improvements: an MIoU of 85.41, MPA of 88.45, and a frame rate of 32.64 FPS, marking substantial gains in both accuracy and speed relative to preupgraded benchmarks.This optimized method not only delivers precise and timely defect delineation with a reduced parameter count, but it also contributes a novel and efficacious strategy for enhancing surface defect detection outcomes. Introduction Crafted from low-carbon steel or low-carbon alloy steel, the piston pin is a robust tubular component that is vital to the functioning of diesel engines.During fabrication, piston pins are subject to various imperfections such as discoloration, wear, and fissures.These flaws not only affect the surface integrity of the piston pin but also create avenues for corrosion and fatigue-related degradation during regular use [1] .As a result, these defects can have serious implications for both vehicular safety and engine performance reliability.Therefore, it is crucial to prioritize the implementation of rigorous surface defect detection measures for piston pins before they are released from the manufacturing facility. Introduction Currently, surface defect detection for piston pins can be classified into three main categories: manual inspection, physical inspection, and machine vision inspection.Manual inspection relies on human vision for subjective assessment, a method plagued by inefficiencies, high costs, labor intensiveness, and subjectivity.Physical inspection methods encompass a variety of techniques such as electromagnetic, acoustic, optical, infrared, and X-ray detection.Although physical methods can be less versatile and are usually confined to specific materials and configurations, they cannot always provide a clear depiction of the defect's form and size.Additionally, some of these methods may impact the health of inspectors to a certain extent.Machine vision inspection, empowered by advances in hardware and image processing technologies, has emerged as the predominant approach to surface defect detection.This IOP Publishing doi:10.1088/1742-6596/2819/1/012059 2 method's ascendancy is attributed to its affordability, efficiency, high reliability, and practical application, solidifying it as an optimal choice for modern manufacturing processes. Introduction Currently, surface defect detection methods using machine vision are categorized into two main streams: traditional algorithms and those relying on deep learning.Traditional machine vision techniques can be further classified into three subcategories: threshold segmentation algorithms that aim to identify local abnormalities, template-matching methods for recognizing defects, and machine learning-based approaches for defect classification.While traditional methods are known for their simple algorithms and fast detection speeds, they are often hindered by their vulnerability to changes in the imaging environment that can affect accurate defect classification.As a result, these conventional techniques are associated with notable limitations. Introduction In the wake of the introduction of AlexNet [2] and the rapid advancement of graphics processing unit (GPU) technology, deep learning has emerged as a pivotal research domain for surface defect detection.These methods leverage convolutional neural networks and nonlinear transformations, which bolster the feature extraction prowess of models and enhance their detection accuracy and generalization capabilities.Deep learning-based surface defect detection architectures primarily fall into three branches: image classification, object detection, and semantic segmentation networks [3] .Specifically, in the context of piston pin surface defect detection, semantic segmentation technology driven by deep learning has proven to be more effective.It facilitates the efficient determination of defect locations, identification of defect types, and measurement of defect areas, proving high adaptability to industrial inspection tasks [4] .Prominent deep learning segmentation models include Full Convolutional Networks [5] (FCN), Pyramid Scene Parsing Networks [6] (PSPNet), U-Net [7] , and DeepLabv3+ [8] .Qiu et al. [9] developed a multi-stage FCN framework that unifies segmentation, detection, and classification duties, achieving remarkable performance in pixel-level segmentation tasks in industrial settings, with accuracy exceeding 99%.Yet, this approach displays limited capability in texture defect characterization.Katsamenis et al. employed the U-Net model to segment metal structure corrosion, taking advantage of its structure to handle various input sizes, though U-Net is critiqued for inadequate integration of higherlevel information, which can result in diminished precision concerning location and edges [10] .PSPNet incorporates multi-scale convolution but its detailed characterization falls short.Meanwhile, DeepLab has demonstrated superior overall performance.Rahman et al. generated an automated dataset trained with the DeepLabv3+ model that showed some progress in corrosion detection tasks [11] .Despite these advancements, the DeepLabv3+ algorithm still contends with challenges such as local detail preservation, less effective information interrelation, a relatively large parameter set, and considerable computational demands. Introduction To tackle the challenges discussed above related to the uneven distribution and detailed nature of surface defects in real-world piston pin imaging, this study presents an advanced and precise lightweight segmentation model, adapted from DeepLabv3+.Specifically designed for detecting surface defects on piston pins, this model efficiently balances performance and computational efficiency. Traditional DeepLabv3+ network models DeepLabv3+ is recognized for its exceptional precision in image segmentation, a result of its unique encoder-decoder structure and the strategic application of atrous (dilated) convolution.The core of its design lies in the Xception backbone network, dedicated to capturing both intricate and general features.A pivotal component within the network is the ASPP module, which integrates various dilated convolutions to capture nuanced semantic details, consolidating the information through a 1×1 convolution for dimension reduction.The process continues with a 4x bilinear interpolation upsampling phase, refining the high-level features that are then fused with the previously extracted low-level features.Subsequently, spatial details are restored through a 3×3 convolution.To further enhance the delineation of precise boundaries, an additional 4x bilinear interpolation upsampling step is employed, ultimately producing a segmentation output that aligns with the original image dimensions. Backbone networks MobileNetV2 builds on the groundwork established by MobileNetV1, with a key innovation being the implementation of depth-separable convolutions to enhance efficiency by replacing standard convolutions.Depth-separable convolution is executed through two sequential operations: depthwise convolution, which processes each channel independently using a single filter per channel, and pointwise convolution, which, unlike traditional convolution, utilizes 1×1×M convolutional kernels, with M representing the number of channels from the preceding layer.During depthwise convolution, each filter operates on its corresponding channel, resulting in an intermediate feature map mirroring the input's channel count.Subsequently, pointwise convolution merges these depth-wise processed features using 1×1 convolutional kernels to interlink channel information and generate new feature maps.The number of resulting feature maps depends on the quantity of 1×1 filters applied.The strategic incorporation of depth-separable convolutions ensures that the output feature map preserves quality while significantly decreasing computational workload and model parameters, achieving only one-third of the complexity and size compared to traditional convolution techniques.The parameters of the MobileNetV2 network are shown in Table 1. Backbone networks Table 1 Attention mechanisms The Convolutional Block Attention Module (CBAM) is an advanced form of hybrid attention that integrates both channel and spatial dimensions to augment feature representation.The CBAM module operates on a given feature map by systematically cultivating attention maps in two distinct realms.It first focuses on channel-wise features, followed by spatial attributes.Subsequently, these attentionguided feature maps are adeptly fused with the original input feature map through element-wise multiplication, serving as a tool for adaptive refinement.This results in the production of an enriched final feature map that encapsulates a more focused and pertinent set of features for subsequent layers to process.By integrating attention mechanisms, CBAM effectively enables the network to emphasize salient features while suppressing less useful information, potentially boosting the overall performance of the convolutional neural network.On the other hand, the strategic implementation of depth-separable convolutions ensures that, for a given input, the output feature map maintains quality while significantly reducing the computational load and model parameters.This achieves a mere one-third of the complexity and size compared to traditional convolution techniques. Attention mechanisms Figure 1 shows the attention module for the channel and computation. Attention mechanisms where Attention mechanisms CBAM combines the output features of the channel attention module and spatial attention module through element-by-element multiplication to generate the final attention-enhancing features, as illustrated in Figure 3. Loss function Presently, the majority of semantic segmentation models utilize a cross-entropy loss function with the L1 expression: Loss function where n is the total number of samples; i is the ith sample; i y is the actual label of sample i; i y ∧ is the predicted label of sample i.Using this loss function in the semantic segmentation of piston pin surface defects will have an obvious defect, and the number of defective pixels is much smaller than IOP Publishing doi:10.1088/1742-6596/2819/1/0120595 that of background pixels, which will make the model seriously biased towards the background, resulting in poor segmentation results.To address this situation, this paper adopts the method of adding focal loss and dice loss as the loss functions to solve the imbalance between foreground and background classes.The expressions of Focal Loss L2 and Dice Loss L3 are respectively: Loss function (1 ) log( ) Loss function Equations ( 4) and ( 5) illustrate that the former addresses the challenge of classifying samples by concentrating the loss on difficult samples, while the latter functions as a regional cost function that influences the gradient of sample i based on the network output. Improvement of DeepLabv3+ network model design In pursuit of a more streamlined architectural design, the approach replaces the original extensive Xception backbone network with the more compact MobileNetV2 to meet lightweight requirements effectively.This substitution is intended to enhance training speed, reduce the number of parameters, and decrease computational heft.Simultaneously, an innovative layer of dimensional information is incorporated to capture multi-scale spatial pyramid features while leveraging the attention mechanism for a more sophisticated fusion process.The addition of this layer aims to increase the network's sensitivity to small-scale anomalies and object contours, preserving a higher integrity of feature data and enhancing feature extraction precision.To tackle the challenge of sample distribution imbalance and different defect discernibility levels, the model introduces a compounded loss function that combines focal loss and dice loss.This integrated approach is specifically crafted to improve target detection accuracy across various conditions.The enhancements implemented in the DeepLabv3+ architecture, which highlight attention-enriched multidimensional feature amalgamation and a nuanced loss function, are visually depicted in Figure 4. Datasets This paper presents research that utilizes empirical data obtained from monochromatic images captured by a line-scan camera at the industrial sites of a corporate group.The high-resolution images, measuring 4, 096 pixels by 5, 120 pixels, undergo an initial preprocessing step that involves threshold segmentation to isolate the primary regions of the workpiece, resulting in an original dataset of 609 images containing various types of defects.These defects include 614 instances of "black leather", 2, 375 instances of generic "abrasions", 307 instances of finer "laceration", 164 occurrences of "corrosion", and 204 cases of "abrasion", with some images displaying multiple types of defects.Following this, the MVTec Deep Learning Tool, a specialized annotation software, is utilized to manually delineate six distinct defect categories representing different grey-scale levels ranging from 0-5.These categories, which include the background (non-defective area), black skin, abrasions, scratches, rust, and additional abrasions, are annotated at the pixel level, creating a reference/validation label map crucial for semantic segmentation, commonly known as "Ground Truth".Given the challenges arising from the uneven distribution and size of defective samples, coupled with the impracticality of using the original large images directly for network training input, a random cropping method is applied to both the images and label maps.This results in cropped images measuring 1, 024 pixels by 1, 024 pixels, significantly enlarging the dataset to 18, 270 images.A meticulous cleaning process is then conducted to refine the dataset to 6, 828 defectcontaining images, categorized into 1, 199 with black skin, 2, 841 with abrasions, 1, 141 with scratches, 1, 198 with rust, and 1, 502 with additional abrasions.Finally, the dataset is divided, allocating 90% to the training set and 10% to the test set.Visual representations of the data are displayed in Figure 5 for reference. Training For this experiment, the input image dimensions are meticulously set to 1, 024×1, 024 pixels, optimizing the balance between computational efficiency and the retention of essential image details.The downsampling factor is fixed at 8 to ensure an efficient process.A dynamic learning rate ranging from 0.00001 to 0.001 is established to allow flexibility and adaptability during training.The preference in optimization is given to the Momentum Stochastic Gradient Descent (MSGD) with a momentum component set precisely at 0.9 for a smooth convergence path.The strategy for the learning rate's progression over time adopts the cos strategy coupled with a weight decay coefficient of 0.0001, facilitating a tempered reduction in the learning rate for effective navigation of the loss landscape.Moreover, the experiment employs a transfer learning strategy to enhance model generalizability by utilizing pre-trained MobileNetv2 network weights from the ImageNet dataset as initial parameters.The training process is structured into two stages: In Stage 1, the backbone feature extraction network weights are frozen to protect the pre-trained weights in the initial phase; In Stage 2, the weights are unfrozen, allowing the network to refine and adjust its weights for improved accuracy.To accommodate Programming language Python3.8 Experiment setup The experimental framework consists of key components that aim to comprehensively evaluate the algorithms under study: Experiment setup The study begins with a detailed evaluation of various state-of-the-art semantic segmentation models, such as U-Net, PSPNet, HRNet, and DeepLabv3+.Each model's performance is thoroughly assessed through a side-by-side comparison, establishing a solid benchmark for the subsequent phases of the research. Experiment setup Subsequently, the experimental focus shifts to ablation studies, which are pivotal in establishing the impact of individual components on the overall performance of the proposed algorithm.The process begins with replacing the original feature extraction network (Xception) with MobileNetv2 as part of the feature extraction network analysis.The outcomes of this substitution are critically analyzed to observe how this change affects algorithmic performance.Following this, the analysis extends to examining a series of loss function combinations in tandem with the first two modifications in the loss function evaluation.This comparative evaluation aims to discern the optimal mix of loss functions that synergize best with the newly adapted feature extractor and attention mechanisms. Experiment setup The experiment thoroughly validates the improved algorithm and the insights from the proposed methodology by systematically dissecting the model's components and evaluating their individual and collective impacts on performance. Experiment result In this subsection, we delve into a comparative assessment of the enhanced network against diverse methodologies.The results, encapsulated in Table 3, showcase a variety of performance metrics including Mean Intersection over Union (MIOU), Mean Pixel Accuracy (MPA), Frames Per Second (FPS), and Accuracy scores. Experiment result A thorough examination of these metrics reveals that our optimized approach surpasses the majority of the existing techniques in several key performance indicators.This noteworthy achievement not only underscores the superiority of our method but also unequivocally demonstrates its efficacy in the context of the tasks it was designed to address.In the enhanced network architecture, we have employed various backbone networks to facilitate a comprehensive comparison.As delineated in Table 4, it becomes evident that the adoption of MobileNetv2 as the backbone yields superior results in comparison to the use of Xception. Experiment result This notable finding indicates that MobileNetv2 provides a more optimized balance of accuracy and efficiency, making it a preferable choice for our improved network configuration.The improved performance with MobileNetv2 underscores its effectiveness as a feature extractor within our framework, reinforcing the importance of backbone selection in the pursuit of high-performance network designs.6 illustrates that upon training with the model proposed in this study, the segmentation outcomes demonstrate a closer approximation to the true label values.This enhancement enables the model to identify and segment the defective regions with greater completeness and precision.Moreover, our model outperforms others in the detection of edge pixel details, yielding segmentation contours that are crisp and distinct.The robustness of our approach is underscored by its ability to detect fine details and maintain clear demarcations, thereby setting a new benchmark for model performance in defect detection and segmentation tasks. Conclusion The cutting-edge DeepLabv3+ architecture is adopted and enhanced in this study to generate defect segmentation imagery.The backbone network of the framework consists of the streamlined MobileNetv2, effectively boosting the model's detection speed while maintaining high accuracy levels.The integration of the attention mechanism into both the Atrous Spatial Pyramid Pooling (ASPP) module and the subsequent feature fusion process significantly enhances the model's capacity to extract salient features and improves its generalization performance.The efficacy of incorporating Focal-Loss and Dice-Loss is supported by meticulous ablation studies.The practical utility and reliability of our devised model are further demonstrated through its superior performance in real-world applications, particularly in the detection of piston pin defects in an operational environment, affirming its effectiveness and applicability. Figure 1 . Figure 1.Structure diagram of the channel attention module. avg F and max c FFigure 2 . Figure 2. Structure diagram of spatial attention module. Figure 3 . Figure 3. Structure diagram of CBAM. Figure 4 . Figure 4. Structure diagram of improved DeepLabv3+ network. Figure 5 . Figure 5.Samples in the dataset. . Network parameters of MobileNetV2. Table 2 . computational demands, the batch sizes are adjusted for each stage.Stage 1 utilizes a batch size of 8 across 50 epochs, while Stage 2 scales down to a batch size of 4 also through 50 epochs.Table2outlines the hardware and software specifications of the experimental platform, providing transparency regarding the conditions under which the experiment is conducted.Experimental platform and environment configuration parameters. Table 3 . Comparison results of different networks. Table 4 . Comparison results of different networks.Within the framework of our refined network, we have integrated the use of Focal-Loss and Dice-Loss as the pivotal loss functions.Table5presents a detailed breakdown of the Mean Intersection over Union (MIoU) scores achieved by our improved network in the context of defect detection while utilizing these distinct loss functions. Table 5 . Performance effects of different loss function. Table 5 . IOP Publishing doi:10.1088/1742-6596/2819/1/0120599 black leather abrasion abrasions corrode lacerate Original image Ground truth U-Net PSP-Net DeepLabv3+ Ours Figure 6. Comparison results of the proposed algorithm with other methods on the dataset.Figure

섹션 본문 40문단 · 21,483자

(제목 없음)

1To address the pressing challenges of slow computation and suboptimal edge feature extraction in current piston pin surface defect detection techniques, this study introduces a refined methodology.By leveraging MobileNetV2, a streamlined convolutional backbone network, our approach accelerates processing speeds.Concurrently, the integration of an attention mechanism ensures that the model devotes increased focus to both edge irregularities and minute defect details.A tailored loss function mitigates the prevalent issue of sample imbalance, further enhancing model performance.Empirical evidence drawn from the piston pin dataset evidences the efficacy of our improvements: an MIoU of 85.41, MPA of 88.45, and a frame rate of 32.64 FPS, marking substantial gains in both accuracy and speed relative to preupgraded benchmarks.This optimized method not only delivers precise and timely defect delineation with a reduced parameter count, but it also contributes a novel and efficacious strategy for enhancing surface defect detection outcomes.

Introduction

2Crafted from low-carbon steel or low-carbon alloy steel, the piston pin is a robust tubular component that is vital to the functioning of diesel engines.During fabrication, piston pins are subject to various imperfections such as discoloration, wear, and fissures.These flaws not only affect the surface integrity of the piston pin but also create avenues for corrosion and fatigue-related degradation during regular use [1] .As a result, these defects can have serious implications for both vehicular safety and engine performance reliability.Therefore, it is crucial to prioritize the implementation of rigorous surface defect detection measures for piston pins before they are released from the manufacturing facility.

3Currently, surface defect detection for piston pins can be classified into three main categories: manual inspection, physical inspection, and machine vision inspection.Manual inspection relies on human vision for subjective assessment, a method plagued by inefficiencies, high costs, labor intensiveness, and subjectivity.Physical inspection methods encompass a variety of techniques such as electromagnetic, acoustic, optical, infrared, and X-ray detection.Although physical methods can be less versatile and are usually confined to specific materials and configurations, they cannot always provide a clear depiction of the defect's form and size.Additionally, some of these methods may impact the health of inspectors to a certain extent.Machine vision inspection, empowered by advances in hardware and image processing technologies, has emerged as the predominant approach to surface defect detection.This IOP Publishing doi:10.1088/1742-6596/2819/1/012059 2 method's ascendancy is attributed to its affordability, efficiency, high reliability, and practical application, solidifying it as an optimal choice for modern manufacturing processes.

4Currently, surface defect detection methods using machine vision are categorized into two main streams: traditional algorithms and those relying on deep learning.Traditional machine vision techniques can be further classified into three subcategories: threshold segmentation algorithms that aim to identify local abnormalities, template-matching methods for recognizing defects, and machine learning-based approaches for defect classification.While traditional methods are known for their simple algorithms and fast detection speeds, they are often hindered by their vulnerability to changes in the imaging environment that can affect accurate defect classification.As a result, these conventional techniques are associated with notable limitations.

5In the wake of the introduction of AlexNet [2] and the rapid advancement of graphics processing unit (GPU) technology, deep learning has emerged as a pivotal research domain for surface defect detection.These methods leverage convolutional neural networks and nonlinear transformations, which bolster the feature extraction prowess of models and enhance their detection accuracy and generalization capabilities.Deep learning-based surface defect detection architectures primarily fall into three branches: image classification, object detection, and semantic segmentation networks [3] .Specifically, in the context of piston pin surface defect detection, semantic segmentation technology driven by deep learning has proven to be more effective.It facilitates the efficient determination of defect locations, identification of defect types, and measurement of defect areas, proving high adaptability to industrial inspection tasks [4] .Prominent deep learning segmentation models include Full Convolutional Networks [5] (FCN), Pyramid Scene Parsing Networks [6] (PSPNet), U-Net [7] , and DeepLabv3+ [8] .Qiu et al. [9] developed a multi-stage FCN framework that unifies segmentation, detection, and classification duties, achieving remarkable performance in pixel-level segmentation tasks in industrial settings, with accuracy exceeding 99%.Yet, this approach displays limited capability in texture defect characterization.Katsamenis et al. employed the U-Net model to segment metal structure corrosion, taking advantage of its structure to handle various input sizes, though U-Net is critiqued for inadequate integration of higherlevel information, which can result in diminished precision concerning location and edges [10] .PSPNet incorporates multi-scale convolution but its detailed characterization falls short.Meanwhile, DeepLab has demonstrated superior overall performance.Rahman et al. generated an automated dataset trained with the DeepLabv3+ model that showed some progress in corrosion detection tasks [11] .Despite these advancements, the DeepLabv3+ algorithm still contends with challenges such as local detail preservation, less effective information interrelation, a relatively large parameter set, and considerable computational demands.

6To tackle the challenges discussed above related to the uneven distribution and detailed nature of surface defects in real-world piston pin imaging, this study presents an advanced and precise lightweight segmentation model, adapted from DeepLabv3+.Specifically designed for detecting surface defects on piston pins, this model efficiently balances performance and computational efficiency.

Traditional DeepLabv3+ network models

7DeepLabv3+ is recognized for its exceptional precision in image segmentation, a result of its unique encoder-decoder structure and the strategic application of atrous (dilated) convolution.The core of its design lies in the Xception backbone network, dedicated to capturing both intricate and general features.A pivotal component within the network is the ASPP module, which integrates various dilated convolutions to capture nuanced semantic details, consolidating the information through a 1×1 convolution for dimension reduction.The process continues with a 4x bilinear interpolation upsampling phase, refining the high-level features that are then fused with the previously extracted low-level features.Subsequently, spatial details are restored through a 3×3 convolution.To further enhance the delineation of precise boundaries, an additional 4x bilinear interpolation upsampling step is employed, ultimately producing a segmentation output that aligns with the original image dimensions.

Backbone networks

8MobileNetV2 builds on the groundwork established by MobileNetV1, with a key innovation being the implementation of depth-separable convolutions to enhance efficiency by replacing standard convolutions.Depth-separable convolution is executed through two sequential operations: depthwise convolution, which processes each channel independently using a single filter per channel, and pointwise convolution, which, unlike traditional convolution, utilizes 1×1×M convolutional kernels, with M representing the number of channels from the preceding layer.During depthwise convolution, each filter operates on its corresponding channel, resulting in an intermediate feature map mirroring the input's channel count.Subsequently, pointwise convolution merges these depth-wise processed features using 1×1 convolutional kernels to interlink channel information and generate new feature maps.The number of resulting feature maps depends on the quantity of 1×1 filters applied.The strategic incorporation of depth-separable convolutions ensures that the output feature map preserves quality while significantly decreasing computational workload and model parameters, achieving only one-third of the complexity and size compared to traditional convolution techniques.The parameters of the MobileNetV2 network are shown in Table 1.

9Table 1

Attention mechanisms

10The Convolutional Block Attention Module (CBAM) is an advanced form of hybrid attention that integrates both channel and spatial dimensions to augment feature representation.The CBAM module operates on a given feature map by systematically cultivating attention maps in two distinct realms.It first focuses on channel-wise features, followed by spatial attributes.Subsequently, these attentionguided feature maps are adeptly fused with the original input feature map through element-wise multiplication, serving as a tool for adaptive refinement.This results in the production of an enriched final feature map that encapsulates a more focused and pertinent set of features for subsequent layers to process.By integrating attention mechanisms, CBAM effectively enables the network to emphasize salient features while suppressing less useful information, potentially boosting the overall performance of the convolutional neural network.On the other hand, the strategic implementation of depth-separable convolutions ensures that, for a given input, the output feature map maintains quality while significantly reducing the computational load and model parameters.This achieves a mere one-third of the complexity and size compared to traditional convolution techniques.

11Figure 1 shows the attention module for the channel and computation.

12where

13CBAM combines the output features of the channel attention module and spatial attention module through element-by-element multiplication to generate the final attention-enhancing features, as illustrated in Figure 3.

Loss function

14Presently, the majority of semantic segmentation models utilize a cross-entropy loss function with the L1 expression:

15where n is the total number of samples; i is the ith sample; i y is the actual label of sample i; i y ∧ is the predicted label of sample i.Using this loss function in the semantic segmentation of piston pin surface defects will have an obvious defect, and the number of defective pixels is much smaller than IOP Publishing doi:10.1088/1742-6596/2819/1/0120595 that of background pixels, which will make the model seriously biased towards the background, resulting in poor segmentation results.To address this situation, this paper adopts the method of adding focal loss and dice loss as the loss functions to solve the imbalance between foreground and background classes.The expressions of Focal Loss L2 and Dice Loss L3 are respectively:

16(1 ) log( )

17Equations ( 4) and ( 5) illustrate that the former addresses the challenge of classifying samples by concentrating the loss on difficult samples, while the latter functions as a regional cost function that influences the gradient of sample i based on the network output.

Improvement of DeepLabv3+ network model design

18In pursuit of a more streamlined architectural design, the approach replaces the original extensive Xception backbone network with the more compact MobileNetV2 to meet lightweight requirements effectively.This substitution is intended to enhance training speed, reduce the number of parameters, and decrease computational heft.Simultaneously, an innovative layer of dimensional information is incorporated to capture multi-scale spatial pyramid features while leveraging the attention mechanism for a more sophisticated fusion process.The addition of this layer aims to increase the network's sensitivity to small-scale anomalies and object contours, preserving a higher integrity of feature data and enhancing feature extraction precision.To tackle the challenge of sample distribution imbalance and different defect discernibility levels, the model introduces a compounded loss function that combines focal loss and dice loss.This integrated approach is specifically crafted to improve target detection accuracy across various conditions.The enhancements implemented in the DeepLabv3+ architecture, which highlight attention-enriched multidimensional feature amalgamation and a nuanced loss function, are visually depicted in Figure 4.

Datasets

19This paper presents research that utilizes empirical data obtained from monochromatic images captured by a line-scan camera at the industrial sites of a corporate group.The high-resolution images, measuring 4, 096 pixels by 5, 120 pixels, undergo an initial preprocessing step that involves threshold segmentation to isolate the primary regions of the workpiece, resulting in an original dataset of 609 images containing various types of defects.These defects include 614 instances of "black leather", 2, 375 instances of generic "abrasions", 307 instances of finer "laceration", 164 occurrences of "corrosion", and 204 cases of "abrasion", with some images displaying multiple types of defects.Following this, the MVTec Deep Learning Tool, a specialized annotation software, is utilized to manually delineate six distinct defect categories representing different grey-scale levels ranging from 0-5.These categories, which include the background (non-defective area), black skin, abrasions, scratches, rust, and additional abrasions, are annotated at the pixel level, creating a reference/validation label map crucial for semantic segmentation, commonly known as "Ground Truth".Given the challenges arising from the uneven distribution and size of defective samples, coupled with the impracticality of using the original large images directly for network training input, a random cropping method is applied to both the images and label maps.This results in cropped images measuring 1, 024 pixels by 1, 024 pixels, significantly enlarging the dataset to 18, 270 images.A meticulous cleaning process is then conducted to refine the dataset to 6, 828 defectcontaining images, categorized into 1, 199 with black skin, 2, 841 with abrasions, 1, 141 with scratches, 1, 198 with rust, and 1, 502 with additional abrasions.Finally, the dataset is divided, allocating 90% to the training set and 10% to the test set.Visual representations of the data are displayed in Figure 5 for reference.

Training

20For this experiment, the input image dimensions are meticulously set to 1, 024×1, 024 pixels, optimizing the balance between computational efficiency and the retention of essential image details.The downsampling factor is fixed at 8 to ensure an efficient process.A dynamic learning rate ranging from 0.00001 to 0.001 is established to allow flexibility and adaptability during training.The preference in optimization is given to the Momentum Stochastic Gradient Descent (MSGD) with a momentum component set precisely at 0.9 for a smooth convergence path.The strategy for the learning rate's progression over time adopts the cos strategy coupled with a weight decay coefficient of 0.0001, facilitating a tempered reduction in the learning rate for effective navigation of the loss landscape.Moreover, the experiment employs a transfer learning strategy to enhance model generalizability by utilizing pre-trained MobileNetv2 network weights from the ImageNet dataset as initial parameters.The training process is structured into two stages: In Stage 1, the backbone feature extraction network weights are frozen to protect the pre-trained weights in the initial phase; In Stage 2, the weights are unfrozen, allowing the network to refine and adjust its weights for improved accuracy.To accommodate Programming language Python3.8

Experiment setup

21The experimental framework consists of key components that aim to comprehensively evaluate the algorithms under study:

22The study begins with a detailed evaluation of various state-of-the-art semantic segmentation models, such as U-Net, PSPNet, HRNet, and DeepLabv3+.Each model's performance is thoroughly assessed through a side-by-side comparison, establishing a solid benchmark for the subsequent phases of the research.

23Subsequently, the experimental focus shifts to ablation studies, which are pivotal in establishing the impact of individual components on the overall performance of the proposed algorithm.The process begins with replacing the original feature extraction network (Xception) with MobileNetv2 as part of the feature extraction network analysis.The outcomes of this substitution are critically analyzed to observe how this change affects algorithmic performance.Following this, the analysis extends to examining a series of loss function combinations in tandem with the first two modifications in the loss function evaluation.This comparative evaluation aims to discern the optimal mix of loss functions that synergize best with the newly adapted feature extractor and attention mechanisms.

24The experiment thoroughly validates the improved algorithm and the insights from the proposed methodology by systematically dissecting the model's components and evaluating their individual and collective impacts on performance.

Experiment result

25In this subsection, we delve into a comparative assessment of the enhanced network against diverse methodologies.The results, encapsulated in Table 3, showcase a variety of performance metrics including Mean Intersection over Union (MIOU), Mean Pixel Accuracy (MPA), Frames Per Second (FPS), and Accuracy scores.

26A thorough examination of these metrics reveals that our optimized approach surpasses the majority of the existing techniques in several key performance indicators.This noteworthy achievement not only underscores the superiority of our method but also unequivocally demonstrates its efficacy in the context of the tasks it was designed to address.In the enhanced network architecture, we have employed various backbone networks to facilitate a comprehensive comparison.As delineated in Table 4, it becomes evident that the adoption of MobileNetv2 as the backbone yields superior results in comparison to the use of Xception.

27This notable finding indicates that MobileNetv2 provides a more optimized balance of accuracy and efficiency, making it a preferable choice for our improved network configuration.The improved performance with MobileNetv2 underscores its effectiveness as a feature extractor within our framework, reinforcing the importance of backbone selection in the pursuit of high-performance network designs.6 illustrates that upon training with the model proposed in this study, the segmentation outcomes demonstrate a closer approximation to the true label values.This enhancement enables the model to identify and segment the defective regions with greater completeness and precision.Moreover, our model outperforms others in the detection of edge pixel details, yielding segmentation contours that are crisp and distinct.The robustness of our approach is underscored by its ability to detect fine details and maintain clear demarcations, thereby setting a new benchmark for model performance in defect detection and segmentation tasks.

Conclusion

28The cutting-edge DeepLabv3+ architecture is adopted and enhanced in this study to generate defect segmentation imagery.The backbone network of the framework consists of the streamlined MobileNetv2, effectively boosting the model's detection speed while maintaining high accuracy levels.The integration of the attention mechanism into both the Atrous Spatial Pyramid Pooling (ASPP) module and the subsequent feature fusion process significantly enhances the model's capacity to extract salient features and improves its generalization performance.The efficacy of incorporating Focal-Loss and Dice-Loss is supported by meticulous ablation studies.The practical utility and reliability of our devised model are further demonstrated through its superior performance in real-world applications, particularly in the detection of piston pin defects in an operational environment, affirming its effectiveness and applicability.

Figure 1 .

29Figure 1.Structure diagram of the channel attention module.

avg F and max c FFigure 2 .

30Figure 2. Structure diagram of spatial attention module.

Figure 3 .

31Figure 3. Structure diagram of CBAM.

Figure 4 .

32Figure 4. Structure diagram of improved DeepLabv3+ network.

Figure 5 .

33Figure 5.Samples in the dataset.

.

34Network parameters of MobileNetV2.

Table 2 .

35computational demands, the batch sizes are adjusted for each stage.Stage 1 utilizes a batch size of 8 across 50 epochs, while Stage 2 scales down to a batch size of 4 also through 50 epochs.Table2outlines the hardware and software specifications of the experimental platform, providing transparency regarding the conditions under which the experiment is conducted.Experimental platform and environment configuration parameters.

Table 3 .

36Comparison results of different networks.

Table 4 .

37Comparison results of different networks.Within the framework of our refined network, we have integrated the use of Focal-Loss and Dice-Loss as the pivotal loss functions.Table5presents a detailed breakdown of the Mean Intersection over Union (MIoU) scores achieved by our improved network in the context of defect detection while utilizing these distinct loss functions.

Table 5 .

38Performance effects of different loss function.

39IOP Publishing doi:10.1088/1742-6596/2819/1/0120599 black

leather abrasion abrasions corrode lacerate Original image Ground truth U-Net PSP-Net DeepLabv3+ Ours Figure 6.

40Comparison results of the proposed algorithm with other methods on the dataset.Figure

참고문헌

참고문헌 정보가 없습니다.