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

A defect detection system of glass tube yarn based on machine vision

간접 관련 산업용 섬유 · (17) 스펀본드 부직포 (1) 에어백(9) 타이어코드(10) 아라미드

기본 정보

저자
  1. Junmin Bao — School of Electronic and Information, Xi'an Polytechnic University, Xi'an, China
  2. Junfeng Jing — Xi'an Polytechnic University Branch of Shaanxi Artificial Intelligence Joint Laboratory, Xi'an, China|||School of Electronic and Information, Xi'an Polytechnic University, Xi'an, China
  3. Yaohua Xie — School of Electronic and Information, Xi'an Polytechnic University, Xi'an, China
DOI
10.1177/15280837231152878
저널
Journal of Industrial Textiles
발행년도
2023
발행기관
SAGE Publishing
피인용수
9
라이선스
cc-by-nc
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1177/15280837231152878
토픽
Textile materials and evaluations
OpenAlex ID
W4319993105

평가 내용

관련도
간접 관련
사업분야
산업용 섬유 · (17) 스펀본드 부직포
부 분야
(1) 에어백, (9) 타이어코드, (10) 아라미드
R&D 측면
공정·제조
확신도
0.80
근거 용어
defect detection system, glass tube yarn, machine vision, deep learning, hairiness detection
판단 근거
유리섬유 사(yarn)의 결함을 머신비전과 딥러닝으로 검출하는 기술로, 코오롱인더스트리의 산업용 섬유(아라미드, 타이어코드, 부직포 등) 제조 공정 내 품질 관리 자동화에 적용 가능한 기술입니다.
R&D 활용 포인트
산업용 고강력사 및 특수 섬유 제조 공정에서 머신비전을 활용한 실시간 결함(모사, 오염 등) 검출 및 품질 관리 시스템 구축에 활용 가능합니다.
평가 입력
초록 1,607자

초록

Tube yarn is also called glass fiber spun yarn. Due to the excellent properties of glass fiber, various industrial products based on glass fiber are used in a variety of industries. As the most obvious factor affecting the quality of products, quality detection of glass fiber yarns is very important for companies. Due to traditional defect detection relies on the experience and subjective factors of workers, which makes many different views on the same defect. Some traditional methods limit the solution to specific types of defects and do not accurately detect various defects. In this paper, we propose a comprehensive defect detection system of tube yarn via combining machine vision and deep learning methods. In whole system, we inspect the weight through a weight sensor firstly. Then, we propose a multi-scale cross-fusion attention module to improve the MobileNetV2, and combine with machine vision image feature extraction method for hairiness detection. Finally, the modified MobileNetV2 network is used as the backbone of YOLOX network, making the YOLOX is lighter and achieve more efficiently stain detection of tube yarn. Then, the detection results are used to determine whether the glass tube yarn has passed. In addition, we establish an effective and sufficient amount of tube yarn defects dataset. The experimental results show that the proposed hairiness detection algorithm achieve 96% accuracy with 160+ FPS, and the surface stain detection algorithm achieve 0.89 mAP with 71+ FPS on the tube yarn dataset. The system is efficient, precise, and can be applied to actual production.

본문 40,772자

