[go: up one dir, main page]

CN111402320A - A deep learning-based fiber cross-section diameter detection method - Google Patents

A deep learning-based fiber cross-section diameter detection method Download PDF

Info

Publication number
CN111402320A
CN111402320A CN202010183578.0A CN202010183578A CN111402320A CN 111402320 A CN111402320 A CN 111402320A CN 202010183578 A CN202010183578 A CN 202010183578A CN 111402320 A CN111402320 A CN 111402320A
Authority
CN
China
Prior art keywords
fiber
section
neural network
mask
convolutional neural
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010183578.0A
Other languages
Chinese (zh)
Inventor
徐运海
董兰兰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing United Vision Technology Co ltd
Original Assignee
Beijing United Vision Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing United Vision Technology Co ltd filed Critical Beijing United Vision Technology Co ltd
Priority to CN202010183578.0A priority Critical patent/CN111402320A/en
Publication of CN111402320A publication Critical patent/CN111402320A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30124Fabrics; Textile; Paper

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

本发明提供了一种基于深度学习的纤维截面直径检测方法,包括:利用预训练参数创建卷积神经网络模型;其中,卷积神经网络模型为Mask R‑CNN模型,其卷积核为长度不等的矩形卷积核;获取纤维图片的训练集及验证集,通过纤维图片的训练集及验证集对卷积神经网络模型进行训练,得到训练后的卷积神经网络模型;确定待检测纤维图片,根据训练后的卷积神经网络模型对待检测纤维图片进行识别,得到纤维图片中各个纤维截面的形状掩码;其中,训练、验证集及待识别纤维图片均为1024×1024大小的纤维图片;基于纤维截面的形状掩码,计算各个截面掩码轮廓的参数;所述参数包括截面掩码轮廓的面积、周长、直径。本发明能够自动确定纤维特征,准确计算纤维截面的直径。

Figure 202010183578

The invention provides a method for detecting the diameter of fiber cross-sections based on deep learning, which includes: creating a convolutional neural network model by using pre-training parameters; wherein, the convolutional neural network model is a Mask R-CNN model, and its convolution kernel is a different length. Equal rectangular convolution kernel; obtain the training set and verification set of the fiber image, train the convolutional neural network model through the training set and verification set of the fiber image, and obtain the trained convolutional neural network model; determine the fiber image to be detected , identify the fiber pictures to be detected according to the trained convolutional neural network model, and obtain the shape masks of each fiber cross-section in the fiber pictures; among them, the training, validation set and the fiber pictures to be identified are all fiber pictures with a size of 1024×1024; Based on the shape mask of the fiber section, parameters of each section mask profile are calculated; the parameters include the area, perimeter, and diameter of the section mask profile. The invention can automatically determine the fiber characteristics and accurately calculate the diameter of the fiber section.

Figure 202010183578

Description

一种基于深度学习的纤维截面直径检测方法A deep learning-based fiber cross-section diameter detection method

技术领域technical field

本发明属于纤维检测技术领域,具体涉及一种基于深度学习的纤维截面直径检测方法。The invention belongs to the technical field of fiber detection, and in particular relates to a method for detecting the diameter of a fiber cross-section based on deep learning.

背景技术Background technique

