WO2023044690A1 - 一种菌落的分类方法 - Google Patents

一种菌落的分类方法 Download PDF

Info

Publication number
WO2023044690A1
WO2023044690A1 PCT/CN2021/120029 CN2021120029W WO2023044690A1 WO 2023044690 A1 WO2023044690 A1 WO 2023044690A1 CN 2021120029 W CN2021120029 W CN 2021120029W WO 2023044690 A1 WO2023044690 A1 WO 2023044690A1
Authority
WO
WIPO (PCT)
Prior art keywords
colony
colonies
classification
bacterial
connected region
Prior art date
Application number
PCT/CN2021/120029
Other languages
English (en)
French (fr)
Inventor
何凯
纪园
Original Assignee
中国科学院深圳先进技术研究院
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 中国科学院深圳先进技术研究院 filed Critical 中国科学院深圳先进技术研究院
Priority to PCT/CN2021/120029 priority Critical patent/WO2023044690A1/zh
Publication of WO2023044690A1 publication Critical patent/WO2023044690A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling

Definitions

  • the invention relates to the technical field of colony segmentation and classification, in particular to a colony classification method.
  • the classification of the traditional method is relatively weak, because the size and shape of the colony in the composite colony are different, and when there is colony adhesion, The formed cohesive colonies will have various shapes; while the traditional classification methods are not robust enough to achieve better classification results in complex situations.
  • the method of target detection is also used to detect the colonies in the petri dish.
  • the method of target detection only performs better for colonies with specific shapes such as circles and ellipses, and the distribution of colonies is relatively sparse.
  • the detection frame cannot frame a single connected area, which will have a greater impact on the subsequent colony classification.
  • the detection frame is a rectangular frame, the shape of the cohesive colony is irregular, and the area to be framed by a rectangular frame , may contain other colonies; the same is true for bar colonies, if two or more bar colonies are slanted and adjacent, they cannot frame an area, and may frame multiple colonies at the same time. Sending the framed multiple colonies into the classification network for classification will affect the classification results, and will affect both the accuracy and recall of the classification.
  • the invention provides a method for classifying bacterial colonies.
  • this classification method comprises the following steps:
  • the binary image is input into the colony classification network or classified according to the colony morphological structure to obtain a colony classification result, wherein the colony morphological structure includes Circular colonies, ellipsoid colonies, cohesive colonies or strip colonies.
  • the above technical solution is an efficient colony classification method, which can efficiently extract various colonies, and classify and count different colonies according to needs, effectively improving the accuracy of colony classification.
  • the present invention can be further configured as follows: when the colony classification network is a convolutional neural network, the convolutional neural network collects colony data, the convolutional neural network has a residual network structure, and extracts different Types of colony images, count the number of different types of colonies, collect different types of colony data according to requirements, divide the collected colony data into training sets, verification sets and test sets, and the convolutional neural network passes through the training set, verification The set and test sets classify colonies as round, elliptical, cohesive, or striped.
  • the colony image segmentation and classification framework based on the local threshold segmentation method and the convolutional neural network colony classification method can not only achieve faster processing speed, but also achieve better results.
  • the present invention can be further configured as follows: the convolutional neural network collects colony data, the convolutional neural network used is a residual network structure, extracts different types of colony images, counts the number of different types of colonies, Collect different types of colony data according to requirements, and divide the collected colony data into training set, verification set and test set;
  • the training set and verification set are normalized to a fixed size, and sent to a pre-designed convolutional neural network for training and verification, and the optimal model is selected according to the training situation and the performance of the model in the test set.
  • the present invention may be further configured to: when collecting the different types of colony data, keep the collected data of various types of colony in balance.
  • the convolutional neural network can be better trained.
  • the present invention can be further configured to: normalize the training set and verification set to a fixed size, and input the pre-designed convolutional neural network for training and verification, according to the training situation and the model in the test set performance, select a classification model.
  • the present invention can be further configured as: the classification recall rate of each type of colony: in the test set, one of the colonies actually has M i , and the number of correctly classified is m i , then the classification recall rate is m i /M i ;
  • the classification accuracy rate of each type of colony in the test set, the number of colonies classified into one type is N i , and the number of N i colonies actually belonging to this type of colony is m i , then the classification accuracy rate is m i / N i .
  • the present invention can be further configured to: evaluate the overall test set, and calculate the mean value of the recall rate and accuracy rate of each type of colony:
  • m i /M i is the classification recall rate
  • m i /N i is the classification accuracy rate
  • P recall is the mean value of the recall rate
  • P acc is the mean value of the accuracy rate.
  • the test set of each type of colony can be evaluated.
  • the present invention can be further configured as follows: according to the size of the obtained colony, design a suitable convolutional neural network (convolutional neural network, CNN) network depth.
  • CNN convolutional neural network
  • the present invention can be further configured as: counting the number of colony connected regions in the colony image after local threshold segmentation, and counting the number of pixels contained in each of the colony connected regions, so as to count each The number of colonies and the size of each colony.
  • the present invention can be further configured to: further include: reviewing the colony connected area, checking the distance between the boundary of the colony connected area and the surrounding colony connected area of the colony connected area, when the distance is less than the preset A threshold value of d pixels indicates that the colony connected area is connected to the surrounding colony connected area.
  • the d is a threshold value of the distance between the connected areas of two colonies.
  • the present invention can be further configured as: when classifying according to the morphological structure of the colony, perform limit corrosion on each of the connected areas of the colony, and determine the number of seed points in the connected area of the colony after the limit corrosion Whether it is greater than 1, if so, classify the colonies in the connected region of the colonies as cohesive colonies; otherwise, judge that the colonies in the connected region of the colonies are circular colonies, and the judgment method is: assume that the center of the circular colony For point C, the coordinates are:
  • the x-axis coordinate of a certain point on the circle of C, y is the y-axis coordinate of a certain point on the circle whose center is C, x i is the x-axis coordinate of a certain point on the colony outline, and y i is a certain point on the colony outline
  • the present invention has at least the following beneficial effects:
  • This application uses the local threshold segmentation method to segment the colony image, extracts the connected area, and uses the convolutional neural network to classify the extracted connected area image, no longer uses manual counting and identification of the colony, which can effectively improve the number of colonies The accuracy of counting and identification is improved, and the accuracy of colony classification is also improved.
  • the colony segmentation and classification method of the present application can not only obtain high precision, but also take into account the processing speed of the algorithm, which can not only achieve a faster processing speed, but also achieve a better classification effect.
  • FIG. 1 is an overall flowchart of the colony classification method of the present application.
  • Figure 2 is the original image of the colony image of the present application.
  • Fig. 3 is a binarized image of the colony image of the present application.
  • Fig. 4 is a single connected region image extracted from the colony image of the present application.
  • Fig. 5a is a flowchart of the classification method for each type of colony in Example 1 of the present application.
  • Fig. 5b is a flowchart of the classification method for each type of colony in Example 2 of the present application.
  • Figure 6 is a classification diagram of the round colony of the present application.
  • Fig. 7 is a classification diagram of ellipsoid colonies of the present application.
  • Figure 8 is a classification diagram of the bar colony of the present application.
  • a kind of classification method of bacterial colony comprises:
  • the colony image after segmentation is input into the convolutional neural network
  • the output result of colony classification in the convolutional neural network is set.
  • the step of segmenting the collected colony image includes:
  • the collected colony image was converted into a grayscale image; the original image of the colony image is shown in Figure 2.
  • the erosion and expansion operation is used on the acquired binary image to remove noise and burrs
  • Connected region analysis is performed on the binary image, as shown in Figure 4, connected regions are extracted, and too small regions and non-colony regions are eliminated.
  • the convolutional neural network collects colony data, and the convolutional neural network used is a residual network structure, extracts different types of colony images, counts the number of different types of colonies, collects different types of colony data according to requirements, and collects the collected
  • the colony data is divided into training set, validation set and test set;
  • the training set and verification set are normalized to a fixed size, and sent to a pre-designed convolutional neural network for training and verification, according to the training situation and the performance of the model in the test set, select optimal model.
  • Using the local threshold segmentation method to segment the colony image can reduce the image processing time.
  • the general classification method has poor robustness in complex situations and cannot achieve a better classification effect. It performs better for colonies of specific shapes such as circles and ovals and the distribution of colonies is relatively sparse.
  • the detection frame cannot frame a single connected area, but the above classification method in this embodiment collects the colony data, and trains and verifies the collected colony data, and passes the model Classification of complex colonies improves the accuracy of complex colony classification.
  • the classification recall rate of each type of colony in the test set, among them, there are actually M i colonies of this type, among which the number correctly classified is m i , and the recall rate is m i /M i ;
  • the classification accuracy rate of each type of colony in the test set, there are N i number of colonies classified into this type, but the number of N i colonies actually belonging to this type of colony is m i , and the accuracy rate is m i /N i ;
  • the recall rate and precision rate of each class are respectively averaged.
  • m i /M i is the classification recall rate
  • m i /N i is the classification accuracy rate
  • P recall is the mean value of the recall rate
  • P acc is the mean value of the accuracy rate.
  • the colonies were divided into four types: cohesive colonies, round colonies, oval colonies and strip colonies.
  • Example 1 The difference from Example 1 is that in Example 1, a convolutional neural network is used to classify the acquired connected areas of the colonies. In this example, the classification is performed according to the different morphological structures of the colonies, as shown in FIG. 5b.
  • is the angle between the line between the farthest two points on the outline of an independent entire colony image and the x-axis
  • x 1 is the x-axis coordinate of point A
  • x 2 is the x-axis coordinate of point B
  • y 1 is the y-axis coordinate of point A
  • y 2 is the y-axis coordinate of point B
  • A(x 1 ,y 1 ) is the coordinate of point A
  • B(x 2 ,y 2 ) is the coordinate of point B.
  • the method of limit corrosion is adopted for each connected area, and if there are 2 or more seed points in the connected area after limit corrosion, it is an adherent colony.
  • the x-axis coordinate of a certain point on the circle of C is the y-axis coordinate of a certain point on the circle whose center is C
  • x i is the x-axis coordinate of a certain point on the colony outline
  • y i is a certain point on the colony outline The y-coordinate of the point.
  • an ellipse the locus of a moving point P whose sum of distances from two fixed points F 1 and F 2 in a plane is equal to a constant 2a (where 2a>
  • 2c ⁇ 2a is called the focal length of the ellipse.
  • P is the moving point of the ellipse
  • the chord obtained by cutting the line that coincides with the line connecting the two foci is the major axis, and its length is 2a
  • the chord obtained by perpendicularly bisecting the line connecting the two foci on the ellipse is the short axis, and its length is 2b.
  • the line segment AB is the major axis of the ellipse, and the semi-major axis of the ellipse Perpendicular to the line segment AB and passing through the point
  • the line of the ellipse intersects to form two intersection points, one of which is set to be (x 3 ,y 3 ), and the other of which is set to be (x 4 ,y 4 ), then the semi-minor axis of the ellipse focal length
  • the line segment AB is composed of AF 1 , F 1 F 2 and F 2 B.
  • the high-resolution colony image is input into the Unet segmentation network, and the output result of the colony classification in the Unet segmentation network is set according to the type of colony to be classified.
  • the Unet segmentation network can process high-resolution images in blocks, input each high-resolution image into the Unet segmentation network, and perform semantic segmentation and classification on each high-resolution image, which can also be achieved while segmenting the colony image.
  • a variety of colony classification, that is, only one network can be used, the specific processing method is as follows:
  • the Unet segmentation network is applied to colony picking.
  • the Unet segmentation network fuses the extracted low-level features and high-level semantic information.
  • the Unet segmentation network is especially suitable for colony images with fixed structures and less rich semantic information.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)