본문 펼치기
Tube yarn is also called glass fiber spun yarn.Due to the excellent properties of glass fiber, various industrial products based on glass fiber are used in a variety of industries.As the most obvious factor affecting the quality of products, quality detection of glass fiber yarns is very important for companies.Due to traditional defect detection relies on the experience and subjective factors of workers, which makes many different views on the same defect.Some traditional methods limit the solution to specific types of defects and do not accurately detect various defects.In this paper, we propose a comprehensive defect detection system of tube yarn via combining machine vision and deep learning methods.In whole system, we inspect the weight through a weight sensor firstly.Then, we propose a multi-scale cross-fusion attention module to improve the MobileNetV2, and combine with machine vision image feature extraction method for hairiness detection.Finally, the modified MobileNetV2 network is used as the backbone of YOLOX network, making the YOLOX is lighter and achieve more efficiently stain detection of tube yarn.Then, the detection results are used to determine whether the glass tube yarn has passed.In addition, we establish an effective and sufficient amount of tube yarn defects dataset.The experimental results show that the proposed hairiness detection algorithm achieve 96% accuracy with 160+ FPS, and the surface stain detection algorithm achieve Introduction In recent years, with the rapid development of the manufacturing industry, more and more manufacturers have payed more attention to the quality control of products.Defect detection becomes an integral part of the production process, which can ensure that the manufacturing and production processes are controlled and feedback from defect detection allows work as expected.Depending on the nature and extent of the defect detection, we can implement appropriate corrective actions, which can ensure that the manufacturing process performance remains satisfactory.In the production of products, defects are basically caused by machine failure, aging or improper operation of workers, so defect detection can be regarded as a precursor to the diagnosis stage of machine maintenance.And defect detection is also an important part of the detection process, relating to the acceptance or rejection of a product produced by a process or delivered by a supplier.Additionally, it enables part rework and repair, reducing material waste. 1 In general, defect detection is very important in the production of products. Introduction With the increasing development of industrial automation, traditional manual quality detection has gradually been difficult to adapt to high-speed factory assembly line production.2][13][14][15][16][17][18][19][20][21] Textile fabrics defect was detected via optimal Gabor filter by Jing et al. 2 In, 3 a method for detecting fabric defects using a thermal camera was presented.A method based on principal component analysis was proposed by Kazim to achieve dimensionality reduction-based classification of fleece fabric-based images. 4In, 5 an objective grades evaluation method of E-glass filament yarn was proposed by analysing the cross-sectional images of yarn.A two-channel deep neural network for apple disease detection by extracting features from HSV and RGB color spaces was constructed by Zhang et al. 6 Zeng et al. 7 proposed an atrous spatial pyramid pooling-balanced-feature pyramid network and used it to achieve the small defects detection on the printed circuit boards surface.Dang et al. used detection transformer to achieve end-to-end sewer defect detection. 8Deep-separable convolution was used to improve Unet by Jing et al., 9 and proposed a lightweight end-to-end fabric defect segmentation network.In, 10 a rail boundary guidance network was proposed for rail surface defects detection, which solved the problem of fully convolutional networks (FCN)-based methods suffer from the blurry rail edges and inaccuracy during detection. Introduction Due to the development of defect detection methods, there are many researchers who have designed corresponding detection systems for different products.A comprehensive description of defect detection systems was given in, 11 which indicated the components of a system and the selection of cameras, light sources, lenses, etc.. In, 12 it was pointed out that detection often requires multiple sensors to work together in smart manufacturing, and a system for detecting defects in products on smart engineering production lines based on fog computing calculations was designed.In agriculture, a machine learning-based system for detecting surface defects in apples is presented in. 13In, 14 an online skin defect detection system for jujubes based on hyperspectral images was proposed using machine vision methods.In industry, A machine vision-based steel surface defect detection system is proposed in, 15 which uses support vector machines to learn defect features and achieve real-time steel surface defect detection.A system for detecting defects such as dirt, scratches, burrs and wear on the surface of a part was proposed in, 16 where a CNN network was used to detect the surface of the part defects, and then each defect is classified using traditional machine learning methods to identify the different defects.A fully automated system for the defects detection on the surface of tube yarns and fabrics was presented in. 17In, 18 a machine vision-based online defect detection system for the printing quality of fluorescent coatings on metal plates was designed, which used color space conversion, blob analysis, sub-pixel edge extraction and template matching to achieve the detection of common defects that appear on fluorescent coatings on metal plates.In, 19 a tunnel surface detection system was proposed, which used a Faster-RCNN based multi-scale feature fusion network to achieve real-time tunnel image defect detection.A collaborative cloud edge fabric defect detection system based on the MobileNetV-SSDLite method was presented in, 20 which improved the detection accuracy of small defects and complex background images in resource-constrained situations.A wire arc additive manufacturing defect detection system based on incremental learning was proposed by Li et al. 21s the needs of society are constantly being updated, the new composite materials are playing an increasingly important role in everyday life.Such as glass tube yarn, also known as glass fiber spun yarn, is a yarn body formed by winding electronic grade glass fiber yarn around a tube body for ease of packaging and transportation.During the manufacturing and transportation of glass tube yarns, due to the complexity of the production environment and external factors, a series of defects such as hairiness and stains is often inevitably produced on the surface of tube yarn.These defects will affect the quality of the product's surface, the sales of the product and the performance companies.In addition, if it is made of glass fiber products, it will also produce a series of other hazards to the product, which will then affect the company's sales interests and cause economic disputes or legal issues.Therefore, it is essential to detect defects on the surface of the tube yarn.As described above, some researchers have proposed many methods for the defect detection of industrial products, but they often only target a certain type of defect, such as tube yarn hairiness detection, 22,23 surface stain detection, 24,25 and few systems or devices can achieve comprehensive detection of multiple defects in tube yarns.To address these issues, we have designed a glass tube yarn surface defects detection system, combining software and hardware, for efficient and accurate cop defect detection. Introduction For the hardware component, we design a data collection system to capture multiple defect images of the tube yarn.For the software component, we propose a combination of conventional and deep learning algorithms for tube yarn hairiness detection.In addition, we propose a surface defect detection algorithm based on deep learning for tube yarn surface stains.Finally, a corresponding operating software is designed to control the hardware device.In general, our contributions are summarized as follows. Introduction (i) A mature bobbin yarn defect detection system has been designed and used in production practice.After field testing, it can basically meet the needs of factory production detection, and can replace manual bobbin defect detection.(ii) A plug-and-play multi-scale attention module is proposed to improve the MobliNetV2 algorithm for fast and accurate classification of tube yarn hairiness.(iii) Proposes an improved YOLOX network for accurate and fast detection of defects such as surface stains and stains on bobbin yarns.(iv) A cop hairiness defect classification dataset containing more than 5000 images is constructed.These defects include cop hairiness, hair clips, loops and other defects, which basically cover all the defects that may occur in cop manufacturing in the industrial field. Introduction The rest of this paper is organized as follows.In Section 2, we present the hardware design of the entire system.In Section 3, the two datasets for tube yarn defects, the algorithms for the detection of tube yarn hairiness and surface stains are described in detail.The software design of the system is presented in Section 4. Section 5 provides an overall summary of the article. The hardware system design According to the actual market research, we fully consider the actual industrial production for the tube yarn surface surface quality detection, which needs to detect the tube yarn hairiness, surface stains and other different defects.Therefore, in the system we designed, different positions are used to detect different defects.The online detection system for tube yarn surface mainly detects and evaluates whether the surface defects of G75 tube yarn are qualified. The hardware system design (i) Automatic adsorption of yarn threads, avoiding the influence of threads on hairiness detection, reducing the workload of manual thread winding and improving overall detection efficiency.(ii) Automatic dust and static removal to prevent dust from adhering to the tube yarn and affecting the effectiveness of surface defect detection.(iii) Automatic weighing, it is ensured that the yarn wound on each cylinder is basically the same and in compliance with the regulations via the automatic weighing of the tube yarn.(iv) This enables the detection and classification of tube yarn hairiness defects and gives a score for the size and number of defects. The hardware system design (v) The detection of stains and spots on the surface of the tube yarn is similar to the detection of hairline defects, with a score based on the size of the stain and the number of spots.(vi) Statistical analysis of the surface data of the bobbin yarn, the product is judged as qualified according to the evaluation criteria and the qualified and unqualified yarns are automatically separated. The hardware system design An automated detection system consists of three elements as shown in Figure 1.Each part fulfils a different function in whole detection procedure."A" represents the feedstock module, which feeds tube yarn through the conveyor into static elimination device ("D") and then into "B"."B" is the tube yarn detection module and is also the most important part of our design, where ①, ② and ③ represent three positions used to weight verification, hairiness detection and surface stain detection of the tube yarn respectively.The inspected tube yarn will flow into section "C", where the unqualified tube yarn (such as "E") will be automatically removed by a pneumatic pusher to the unqualified area, and the qualified tube yarn (such as "F") will flow into the next section. The hardware system design Defect detection and product classification are the most important parts of the system.The overall architecture and working procedure are explained in Figure 2. Firstly, images of tube yarn are captured by four GigE cameras of two detection position.Then, these images are transmitted to the central processing server via a Gigabit network cable.These images are processed and used to detect hairiness and stain defects in the central processing server, then the yarn is judged to be qualified according to the detected results from hairiness and stain detection positions. The hardware system design In summary, our system firstly measures the weight of tube yarn to check whether the weight of the tube yarn conforms to the standard weight, because when the weight is up to standard, the length of yarn carried on each tube is also in accordance with the manufacturing standard.Secondly, surface defects are detected by our proposed defect detection methods.These defects include hairiness, stains and other surface defects.Finally, the tube yarn is sorted by detection result. The hardware system design The hardware structure platform of the designed system is shown in Figure 3. Main components include holding devices, LED strip lights, cameras, a weight sensor, etc..The weight of the tube yarn is validated at the position ① shown in Figure 3.A weight sensor is placed underneath the detection position, and the weight of the tube yarn is directly measured by the weight sensor via removing the weight of the tube yarn load-bearing tray during correction.The measured weight of the tube yarn is displayed on an electronic screen for workers to view.In the second detection position, two cameras are used to capture images in real time to detect defects such as yarn hairiness ("maoyu"), yarn loops ("maoquan"), yarn cluster ("maojia") etc. on the oblique and vertical sides of the tube yarn, as shown in ② of Figure 3.The third detection position is used to detect surface stains on the tube yarn, which is rotated in the position and the camera transmits the captured images in real time to the central server for processing and defect detection, as shown in ③ of Figure 3. The hardware system design For the whole vision defect detection system we designed, the vision component selected are shown in Table 1, including cameras, lenses and lights. The detection algorithms In this section, the dataset of tube yarn defect is described firstly.Then, a detailed description of the algorithms used in our system, which is in terms of both the yarn defect detection algorithm and the algorithm of tube yarn surface stains detection. Establishing a dataset of tube yarn defects Dataset is an essential element of supervised learning, which can determine the learning outcome of a network to a certain extent.We have collected defects that occur in the actual production process to form our dataset, where hairiness defects are more common and most likely to arise.We have classified hairiness into six categories: 'maoyu', 'maoquan', 'maojia', 'mohu', 'xiantou1', and 'xiantou2'.The 'maoyu' is the formation of a single filament on the surface of a tube yarn when the fibers are broken during winding or packing.The 'maoquan' is a ring-like defect formed by the ends of a monofilament fiber embedded in the surface of a tube yarn.The 'maojia' are a mixture of defects formed by the interweaving of 'maoyu' and 'maoquan'.The 'mohu' is a defect that is not clearly captured due to interference from other uncertainties in the operation of the hardware, but which can be positively identified as a defect and does not affect the grading of the tube yarn.The 'xiantou' is a cluster of hairiness gathered from a single strand of hairiness and is divided into 'xiantou1' and 'xiantou2' according to the size of the cluster, while 'xiantou1' is a small amount of hairiness clusters and 'xiantou2' is a large amount of hairiness clusters.A tube yarn with many "xiantou" can be directly considered as a substandard product.Details of the tube yarn defect dataset and real images are shown in the Table 2 and Figure 4. Establishing a dataset of tube yarn defects Due to other factors in the production environment, other defects also occur on tube yarn surface.Tube yarn surface defects, which are larger stains ('blot') and smaller stains ('spot').But these stains are not common.In order to obtain an adequate sample of defects, we directly use tube yarns with defects that removed from the actual industries for better collection of defects.We use equipment for defect acquisition of tube yarns after designing our hardware.The resolution of the original image we captured is 3000 × 300, which are unfriendly in processing due to imbalanced aspect ratio of image length and width.That is because images are resized to new images with proportional width and height.The majority of deep learning networks resize the images in the data pre- "maoyu", "maoquan", "mohu", "xiantou1", and "xiantou2". Establishing a dataset of tube yarn defects processing stage, where resizing is usually an image with equal width and height.Then, Resizing leads to serious distortion of the image and can not extract effective features if an image with an imbalanced aspect ratio.Therefore, the images acquired by the camera were processed artificially in order to fit the pre-processing characteristics of the deep learning network.We crop an image into some 300 × 300 small pieces, where will make an original image to produce ten training images.It is very beneficial for the training of the network.According to images from actual factory, we propose a tube yarn surface stain defect dataset, which information and the defects are shown in the Table 3 and Figure 5. Tube yarn hairiness defect detection There are three main parts including defect extraction, defect classification and defect statistics in tube yarn hairiness defect detection, which is shown in the Figure 6.All possible defects in the image are extracted firstly by using machine vision feature extraction methods, then these defects are classified, and finally the defects detected are counted to achieve a graded evaluation of the product. Tube yarn hairiness defect detection During tube yarn hairiness defect detection stage, the feature points in the images acquired by the camera are detected using the method that we previous researched in Ref. 26.Since the yarn image is captured with a black background, feature points are almost distributed in the regions where the black background and the white yarn meet, i.e. at the edge of the tube yarn, these dense feature points are traced to obtain the edge of the tube yarn, the edge approximate a straight line.Then, the feature points and other lines above the edge are considered as defective parts, which are cropped out to obtain image blocks containing defects.These blocks are classified to determine the type of defects, and these defects in all images are counted to obtain a basis for grading the tube yarn.For defect classification, image blocks are classified by the deep learning classification network we proposed to identify defects that appear in image blocks.The reason for above processing because deep learning image classification algorithms are well established and many hardware devices are exceptionally good at accelerating convolutional neural networks.In addition, deep learning algorithms are more robust than traditional algorithms, so instead of using traditional machine vision algorithms to accurately detect every type of defect.In short, we use traditional feature extraction method based on machine vision to extract the defects information, then using classification network to identify every block belong to which defect.The detection progress is efficient and accurate. Tube yarn hairiness defect detection We use the modified MobileNetV2 network 27 to defect classification.Due to the development of neural networks, most networks are able to meet the classification accuracy requirements.But when applied deep learning networks to industrial production process, the requirement for real-time is very high.Many networks cannot be applied to industrial process because they cannot meet the real-time requirements.MobileNetV2 is a lightweight network, and its classification of defect images already meets the requirements of most industrial process.We modified the network structure of MobileNetV2 by reducing the number of network layers to improve its efficiency.Then, our proposed Multi-Scale Cross-Fusion Attention Module (MSCFA) is added to significantly improve the classification accuracy without affecting the classification speed of the original network. Tube yarn hairiness defect detection Multi-scale cross-fusion attention module.The attention module has two main aspects: deciding which part of the input features needs to pay more attention, and allocating limited information processing resources to the important parts, which can effectively improve the network's ability to extract valid information.Inspired by attention modules such as SE, 28 CBAM 29 and ECA, 30 we have designed a Multi-Scale Cross-Fusion Attention Module, which is a plug-and-play module with the following module schematic as shown in Figure 7. Firstly, the input feature map is convoluted with three different sized convolution kernels respectively, which achieves multi-scale feature extraction.This is equivalent to extending the feature map of one scale to multiple scales, which is a better fusion of both contour features and detail features of the target.Then, the global average pooling (GAP) and the global max pooling (GMP) are performed for each scale feature maps.Followingly, all the global max pooling results are cross-fused and all the global average pooling results are also cross-fused, and two 1 × 1×C feature sequences are obtained.The two feature sequences are then passed different stimulus layers in parallel and later fused.The fused results are passed the fully connected layer and the activation function layer in turn to obtain a set of weights. Tube yarn hairiness defect detection In MSCFA, we use GMP and GAP at the same time because different pooling operations has different results, either to reduce features and parameters or to maintain invariance in rotation, translation, scaling, etc.. Average pooling is mainly used when all the information in the feature map should be considered, while max pooling is mainly used to reduce the effect of useless information.Such as max pooling, which is often used in the shallow layers of a network, as the first few layers contain more irrelevant information for the image feature.At the same time, max pooling is designed to reduce the dimension of features while extracting better features with stronger semantic information.We use global pooling instead of the full connection layer, which can save parameters, greatly reduce network parameters, and avoid overfitting.On the other hand, each feature map has the equivalent to an output feature, and this feature represents the feature of our output class.In addition, average pooling can reduce the increase in variance of the estimates due to domain size constraints and preserves more of the background information of the image.Max pooling can reduce the bias of the estimates due to parameter errors in the convolution layer and preserves more of the texture information. Tube yarn hairiness defect detection Transformer-style network architecture.In Ref. 31, it was researched that modifying the CNN network structure according to the format of the transformer can improve the performance of the CNN network.In Swim-Transformer, 32 the network structure has a stack of modules of 2, 2, 6, 2 in each stage with a ratio of 1:1:3:1.We modified the number of 'bottleneck' in mobilenetv2 to 1:1:3:1 according to the research results in Ref. 31.At the same time, the number of nodes in each layer is changed and the size of the feature map not following the original network.After testing, the modified network outperformed the original network.The modified network structure is shown in Table 4, where the 'bottleneck' still follows the structure in Ref. 27 We improve the network structure and then add our proposed multi-scale cross-fusion attention layer to the last layer of feature extraction.Then, connecting the global average pooling and fully connected layers forms the whole network. Tube yarn surface stain detection Apart from hairiness defects, there are also surface defects caused during the forming of the tube yarn.These stains defects on tube yarn surface are caused by d improper site environment and worker operation.We use deep learning-based object detection methods to detect stains.Deep learning-based object detection algorithms are mainly divided into one-stage algorithms and two-stage algorithms, in which the detection speed of the onestage algorithm is often higher than that of the two-stage algorithm, but the detection speed is not as fast as the two-stage algorithm.On the contrary, the two-stage methods often have a high detection accuracy, but the detection speed is not as fast as the one-stage methods.In industrial applications, under the condition of meeting certain detection accuracy, the required detection speed must be achieved to be applied to actual production.Therefore, we adopt the one-stage object detection algorithm, because it compared with the two-stage deep learning method has an absolute advantage in processing speed.With the development of deep learning, the detection accuracy of the onestage algorithm also basically reaches the requirements of actual production.One-stage methods can be applied to actual detection equipment.For tube yarn stain defects, our detection process is shown in Figure 8. Tube yarn surface stain detection Images of tube yarn surface are captured by the industrial camera firstly.Then, these images are cropped into individual blocks because of the original images are high-resolution and unbalanced in width to height ratio.Then, we improve the YOLOX 33 object detection method to detect stain defects.Our improved network structure is shown in Figure 9. Based on the YOLOX, the original network uses the darknet53 network for feature extraction.In our improvement, we use the modified MobileNetV2 network that described in Tube yarn hairiness defect detection section is used for feature extration to obtain the FPN features.We remove a 'ConvBNSiLU' layer and add a 'Patch Merging' layer in Neck module.The 'Patch Merging' Tube yarn surface stain detection can achieve downsample while better retaining the input feature.In addition, we add a shortcut connection and 'Upsample' layer to achieve feature fusion better.Afterwards, the FPN features are passed through a number of Conv, BN and activation function layers to obtain the data used for prediction.Finally, the decoupled head is used to detect defects, feature maps of different sizes are used to detect defects of different sizes.We use our improved network reach more accurate and more efficient detection performance. Software system design A complete system consists of a hardware part and a software part, the software part of our designed system is described in this section.For the defect detection system we have designed, we have designed a software operating system to visualise the data during the detection process in real time, which is easy for the operator to view and manage.We designed the operating software community as shown in Figure 10, where (a) is the main interface, showing the overall information of the detection, including the product information of the currently inspected samples, the defect information, and the rightmost part of the interface which shows the total number of products currently inspected, the number of qualified products, the number of non-conforming products and the current passing rate, which is convenient for workers to view in real time.The (b) is the parameter setting interface of the software, which mainly completes the setting of some weights that are used to calculate the weight of each defect when evaluating and grading the product, as well as the possibility of setting by the administrator the maximum number of each defect that can exist in each tube yarn, and the direct determination of a non-conforming product when the number of detected defects exceeds the set threshold.The (c) shows the data view interface, which allows one to observe a view of the detection data over a period of time, such as the test data of the type of product, the performance of the product, the equipment and worker responsible for detection, which can facilitate subsequent traceability of responsibility.The (d) is a view of the detected defects as images, which will be saved in a local folder when it is determined in the main page to save the images.These images are advantage for workers to study defects characteristics and use as a data set in subsequent studies. Experiments and analysis In this section, we have verified the effectiveness of the entire system, using defective and qualified yarns tested in the factory for defects and product ratings test, which is equivalent to evaluate the performance of our design system under conditions of priori knowledge.Firstly, the performance of the yarn hairiness detection algorithm is examined, the accuracy and speed of the hairiness defect classification algorithm is analysed and compare with some mainstream algorithms.Then the effectiveness of the surface defect detection algorithm is analysed and compare with a series of state-of-the-art algorithms.Finally, the overall operation of the system is tested, including classification, detection, product rating and software operation.In the experiments, all experiments are implemented on a local workstation.We implemented our models on PyCharm using the open source toolkit PyTorch 1. Tube yarn hairiness defect classification experiment In industrial production, there are two main factors to be considered, detection speed and detection accuracy.Therefore, when our method is compared with other state-of-the-art methods, the accuracy and frame rate are considered.Accuracy (acc) is an important reference indicator for classification, which is the proportion of correctly classified samples to the total number of samples, i.e. Tube yarn hairiness defect classification experiment where N correct is the number of samples ready for correct classification and N total is the total number of samples.Frame rate (FPS) is the frame per second transmission of the screen, which is a measure of the amount of information used to save and display dynamic video.It is a key indicator to reflect real-time.We also use it to illustrate the detection speed of a model.In the real time test of a model, the number of images processed by the model in a given time is recorded and the number of images that can be processed per second, i.e. the frame rate, which can be calculated using the equation (2). Tube yarn hairiness defect classification experiment where frameNum denotes the total number of images predicted and elapseTime is the total time spent on processing.The results of the experimental comparison are shown in Table 5, from which it can be concluded that the accuracy of our proposed method is the highest under the condition that a certain detection speed is met. Surface defect detection experiment For defect detection task, mean Average Precision (mAP) is usually employed to quantify the performance of the algorithm, which combines precision and recall to provide a comprehensive assessment of the network model and is calculated using the well-known metrics as follows Surface defect detection experiment where TP (true positive) denotes the number, which are predicted correctly, FP (false positive) is the number of defects which are predicted as normal ones, FN (false negative) denotes the number of normal surfaces, which are identified as defective ones, AP is the average accuracy of individual defect categories and N is the number of defect class. Surface defect detection experiment In our experiment, we set the number of training epoch to 300, which can compare the results of each model at the same training intensity.The predictive performance of the models is evaluated after training.The mAP and FPS for each model are shown in Table 6, and the detection results of some of the models are presented in Figure 11. Surface defect detection experiment From the experimental results, we can obtain that with the development of deep learning networks, the new network has higher accuracy and detection speed when training the same intensity.While for some two-stage networks, such as the FasterRCNN network in the experiment, its detection accuracy rises as the training epoches increases.When we increase the training epoch from 300 to 1000, its accuracy rises by 30%+, but its detection speed does not change significantly.Combining the training epoch and detection speed, the one-stage network has a greater advantage in practical applications.In this experiment, our improved YOLOX network achieves the best results at the same training cost.Our method with its high detection accuracy and speed for tube yarn defect detection, can basically meet the basic needs of the industry. Overall system test experiment After completing the system design and the defect detection algorithm, we combine all modules to form a complete detection system and verify the overall operation and integrity of the system.During the detection process, the LED lights up when the product appears on the position and the detection position is rotated to ensure that the camera acquires the entire surface of the yarn.The real-time detection information is displayed on the GUI interface.The actual running performance of our system is shown in Figure 12, where (a) is the working condition of the hairiness defect detection position, (b) is the working situation of the surface stain detection position and (c) is the real-time detection information.In addition, the system is equipped with an alarm device.when any fault occurs in the vision component or the motion control component during system operation, the alarm light immediately lights up to show red and the system stops working, while it will display green when it works normally, as shown in (d) and (e).We deploy the system in a factory.We test 8 groups of tube yarns, there are 30 tube yarns in each group, where the number of non-conforming products contained in each group is unequal.According to the actual production requirements, only when the detection accuracy of our system for non-conforming products is not less than 90%, and 2 products are completed within the specified time of 1 min.Our test results are shown in Table 7.In the 8 groups tested, only one tube yarn is misclassified as non-conforming in the 6th group.This is due to some hairiness are produced on the surface of the qualified tube yarn during careless handling, which caused the test results to deviate from the actual prediction.However, this group also achieved a 96.7% test approval rate and the other groups are fully compliant.After actual testing, the detection performance of our system basically meets the requirements of industrial production and is expected to be truly applied to the market. Conclusion In this paper, we design a defect detection system of glass tube yarn based on machine vision and deep learning.The whole hardware detection platform includes three detection position, weight verification position, tube yarn hairiness detection position and tube yarn stain detection position.For weight verification, we use a weight sensor to inspect that the weight of the tube yarn to be detected is in accordance with production standard.For tube yarn hairiness detection, we use image feature extraction method based on machine vision and improved MobileNetV2 method with the proposed Multi-Scale Cross-Fusion Attention Module to detect hairiness, which achieve excellent detection result.We modify the backbone network of YOLOX via replacing the original backbone network with a more lightweight feature extraction network.With above improvement in YOLOX, our proposed stain detection method reaches higher detection speeds while maintaining good detection results.The system uses machines instead of humans to carry out tube yarn defects detection, basically meeting the needs of industrial production and having the ability to be applied in factories.In the future work, the defect detection can be achieved using a lighter network, the real-time of the system is further improved by other light detection networks.This is do to make the system can meet the detection requirements of most products and can be applied to a wider range of applications. Declaration of conflicting interests The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/ or publication of this article. Figure 1 . Figure1.Topology of our designed system.The system consists of three parts: A, B, C, which are feedstock and pre-processing module, defect detection module and module for sorting qualified and unqualified tube yarn. Figure 2 . Figure2.The procedure of defect detection and product classification of our system.The whole procedure can be divided into three parts: obtaining images of tube yarn, detecting defect from these images, and classification of tube yarn. Figure 3 . Figure 3. Hardware view of the system, where the different colored circles indicate the different vision devices.Main components include holding devices, LED strip lights, cameras, a weight sensor, etc. Figure 4 . Figure 4. Types of hairiness defects and their presentation.The dataset includes six defects:"maoyu", "maoquan", "mohu", "xiantou1", and "xiantou2". Figure 5 . Figure 5. Types of the tube yarn surface stains and their presentation.The dataset includes two surface defects: "blot" and "spot". Figure 6 . Figure 6.Method for detecting tube yarn hairiness defect.The detection consists of three process: extracting defects information, cropping image blocks, and defect classification. Figure 7 . Figure 7. Structure of our proposed Multi-Scale Cross-Fusion Attention Module.Where GAP is global average pooling, GMP is global max pooling. Figure 8 . Figure 8. Process for detecting surface stains on tube yarn.The whole detecting process can be divided into three parts: the image is cropped to a series of image blocks, FPN feature extraction, and Decoupled detection head. Figure 9 . Figure 9.The structure of our detection network.It consists of FPN feature extraction, bottle network and decouple head, which achieves tube yarn stains detection. Figure 10 . Figure 10.The operating software interface, which contains a total of four screens: (a) the home page, (b) the parameters setting screen, (c) the data view page and (d) the image view page, each implementing a different function. 9 . The experimental hardware environment is Windows 10 with an Intel Core i9-10900X CPU @ 3.70 Hz GPU of NVIDIA GeForce RTX 3090.The algorithms compared are all from the model library provided by Paddlex, which is a technologically advanced and fully functional open source deep learning platform developed by Baidu.It merges the core framework, tool components and service platform of deep learning, simplifies the complex steps in deep learning, enables easy implementation of the pipeline from dataset construction to model selection and training to result prediction. Figure 11 . Figure 11.Detection results of different models, GT (Ground Truth), a (PicoDet + ESNet m), b (YOLOV3 + MobileNetV1), c (FasterRCNN + ResNet50 with 1000 training epoches), d (YOLOVX) and f (Ours). Figure 12 . Figure 12.System operation display, (a) is an illustration of the operating status of the hairiness defect detection position, (b) is an illustration of the operating status of the surface defect detection position, (c) is a display of product detection information in the GUI interface, (d) is a red alarm when the system is abnormal, and (e) is an indication of the status of the alarm when the system is operating normally. Table 1 . Specification and number of visual components. Table 2 . The details of the hairiness defects dataset. Table 3 . The details of the tube yarn surface stains dataset. Table 4 . The network structure of our improved MobileNetV2. Table 5 . Accuracy and frame rate performance comparison of different models. Table 6 . Mean average precision and frame rate performance comparison of different models. Table 6 . (continued) Table 7 . Actual running test results of our design system.