目前,现有技术对纤维截面直径的测量方法,是将待测纤维束切成毫米级的小段,再利用分散装置将纤维段分散散落在玻片上,放在显微镜头下通过摄像头成像。利用经典数字图像方法,对图像中的大量纤维段分别测量其直径,这个过程在纺织领域内习惯叫做纵面法测量。这里有一个比较关键的问题是,大量纤维段散落在玻片上,其中存在着非常多的交叉、弯曲和部分重叠的情况,经典图像算法并不能很好的应对,会存在非常多的重复测量(因为交叉纤维被分成多段,而这多段并不一定被归结为同一根纤维)和合并测量(并在一起的两根算成了一根),这些其实都是伪数据。这样的系统测试出的数据有一定的随机性,尤其对纤维直径离散较大的样本误差会较大。另一方面,分散纤维采集测量通常一个视场内可测的纤维数量平均10根左右,要达到数千根的大容量测试,要对应数百个视场的移动采集,效率较低。另外,对于截面形状不接近圆形的纤维,其测得直径也有一定偏差。At present, the method for measuring the diameter of the fiber cross-section in the prior art is to cut the fiber bundle to be measured into small segments of millimeter level, and then use a dispersing device to disperse the fiber segments on a glass slide, and place them under a microscope to image them through a camera. Using the classic digital image method, the diameters of a large number of fiber segments in the image are measured separately. This process is commonly called longitudinal measurement in the textile field. A key problem here is that a large number of fiber segments are scattered on the glass slide, and there are a lot of crosses, bends and partial overlaps. Because the crossed fibers are divided into multiple segments, and these multiple segments are not necessarily attributed to the same fiber) and combined measurements (two combined together are counted as one), these are actually fake data. The data tested by such a system has a certain degree of randomness, especially for samples with large dispersion of fiber diameters, the error will be large. On the other hand, the average number of measurable fibers in a field of view is usually about 10 in the measurement of dispersion fiber acquisition. To achieve a large-capacity test of thousands of fibers, it needs to correspond to the mobile acquisition of hundreds of fields of view, and the efficiency is low. In addition, for fibers whose cross-sectional shape is not close to a circle, the measured diameter also has a certain deviation.

因此,如何准确高效地检测大量纤维的直径,是本领域技术人员需要解决的问题。Therefore, how to accurately and efficiently detect the diameters of a large number of fibers is a problem that needs to be solved by those skilled in the art.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于针对现有技术的不足,提供一种基于深度学习的纤维截面直径检测方法,利用Mask-RCN模型自动确定纤维特征,准确计算纤维截面的直径(面积)。The purpose of the present invention is to provide a method for detecting the diameter of a fiber cross-section based on deep learning in view of the deficiencies of the prior art, using the Mask-RCN model to automatically determine the fiber characteristics and accurately calculate the diameter (area) of the fiber cross-section.

本发明的实施例提供了一种基于深度学习的纤维截面直径检测方法,包括如下步骤:An embodiment of the present invention provides a method for detecting the diameter of a fiber cross-section based on deep learning, comprising the following steps:

步骤1,利用预训练参数创建卷积神经网络模型;其中,所述卷积神经网络模型为Mask R-CNN模型,其卷积核为长度不等的矩形卷积核;Step 1, using pre-training parameters to create a convolutional neural network model; wherein, the convolutional neural network model is a Mask R-CNN model, and its convolution kernel is a rectangular convolution kernel of unequal length;

步骤2,获取纤维图片的训练集及验证集,通过所述纤维图片的训练集及验证集对所述卷积神经网络模型进行训练,得到训练后的卷积神经网络模型;Step 2, obtaining the training set and the verification set of the fiber picture, and training the convolutional neural network model through the training set and the verification set of the fiber picture to obtain the trained convolutional neural network model;

步骤3,确定待检测纤维图片,根据所述训练后的卷积神经网络模型对所述待检测纤维图片进行识别,得到纤维图片中各个纤维截面的形状掩码;其中,所述训练、验证集及待识别纤维图片均为1024×1024大小的纤维图片;Step 3: Determine the fiber picture to be detected, identify the fiber picture to be detected according to the trained convolutional neural network model, and obtain the shape mask of each fiber cross section in the fiber picture; wherein, the training and verification sets and the fiber pictures to be identified are all fiber pictures in the size of 1024×1024;

步骤4,基于纤维截面的形状掩码,计算各个截面掩码轮廓的参数;所述参数包括截面掩码轮廓的面积、周长、直径。Step 4, based on the shape mask of the fiber cross-section, calculate the parameters of each cross-sectional mask contour; the parameters include the area, perimeter, and diameter of the cross-sectional mask contour.

与现有技术相比本发明的有益效果是:Compared with the prior art, the beneficial effects of the present invention are:

1、无论纤维截面形状如何,都可以准确获取其截面面积,从而计算出准确的当量直径。1. No matter what the shape of the fiber cross-section is, the cross-sectional area can be accurately obtained, so as to calculate the accurate equivalent diameter.

2、截面方式下的视场内纤维不存在交叉问题,因而也不存在重复测量的问题。2. There is no cross-over problem of fibers in the field of view in cross-section mode, so there is no problem of repeated measurement.