Abstract

本发明公开了一种菌落的分类方法,包括:将输入的菌落图像转化成灰度图像;对所述灰度图像进行局部阈值分割,把所述灰度图像大于对应局部阈值的像素,设置为1,并把所述灰度图像小于局部阈值的像素设置为0,以生成二值化图像;对所述二值化图像采用腐蚀膨胀操作,并进行形态学处理,去除噪点和毛刺;对所述二值化图像进行连通区域分析,以提取菌落连通区域,剔除非菌落区域;当所述菌落连通区域中包含的像素大于像素个数阈值T时,把所述二值化图像输入菌落分类网络或者根据菌落形态结构进行分类,得菌落分类结果,其中,所述菌落形态结构包括圆形菌落、椭圆菌落、黏连菌落或条形菌落。本发明具有提高了菌落分割与分类的精度等优点。

Description

一种菌落的分类方法 技术领域
本发明涉及菌落分割与分类的技术领域,尤其是涉及一种菌落的分类方法。
背景技术
目前,采用人工对菌落进行计数和识别,人工对菌落进行计数和识别的工作非常繁杂,并且无法保证计数和识别的精度。
如果采用传统方法对菌落进行分类,当传统方法对复合菌落进行分类时,传统方法的分类又表现得比较乏力,由于复合菌落中的菌落大小形状不一,且当存在菌落黏连的情况时,形成的黏连菌落更会存在各种形状;而传统的分类方法在复杂情况下鲁棒性差,无法达到较优的分类效果。
目前也有使用目标检测的方法对培养皿中的菌落进行检测,目标检测的方法只对圆形和椭圆形等特定形状的菌落且菌落分布较稀疏的情况,表现较优,当存在条形菌落,或者菌落黏连的情况时,检测框无法框住单一连通区域,在后续的菌落分类中则会产生较大影响,由于检测框是矩形框,黏连菌落形状不规则,用矩形框框到的区域,可能包含其他菌落;条形菌落也一样,如果是两个或多个条形菌落是倾斜的、紧邻的,则不能框住一个区域,可能同时框住多个菌落。则将框住的多个菌落送入分类网络进行分类,会对分类结果造成影响,对分类的准确率和召回率都会产生影响。
发明内容
为了提高菌落分割与分类的精度,本发明提供一种菌落的分类方法。
本发明提供一种菌落的分类方法,采用如下的技术方案:该分类方法 包括以下步骤:
将输入的菌落图像转化成灰度图像;
对所述灰度图像进行局部阈值分割,把所述灰度图像大于对应局部阈值的像素,设置为1,并把所述灰度图像小于局部阈值的像素设置为0,以生成二值化图像;
对所述二值化图像采用腐蚀膨胀操作,并进行形态学处理,去除噪点和毛刺;
对所述二值化图像进行连通区域分析,以提取菌落连通区域,剔除非菌落区域;
当所述菌落连通区域中包含的像素大于像素个数阈值T时,把所述二值化图像输入菌落分类网络或者根据菌落形态结构进行分类,得菌落分类结果,其中,所述菌落形态结构包括圆形菌落、椭圆菌落、黏连菌落或条形菌落。
上述技术方案,是一种高效的菌落的分类方法,可以高效提取各种菌落,并根据需要对不同的菌落进行分类和统计计数,有效提高了菌落分类的精度。
本发明在一较佳示例中可以进一步配置为:当所述菌落分类网络为卷积神经网络时,所述卷积神经网络收集菌落数据,所述卷积神经网络具有残差网络结构,提取不同种类的菌落图像,统计不同种类的菌落数量,根据需求收集不同种类的菌落数据,将收集的菌落数据分为训练集、验证集和测试集,所述卷积神经网络通过所述训练集、验证集和测试集把菌落分类为圆形菌落、椭圆菌落、黏连菌落或条形菌落。
采用上述技术方案,基于局部阈值分割方法和卷积神经网络菌落分类方法的菌落图像分割分类框架,既可以达到较快的处理速度,也可以达到较优的效果。
本发明在一较佳示例中可以进一步配置为:所述卷积神经网络收集菌落数据,采用的卷积神经网络网络为残差网络结构,提取不同种类的菌落图像,统计不同种类的菌落数量,根据需求收集不同种类的菌落数据,并将收集的菌落数据分为训练集、验证集和测试集;
把所述训练集和验证集归一化为固定大小,并送入预先设计好的卷积神经网络进行训练和验证,根据训练情况和模型在测试集的表现情况,选择最优模型。
收集所述不同种类的菌落数据时,保持收集的各类菌落数据平衡。
采用上述技术方案,使用卷积神经网络分类和收集菌落数据,在复合菌落的分类和菌落黏连的情况下,都可以提高菌落分类的精度。
本发明在一较佳示例中可以进一步配置为:收集所述不同种类的菌落数据时,保持收集的各类菌落数据平衡。
采用上述技术方案,可以更好的训练卷积神经网络。
本发明在一较佳示例中可以进一步配置为:把所述训练集和验证集归一化为固定大小,并输入预先设计的卷积神经网络进行训练和验证,根据训练情况和模型在测试集的表现情况,选择分类模型。
采用上述技术方案,选择分类模型,可以达到更优的分类效果。
本发明在一较佳示例中可以进一步配置为:每类菌落的分类召回率:在测试集中,其中一种菌落实际有M i个,被正确分类的数量为m i个,则分 类召回率为m i/M i
每类菌落的分类准确率:在测试集中,其中分为一种菌落的数目有N i个,N i个菌落中实际属于该种菌落的数量为m i个,则分类准确率为m i/N i
采用上述技术方案,可以在菌落种类比较复杂的情况下,提高鲁棒性,达到更优的分类效果。
本发明在一较佳示例中可以进一步配置为:对整体测试集进行评估,并对每类菌落的召回率和准确率分别求均值:
Figure PCTCN2021120029-appb-000001
Figure PCTCN2021120029-appb-000002
其中,m i/M i为分类召回率,m i/N i为分类准确率,P recall为召回率的均值,P acc为准确率的均值。
采用上述技术方案,可以对每类菌落的测试集进行评估。
本发明在一较佳示例中可以进一步配置为:根据获取菌落的大小,设计合适的卷积神经网络(convolutional neural network,CNN)的网络深度。
采用上述技术方案,可以对各个类型菌落进行识别,可以统计培养皿中每种菌落的具体数量和大小,实现挑取菌落时的分类挑取
本发明在一较佳示例中可以进一步配置为:统计所述进行局部阈值分割后的菌落图像中菌落连通区域的个数,并统计每个所述菌落连通区域包含的像素个数,以统计每种菌落的个数和每个菌落的大小。
采用上述技术方案,当存在条形菌落或者菌落黏连的情况时,也可以较为精准的对菌落进行分类。
本发明在一较佳示例中可以进一步配置为:还包括:菌落连通区域复查,检查菌落连通区域的边界与所述菌落连通区域的周边菌落连通区域的距离,当所述距离小于预先设定的阈值d个像素,则表示所述菌落连通区域与周边菌落连通区域连通。
在上述技术方案中,所述d是两个菌落连通区域之间距离的阈值。
本发明在一较佳示例中可以进一步配置为:当根据菌落形态结构进行分类时,对各个所述菌落连通区域进行极限腐蚀,并判断进行所述极限腐蚀后的菌落连通区域内的种子点数量是否大于1,若是,则把所述菌落连通区域内的菌落分类为黏连菌落;否则,判断所述所述菌落连通区域内的菌落为圆形菌落,判断方法为:假设圆形菌落的圆心为C点,坐标为:
Figure PCTCN2021120029-appb-000003
则菌落连通区域轮廓的圆形方程为:
(x-x r) 2+(y-y r) 2=r 2
计算菌落轮廓上所有的点到圆心C的距离l i,当l i满足|r-l i|<ε时,则表示菌落轮廓近似为圆形,其中,
Figure PCTCN2021120029-appb-000004
i为正整数,i=1,2,3,…,计算l i的公式为:
Figure PCTCN2021120029-appb-000005
其中,l i为轮廓上所有的点到圆心C的距离,r是圆心为C的圆的半径,x r为圆心C点x轴坐标,y r为圆心C点y轴坐标,x为圆心为C的圆上某一个点的x轴坐标,y为圆心为C的圆上某一个点的y轴坐标,x i为菌落轮廓上某一个点的x轴坐标,y i为菌落轮廓上某一个点的y轴坐标;当菌落轮廓近似为圆形时,则把所述菌落分类为圆形菌落,否则,判断所述所述菌落连通区域内的菌落为椭圆菌落,判断方法为:若||PF 1|+|PF 2||-2a<∈,则所述菌落连通区域 为椭圆,把所述菌落连通区域内的菌落分类为椭圆菌落,其中,PF 1为所述菌落连通区域轮廓上的点P到椭圆的第一个焦点F 1的距离,PF 2为所述菌落连通区域轮廓上的点P到椭圆的第一个焦点F 2的距离,a为椭圆的半长轴,∈为常数,否则,判断所述菌落连通区域内的菌落是否为条形菌落,判断方法为:计算菌落轮廓上距离最远的两个点,记为点A(x 1,y 1)和点B(x 2,y 2),把点A(x 1,y 1)和点B(x 2,y 2)连接起来形成AB线段,画出并遍历菌落连通区域平面上与AB线段垂直的直线,获取一系列的交点对(x k,y k)和(x k+1,y k+1),其中,k为正整数,k∈(1,3,5,…),并计算每条垂直直线与连通区域的两个交点的距离d K,d K∈{d 1,d 3,d 5,…},计算{d 1,d 3,d 5,…}中两两之间的差值,若对于任意d K,若满足|d m-d n|<ε,则表示该菌落为条形菌落,d m和d n均为{d 1,d 3,d 5,…}中的任意一个d K,x k为垂直直线与连通区域的两个交点中一个交点的x轴坐标,y k为垂直直线与连通区域的两个交点中一个交点的y轴坐标,x k+1为垂直直线与连通区域的两个交点中另一个交点的x轴坐标,y k+1为垂直直线与连通区域的两个交点中另一个交点的y轴坐标。
采用上述技术方案,在菌落繁殖的过程中,不同种类的菌落会有不同的生长形态,因此,根据菌落形态进行菌落连通区域内的菌落进行分类,可以精准的对菌落进行分类。
综上所述,相对于现有技术,本发明具有至少如下的有益效果:
1、本申请采用局部阈值分割的方法对菌落图像进行分割,提取连通区域,并采用卷积神经网络对提取的连通区域图像进行分类,不再采用人工对菌落进行计数和识别,可以有效提高菌落的计数和识别精度,同时提高 了菌落分类的精度。
2、本申请的菌落分割与分类方法,在得到高精度的同时,还可以兼顾算法的处理速度,既可以达到较快的处理速度,同事也可以达到较优的分类效果。
3、在菌落繁衍的过程中,不同种类的菌落会有不同的生长形态,因此,根据菌落形态进行菌落连通区域内的菌落进行分类,可以精准的对菌落进行分类。
附图说明
图1是本申请的菌落的分类方法的整体流程图。
图2是本申请的菌落图像的原图。
图3是本申请的菌落图像的二值化图像。
图4是本申请的菌落图像提取的单个连通区域图像。
图5a是本申请的实施例一中每类菌落的分类方法的流程图。
图5b是本申请的实施例二中每类菌落的分类方法的流程图。
图6是本申请的圆形菌落的分类图。
图7是本申请的椭圆菌落的分类图。
图8是本申请的条形菌落的分类图。
具体实施方式
实施例一
以下结合附图对本发明作进一步详细说明。
如图1所示,一种菌落的分类方法,包括:
将采集到的菌落图像进行分割;
把经过分割后的所述菌落图像输入卷积神经网络;
根据需要分类的菌落种类,设置所述卷积神经网络中菌落分类的输出结果。
采用高分辨率相机对菌落进行图像采集,然后对菌落图像进行分割和提取,通过卷积神经网络对各个类型的菌落进行识别,并输出菌落分类的结果,以统计培养皿中每种菌落的数量和大小,实现挑取菌落时的分类挑取菌落,根据获取菌落的大小,设计卷积神经网络的网络深度。
所述将采集到的菌落图像进行分割的步骤,包括:
将采集到的菌落图像转化成灰度图像;菌落图像的原图像如图2所示。
对所述灰度图像进行局部阈值分割;
把所述灰度图像大于对应局部阈值的像素,设置为1,并把所述灰度图像小于局部阈值的像素设置为0;
如图3所示,对获取的二值图像采用腐蚀膨胀操作,去除噪点和毛刺;
对二值化图像进行连通区域分析,如图4所示,提取连通区域,并剔除过小区域和非菌落区域。
所述卷积神经网络收集菌落数据,采用的卷积神经网络网络为残差网络结构,提取不同种类的菌落图像,统计不同种类的菌落数量,根据需求收集不同种类的菌落数据,并将收集的菌落数据分为训练集、验证集和测试集;
如图5a所示,把所述训练集和验证集归一化为固定大小,并送入预先 设计好的卷积神经网络进行训练和验证,根据训练情况和模型在测试集的表现情况,选择最优模型。
收集所述不同种类的菌落数据时,保持收集的各类菌落数据平衡。
采用局部阈值分割方法对菌落图像进行分割,可以减少图像的处理时间,对于复合菌落的分类,由于复合菌落中菌落的大小形状不一,且当存在菌落黏连的情况时,形成的黏连菌落更会存在各种形状,一般的分类方法在复杂情况下鲁棒性差,无法达到较优的分类效果,对圆形、椭圆形等特定形状的菌落且菌落分布较稀疏的情况表现较优,当存在条形菌落,或者菌落黏连的情况时,检测框无法框住单一连通区域,而本实施例中的上述分类方法对菌落数据进行采集,并对采集的菌落数据进行训练和验证,通过模型对复杂菌落进行分类,提高了复杂菌落分类的精确性。
统计所述分割处理后的菌落图像中每种像素值对应的连通区域的个数,并统计每个所述连通区域包含的像素个数,以统计每种菌落的个数和每个菌落的大小,并提取连通区域的方法进行优化。
每类菌落的分类召回率:在测试集中,其中,该种菌落实际有M i个,其中被正确分类的数量为m i,召回率为m i/M i
每类菌落的分类准确率:在测试集中,其中分为该种菌落的数目有N i个,但N i个菌落中实际属于该种菌落的数量为m i,准确率为m i/N i
整体菌落的分类方法:
每类的召回率、准确率分别求均值。
Figure PCTCN2021120029-appb-000006
Figure PCTCN2021120029-appb-000007
其中,m i/M i为分类召回率,m i/N i为分类准确率,P recall为召回率的均值,P acc为准确率的均值。
实施例二
根据不同菌落的种类,菌落分为黏连菌落、圆形菌落、椭圆形菌落和条形菌落这4种菌落。
与实施例一不同的是,实施例一中采用卷积神经网络对获取的菌落连通区域进行分类,本实施例中根据菌落的形态结构的不同进行分类,如图5b所示。
对圆形、椭圆、条形和黏连菌落进行分类,根据菌落的二值化图像,记录每个连通区域的轮廓。比较计算轮廓上距离最远的点,记为点A(x 1,y 1)、B(x 2,y 2),且轮廓上点的最远距离为dmax。计算一个独立的整幅菌落图像轮廓上最远两个点之间的连线与x轴的夹角为:
Figure PCTCN2021120029-appb-000008
其中,θ为一个独立的整幅菌落图像轮廓上最远两个点之间的连线与x轴的夹角,x 1为A点的x轴坐标,x 2为B点的x轴坐标,y 1为A点的y轴坐标,y 2为B点的y轴坐标,A(x 1,y 1)为A点的坐标,B(x 2,y 2)为B点的坐标。
黏连菌落的分类方法:
对各个连通区域采用极限腐蚀的方法,极限腐蚀后的连通区域若存在2个或2个以上的种子点,则为黏连菌落。
圆形菌落的分类方法:
如图6所示,假设圆心为C点,坐标为:
Figure PCTCN2021120029-appb-000009
则该连通区域轮廓的圆形方程为:
(x-x r) 2+(y-y r) 2=r 2
计算菌落轮廓上所有的点到圆心C的距离l i,当l i满足|r-l i|<ε时,则表示该菌落轮廓近似为圆形,其中,
Figure PCTCN2021120029-appb-000010
i为正整数,i=1,2,3,…,计算l i的公式为:
Figure PCTCN2021120029-appb-000011
其中,l i为轮廓上所有的点到圆心C的距离,r是圆心为C的圆的半径,x r为圆心C点x轴坐标,y r为圆心C点y轴坐标,x为圆心为C的圆上某一个点的x轴坐标,y为圆心为C的圆上某一个点的y轴坐标,x i为菌落轮廓上某一个点的x轴坐标,y i为菌落轮廓上某一个点的y轴坐标。
椭圆菌落的分类方法:
椭圆的定义为:平面内与两定点F 1、F 2的距离的和等于常数2a(其中,2a>|F 1F 2|)的动点P的轨迹叫做椭圆。即:其中两定点F 1、F 2叫做椭圆的焦点,两焦点的距离|F 1F 2|=2c<2a叫做椭圆的焦距。P为椭圆的动点,椭圆截与两焦点连线重合的直线所得的弦为长轴,长为2a,椭圆上垂直平分两焦点连线的直线所得弦为短轴,长为2b。
由以上椭圆的定义可知:AB线段为椭圆的长轴,则椭圆的半长轴
Figure PCTCN2021120029-appb-000012
Figure PCTCN2021120029-appb-000013
与AB线段垂直且过点
Figure PCTCN2021120029-appb-000014
的直线与椭圆相交,形成两个交点,该两个交点中的一个交点的坐标设置为(x 3,y 3),该两个交点中的另一个交点的坐标设置为(x 4,y 4),则椭圆的半短轴
Figure PCTCN2021120029-appb-000015
Figure PCTCN2021120029-appb-000016
焦距
Figure PCTCN2021120029-appb-000017
如图6所示,AB线段由AF 1、F 1F 2和F 2B组成,根据AF 1、F 1F 2和F 2B这三个线段长度的比例关系,可以 计算出F 1和F 2的坐标分别为:
Figure PCTCN2021120029-appb-000018
Figure PCTCN2021120029-appb-000019
Figure PCTCN2021120029-appb-000020
由连通区域轮廓上的每一点P到两个焦点F 1、F 2的距离之和满足下式,若||PF 1|+|PF 2||-2a<∈,则表示该连通区域为椭圆,如图7所示,其中,c为焦距,∈为常数(某一个极小值),a为椭圆的半长轴,b为椭圆的半短轴,x 3为两个交点中的一个交点的x轴坐标,y 3为两个交点中的一个交点的y轴坐标,x 4为两个交点中的另一个交点的x轴坐标,y 4为两个交点中的另一个交点的y轴坐标,PF 1为连通区域轮廓上的点到焦点F 1的距离,PF 2为连通区域轮廓上的点到焦点F 2的距离。
如图8所示,为条形菌落的分类方法图:
画出并遍历菌落连通区域平面上与AB线段垂直的直线,获取一系列的交点对(x k,y k)和(x k+1,y k+1),其中,k为正整数,k∈(1,3,5,…),并计算每条垂直直线与连通区域的两个交点的距离d K,d K∈{d 1,d 3,d 5,…},计算{d 1,d 3,d 5,…}中两两之间的差值,若对于任意d K,若满足|d m-d n|<ε,则表示该菌落为条形菌落,d m和d n均为{d 1,d 3,d 5,…}中的任意一个d K,x k为垂直直线与连通区域的两个交点中一个交点的x轴坐标,y k为垂直直线与连通区域的两个交点中一个交点的y轴坐标,x k+1为垂直直线与连通区域的两个交点中另一个交点的x轴坐标,y k+1为垂直直线与连通区域的两个交点中另一个交点的y轴坐标。
实施例三
与实施例一和实施例二不同的是,在本实施例中,将高分辨率的菌落图像输入Unet分割网络,根据需要分类的菌落种类,设置所述Unet分割网络中菌落分类的输出结果。
所述Unet分割网络可以对高分辨率图像分块处理,把每块高分辨率图像输入Unet分割网络,并对每块高分辨率图像进行语义分割分类,在对菌落图像分割的同时也可以实现多种菌落分类,即只用一个网络即可实现,具体处理方法如下:
(1)对输入的高分辨率图像分块;
(2)分块输入Unet分割网络进行推理;
(3)对获取的各个分割图像,统计每种像素值对用的连通区域的个数,以及每个连通区域包含的像素个数,即通过Unet分割网络对高分辨率的菌落图像进行处理后,根据不同类别的菌落,采用不同的序号或者标记对不同类别菌落所在的像素进行标记,便于后续进行识别或者提取。
将Unet分割网络应用于菌落挑取,Unet分割网络把提取的低级特征和高级语义信息进行融合,Unet分割网络尤其适用于结构固定和语义信息没有那么丰富的菌落图像。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围,均应包含在本发明 的保护范围之内。