섹션 본문 61문단 · 39,287자

(제목 없음)

1Tube yarn is also called glass fiber spun yarn.Due to the excellent properties of glass fiber, various industrial products based on glass fiber are used in a variety of industries.As the most obvious factor affecting the quality of products, quality detection of glass fiber yarns is very important for companies.Due to traditional defect detection relies on the experience and subjective factors of workers, which makes many different views on the same defect.Some traditional methods limit the solution to specific types of defects and do not accurately detect various defects.In this paper, we propose a comprehensive defect detection system of tube yarn via combining machine vision and deep learning methods.In whole system, we inspect the weight through a weight sensor firstly.Then, we propose a multi-scale cross-fusion attention module to improve the MobileNetV2, and combine with machine vision image feature extraction method for hairiness detection.Finally, the modified MobileNetV2 network is used as the backbone of YOLOX network, making the YOLOX is lighter and achieve more efficiently stain detection of tube yarn.Then, the detection results are used to determine whether the glass tube yarn has passed.In addition, we establish an effective and sufficient amount of tube yarn defects dataset.The experimental results show that the proposed hairiness detection algorithm achieve 96% accuracy with 160+ FPS, and the surface stain detection algorithm achieve

Introduction

2In recent years, with the rapid development of the manufacturing industry, more and more manufacturers have payed more attention to the quality control of products.Defect detection becomes an integral part of the production process, which can ensure that the manufacturing and production processes are controlled and feedback from defect detection allows work as expected.Depending on the nature and extent of the defect detection, we can implement appropriate corrective actions, which can ensure that the manufacturing process performance remains satisfactory.In the production of products, defects are basically caused by machine failure, aging or improper operation of workers, so defect detection can be regarded as a precursor to the diagnosis stage of machine maintenance.And defect detection is also an important part of the detection process, relating to the acceptance or rejection of a product produced by a process or delivered by a supplier.Additionally, it enables part rework and repair, reducing material waste. 1 In general, defect detection is very important in the production of products.