3、视场内纤维数量密度高,通常一个视场内有数百根纤维可供测量,效率较纵面法有大幅提升。3. The number and density of fibers in the field of view are high. Usually, there are hundreds of fibers in a field of view for measurement, and the efficiency is greatly improved compared with the longitudinal method.

4、基于AI神经网络算法,很好地解决了传统数字图像算法难以解决的相邻截面难以准确分割的问题,为截面计算奠定了基础。4. Based on the AI neural network algorithm, the problem that the adjacent sections are difficult to be accurately divided by the traditional digital image algorithm is well solved, which lays a foundation for the section calculation.

附图说明Description of drawings

图1是本发明基于深度学习的纤维截面直径检测方法的流程图;Fig. 1 is the flow chart of the fiber section diameter detection method based on deep learning of the present invention;

图2是本发明Mask R-CNN结构简化图。FIG. 2 is a simplified diagram of the Mask R-CNN structure of the present invention.

具体实施方式Detailed ways

下面结合附图所示的各实施方式对本发明进行详细说明,但应当说明的是,这些实施方式并非对本发明的限制,本领域普通技术人员根据这些实施方式所作的功能、方法、或者结构上的等效变换或替代,均属于本发明的保护范围之内。The present invention will be described in detail below with reference to the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments do not limit the present invention. Equivalent transformations or substitutions all fall within the protection scope of the present invention.

参图1所示,本实施例提供了一种基于深度学习的纤维截面直径检测方法,包括:Referring to FIG. 1 , this embodiment provides a method for detecting the diameter of a fiber cross-section based on deep learning, including:

步骤S1,利用ImageNet上的预训练参数创建卷积神经网络模型;其中,所述卷积神经网络模型为Mask R-CNN模型,其卷积核为长度不等的矩形卷积核;Step S1, using the pre-training parameters on ImageNet to create a convolutional neural network model; wherein, the convolutional neural network model is a Mask R-CNN model, and its convolution kernel is a rectangular convolution kernel of unequal length;

步骤S2,获取纤维图片的训练集及验证集,通过所述纤维图片的训练集及验证集对所述卷积神经网络模型进行训练,得到训练后的卷积神经网络模型;Step S2, obtaining the training set and the verification set of the fiber picture, and training the convolutional neural network model through the training set and the verification set of the fiber picture, to obtain the trained convolutional neural network model;

步骤S3,确定待检测纤维图片,根据所述训练后的卷积神经网络模型对所述待检测纤维图片进行识别,得到纤维图片中各个纤维截面的形状掩码;其中,所述训练、验证集及待识别纤维图片均为1024×1024大小的纤维图片;Step S3: Determine the fiber picture to be detected, identify the fiber picture to be detected according to the trained convolutional neural network model, and obtain the shape mask of each fiber cross section in the fiber picture; wherein, the training and verification sets and the fiber pictures to be identified are all fiber pictures in the size of 1024×1024;

步骤S4,基于纤维截面的形状掩码,计算各个截面掩码轮廓的参数;所述参数包括截面掩码轮廓的面积、周长、直径。Step S4, based on the shape mask of the fiber cross-section, calculate the parameters of each cross-sectional mask contour; the parameters include the area, perimeter, and diameter of the cross-sectional mask contour.

Mask R-CNN模型由5个部分组成,分别是特征提取网络、特征组合网络、区域提交网络(RPN)、区域特征聚集网络(ROIAlign)和功能性网络,如图2所示。The Mask R-CNN model consists of 5 parts, namely the feature extraction network, the feature combination network, the region submission network (RPN), the region feature aggregation network (ROIAlign) and the functional network, as shown in Figure 2.

