# A Method for Detecting the Yarm Roll's Margin Based on VGG-UNet
## 2 Related Work  
According to related literature, the techniques utilized for the measurement of yarn roll dimensions are predominantly classified into two categories: contact and non-contact. Contact measurement entails the use of assorted instruments or sensors to obtain the dimensions and other characteristics of the yarn roll. For example, [PERSON], [PERSON], and [PERSON] proposed a yarn detection method based on the monitoring of yarn tension [7]. However, these methods have the potential to damage the yarn and generally exhibit complex detection steps, low efficiency, and negative impact on the normal use of yarn rolls, making them impractical for widespread use in production environments.  
Non-contact measurement technologies rely on computer vision to identify yarn roll features such as color and edges. These can be classified into three categories: monocular vision, stereo vision, and deep learning-based techniques.  
Monocular vision technology refers to image processing techniques applied to images captured by a single camera. It is the most common detection technology within machine vision. [PERSON], [PERSON], and [PERSON], [PERSON] designed an online detection system for yarn roll density based on machine vision [10]. The theory of perspective projection was employed to develop a correction model for yarn rolls, whereby the linear characteristics of the upper and lower boundaries of the yarn roll were restored and an ideal side-view image of the yarn was obtained. Subsequently, the yarn's precise volume was calculated using integral methods.  
Stereo vision systems capture images of an object from different angles, followed by 3D reconstruction to form the object's model. Often used in conjunction with lasers, this approach has seen rapid development recently due to its strong anti-interference capabilities. However, stereo vision requires significant computational resources to process and analyze images from two viewpoints, perform image matching, and compute depth. [PERSON], [PERSON], [PERSON], E.K., and others have used stereo vision systems to generate point clouds of fish surfaces and proposed a B-spline surface fitting algorithm to estimate the volume of fish [11], effectively enhancing the accuracy of weight and volume estimates.  
In contrast, deep learning techniques have demonstrated significant potential in the measurement of yarn spool dimensions. By utilizing deep learning models, it is possible to automatically extract image features and adapt to various complex scenarios and changing lighting conditions. By training on large amounts of annotated data, deep learning models can achieve high-precision measurements and exhibit strong robustness and generalization capabilities. For example, [PERSON], [PERSON], [PERSON], [PERSON] and others utilized the YOLO [12; 13; 14; 15] model to roughly detect each yarn roll and its pixel diameter. Subsequently,  
Figure 1: Environment. (**a**) Production environment and layout of yarn bobbin. (**b**) Types and sizes of three different yarn rolls.  
the region of interest (ROI) images of each yarn roll were subjected to further processing in order to extract the internal and external contours of the yarn roll. Finally, the measurements and predictions were integrated using a Kalman filter. The validation results demonstrate that this method effectively addresses existing issues and accurately detects the yarn margin [4]. Similarly, [PERSON], [PERSON], and [PERSON], H. addressed the issue of automatic recognition of gauge reading recognition by introducing the SIFT algorithm for correction and improved U-Net for segmentation [16]. This approach enhanced enhancing the accuracy and efficiency of recognition.