3With the increasing development of industrial automation, traditional manual quality detection has gradually been difficult to adapt to high-speed factory assembly line production.2][13][14][15][16][17][18][19][20][21] Textile fabrics defect was detected via optimal Gabor filter by Jing et al. 2 In, 3 a method for detecting fabric defects using a thermal camera was presented.A method based on principal component analysis was proposed by Kazim to achieve dimensionality reduction-based classification of fleece fabric-based images. 4In, 5 an objective grades evaluation method of E-glass filament yarn was proposed by analysing the cross-sectional images of yarn.A two-channel deep neural network for apple disease detection by extracting features from HSV and RGB color spaces was constructed by Zhang et al. 6 Zeng et al. 7 proposed an atrous spatial pyramid pooling-balanced-feature pyramid network and used it to achieve the small defects detection on the printed circuit boards surface.Dang et al. used detection transformer to achieve end-to-end sewer defect detection. 8Deep-separable convolution was used to improve Unet by Jing et al., 9 and proposed a lightweight end-to-end fabric defect segmentation network.In, 10 a rail boundary guidance network was proposed for rail surface defects detection, which solved the problem of fully convolutional networks (FCN)-based methods suffer from the blurry rail edges and inaccuracy during detection.

4Due to the development of defect detection methods, there are many researchers who have designed corresponding detection systems for different products.A comprehensive description of defect detection systems was given in, 11 which indicated the components of a system and the selection of cameras, light sources, lenses, etc.. In, 12 it was pointed out that detection often requires multiple sensors to work together in smart manufacturing, and a system for detecting defects in products on smart engineering production lines based on fog computing calculations was designed.In agriculture, a machine learning-based system for detecting surface defects in apples is presented in. 13In, 14 an online skin defect detection system for jujubes based on hyperspectral images was proposed using machine vision methods.In industry, A machine vision-based steel surface defect detection system is proposed in, 15 which uses support vector machines to learn defect features and achieve real-time steel surface defect detection.A system for detecting defects such as dirt, scratches, burrs and wear on the surface of a part was proposed in, 16 where a CNN network was used to detect the surface of the part defects, and then each defect is classified using traditional machine learning methods to identify the different defects.A fully automated system for the defects detection on the surface of tube yarns and fabrics was presented in. 17In, 18 a machine vision-based online defect detection system for the printing quality of fluorescent coatings on metal plates was designed, which used color space conversion, blob analysis, sub-pixel edge extraction and template matching to achieve the detection of common defects that appear on fluorescent coatings on metal plates.In, 19 a tunnel surface detection system was proposed, which used a Faster-RCNN based multi-scale feature fusion network to achieve real-time tunnel image defect detection.A collaborative cloud edge fabric defect detection system based on the MobileNetV-SSDLite method was presented in, 20 which improved the detection accuracy of small defects and complex background images in resource-constrained situations.A wire arc additive manufacturing defect detection system based on incremental learning was proposed by Li et al. 21s the needs of society are constantly being updated, the new composite materials are playing an increasingly important role in everyday life.Such as glass tube yarn, also known as glass fiber spun yarn, is a yarn body formed by winding electronic grade glass fiber yarn around a tube body for ease of packaging and transportation.During the manufacturing and transportation of glass tube yarns, due to the complexity of the production environment and external factors, a series of defects such as hairiness and stains is often inevitably produced on the surface of tube yarn.These defects will affect the quality of the product's surface, the sales of the product and the performance companies.In addition, if it is made of glass fiber products, it will also produce a series of other hazards to the product, which will then affect the company's sales interests and cause economic disputes or legal issues.Therefore, it is essential to detect defects on the surface of the tube yarn.As described above, some researchers have proposed many methods for the defect detection of industrial products, but they often only target a certain type of defect, such as tube yarn hairiness detection, 22,23 surface stain detection, 24,25 and few systems or devices can achieve comprehensive detection of multiple defects in tube yarns.To address these issues, we have designed a glass tube yarn surface defects detection system, combining software and hardware, for efficient and accurate cop defect detection.