特征提取网络是深度神经网络的骨干网络,是整个模型计算量最大的部分。根据不同的应用需求,可以选择不同的特征提取网络。以ResNet50为例,取其4个ResidualBlock输出的4个特征图,记为C2,C3,C4,C5,分别代表图像不同深度的特征。特征组合网络的作用是将不同深度的特征进行重新组合,新生成的特征图中同时包含不同深度的特征信息。Mask R-CNN中使用FPN来组合特征图C2,C3,C4,C5成为新的特征图P2,P3,P4,P5,P6.对于i=5,4,3,2,U6=0,特征组合处理过程如式(1)所示:P’i The feature extraction network is the backbone network of the deep neural network and is the most computationally intensive part of the entire model. According to different application requirements, different feature extraction networks can be selected. Taking ResNet50 as an example, take the 4 feature maps output by its 4 ResidualBlocks, denoted as C 2 , C 3, C 4, and C 5, which represent the features of different depths of the image respectively. The function of the feature combination network is to recombine the features of different depths, and the newly generated feature map contains the feature information of different depths at the same time. Mask R-CNN uses FPN to combine feature maps C 2 , C 3 , C 4 , C 5 into new feature maps P 2 , P 3 , P 4 , P 5 , P 6 . For i=5, 4, 3 , 2, U 6 =0, the feature combination processing process is shown in formula (1): P' i

Figure BDA0002413423510000041
Figure BDA0002413423510000041

其中:conv代表卷积操作,sum代表逐元素的对位求和操作,upsample代表使得特征长宽变为2倍的上采样操作,pooling代表步长(stride)为2的最大池化操作。Among them: conv represents the convolution operation, sum represents the element-by-element bitwise sum operation, upsample represents the upsampling operation that doubles the feature length and width, and pooling represents the maximum pooling operation with a stride of 2.

区域提交网络的作用是利用特征图计算出能表示物体在图像中位置的候选框,采用锚点(Anchor)技术来完成区域提交功能。Mask R-CNN中RPN基于P2,P3,P4,P5,P6这5个特征图,对每一个特征图中的每一个特征向量回归得出一个5n维的向量,用以描述n个Anchor的修正值,每个Anchor的修正值包括△x、△y、△h、△w、p。其中p为前后景置信度。Anchor是一个预先设定好的Box。对于P2,P3,P4,P5,P6中的每个点,都会以其坐标为中心,以不同的宽、高来预设多个Anchor。然后,根据RPN网络回归得出的修正值对每个Anchor的中心和宽、高进行修正,从而得到新的Box。式(2)给出了Anchor修正计算过程。The role of the region submission network is to use the feature map to calculate the candidate frame that can represent the position of the object in the image, and use the anchor technology to complete the region submission function. RPN in Mask R-CNN is based on the five feature maps P 2 , P 3 , P 4 , P 5 , and P 6 , and regresses each feature vector in each feature map to obtain a 5n-dimensional vector to describe Correction values of n anchors, each of which includes △x, △y, △h, △w, and p. where p is the foreground and background confidence. Anchor is a pre-set Box. For each point in P 2 , P 3 , P 4 , P 5 , and P 6 , multiple Anchors will be preset with different widths and heights centered on their coordinates. Then, the center, width and height of each Anchor are corrected according to the correction value obtained by the regression of the RPN network, so as to obtain a new Box. Equation (2) gives the calculation process of Anchor correction.

Figure BDA0002413423510000042
Figure BDA0002413423510000042

其中:x、y代表Anchor的中心的坐标,w、h分别代表Anchor的宽和高。Among them: x and y represent the coordinates of the center of the Anchor, and w and h represent the width and height of the Anchor, respectively.

当Anchor修正完成后,会产生大量的Box,这时再根据每个Box的p值,利用非极大抑制(NMS)即可过渡出较为精确的候选框。When the Anchor correction is completed, a large number of Boxes will be generated. At this time, according to the p value of each Box, a more accurate candidate box can be transitioned by using Non-Maximum Suppression (NMS).

获取候选框之后,传统方法会根据每个候选框的位置从原图中裁剪出对应的区域,再对该区域进行分类和分割。然而,考虑到这些功能性网络所需要的输入都来源于特征图P2,P3,P4,P5,P6,因此采用ROIAlign算法直接从特征图中裁剪出候选框对应位置的特征,并加以双线性插值和池化,将特征变换为统一的尺,ROIAlign算法可以看作是一个引入了双线性插值的池化过程,它将原先离散的池化变为连续。After obtaining the candidate frame, the traditional method will cut out the corresponding area from the original image according to the position of each candidate frame, and then classify and segment the area. However, considering that the input required by these functional networks comes from the feature maps P 2 , P 3 , P 4 , P 5 , P 6 , the ROIAlign algorithm is used to directly crop the features of the corresponding positions of the candidate frames from the feature maps, And add bilinear interpolation and pooling to transform the features into a unified ruler. The ROIAlign algorithm can be regarded as a pooling process that introduces bilinear interpolation, which turns the original discrete pooling into continuous.

得到每个候选框对应区域同一尺寸的特征后,将其作为一些被称为头部的功能性网络的输入参与后续计算。对于分类头部,采用全连接层和Softmax层的固定搭配.对于候选框的二阶段修正,MaskRCNN对每个类别都回归得出一个5维向量的修正值,修正过程与式(2)一致。After obtaining the features of the same size in the corresponding area of each candidate frame, they are used as the input of some functional networks called heads to participate in the subsequent calculation. For the classification head, a fixed combination of the fully connected layer and the Softmax layer is used. For the two-stage correction of the candidate frame, MaskRCNN regresses each category to obtain a correction value of a 5-dimensional vector, and the correction process is consistent with formula (2).

本实施例中Mask-RCNN网络有两个主要部分。The Mask-RCNN network in this embodiment has two main parts.

第一是区域提案网络,该网络每个图像生成大约2000个区域提案。在训练期间,这些提案(ROI)中的每一个都经过第二部分,即对象检测和mask预测网络。由于掩码预测分支与标签和框预测分支并行运行,因此对于每个给定的ROI,网络都会预测属于所有类别的掩码。The first is the Region Proposal Network, which generates around 2000 region proposals per image. During training, each of these proposals (ROIs) goes through the second part, the object detection and mask prediction network. Since the mask prediction branch runs in parallel with the label and box prediction branches, for each given ROI, the network predicts masks belonging to all classes.

第二是在推理过程中,区域提议经过非最大抑制,并且掩码预测分支仅处理得分最高的1000个检测框。因此,在具有1000个ROI和2个对象类别的情况下,网络的蒙版预测部分将输出尺寸为1000×2×28×28的4D张量,其中每个蒙版的尺寸为28×28。The second is that during inference, region proposals undergo non-maximal suppression, and the mask prediction branch only processes the top 1000 detection boxes. Therefore, with 1000 ROIs and 2 object categories, the mask prediction part of the network will output a 4D tensor of size 1000 × 2 × 28 × 28, where each mask is of size 28 × 28.

需要说明的是,由于本方案所需要进行检测的纤维主要以羊毛绒为例,其他纤维使用本发明可能会有一定差别。It should be noted that since the fibers to be detected in this solution are mainly wool wool as an example, there may be certain differences in other fibers using the present invention.

本方案,设定纤维图片的尺寸为1024×1024,因此,本方案中纤维图片的训练集、验证集中的纤维图片、以及待识别纤维图片的尺寸均为1024×1024,以便保证图片长度能被32整除。由于图片较大,而且纤维图片上每一个地方可能存在羊绒毛截面,所以设定Anchor为[64,128,256,512,1024],每张纤维图片能够检测出来的最大数量设定为1000。并且,在训练时,由于纤维图片上羊毛绒前景超过90%以上,造成正负样本严重的不平衡,需要在模型上调整损失函数,故而使用Focal Loss函数来减少正负样本的不平衡造成的损失。另外,模型使用Adam算法来进行梯度计算,保证找到梯度最优解。In this scheme, the size of the fiber picture is set to 1024×1024. Therefore, the size of the fiber picture in the training set, the fiber picture in the verification set, and the fiber picture to be identified in this scheme are all 1024×1024, so as to ensure that the length of the picture can be Divisible by 32. Since the image is large, and there may be cashmere sections in every part of the fiber image, the Anchor is set to [64, 128, 256, 512, 1024], and the maximum number that can be detected per fiber image is set to 1000. Moreover, during training, since the woolen foreground on the fiber image exceeds 90%, the positive and negative samples are seriously unbalanced, and the loss function needs to be adjusted on the model. Therefore, the Focal Loss function is used to reduce the imbalance caused by the positive and negative samples. Loss. In addition, the model uses the Adam algorithm for gradient calculation to ensure that the gradient optimal solution is found.