Claims (10)

  1. 一种菌落的分类方法,其特征在于,包括:
    将输入的菌落图像转化成灰度图像;
    对所述灰度图像进行局部阈值分割,把所述灰度图像大于对应局部阈值的像素,设置为1,并把所述灰度图像小于局部阈值的像素设置为0,以生成二值化图像;
    对所述二值化图像采用腐蚀膨胀操作,并进行形态学处理,去除噪点和毛刺;
    对所述二值化图像进行连通区域分析,以提取菌落连通区域,剔除非菌落区域;
    当所述菌落连通区域中包含的像素大于像素个数阈值T时,把所述二值化图像输入菌落分类网络或者根据菌落形态结构进行分类,得菌落分类结果,其中,所述菌落形态结构包括圆形菌落、椭圆菌落、黏连菌落或条形菌落。
  2. 根据权利要求1所述菌落的分类方法,其特征在于,还包括:
    当所述菌落分类网络为卷积神经网络时,所述卷积神经网络收集菌落数据,所述卷积神经网络提取不同种类的菌落图像,统计不同种类的菌落数量,根据需求收集不同种类的菌落数据,并将收集的菌落数据分为训练集、验证集和测试集,所述卷积神经网络通过所述训练集、验证集和测试集,把菌落分类为圆形菌落、椭圆菌落、黏连菌落或条形菌落。
  3. 根据权利要求2所述菌落的分类方法,其特征在于,还包括:收集所述不同种类的菌落数据时,保持收集的各类菌落数据的平衡。
  4. 根据权利要求2所述菌落的分类方法,其特征在于,包括:把所述 训练集和验证集归一化为固定大小,并输入预先设计的卷积神经网络进行训练和验证,根据训练情况和模型在测试集的表现情况,选择分类模型。
  5. 根据权利要求4所述菌落的分类方法,其特征在于,还包括:
    每类菌落的分类召回率:在测试集中,其中一种菌落实际有M i个,被正确分类的数量为m i个,则分类召回率为m i/M i
    每类菌落的分类准确率:在测试集中,其中分为一种菌落的数目有N i个,N i个菌落中实际属于该种菌落的数量为m i个,则分类准确率为m i/N i
  6. 根据权利要求4所述菌落的分类方法,其特征在于,还包括:对整体测试集进行评估,并对每类菌落的召回率和准确率分别求均值:
    Figure PCTCN2021120029-appb-100001
    Figure PCTCN2021120029-appb-100002
    其中,m i/M i为分类召回率,m i/N i为分类准确率,P recall为召回率的均值,P acc为准确率的均值。
  7. 根据权利要求1所述菌落的分类方法,其特征在于,还包括:根据获取所述菌落的大小、菌落分类结果和菌落分类结果中菌落类型的数量,设计卷积神经网络的网络深度。
  8. 根据权利要求1所述菌落的分类方法,其特征在于,还包括:统计所述进行局部阈值分割后的菌落图像中菌落连通区域的个数,并统计每个所述菌落连通区域包含的像素个数,以统计每种菌落的个数和每个菌落的大小。
  9. 根据权利要求1所述菌落的分类方法,其特征在于,还包括:
    菌落连通区域复查,检查菌落连通区域的边界与所述菌落连通区域的周边菌落连通区域的距离,当所述距离小于预先设定的阈值d个像素,则表示所述菌落连通区域与周边菌落连通区域连通。
  10. 根据权利要求1所述菌落的分类方法,其特征在于,还包括:当根据菌落形态结构进行分类时,对所述菌落连通区域进行极限腐蚀,并判断进行所述极限腐蚀后的菌落连通区域内的种子点数量是否大于1,若是,则把所述菌落连通区域内的菌落分类为黏连菌落;否则,判断所述菌落连通区域内的菌落为圆形菌落,判断方法为:假设圆形菌落的圆心为C点,坐标为:
    Figure PCTCN2021120029-appb-100003
    则菌落连通区域轮廓的圆形方程为:
    (x-x r) 2+(y-y r) 2=r 2
    计算菌落连通区域的轮廓上所有的点到圆心C的距离l i,当距离l i满足:|r-l i|<ε时,则表示菌落轮廓近似为圆形;
    其中,
    Figure PCTCN2021120029-appb-100004
    i为正整数,i=1,2,3,…,计算距离l i的公式为:
    Figure PCTCN2021120029-appb-100005
    l i为轮廓上所有的点到圆心C的距离,r是圆心为C的圆的半径,x r为圆心C点的x轴坐标,y r为圆心C点的y轴坐标,x为圆心为C的圆上某一个点的x轴坐标,y为圆心为C的圆上某一个点的y轴坐标,x i为菌落轮廓上某一个点的x轴坐标,y i为菌落轮廓上某一个点的y轴坐标;当菌落轮廓近似为圆形时,则把所述菌落分类为圆形菌落,否则,判断所述菌落连通区域内的菌落为椭圆菌落,判断方法为:若||PF 1|+|PF 2||-2a<ε,则所述菌落连通区域为椭圆,把 所述菌落连通区域内的菌落分类为椭圆菌落,其中,PF 1为所述菌落连通区域轮廓上的点P到椭圆的第一个焦点F 1的距离,PF 2为所述菌落连通区域轮廓上的点P到椭圆的第一个焦点F 2的距离,a为椭圆的半长轴,ε为常数,否则,判断所述菌落连通区域内的菌落是否为条形菌落,判断方法为:计算菌落轮廓上距离最远的两个点,记为点A(x 1,y 1)和点B(x 2,y 2),把点A(x 1,y 1)和点B(x 2,y 2)连接起来形成AB线段,画出并遍历菌落连通区域平面上与AB线段垂直的直线,获取一系列的交点对(x k,y k)和(x k+1,y k+1),其中,k为正整数,k∈(1,3,5,…),并计算每条垂直直线与连通区域的两个交点的距离d K,d K∈{d 1,d 3,d 5,…},计算{d 1,d 3,d 5,…}中两两之间的差值,若对于任意d K,若满足|d m-d n|<ε,则表示该菌落为条形菌落,d m和d n均为{d 1,d 3,d 5,…}中的任意一个d K,x k为垂直直线与连通区域的两个交点中一个交点的x轴坐标,y k为垂直直线与连通区域的两个交点中一个交点的y轴坐标,x k+1为垂直直线与连通区域的两个交点中另一个交点的x轴坐标,y k+1为垂直直线与连通区域的两个交点中另一个交点的y轴坐标。