5For the hardware component, we design a data collection system to capture multiple defect images of the tube yarn.For the software component, we propose a combination of conventional and deep learning algorithms for tube yarn hairiness detection.In addition, we propose a surface defect detection algorithm based on deep learning for tube yarn surface stains.Finally, a corresponding operating software is designed to control the hardware device.In general, our contributions are summarized as follows.

6(i) A mature bobbin yarn defect detection system has been designed and used in production practice.After field testing, it can basically meet the needs of factory production detection, and can replace manual bobbin defect detection.(ii) A plug-and-play multi-scale attention module is proposed to improve the MobliNetV2 algorithm for fast and accurate classification of tube yarn hairiness.(iii) Proposes an improved YOLOX network for accurate and fast detection of defects such as surface stains and stains on bobbin yarns.(iv) A cop hairiness defect classification dataset containing more than 5000 images is constructed.These defects include cop hairiness, hair clips, loops and other defects, which basically cover all the defects that may occur in cop manufacturing in the industrial field.

7The rest of this paper is organized as follows.In Section 2, we present the hardware design of the entire system.In Section 3, the two datasets for tube yarn defects, the algorithms for the detection of tube yarn hairiness and surface stains are described in detail.The software design of the system is presented in Section 4. Section 5 provides an overall summary of the article.

The hardware system design

8According to the actual market research, we fully consider the actual industrial production for the tube yarn surface surface quality detection, which needs to detect the tube yarn hairiness, surface stains and other different defects.Therefore, in the system we designed, different positions are used to detect different defects.The online detection system for tube yarn surface mainly detects and evaluates whether the surface defects of G75 tube yarn are qualified.

9(i) Automatic adsorption of yarn threads, avoiding the influence of threads on hairiness detection, reducing the workload of manual thread winding and improving overall detection efficiency.(ii) Automatic dust and static removal to prevent dust from adhering to the tube yarn and affecting the effectiveness of surface defect detection.(iii) Automatic weighing, it is ensured that the yarn wound on each cylinder is basically the same and in compliance with the regulations via the automatic weighing of the tube yarn.(iv) This enables the detection and classification of tube yarn hairiness defects and gives a score for the size and number of defects.

10(v) The detection of stains and spots on the surface of the tube yarn is similar to the detection of hairline defects, with a score based on the size of the stain and the number of spots.(vi) Statistical analysis of the surface data of the bobbin yarn, the product is judged as qualified according to the evaluation criteria and the qualified and unqualified yarns are automatically separated.

11An automated detection system consists of three elements as shown in Figure 1.Each part fulfils a different function in whole detection procedure."A" represents the feedstock module, which feeds tube yarn through the conveyor into static elimination device ("D") and then into "B"."B" is the tube yarn detection module and is also the most important part of our design, where ①, ② and ③ represent three positions used to weight verification, hairiness detection and surface stain detection of the tube yarn respectively.The inspected tube yarn will flow into section "C", where the unqualified tube yarn (such as "E") will be automatically removed by a pneumatic pusher to the unqualified area, and the qualified tube yarn (such as "F") will flow into the next section.

12Defect detection and product classification are the most important parts of the system.The overall architecture and working procedure are explained in Figure 2. Firstly, images of tube yarn are captured by four GigE cameras of two detection position.Then, these images are transmitted to the central processing server via a Gigabit network cable.These images are processed and used to detect hairiness and stain defects in the central processing server, then the yarn is judged to be qualified according to the detected results from hairiness and stain detection positions.

13In summary, our system firstly measures the weight of tube yarn to check whether the weight of the tube yarn conforms to the standard weight, because when the weight is up to standard, the length of yarn carried on each tube is also in accordance with the manufacturing standard.Secondly, surface defects are detected by our proposed defect detection methods.These defects include hairiness, stains and other surface defects.Finally, the tube yarn is sorted by detection result.

14The hardware structure platform of the designed system is shown in Figure 3. Main components include holding devices, LED strip lights, cameras, a weight sensor, etc..The weight of the tube yarn is validated at the position ① shown in Figure 3.A weight sensor is placed underneath the detection position, and the weight of the tube yarn is directly measured by the weight sensor via removing the weight of the tube yarn load-bearing tray during correction.The measured weight of the tube yarn is displayed on an electronic screen for workers to view.In the second detection position, two cameras are used to capture images in real time to detect defects such as yarn hairiness ("maoyu"), yarn loops ("maoquan"), yarn cluster ("maojia") etc. on the oblique and vertical sides of the tube yarn, as shown in ② of Figure 3.The third detection position is used to detect surface stains on the tube yarn, which is rotated in the position and the camera transmits the captured images in real time to the central server for processing and defect detection, as shown in ③ of Figure 3.

15For the whole vision defect detection system we designed, the vision component selected are shown in Table 1, including cameras, lenses and lights.

The detection algorithms

16In this section, the dataset of tube yarn defect is described firstly.Then, a detailed description of the algorithms used in our system, which is in terms of both the yarn defect detection algorithm and the algorithm of tube yarn surface stains detection.

Establishing a dataset of tube yarn defects

17Dataset is an essential element of supervised learning, which can determine the learning outcome of a network to a certain extent.We have collected defects that occur in the actual production process to form our dataset, where hairiness defects are more common and most likely to arise.We have classified hairiness into six categories: 'maoyu', 'maoquan', 'maojia', 'mohu', 'xiantou1', and 'xiantou2'.The 'maoyu' is the formation of a single filament on the surface of a tube yarn when the fibers are broken during winding or packing.The 'maoquan' is a ring-like defect formed by the ends of a monofilament fiber embedded in the surface of a tube yarn.The 'maojia' are a mixture of defects formed by the interweaving of 'maoyu' and 'maoquan'.The 'mohu' is a defect that is not clearly captured due to interference from other uncertainties in the operation of the hardware, but which can be positively identified as a defect and does not affect the grading of the tube yarn.The 'xiantou' is a cluster of hairiness gathered from a single strand of hairiness and is divided into 'xiantou1' and 'xiantou2' according to the size of the cluster, while 'xiantou1' is a small amount of hairiness clusters and 'xiantou2' is a large amount of hairiness clusters.A tube yarn with many "xiantou" can be directly considered as a substandard product.Details of the tube yarn defect dataset and real images are shown in the Table 2 and Figure 4.

18Due to other factors in the production environment, other defects also occur on tube yarn surface.Tube yarn surface defects, which are larger stains ('blot') and smaller stains ('spot').But these stains are not common.In order to obtain an adequate sample of defects, we directly use tube yarns with defects that removed from the actual industries for better collection of defects.We use equipment for defect acquisition of tube yarns after designing our hardware.The resolution of the original image we captured is 3000 × 300, which are unfriendly in processing due to imbalanced aspect ratio of image length and width.That is because images are resized to new images with proportional width and height.The majority of deep learning networks resize the images in the data pre- "maoyu", "maoquan", "mohu", "xiantou1", and "xiantou2".

19processing stage, where resizing is usually an image with equal width and height.Then, Resizing leads to serious distortion of the image and can not extract effective features if an image with an imbalanced aspect ratio.Therefore, the images acquired by the camera were processed artificially in order to fit the pre-processing characteristics of the deep learning network.We crop an image into some 300 × 300 small pieces, where will make an original image to produce ten training images.It is very beneficial for the training of the network.According to images from actual factory, we propose a tube yarn surface stain defect dataset, which information and the defects are shown in the Table 3 and Figure 5.

Tube yarn hairiness defect detection

20There are three main parts including defect extraction, defect classification and defect statistics in tube yarn hairiness defect detection, which is shown in the Figure 6.All possible defects in the image are extracted firstly by using machine vision feature extraction methods, then these defects are classified, and finally the defects detected are counted to achieve a graded evaluation of the product.

21During tube yarn hairiness defect detection stage, the feature points in the images acquired by the camera are detected using the method that we previous researched in Ref. 26.Since the yarn image is captured with a black background, feature points are almost distributed in the regions where the black background and the white yarn meet, i.e. at the edge of the tube yarn, these dense feature points are traced to obtain the edge of the tube yarn, the edge approximate a straight line.Then, the feature points and other lines above the edge are considered as defective parts, which are cropped out to obtain image blocks containing defects.These blocks are classified to determine the type of defects, and these defects in all images are counted to obtain a basis for grading the tube yarn.For defect classification, image blocks are classified by the deep learning classification network we proposed to identify defects that appear in image blocks.The reason for above processing because deep learning image classification algorithms are well established and many hardware devices are exceptionally good at accelerating convolutional neural networks.In addition, deep learning algorithms are more robust than traditional algorithms, so instead of using traditional machine vision algorithms to accurately detect every type of defect.In short, we use traditional feature extraction method based on machine vision to extract the defects information, then using classification network to identify every block belong to which defect.The detection progress is efficient and accurate.

22We use the modified MobileNetV2 network 27 to defect classification.Due to the development of neural networks, most networks are able to meet the classification accuracy requirements.But when applied deep learning networks to industrial production process, the requirement for real-time is very high.Many networks cannot be applied to industrial process because they cannot meet the real-time requirements.MobileNetV2 is a lightweight network, and its classification of defect images already meets the requirements of most industrial process.We modified the network structure of MobileNetV2 by reducing the number of network layers to improve its efficiency.Then, our proposed Multi-Scale Cross-Fusion Attention Module (MSCFA) is added to significantly improve the classification accuracy without affecting the classification speed of the original network.

23Multi-scale cross-fusion attention module.The attention module has two main aspects: deciding which part of the input features needs to pay more attention, and allocating limited information processing resources to the important parts, which can effectively improve the network's ability to extract valid information.Inspired by attention modules such as SE, 28 CBAM 29 and ECA, 30 we have designed a Multi-Scale Cross-Fusion Attention Module, which is a plug-and-play module with the following module schematic as shown in Figure 7. Firstly, the input feature map is convoluted with three different sized convolution kernels respectively, which achieves multi-scale feature extraction.This is equivalent to extending the feature map of one scale to multiple scales, which is a better fusion of both contour features and detail features of the target.Then, the global average pooling (GAP) and the global max pooling (GMP) are performed for each scale feature maps.Followingly, all the global max pooling results are cross-fused and all the global average pooling results are also cross-fused, and two 1 × 1×C feature sequences are obtained.The two feature sequences are then passed different stimulus layers in parallel and later fused.The fused results are passed the fully connected layer and the activation function layer in turn to obtain a set of weights.

24In MSCFA, we use GMP and GAP at the same time because different pooling operations has different results, either to reduce features and parameters or to maintain invariance in rotation, translation, scaling, etc.. Average pooling is mainly used when all the information in the feature map should be considered, while max pooling is mainly used to reduce the effect of useless information.Such as max pooling, which is often used in the shallow layers of a network, as the first few layers contain more irrelevant information for the image feature.At the same time, max pooling is designed to reduce the dimension of features while extracting better features with stronger semantic information.We use global pooling instead of the full connection layer, which can save parameters, greatly reduce network parameters, and avoid overfitting.On the other hand, each feature map has the equivalent to an output feature, and this feature represents the feature of our output class.In addition, average pooling can reduce the increase in variance of the estimates due to domain size constraints and preserves more of the background information of the image.Max pooling can reduce the bias of the estimates due to parameter errors in the convolution layer and preserves more of the texture information.