具体过程是:通过专用装置采集到纤维图片,Mask-RCNN通过FCN分割网络,以14×14的ROIAlign输出特征图为输入,通过4个3×3的卷积层,保持14×14的尺寸不变,再通过1个2×2的反卷积层将输出尺寸升采样为28×28最后再经过一个1×1的卷积层和sigmoid激活层获得一个28×28的输出,该输出中每个点代表候选框某个类别的形状的前后景置信度。最后,用0.5作为置信度阈值获取物体形状掩码.对于显示的图像,网络需要检测到多个对象。对于每个对象,它输出一个数组,该数组包含预测的类别得分(指示该对象属于预测的类别的概率),检测到的对象在框中的边界框的左,上,右和下位置。来自此数组的类id用于从掩码预测分支的输出中提取相应的掩码。The specific process is: the fiber image is collected by a special device, Mask-RCNN splits the network through FCN, takes the 14×14 ROIAlign output feature map as input, and passes through four 3×3 convolutional layers, keeping the size of 14×14 unchanged. Then, the output size is upsampled to 28×28 through a 2×2 deconvolution layer, and finally a 28×28 output is obtained through a 1×1 convolution layer and a sigmoid activation layer. The points represent the foreground and background confidence of the shape of a certain category of the candidate box. Finally, an object shape mask is obtained with a confidence threshold of 0.5. For the displayed image, the network needs to detect multiple objects. For each object, it outputs an array containing the predicted class score (indicating the probability that the object belongs to the predicted class), the left, top, right and bottom positions of the detected object's bounding box in the box. The class ids from this array are used to extract the corresponding mask from the output of the mask prediction branch.

对于显示的图像,网络需要检测到多个对象。对于每个对象,它输出一个数组,该数组包含预测的类别得分(指示该对象属于预测的类别的概率),检测到的对象在框中的边界框的左,上,右和下位置。来自此数组的类id用于从掩码预测分支的输出中提取相应的掩码。For the displayed image, the network needs to detect multiple objects. For each object, it outputs an array containing the predicted class score (indicating the probability that the object belongs to the predicted class), the left, top, right and bottom positions of the detected object's bounding box in the box. The class ids from this array are used to extract the corresponding mask from the output of the mask prediction branch.

在本方案MaskRCNN中,基于ResNet50模型结构,其中包括有50多个由conv、BatchNorm组成的运算块。在网络模型训练完成后,只用作前向运算的网络模型存在一些冗余的计算步骤,可以采用参数合并的方式预先完成。另外,对模型的导数、参数数量和参数值进行了调整,提出了更适合的纤维截面直径(面积)检测的模型。In this scheme MaskRCNN, based on the ResNet50 model structure, there are more than 50 operation blocks composed of conv and BatchNorm. After the network model training is completed, the network model that is only used for forward operation has some redundant calculation steps, which can be completed in advance by means of parameter merging. In addition, the derivative of the model, the number of parameters and the value of the parameters are adjusted, and a more suitable model for the detection of fiber cross-section diameter (area) is proposed.

在本方案中选取的模型输入图像为1024×1024的3通道彩色图像,输出有类别、回归和其对应的掩码值,再根据这些值计算出纤维图像中羊毛绒的截面直径(面积)。最后,MaskRCNN运用FPN技术,每一张输入图片经过FPN的特征组合之后都会生成深度、规模不同的多张特征图.MaskRCNN会根据候选框的大小来选择其中一张特征图进行ROIAlign操作.选择的原则是针对面积越大的候选框,选择深度越大的特征图。The input image of the model selected in this scheme is a 1024×1024 3-channel color image, and the output includes categories, regressions and their corresponding mask values, and then calculates the cross-sectional diameter (area) of wool in the fiber image based on these values. . Finally, MaskRCNN uses FPN technology, and each input image will generate multiple feature maps with different depths and scales after the feature combination of FPN. MaskRCNN will select one of the feature maps according to the size of the candidate frame for ROIAlign operation. The selected The principle is to select a feature map with a larger depth for a candidate frame with a larger area.

本实施例搭建的系统的输入为光学显微镜下的绒毛纤维截面图像,输出为图像中各个纤维截面的形状掩码,然后再根据经典图像算法,计算各个截面掩码轮廓的面积、周长、直径等参数。图像采用Mask R-CNN作前向计算,获取图像中主要图像的具体信息,然后利用模型输出的纤维截面掩码结果,计算出图像纤维的直径,各个环节均不需要人员参与。与传统截面计算方法相比,在精度上和速度上都有很大提高。本方案将深度学习运用于纤维截面直径(面积)测试检测领域,使得纤维截面直径(面积)检测变得简单,不再需要人工设置提取大量特征,而是可以自主学习纤维特征,既能实现高效和分析运算,提高效率,又能极大地降低运算成本。The input of the system constructed in this example is the cross-sectional image of the fluff fiber under the optical microscope, and the output is the shape mask of each fiber cross-section in the image. Then, according to the classical image algorithm, the area, perimeter, and diameter of the outline of each cross-sectional mask are calculated. and other parameters. The image uses Mask R-CNN for forward calculation to obtain the specific information of the main image in the image, and then uses the fiber cross-section mask result output by the model to calculate the diameter of the image fiber, without the need for personnel to participate in each link. Compared with the traditional section calculation method, the accuracy and speed are greatly improved. This solution applies deep learning to the field of fiber cross-section diameter (area) testing and detection, which makes the fiber cross-sectional diameter (area) detection simple. It no longer needs to manually set and extract a large number of features, but can learn fiber features independently, which can achieve high efficiency. And analysis operation, improve efficiency, but also greatly reduce the operation cost.

对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化囊括在本发明内。It will be apparent to those skilled in the art that the present invention is not limited to the details of the above-described exemplary embodiments, but that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of the invention is to be defined by the appended claims rather than the foregoing description, which are therefore intended to fall within the scope of the claims. All changes within the meaning and scope of the equivalents of , are included in the present invention.

Claims (1)

1. A fiber section diameter detection method based on deep learning is characterized by comprising the following steps:
step 1, creating a convolutional neural network model by using pre-training parameters; the convolutional neural network model is a MaskR-CNN model, and the convolutional kernel of the model is a rectangular convolutional kernel with different lengths;
step 2, acquiring a training set and a verification set of the fiber picture, and training the convolutional neural network model through the training set and the verification set of the fiber picture to obtain a trained convolutional neural network model;
step 3, determining a fiber picture to be detected, and identifying the fiber picture to be detected according to the trained convolutional neural network model to obtain a shape mask of each fiber section in the fiber picture, wherein the training and verifying set and the fiber picture to be identified are 1024 × 1024 fiber pictures;
step 4, calculating the parameters of the mask contour of each cross section based on the shape mask of the fiber cross section; the parameters include area, perimeter, diameter of the cross-section mask outline.
CN202010183578.0A 2020-03-17 2020-03-17 A deep learning-based fiber cross-section diameter detection method Pending CN111402320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010183578.0A CN111402320A (en) 2020-03-17 2020-03-17 A deep learning-based fiber cross-section diameter detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010183578.0A CN111402320A (en) 2020-03-17 2020-03-17 A deep learning-based fiber cross-section diameter detection method

Publications (1)

Publication Number Publication Date
CN111402320A true CN111402320A (en) 2020-07-10

Family

ID=71430893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010183578.0A Pending CN111402320A (en) 2020-03-17 2020-03-17 A deep learning-based fiber cross-section diameter detection method

Country Status (1)

Country Link
CN (1) CN111402320A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114140687A (en) * 2021-11-22 2022-03-04 浙江省轻工业品质量检验研究院 Wool and cashmere fiber identification method based on improved Mask R-CNN neural network
US20240151517A1 (en) * 2021-05-24 2024-05-09 Ramot At Tel-Aviv University Ltd. Shape Sensing of Multimode Optical Fibers

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180276825A1 (en) * 2017-03-23 2018-09-27 Petuum, Inc. Structure Correcting Adversarial Network for Chest X-Rays Organ Segmentation
CN109102502A (en) * 2018-08-03 2018-12-28 西北工业大学 Pulmonary nodule detection method based on Three dimensional convolution neural network
CN109165645A (en) * 2018-08-01 2019-01-08 腾讯科技(深圳)有限公司 A kind of image processing method, device and relevant device
CN109886307A (en) * 2019-01-24 2019-06-14 西安交通大学 A kind of image detecting method and system based on convolutional neural networks
CN109948712A (en) * 2019-03-20 2019-06-28 天津工业大学 A kind of nanoparticle size measurement method based on improved Mask R-CNN
WO2019178561A2 (en) * 2018-03-16 2019-09-19 The United States Of America, As Represented By The Secretary, Department Of Health & Human Services Using machine learning and/or neural networks to validate stem cells and their derivatives for use in cell therapy, drug discovery, and diagnostics
CN110866365A (en) * 2019-11-22 2020-03-06 北京航空航天大学 Intelligent fault diagnosis method for mechanical equipment based on partial transfer convolutional network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180276825A1 (en) * 2017-03-23 2018-09-27 Petuum, Inc. Structure Correcting Adversarial Network for Chest X-Rays Organ Segmentation
WO2019178561A2 (en) * 2018-03-16 2019-09-19 The United States Of America, As Represented By The Secretary, Department Of Health & Human Services Using machine learning and/or neural networks to validate stem cells and their derivatives for use in cell therapy, drug discovery, and diagnostics
CN109165645A (en) * 2018-08-01 2019-01-08 腾讯科技(深圳)有限公司 A kind of image processing method, device and relevant device
CN109102502A (en) * 2018-08-03 2018-12-28 西北工业大学 Pulmonary nodule detection method based on Three dimensional convolution neural network
CN109886307A (en) * 2019-01-24 2019-06-14 西安交通大学 A kind of image detecting method and system based on convolutional neural networks
CN109948712A (en) * 2019-03-20 2019-06-28 天津工业大学 A kind of nanoparticle size measurement method based on improved Mask R-CNN
CN110866365A (en) * 2019-11-22 2020-03-06 北京航空航天大学 Intelligent fault diagnosis method for mechanical equipment based on partial transfer convolutional network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱有产;王雯瑶;: "基于改进Mask R-CNN的绝缘子目标识别方法", 微电子学与计算机, no. 02 *
陈晓娟;卜乐平;李其修;: "基于图像处理的明火火灾探测研究", 海军工程大学学报, no. 03 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20240151517A1 (en) * 2021-05-24 2024-05-09 Ramot At Tel-Aviv University Ltd. Shape Sensing of Multimode Optical Fibers
CN114140687A (en) * 2021-11-22 2022-03-04 浙江省轻工业品质量检验研究院 Wool and cashmere fiber identification method based on improved Mask R-CNN neural network

Similar Documents

Publication Publication Date Title
CN108122236B (en) Iterative fundus image blood vessel segmentation method based on distance modulation loss
CN113920107A (en) A method of insulator damage detection based on improved yolov5 algorithm
CN113240623B (en) Pavement disease detection method and device
CN113129281B (en) A deep learning-based detection method for wheat stalk cross-section parameters
CN113269737B (en) Fundus retina artery and vein vessel diameter calculation method and system
CN117152484A (en) Small target cloth flaw detection method for improving YOLOv5s
CN116883887B (en) Leakage gas detection method for infrared video
US20220284580A1 (en) Image analysis in pathology
CN115205209B (en) Monochromatic cloth flaw detection method based on weak supervised learning
CN112927212A (en) OCT cardiovascular plaque automatic identification and analysis method based on deep learning
CN117576038A (en) Fabric defect detection method and system based on YOLOv8 network
CN118570155A (en) Fabric defect detection method based on EFC feature extraction and hybrid loss function
CN111402320A (en) A deep learning-based fiber cross-section diameter detection method
CN116309493A (en) A method and system for detecting defects in textile products
CN118015244B (en) Tobacco shred uniformity detection method and system based on convolutional neural network
CN109785313B (en) Tire qualification detection method based on LBP
CN118537353A (en) Human brain glioma blood vessel segmentation method and system based on tissue transparency
CN113674205A (en) Method and system for measuring human body based on monocular depth camera
CN116958679A (en) A target detection method and related equipment based on weak supervision
CN119342359B (en) Dynamic white balance adjustment method and system for hysteroscope visual field optimization
CN111951271B (en) Method and device for identifying cancer cells in pathological image
CN117893517A (en) Cloth defect detection method based on improved YOLOv5
CN106847069B (en) Method for identifying map plane mathematical basis
CN119152393B (en) A Deep Learning-Based Method for Recognizing Wheat Seedlings from UAV Images
CN111627053A (en) Method and system for detecting cleaning cleanliness of universal spinneret orifice

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200710