PCT/CN2021/120029 2021-09-24 2021-09-24 一种菌落的分类方法 WO2023044690A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/120029 WO2023044690A1 (zh) 2021-09-24 2021-09-24 一种菌落的分类方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/120029 WO2023044690A1 (zh) 2021-09-24 2021-09-24 一种菌落的分类方法

Publications (1)

Publication Number Publication Date
WO2023044690A1 true WO2023044690A1 (zh) 2023-03-30

Family

ID=85719132

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/120029 WO2023044690A1 (zh) 2021-09-24 2021-09-24 一种菌落的分类方法

Country Status (1)

Country Link
WO (1) WO2023044690A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9719017D0 (en) * 1997-09-05 1997-11-12 Campbell Colin An automated procedure for the identification of tubercle bacilli from clinical specimens
JP2017035042A (ja) * 2015-08-11 2017-02-16 大日本印刷株式会社 コロニー検出システム、コロニー検出方法、及び、プログラム
CN109614856A (zh) * 2018-10-31 2019-04-12 西安理工大学 基于卷积神经网络的真菌图像分类方法
CN111178173A (zh) * 2019-12-14 2020-05-19 杭州电子科技大学 一种目标菌落生长特征识别方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9719017D0 (en) * 1997-09-05 1997-11-12 Campbell Colin An automated procedure for the identification of tubercle bacilli from clinical specimens
JP2017035042A (ja) * 2015-08-11 2017-02-16 大日本印刷株式会社 コロニー検出システム、コロニー検出方法、及び、プログラム
CN109614856A (zh) * 2018-10-31 2019-04-12 西安理工大学 基于卷积神经网络的真菌图像分类方法
CN111178173A (zh) * 2019-12-14 2020-05-19 杭州电子科技大学 一种目标菌落生长特征识别方法

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HUANG LEI, WU TONG: "Novel neural network application for bacterial colony classification", THEORETICAL BIOLOGY AND MEDICAL MODELLING, vol. 15, no. 1, 1 December 2018 (2018-12-01), XP055793321, DOI: 10.1186/s12976-018-0093-x *
PATEL SANSKRUTI: "Bacterial Colony Classification Using Atrous Convolution with Transfer Learning", ANNALS OF THE ROMANIAN SOCIETY FOR CELL BIOLOGY, ARAD, vol. 25, no. 4, 30 April 2021 (2021-04-30), Arad, pages 1428 - 1441, XP093055460, ISSN: 2067-3019 *
YU HUI, PEIPEI DU, XIANG LIU, ZHENG LIU, XIANFENG ZHU, YUZHEN CAO: "Intelligent Classification and Identification of Composite Colonies Based on Convolutional Neural Network", ZHONGGUO SHENGWU YIXUE GONGCHENG XUEBAO - CHINESE JOURNAL OF BIOMEDICAL ENGINEERING, ZHONGGUO SHENGWU YIXUE GONGCHENG XUEHUI, CHINA, vol. 39, no. 1, 29 February 2020 (2020-02-29), CHINA , pages 36 - 32, XP093055465, ISSN: 0258-8021, DOI: 10.3969/j.issn.0258-8021.2020.01.04 *