25Transformer-style network architecture.In Ref. 31, it was researched that modifying the CNN network structure according to the format of the transformer can improve the performance of the CNN network.In Swim-Transformer, 32 the network structure has a stack of modules of 2, 2, 6, 2 in each stage with a ratio of 1:1:3:1.We modified the number of 'bottleneck' in mobilenetv2 to 1:1:3:1 according to the research results in Ref. 31.At the same time, the number of nodes in each layer is changed and the size of the feature map not following the original network.After testing, the modified network outperformed the original network.The modified network structure is shown in Table 4, where the 'bottleneck' still follows the structure in Ref. 27 We improve the network structure and then add our proposed multi-scale cross-fusion attention layer to the last layer of feature extraction.Then, connecting the global average pooling and fully connected layers forms the whole network.

Tube yarn surface stain detection

26Apart from hairiness defects, there are also surface defects caused during the forming of the tube yarn.These stains defects on tube yarn surface are caused by d improper site environment and worker operation.We use deep learning-based object detection methods to detect stains.Deep learning-based object detection algorithms are mainly divided into one-stage algorithms and two-stage algorithms, in which the detection speed of the onestage algorithm is often higher than that of the two-stage algorithm, but the detection speed is not as fast as the two-stage algorithm.On the contrary, the two-stage methods often have a high detection accuracy, but the detection speed is not as fast as the one-stage methods.In industrial applications, under the condition of meeting certain detection accuracy, the required detection speed must be achieved to be applied to actual production.Therefore, we adopt the one-stage object detection algorithm, because it compared with the two-stage deep learning method has an absolute advantage in processing speed.With the development of deep learning, the detection accuracy of the onestage algorithm also basically reaches the requirements of actual production.One-stage methods can be applied to actual detection equipment.For tube yarn stain defects, our detection process is shown in Figure 8.

27Images of tube yarn surface are captured by the industrial camera firstly.Then, these images are cropped into individual blocks because of the original images are high-resolution and unbalanced in width to height ratio.Then, we improve the YOLOX 33 object detection method to detect stain defects.Our improved network structure is shown in Figure 9. Based on the YOLOX, the original network uses the darknet53 network for feature extraction.In our improvement, we use the modified MobileNetV2 network that described in Tube yarn hairiness defect detection section is used for feature extration to obtain the FPN features.We remove a 'ConvBNSiLU' layer and add a 'Patch Merging' layer in Neck module.The 'Patch Merging'

28can achieve downsample while better retaining the input feature.In addition, we add a shortcut connection and 'Upsample' layer to achieve feature fusion better.Afterwards, the FPN features are passed through a number of Conv, BN and activation function layers to obtain the data used for prediction.Finally, the decoupled head is used to detect defects, feature maps of different sizes are used to detect defects of different sizes.We use our improved network reach more accurate and more efficient detection performance.

Software system design

29A complete system consists of a hardware part and a software part, the software part of our designed system is described in this section.For the defect detection system we have designed, we have designed a software operating system to visualise the data during the detection process in real time, which is easy for the operator to view and manage.We designed the operating software community as shown in Figure 10, where (a) is the main interface, showing the overall information of the detection, including the product information of the currently inspected samples, the defect information, and the rightmost part of the interface which shows the total number of products currently inspected, the number of qualified products, the number of non-conforming products and the current passing rate, which is convenient for workers to view in real time.The (b) is the parameter setting interface of the software, which mainly completes the setting of some weights that are used to calculate the weight of each defect when evaluating and grading the product, as well as the possibility of setting by the administrator the maximum number of each defect that can exist in each tube yarn, and the direct determination of a non-conforming product when the number of detected defects exceeds the set threshold.The (c) shows the data view interface, which allows one to observe a view of the detection data over a period of time, such as the test data of the type of product, the performance of the product, the equipment and worker responsible for detection, which can facilitate subsequent traceability of responsibility.The (d) is a view of the detected defects as images, which will be saved in a local folder when it is determined in the main page to save the images.These images are advantage for workers to study defects characteristics and use as a data set in subsequent studies.

Experiments and analysis

30In this section, we have verified the effectiveness of the entire system, using defective and qualified yarns tested in the factory for defects and product ratings test, which is equivalent to evaluate the performance of our design system under conditions of priori knowledge.Firstly, the performance of the yarn hairiness detection algorithm is examined, the accuracy and speed of the hairiness defect classification algorithm is analysed and compare with some mainstream algorithms.Then the effectiveness of the surface defect detection algorithm is analysed and compare with a series of state-of-the-art algorithms.Finally, the overall operation of the system is tested, including classification, detection, product rating and software operation.In the experiments, all experiments are implemented on a local workstation.We implemented our models on PyCharm using the open source toolkit PyTorch 1.

Tube yarn hairiness defect classification experiment

31In industrial production, there are two main factors to be considered, detection speed and detection accuracy.Therefore, when our method is compared with other state-of-the-art methods, the accuracy and frame rate are considered.Accuracy (acc) is an important reference indicator for classification, which is the proportion of correctly classified samples to the total number of samples, i.e.

32where N correct is the number of samples ready for correct classification and N total is the total number of samples.Frame rate (FPS) is the frame per second transmission of the screen, which is a measure of the amount of information used to save and display dynamic video.It is a key indicator to reflect real-time.We also use it to illustrate the detection speed of a model.In the real time test of a model, the number of images processed by the model in a given time is recorded and the number of images that can be processed per second, i.e. the frame rate, which can be calculated using the equation (2).

33where frameNum denotes the total number of images predicted and elapseTime is the total time spent on processing.The results of the experimental comparison are shown in Table 5, from which it can be concluded that the accuracy of our proposed method is the highest under the condition that a certain detection speed is met.

Surface defect detection experiment

34For defect detection task, mean Average Precision (mAP) is usually employed to quantify the performance of the algorithm, which combines precision and recall to provide a comprehensive assessment of the network model and is calculated using the well-known metrics as follows

35where TP (true positive) denotes the number, which are predicted correctly, FP (false positive) is the number of defects which are predicted as normal ones, FN (false negative) denotes the number of normal surfaces, which are identified as defective ones, AP is the average accuracy of individual defect categories and N is the number of defect class.

36In our experiment, we set the number of training epoch to 300, which can compare the results of each model at the same training intensity.The predictive performance of the models is evaluated after training.The mAP and FPS for each model are shown in Table 6, and the detection results of some of the models are presented in Figure 11.

37From the experimental results, we can obtain that with the development of deep learning networks, the new network has higher accuracy and detection speed when training the same intensity.While for some two-stage networks, such as the FasterRCNN network in the experiment, its detection accuracy rises as the training epoches increases.When we increase the training epoch from 300 to 1000, its accuracy rises by 30%+, but its detection speed does not change significantly.Combining the training epoch and detection speed, the one-stage network has a greater advantage in practical applications.In this experiment, our improved YOLOX network achieves the best results at the same training cost.Our method with its high detection accuracy and speed for tube yarn defect detection, can basically meet the basic needs of the industry.

Overall system test experiment

38After completing the system design and the defect detection algorithm, we combine all modules to form a complete detection system and verify the overall operation and integrity of the system.During the detection process, the LED lights up when the product appears on the position and the detection position is rotated to ensure that the camera acquires the entire surface of the yarn.The real-time detection information is displayed on the GUI interface.The actual running performance of our system is shown in Figure 12, where (a) is the working condition of the hairiness defect detection position, (b) is the working situation of the surface stain detection position and (c) is the real-time detection information.In addition, the system is equipped with an alarm device.when any fault occurs in the vision component or the motion control component during system operation, the alarm light immediately lights up to show red and the system stops working, while it will display green when it works normally, as shown in (d) and (e).We deploy the system in a factory.We test 8 groups of tube yarns, there are 30 tube yarns in each group, where the number of non-conforming products contained in each group is unequal.According to the actual production requirements, only when the detection accuracy of our system for non-conforming products is not less than 90%, and 2 products are completed within the specified time of 1 min.Our test results are shown in Table 7.In the 8 groups tested, only one tube yarn is misclassified as non-conforming in the 6th group.This is due to some hairiness are produced on the surface of the qualified tube yarn during careless handling, which caused the test results to deviate from the actual prediction.However, this group also achieved a 96.7% test approval rate and the other groups are fully compliant.After actual testing, the detection performance of our system basically meets the requirements of industrial production and is expected to be truly applied to the market.

Conclusion

39In this paper, we design a defect detection system of glass tube yarn based on machine vision and deep learning.The whole hardware detection platform includes three detection position, weight verification position, tube yarn hairiness detection position and tube yarn stain detection position.For weight verification, we use a weight sensor to inspect that the weight of the tube yarn to be detected is in accordance with production standard.For tube yarn hairiness detection, we use image feature extraction method based on machine vision and improved MobileNetV2 method with the proposed Multi-Scale Cross-Fusion Attention Module to detect hairiness, which achieve excellent detection result.We modify the backbone network of YOLOX via replacing the original backbone network with a more lightweight feature extraction network.With above improvement in YOLOX, our proposed stain detection method reaches higher detection speeds while maintaining good detection results.The system uses machines instead of humans to carry out tube yarn defects detection, basically meeting the needs of industrial production and having the ability to be applied in factories.In the future work, the defect detection can be achieved using a lighter network, the real-time of the system is further improved by other light detection networks.This is do to make the system can meet the detection requirements of most products and can be applied to a wider range of applications.

Declaration of conflicting interests

40The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/ or publication of this article.

Figure 1 .

41Figure1.Topology of our designed system.The system consists of three parts: A, B, C, which are feedstock and pre-processing module, defect detection module and module for sorting qualified and unqualified tube yarn.

Figure 2 .

42Figure2.The procedure of defect detection and product classification of our system.The whole procedure can be divided into three parts: obtaining images of tube yarn, detecting defect from these images, and classification of tube yarn.

Figure 3 .

43Figure 3. Hardware view of the system, where the different colored circles indicate the different vision devices.Main components include holding devices, LED strip lights, cameras, a weight sensor, etc.

Figure 4 .

44Figure 4. Types of hairiness defects and their presentation.The dataset includes six defects:"maoyu", "maoquan", "mohu", "xiantou1", and "xiantou2".

Figure 5 .

45Figure 5. Types of the tube yarn surface stains and their presentation.The dataset includes two surface defects: "blot" and "spot".

Figure 6 .

46Figure 6.Method for detecting tube yarn hairiness defect.The detection consists of three process: extracting defects information, cropping image blocks, and defect classification.

Figure 7 .

47Figure 7. Structure of our proposed Multi-Scale Cross-Fusion Attention Module.Where GAP is global average pooling, GMP is global max pooling.

Figure 8 .

48Figure 8. Process for detecting surface stains on tube yarn.The whole detecting process can be divided into three parts: the image is cropped to a series of image blocks, FPN feature extraction, and Decoupled detection head.

Figure 9 .

49Figure 9.The structure of our detection network.It consists of FPN feature extraction, bottle network and decouple head, which achieves tube yarn stains detection.

Figure 10 .

50Figure 10.The operating software interface, which contains a total of four screens: (a) the home page, (b) the parameters setting screen, (c) the data view page and (d) the image view page, each implementing a different function.

9 .

51The experimental hardware environment is Windows 10 with an Intel Core i9-10900X CPU @ 3.70 Hz GPU of NVIDIA GeForce RTX 3090.The algorithms compared are all from the model library provided by Paddlex, which is a technologically advanced and fully functional open source deep learning platform developed by Baidu.It merges the core framework, tool components and service platform of deep learning, simplifies the complex steps in deep learning, enables easy implementation of the pipeline from dataset construction to model selection and training to result prediction.

Figure 11 .

52Figure 11.Detection results of different models, GT (Ground Truth), a (PicoDet + ESNet m), b (YOLOV3 + MobileNetV1), c (FasterRCNN + ResNet50 with 1000 training epoches), d (YOLOVX) and f (Ours).

Figure 12 .

53Figure 12.System operation display, (a) is an illustration of the operating status of the hairiness defect detection position, (b) is an illustration of the operating status of the surface defect detection position, (c) is a display of product detection information in the GUI interface, (d) is a red alarm when the system is abnormal, and (e) is an indication of the status of the alarm when the system is operating normally.

Table 1 .

54Specification and number of visual components.

Table 2 .

55The details of the hairiness defects dataset.

Table 3 .

56The details of the tube yarn surface stains dataset.

Table 4 .

57The network structure of our improved MobileNetV2.

Table 5 .

58Accuracy and frame rate performance comparison of different models.

Table 6 .

59Mean average precision and frame rate performance comparison of different models.

60(continued)

Table 7 .

61Actual running test results of our design system.

참고문헌 28건

  1. Supervised defect detection on textile fabrics via optimal Gabor filter Journal of Industrial Textiles · SAGE Publishing · 2013 10.1177/1528083713490002
  2. Study on the detection of yarn hairiness morphology based on image processing technique International Conference on Machine Learning and Cybernetics · 2010 10.1109/icmlc.2010.5580660
  3. Computer vision based system for apple surface defect detection Computers and Electronics in Agriculture · Elsevier BV · 2002 10.1016/s0168-1699(02)00093-5
  4. A novel thermal-based fabric defect detection technique Journal of the Textile Institute · Taylor & Francis · 2014 10.1080/00405000.2014.916063
  5. Machine learning-based imaging system for surface defect inspection International Journal of Precision Engineering and Manufacturing-Green Technology · Springer Science+Business Media · 2016 10.1007/s40684-016-0039-x
  6. Dimensionality reduction-based feature extraction and classification on fleece fabric images Signal Image and Video Processing · Springer Science+Business Media · 2016 10.1007/s11760-016-0939-9
  7. Fabric defect detection systems and methods—A systematic literature review Optik · Elsevier BV · 2016 10.1016/j.ijleo.2016.09.110
  8. Squeeze-and-Excitation Networks 2018 10.1109/cvpr.2018.00745
  9. Deep Learning for Smart Industry: Efficient Manufacture Inspection System With Fog Computing IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2018 10.1109/tii.2018.2842821
  10. Single vision based identification of yarn hairiness using adaptive threshold and image enhancement method Measurement · Elsevier BV · 2018 10.1016/j.measurement.2018.06.029
  11. CBAM: Convolutional Block Attention Module Lecture notes in computer science · Springer Science+Business Media · 2018 10.1007/978-3-030-01234-2_1
  12. Research on a Surface Defect Detection Algorithm Based on MobileNet-SSD Applied Sciences · Multidisciplinary Digital Publishing Institute · 2018 10.3390/app8091678
  13. Defects Detection System for Fluorescent Coating of Metal Plate Based on Machine Vision Mechanisms and machine science · Springer Nature (Netherlands) · 2019 10.1007/978-981-32-9941-2_94
  14. Objective evaluation of sizing morphology of E-glass filament yarn Journal of Industrial Textiles · SAGE Publishing · 2020 10.1177/1528083720911218
  15. Mobile-Unet: An efficient convolutional neural network for fabric defect detection Textile Research Journal · SAGE Publishing · 2020 10.1177/0040517520928604
  16. ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks 2020 10.1109/cvpr42600.2020.01155
  17. Automatic defect detection of metro tunnel surfaces using a vision-based inspection system Advanced Engineering Informatics · Elsevier BV · 2020 10.1016/j.aei.2020.101206
  18. Image-Based Surface Defect Detection Using Deep Learning: A Review Journal of Computing and Information Science in Engineering · ASM International · 2021 10.1115/1.4049535
  19. Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 2021 IEEE/CVF International Conference on Computer Vision (ICCV) · 2021 10.1109/iccv48922.2021.00986
  20. Hybrid deep learning architecture for rail surface segmentation and surface defect detection Computer-Aided Civil and Infrastructure Engineering · Wiley · 2021 10.1111/mice.12710
  21. Surface Defect Detection Methods for Industrial Products: A Review Applied Sciences · Multidisciplinary Digital Publishing Institute · 2021 10.3390/app11167657
  22. The development of on-line surface defect detection system for jujubes based on hyperspectral images Computers and Electronics in Agriculture · Elsevier BV · 2022 10.1016/j.compag.2022.106743
  23. DefectTR: End-to-end defect detection for sewage networks using a transformer Construction and Building Materials · Elsevier BV · 2022 10.1016/j.conbuildmat.2022.126584
  24. Deep multi-scale dual-channel convolutional neural network for Internet of Things apple disease detection Computers and Electronics in Agriculture · Elsevier BV · 2022 10.1016/j.compag.2022.106749
  25. A corner detection method based on adaptive multi-directional anisotropic diffusion Multimedia Tools and Applications · Springer Science+Business Media · 2022 10.1007/s11042-022-12666-w
  26. Improved MobileNetV2-SSDLite for automatic fabric defect detection system based on cloud-edge computing Measurement · Elsevier BV · 2022 10.1016/j.measurement.2022.111665
  27. A ConvNet for the 2020s 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · 2022 10.1109/cvpr52688.2022.01167
  28. Rail Break Prediction and Cause Analysis Using Imbalanced In-Service Train Data IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2022 10.1109/tim.2022.3214494