Similar Documents

Publication Publication Date Title
WO2018119668A1 (zh) 一种行人头部识别方法及系统
CN104778470B (zh) 基于组件树和霍夫森林的文字检测和识别方法
CN110866430B (zh) 一种车牌识别方法及装置
CN102637258B (zh) 一种建立在线表面质量检测系统缺陷库的方法
CN112016605B (zh) 一种基于边界框角点对齐和边界匹配的目标检测方法
CN104952073B (zh) 基于深度学习的镜头边缘检测方法
WO2018076392A1 (zh) 一种基于人体头顶部识别的行人统计方法及装置
CN106529532A (zh) 一种基于积分特征通道与灰度投影的车牌识别系统
CN110070090A (zh) 一种基于手写文字识别的物流标签信息检测方法及系统
CN108828608B (zh) 车辆检测方法中激光雷达背景数据滤除方法
CN110400287B (zh) 结直肠癌ihc染色图像肿瘤侵袭边缘和中心的检测系统及方法
CN111598175B (zh) 一种基于在线难例挖掘方式的检测器训练优化方法
CN108509950B (zh) 基于概率特征加权融合的铁路接触网支柱号牌检测识别法
Maji et al. An automated method for counting and characterizing red blood cells using mathematical morphology
CN113240623A (zh) 一种路面病害检测方法及装置
CN113870202A (zh) 一种基于深度学习技术的远端芯片缺陷检测系统
CN113221956A (zh) 基于改进的多尺度深度模型的目标识别方法及装置
Çavdaroğlu et al. A character segmentation method to increase character recognition accuracy for Turkish number plates
CN109543498A (zh) 一种基于多任务网络的车道线检测方法
WO2023044690A1 (zh) 一种菌落的分类方法
CN114066924A (zh) 一种菌落的分类方法
CN111723673A (zh) 一种基于计算机视觉的智能高铁人数统计方法
CN106683257A (zh) 冠字号定位方法及装置
CN111145197A (zh) 一种精确的基于直方图和局部梯度的道岔转辙机缺口边缘定位方法
CN114513473B (zh) 一种流量类别检测方法、装置及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21957826

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE