CN111652317B - Super-parameter image segmentation method based on Bayes deep learning - Google Patents
Super-parameter image segmentation method based on Bayes deep learning Download PDFInfo
- Publication number
- CN111652317B CN111652317B CN202010501892.9A CN202010501892A CN111652317B CN 111652317 B CN111652317 B CN 111652317B CN 202010501892 A CN202010501892 A CN 202010501892A CN 111652317 B CN111652317 B CN 111652317B
- Authority
- CN
- China
- Prior art keywords
- target
- image
- feature
- edge
- probability
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
- G06F18/24155—Bayesian classification
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V10/267—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Multimedia (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Probability & Statistics with Applications (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及机器学习技术领域,具体涉及一种基于贝叶斯深度学习的超参数图像分割方法。The invention relates to the technical field of machine learning, in particular to a hyperparameter image segmentation method based on Bayesian deep learning.
背景技术Background technique
在计算机视觉领域,图像分割指的是为图像中的每个像素分配一个标签的任务,它也可以被看作是像素分类。和使用矩形候选框的目标检测不同,图像分割需要精确到像素级位置,因此它在医学分析、卫星图像物体检测、虹膜识别和自动驾驶汽车等任务中起着非常重要的作用。In computer vision, image segmentation refers to the task of assigning a label to each pixel in an image, which can also be viewed as pixel classification. Unlike object detection using rectangular candidate boxes, image segmentation needs to be accurate to pixel-level locations, so it plays a very important role in tasks such as medical analysis, satellite image object detection, iris recognition, and self-driving cars.
人类识别目标更多的是依靠经验来区分目标,而深度学习是通过构建卷积神经网络,依靠训练提取目标特征,进而识别目标。传统的目标识别方法的识别结果往往是一些事先定义好的某个类别的物体,比如人脸、车辆等,而一幅图像中包含的内容远远不止一些相互独立的物体,还包含了多个物体及物体的属性、空间关系、逻辑关系等信息,这些信息不能够只用一些类标签进行描述,而是需要使用自然语言进行描述。任何一个数学模型都难以满足所有的目标识别,因此形成了诸多的条件分类识别,导致深度学习的跨域融合识别效率不高。Humans recognize targets more by relying on experience to distinguish targets, while deep learning is to build a convolutional neural network, rely on training to extract target features, and then identify targets. The recognition results of traditional target recognition methods are often some pre-defined objects of a certain category, such as faces, vehicles, etc., and the content contained in an image is far more than some independent objects. It also contains multiple Objects and their attributes, spatial relationships, logical relationships and other information, these information cannot be described with only some class labels, but need to be described in natural language. It is difficult for any mathematical model to satisfy all target recognition, so many conditional classification and recognition are formed, resulting in low efficiency of deep learning cross-domain fusion recognition.
像素级图像分割是人工智能领域的研究热点,它是一个涉及到图像处理、模式识别、视觉感知和心理认知等多个学科的数学建模问题。人类自身在长期的进化和学习过程中依靠经验识别目标是件非常容易的事,但是依靠机器从复杂的背景中自动识别目标,需要复杂的数学建模来实现,因此选择识别模型和超参数优化就显得有为重要。深度学习的超参数存在选取困难、没有规律性的特点,而且不同超参数之间存在无法预知的影响,其调试非常耗时,每个超参组合的评估需要进行大量的迭代计算。针对此类问题,经典的一些优化算法:如粒子群算法、模拟退火算法、局部搜索算法等已不再适用。有研究者提出采用代理模型的方法,通过仿真目标函数的估计值,以降低该类问题的评估代价。但无论采用门特卡洛算法还是强化学习领域中提出的自适应模拟算法,学习过程总是耗时的,而且仅限于在某个条件下或某个领域内,精度难以保证,很难实现跨界融合。Pixel-level image segmentation is a research hotspot in the field of artificial intelligence. It is a mathematical modeling problem involving multiple disciplines such as image processing, pattern recognition, visual perception and psychological cognition. It is very easy for human beings to rely on experience to identify targets in the long-term evolution and learning process, but relying on machines to automatically identify targets from complex backgrounds requires complex mathematical modeling to achieve, so the identification model and hyperparameter optimization are selected appears to be important. The selection of hyperparameters in deep learning is difficult and irregular, and there are unpredictable effects between different hyperparameters. Its debugging is very time-consuming, and the evaluation of each hyperparameter combination requires a large number of iterative calculations. For such problems, some classic optimization algorithms such as particle swarm optimization algorithm, simulated annealing algorithm, local search algorithm, etc. are no longer applicable. Some researchers have proposed the method of using a proxy model to reduce the evaluation cost of this type of problem by simulating the estimated value of the objective function. However, no matter using the Monte Carlo algorithm or the adaptive simulation algorithm proposed in the field of reinforcement learning, the learning process is always time-consuming, and it is limited to a certain condition or field, and the accuracy is difficult to guarantee, and it is difficult to achieve cross- world fusion.
发明内容Contents of the invention
本发明提供一种基于贝叶斯深度学习的超参数图像分割方法,以解决现有的图像分割中超参数的提取计算量大且精度低的技术问题。The present invention provides a hyperparameter image segmentation method based on Bayesian deep learning to solve the existing technical problems of large amount of calculation and low precision in the extraction of hyperparameters in image segmentation.
为解决上述技术问题,本发明采用如下技术方案:In order to solve the problems of the technologies described above, the present invention adopts the following technical solutions:
设计一种基于贝叶斯深度学习的超参数图像分割方法,包括:Design a hyperparameter image segmentation method based on Bayesian deep learning, including:
步骤1:数据预处理,将图像中的数据元素正则化处理,生成图像分割类数据集;Step 1: Data preprocessing, normalize the data elements in the image, and generate an image segmentation data set;
步骤2:对图像利用高斯掩码提取目标边缘特征;Step 2: Use Gaussian mask to extract target edge features on the image;
步骤3:利用贝叶斯估计,通过目标边缘特征提取图像的边界框和目标掩膜;Step 3: Using Bayesian estimation, extract the bounding box and target mask of the image through the target edge feature;
步骤4:将边界框及目标掩膜放入特征字典中进行对比,即可获得图像中各目标的类别;Step 4: Put the bounding box and the target mask into the feature dictionary for comparison, and then the category of each target in the image can be obtained;
特征字典的构建方法如下:The construction method of the feature dictionary is as follows:
(1)建立图像的训练集和测试集;(1) set up a training set and a test set of images;
(2)对训练集中的每个图像进行上述步骤1-3中的操作,获取其边界框和目标掩膜;(2) Perform the operations in the above steps 1-3 for each image in the training set to obtain its bounding box and target mask;
(3)汇集(2)中的边界框和目标掩膜,即可得到由其组成的特征字典;(3) Collect the bounding boxes and target masks in (2) to obtain a feature dictionary composed of them;
(4)将测试集输入(3)中的特征字典,查看得到的特征字典的准确率,如果准确率不符合要求,则调整模型的参数重新训练,直至特征字典的准确率达到要求。(4) Input the test set into the feature dictionary in (3), and check the accuracy rate of the obtained feature dictionary. If the accuracy rate does not meet the requirements, adjust the parameters of the model and retrain until the accuracy rate of the feature dictionary meets the requirements.
进一步的,在步骤1中,图像分割类数据集包含N个目标分割类属性和每个目标类的M个数据属性,当N个类属性概率与M个数据属性概率最大时,采用贝叶斯分类匹配器,选中目标并对图像进行分割;所用的软件是python,框架采用tensorflow。Further, in step 1, the image segmentation data set contains N target segmentation class attributes and M data attributes of each target class. When the probability of N class attributes and M data attributes is the largest, Bayesian Classification matcher, select the target and segment the image; the software used is python, and the framework adopts tensorflow.
进一步的,在步骤2中,提取目标边缘特征的具体步骤为:Further, in step 2, the specific steps of extracting target edge features are:
第一步:设图像像素f(x,y)边缘概率满足高斯分布,则其二维高斯函数为:Step 1: Suppose the edge probability of the image pixel f(x,y) satisfies the Gaussian distribution, then its two-dimensional Gaussian function is:
第二步:对上述图像的x,y方向求梯度函数:The second step: Find the gradient function for the x and y directions of the above image:
第三步:对图像数据集进行卷积:Step 3: Convolve the image dataset:
第四步:计算图像目标边缘概率密度分布,即目标边缘特征:Step 4: Calculate the image target edge probability density distribution, that is, the target edge features:
进一步的,在步骤2中,在提取目标类别标签前,计算目标出现的先验概率:Further, in step 2, before extracting the target category label, calculate the prior probability of the target appearing:
其中,Ci为C类目标集(C1、C2、C3...Cn)中的任一元素,Ni代表目标出现的次数,N代表目标集的总量。Among them, C i is any element in the target set of type C (C 1 , C 2 , C 3 . . . C n ), N i represents the number of occurrences of the target, and N represents the total amount of the target set.
进一步的,在步骤2中,在提取目标类别标签的过程中,计算目标出现的条件概率:Further, in step 2, in the process of extracting the target category label, the conditional probability of the target appearance is calculated:
其中,xa代表目标点横坐标,ya代表目标点纵坐标坐标。P(xa)、P(ya)代表目标边缘特征概率。Among them, x a represents the abscissa of the target point, and y a represents the ordinate of the target point. P(x a ), P(y a ) represent the target edge feature probability.
进一步的,在步骤3中,提取图像的边界框和目标掩膜的具体步骤为:Further, in step 3, the specific steps of extracting the bounding box and target mask of the image are:
(1)通过学习提取到的目标边界特征,得到图像的目标区域以及区域中每个像素的分类权重;(1) Obtain the target area of the image and the classification weight of each pixel in the area by learning the extracted target boundary features;
(2)得到图像的目标区域以后,将每个目标区域的内部和外部特征图组合成两张完整的特征图,然后同步进行图像分割和图像分类两个分支数据集D1,D2;(2) After obtaining the target area of the image, combine the internal and external feature maps of each target area into two complete feature maps, and then perform image segmentation and image classification two branch data sets D1 and D2 simultaneously;
(3)在图像分割中,使用贝叶斯分类器对目标区域的内部和外部特征图进行分类,以区分图像中的前景和背景并生成掩膜;(3) In image segmentation, a Bayesian classifier is used to classify the inner and outer feature maps of the target region to distinguish the foreground and background in the image and generate a mask;
(4)在图像分类中,在两类特征图中按像素概率分布取最大值,得到一张新的特征图,再使用最大似然估计分类器得到目标区内物体的类别。(4) In image classification, take the maximum value according to the pixel probability distribution in the two types of feature maps to obtain a new feature map, and then use the maximum likelihood estimation classifier to obtain the object category in the target area.
进一步的,在步骤4中,将边界框及目标掩膜和特征字典进行对比的方法为:首先用L2正则算子计算边界框和目标掩膜各自和特征字典的相似度权重,然后相似度高斯过程,提取目标边缘特征数据集,经过贝叶斯分类匹配,即可得到语义分割结果。Further, in step 4, the method of comparing the bounding box and the target mask with the feature dictionary is as follows: first, use the L2 regular operator to calculate the similarity weights of the bounding box and the target mask and the feature dictionary respectively, and then the similarity Gaussian The process extracts the target edge feature data set, and after Bayesian classification matching, the semantic segmentation result can be obtained.
进一步的,在语义分割结果输出之前,先计算边高斯超参数函数,然后根据分值大小,计算目标匹配度,超参数集越优,得到语义分割的精准度分值就越高。Furthermore, before the output of the semantic segmentation results, the edge Gaussian hyperparameter function is calculated first, and then the target matching degree is calculated according to the score. The better the hyperparameter set, the higher the accuracy score of the semantic segmentation.
进一步的,图像的训练集包括Open Images V4检测集,其含有190万张图片以及图片上针对600个类别的1540万个边框盒。Further, the training set of images includes the Open Images V4 detection set, which contains 1.9 million images and 15.4 million bounding boxes for 600 categories on the images.
与现有技术相比,本发明的有益技术效果在于:Compared with the prior art, the beneficial technical effect of the present invention is:
本发明主要是利用贝叶斯公式,python语言,tensorflow框架,根据图像边缘特征高斯过程后,边缘特征突起处陡峭的原理,对图像进行像素预处理,并对整个图像进行高斯过程,获取边缘特征数据集,然后利用L2准则对数据集预处理,再针对基于语义识别的图像目标分割需求,将贝叶斯估计模型用于图像目标边缘特征识别,并结合深度学习构建基于语义识别的图像目标边缘特征数据字典,将训练好的模型应用于复杂目标识别系统,提高了目标识别的效率与精度。The present invention mainly utilizes Bayesian formula, python language, tensorflow framework, according to the principle that after the Gaussian process of the edge feature of the image, the protrusion of the edge feature is steep, performs pixel preprocessing on the image, and performs a Gaussian process on the entire image to obtain the edge feature Data set, and then use the L2 criterion to preprocess the data set, and then according to the image target segmentation requirements based on semantic recognition, use the Bayesian estimation model for image target edge feature recognition, and combine deep learning to construct image target edge based on semantic recognition The feature data dictionary applies the trained model to the complex target recognition system, improving the efficiency and accuracy of target recognition.
附图说明Description of drawings
图1为本发明基于贝叶斯深度学习的超参数图像分割方法的流程图。Fig. 1 is the flow chart of the hyperparameter image segmentation method based on Bayesian deep learning of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例来说明本发明的具体实施方式,但以下实施例只是用来详细说明本发明,并不以任何方式限制本发明的范围。The specific implementation of the present invention will be described below in conjunction with the accompanying drawings and examples, but the following examples are only used to describe the present invention in detail, and do not limit the scope of the present invention in any way.
以下实施例中所涉及或依赖的程序均为本技术领域的常规程序或简单程序,本领域技术人员均能根据具体应用场景做出常规选择或者适应性调整。The programs involved or relied on in the following embodiments are conventional programs or simple programs in the technical field, and those skilled in the art can make conventional selections or adaptive adjustments according to specific application scenarios.
实施例1:一种基于贝叶斯深度学习的超参数图像分割方法,参见图1,其整体步骤为:选择图像训练集,对图像信息进行高斯过程,采用L2正则算子对数据集进行预处理,获取图像轮廓边缘特征,并构建目标特征边缘特征识别训练集,根据贝叶斯定理对数据集进行分类,并设定基于语义识别的图像目标边缘分割标签,进一步采用高斯过程,提取目标边缘特征数据集,并计算目标集边缘特征高斯超参数集,依据数据集计算目标边缘后验概率,并取最大后验概率,作为基于语义的目标图像分割与识别概率,再经过贝叶斯分值匹配,分值高于90即认为识别正确,否则采用深度学习和0.618系数调整高斯和超参数重新进行高斯过程训练,直到获得超优参数。本发明最终结果可以实现:输入图像和目标标签到模型中进行图像目标分割,目标可以与相应的背景分离出来。即,对于训练好的模型,给定一个图像以及要查询的目标信息,从图像中即可检测出相应目标。Embodiment 1: A hyperparameter image segmentation method based on Bayesian deep learning, see Fig. 1, its overall steps are: select image training set, carry out Gaussian process to image information, adopt L2 regular operator to carry out pre-processing to data set Processing, obtaining image contour edge features, and constructing target feature edge feature recognition training set, classifying the data set according to Bayesian theorem, and setting image target edge segmentation labels based on semantic recognition, and further using Gaussian process to extract target edges Feature data set, and calculate the target set edge feature Gauss hyperparameter set, calculate the target edge posterior probability according to the data set, and take the maximum posterior probability as the target image segmentation and recognition probability based on semantics, and then pass the Bayesian score Matching, if the score is higher than 90, the recognition is considered correct, otherwise, Gaussian and hyperparameters are adjusted by deep learning and 0.618 coefficients, and Gaussian process training is performed again until super-optimal parameters are obtained. The final result of the present invention can be achieved: input images and target labels into the model for image target segmentation, and the target can be separated from the corresponding background. That is, for a trained model, given an image and the target information to be queried, the corresponding target can be detected from the image.
上述特征字典的制作方法如下:The method of making the above feature dictionary is as follows:
(1)数据预处理(1) Data preprocessing
将图像中的数据元素正则化处理,生成图像分割类数据集。该数据集包含N个目标分割类属性和代表每个目标类M个数据属性,当N个类属性概率与M个数据属性概率最大时,采用该模型,对图像按照目标边缘轮廓进行分割。具体实现利用Python语言,在人工智能tensorflow框架下实现。Regularize the data elements in the image to generate an image segmentation dataset. The data set contains N target segmentation class attributes and M data attributes representing each target class. When the probability of N class attributes and M data attribute probabilities are the largest, the model is used to segment the image according to the target edge contour. The specific implementation uses the Python language and is implemented under the artificial intelligence tensorflow framework.
(2)提取目标边缘特征(2) Extract target edge features
主要通过高斯变换提取目标超边缘参数特征,主要提取的特征如下:Mainly through the Gaussian transformation to extract the target super-edge parameter features, the main extracted features are as follows:
1.目标图像边缘像素灰度跃变;1. The gray level of the edge pixel of the target image jumps;
2.目标不同材质、纹理、颜色和亮度之间的像素分界线产生跃变;2. The pixel boundary between different materials, textures, colors and brightness of the target changes abruptly;
3.目标轮廓线与背景具有不同的反射特性,也会形成像素值跃变;3. The target contour line and the background have different reflection characteristics, which will also cause a jump in the pixel value;
4.目标受到光照会形成阴影,这也会形成像素间灰度值跃变。4. When the target is illuminated, it will form a shadow, which will also cause a jump in the gray value between pixels.
对上述属性进行计算,包括:对图像f(x,y)采用高斯掩码边缘特征提取算法,其特征在于:根据图像目标边缘数据跃变,概率密度变化大的特征,选择合适的高斯掩码,以计算像素点邻域内最大值为依据,获取数据集概率密度高的位置,即为边缘像素点。Calculating the above attributes includes: using a Gaussian mask edge feature extraction algorithm for the image f(x, y), which is characterized in that: according to the feature of the edge data jump of the image target and the feature with a large probability density change, an appropriate Gaussian mask is selected , based on the calculation of the maximum value in the neighborhood of the pixel point, the position with high probability density of the data set is obtained, which is the edge pixel point.
具体过程如下:The specific process is as follows:
第一步:设图像像素f(x,y)边缘概率满足高斯分布,则二维高斯函数为:Step 1: Suppose the edge probability of the image pixel f(x,y) satisfies the Gaussian distribution, then the two-dimensional Gaussian function is:
第二步:对x,y方向求梯度函数:The second step: Find the gradient function for the x and y directions:
第三步:对图像数据集进行卷积:Step 3: Convolve the image dataset:
第四步:计算图像目标边缘概率密度分布,即目标边缘特征:Step 4: Calculate the image target edge probability density distribution, that is, the target edge features:
以上为高斯边沿超参数特征提取模块计算方法,实质是计算高斯核函数,再把高斯核函数作为掩码,与目标像素卷积,即可提取目标边缘特征,该过程也是超参数估计过程。The above is the calculation method of the Gaussian edge hyperparameter feature extraction module. The essence is to calculate the Gaussian kernel function, and then use the Gaussian kernel function as a mask to convolve with the target pixel to extract the target edge feature. This process is also a hyperparameter estimation process.
获取图像像素边缘特征后,利用高斯过程计算特征分布参数,再利用L2正则化算子,计算高斯特征函数损失函数最小(最优),同时在算法中增加惩罚函数防止模型出现过拟合。L2正则化算子为:After obtaining the image pixel edge features, the Gaussian process is used to calculate the feature distribution parameters, and then the L2 regularization operator is used to calculate the minimum (optimum) loss function of the Gaussian feature function. At the same time, a penalty function is added to the algorithm to prevent the model from overfitting. The L2 regularization operator is:
其中,Loss是损失函数,Ein是未包含正则化项的训练样本误差,λ是正则化参数(惩罚函数)。为了使模型更加优化,对正则函数做如下限定:Among them, Loss is the loss function, E in is the training sample error that does not contain the regularization item, and λ is the regularization parameter (penalty function). In order to make the model more optimized, the regular function is defined as follows:
即所有w(误差)的平方和不超过参数C(阈值),可以确保最小化训练样本误差Ein,损失函数值最小。That is, the sum of squares of all w (errors) does not exceed the parameter C (threshold), which can ensure that the training sample error E in is minimized, and the loss function value is the smallest.
(3)提取图像的边界框和目标掩膜(3) Extract the bounding box and target mask of the image
主要采用贝叶斯估计算法。贝叶斯估计模型是利用先验概率识别算法认知客观世界,其基本思想是在积累大量的样本的基础之上,通过先验概率和条件概率,对认知的对象进行最大概率估计,概率最大者即为认知结果,当分析样本大到接近总体数时,样本中事件发生的概率将接近于总体中事件发生的概率,因此可以实现最小误差预测。贝叶斯估计核心是超参数选择,为了提高图像分割过程中陷入局部优势,通过构建基于高斯分布的超参数图像数据分类模型,并与深度学习相结合,采用0.618估计法(黄金分割法),选取超参数,有效地调节超参数误差与权值之间的平衡,实现高效的基于语义理解的像素分割法。The Bayesian estimation algorithm is mainly used. The Bayesian estimation model uses the prior probability recognition algorithm to recognize the objective world. Its basic idea is to estimate the maximum probability of the cognitive object through the prior probability and conditional probability on the basis of accumulating a large number of samples. The largest is the cognitive result. When the analysis sample is large enough to be close to the population, the probability of the event occurring in the sample will be close to the probability of the event occurring in the population, so the minimum error prediction can be realized. The core of Bayesian estimation is the selection of hyperparameters. In order to improve the local advantage in the process of image segmentation, a hyperparameter image data classification model based on Gaussian distribution is constructed, combined with deep learning, and the 0.618 estimation method (golden section method) is adopted. Select hyperparameters, effectively adjust the balance between hyperparameter errors and weights, and realize an efficient pixel segmentation method based on semantic understanding.
贝叶斯分类器是一种基于统计理论的分类方法,对于包含M个类别样本的样本集C={C1C2C3......Cn},分类器首先计算N维特征向量X=[x1x2......xn]属于每个类别的标签的最大似然估计,通过将其排序,并取得最大值的方式来计算x所属的类别标签Ci,贝叶斯公式如下:Bayesian classifier is a classification method based on statistical theory. For a sample set C={C 1 C 2 C 3 ...... C n } containing M class samples, the classifier first calculates N-dimensional features Vector X=[x 1 x 2 ...... x n ] the maximum likelihood estimation of the labels belonging to each category, by sorting them and obtaining the maximum value to calculate the category label C i to which x belongs, The Bayesian formula is as follows:
其中,Pr(ci|x)为后验概率,Pr(x|ci)条件概率,Pr(ci)为先验概率,P(xa)、P(ya)代表目标边缘特征概率。则分类问题归结为求x属性类Ci最大值问题:Among them, Pr( ci |x) is the posterior probability, Pr(x| ci ) is the conditional probability, Pr( ci ) is the prior probability, P(x a ), P(y a ) represent the target edge feature probability . Then the classification problem boils down to the problem of finding the maximum value of x attribute class C i :
Ci=argmaxPr(x|ci)Pr(ci) (11)C i =argmaxPr(x|c i )Pr(c i ) (11)
实验证明,朴素贝叶斯分类器与其他类别分类器的精度要高很多。Experiments have shown that the accuracy of Naive Bayes classifiers is much higher than that of other class classifiers.
根据不同图像灰度不同,图像边界处一般会有明显的突起边缘,利用此特征可以分割图像。该核算子是一个具有高斯超参数的滤波器,具有对图像去噪、平滑和加强边缘特征属性的特征,计算过程分为四步:第一步:用高斯滤波器平滑图象;第二步:用一阶偏导的有限差分来计算梯度的幅值和方向;第三步:对梯度幅值进行非极大值抑制;第四步:用双阈值算法检测和连接边缘。According to the different gray levels of different images, there are generally obvious protruding edges at the boundary of the image, and this feature can be used to segment the image. The kernel operator is a filter with Gaussian hyperparameters, which has the characteristics of image denoising, smoothing and strengthening edge feature attributes. The calculation process is divided into four steps: the first step: smoothing the image with a Gaussian filter; the second step : Use the finite difference of the first-order partial derivative to calculate the magnitude and direction of the gradient; the third step: carry out non-maximum suppression on the gradient magnitude; the fourth step: detect and connect the edges with a double threshold algorithm.
图像分割的过程如下:The process of image segmentation is as follows:
(1)通过学习提取到的目标边界特征,得到图像的目标区域以及区域中每个像素的分类权重;(1) Obtain the target area of the image and the classification weight of each pixel in the area by learning the extracted target boundary features;
(2)得到图像的目标区域以后,将每个目标区域的内部和外部特征图组合成两张完整的特征图,然后同步进行图像分割和图像分类两个分支数据集D1,D2;(2) After obtaining the target area of the image, combine the internal and external feature maps of each target area into two complete feature maps, and then perform image segmentation and image classification two branch data sets D1 and D2 simultaneously;
(3)在图像分割中,使用贝叶斯分类器对目标区域的内部和外部特征图进行分类,以区分图像中的前景和背景并生成掩膜;(3) In image segmentation, a Bayesian classifier is used to classify the inner and outer feature maps of the target region to distinguish the foreground and background in the image and generate a mask;
(4)在图像分类中,在两类特征图中按像素概率分布取最大值,得到一张新的特征图,再使用最大似然估计分类器得到目标区内物体的类别。(4) In image classification, take the maximum value according to the pixel probability distribution in the two types of feature maps to obtain a new feature map, and then use the maximum likelihood estimation classifier to obtain the object category in the target area.
图像分割完成后,需建立图像目标轮廓边缘数据集,具体如下:图像目标边缘分割任务包括目标备选集的产生、备选目标的边缘特征抽取、备选目标的贝叶斯分类、备选目标的超参数修正、备选目标边缘特征字典构建等5个基本子任务。备选目标数据集包括OpenImages V4检测集,其含有190万张图片以及图片上针对600个类别的1540万个边框盒。采用像素L2正则算子对图像数据进行预处理,形成图像分类集和分类图像像素子集,并采用多维高斯分布概率模型,计算目标边缘特征核掩码,通过卷积获取目标边缘特征数据集,采用贝叶斯证据学习获取目标边缘特征分类集先验概率。After the image segmentation is completed, an image target contour edge data set needs to be established, as follows: The task of image target edge segmentation includes the generation of target candidate sets, edge feature extraction of candidate targets, Bayesian classification of candidate targets, candidate target There are 5 basic sub-tasks, such as hyperparameter correction of the target algorithm, and construction of the candidate target edge feature dictionary. Alternative target datasets include the OpenImages V4 detection set, which contains 1.9 million images and 15.4 million bounding boxes on images for 600 categories. The pixel L2 regularization operator is used to preprocess the image data to form an image classification set and a classification image pixel subset, and a multidimensional Gaussian distribution probability model is used to calculate the target edge feature kernel mask, and the target edge feature data set is obtained through convolution. Bayesian evidence learning is used to obtain the prior probability of the target marginal feature classification set.
(4)实现过程(4) Implementation process
主要包括三个部分:(1)图像目标像素预处理:采用L2正则算法,设定阈值函数生成初始点集:X,Y=(x1,y1),(x2,y2),...(xt,yt);(2)采用高斯核模型,构建数据集D={(x1,y1)...(xt,yt)};(3)进入贝叶斯最大后验概率估计。具体操作为:It mainly includes three parts: (1) Image target pixel preprocessing: use L2 regularization algorithm, set threshold function to generate initial point set: X, Y=(x1, y1), (x2, y2),...(xt , yt); (2) Adopt Gaussian kernel model to construct data set D={(x1, y1)...(xt, yt)}; (3) Enter Bayesian maximum a posteriori probability estimation. The specific operation is:
A.按照目标分类设置标签;A. Set labels according to the target category;
B.统计图像目标分类;B. Statistical image target classification;
C.计算各类目标先验概率:Pr(Ci);C. Calculate the prior probability of various targets: Pr(C i );
D.按照目标分类,选择相应数据集D中所有数据,构建高斯过程模型,提取目标边缘点Xi,Yi集;D. According to the target classification, select all the data in the corresponding data set D, build a Gaussian process model, and extract the target edge point Xi, Yi set;
E.计算高斯分布超参数函数(μi,σi);E. Calculate the Gaussian distribution hyperparameter function (μ i , σ i );
F.进一步,使用获取函数(μi,σi)计算下一个评估点xi,i的取值为1~t,xi=argmaxu(x|D),计算响应yi;F. Further, use the acquisition function (μ i , σ i ) to calculate the next evaluation point xi, the value of i is 1~t, xi=argmaxu(x|D), and calculate the response yi;
G.增加新数据点到集合D,D←D∪{xi,yi},i←i+1;G. Add new data points to the set D, D←D∪{xi,yi}, i←i+1;
H.采用贝叶斯后验估计公式计算后验概率H. Using the Bayesian posterior estimation formula to calculate the posterior probability
I.计算后验概率分布:R=Max(Pr(C1|X),Pr(C2|X)......Pr(CtX));I. Calculate the posterior probability distribution: R=Max(Pr(C 1 |X), Pr(C 2 |X)...Pr(C t X));
J.检验计算结果:用计算的后验概率与目标边缘特征匹配,如匹配分值越高则识别的月接近实际目标,该模型设定score>90;J. Test calculation results: Use the calculated posterior probability to match the target edge features. If the matching score is higher, the recognized month is closer to the actual target. The model sets score>90;
K.修正,若分值小于90,则采用深度学习对高斯超参数μi,σi进行修正,修正系数为0.618;K. Correction, if the score is less than 90, use deep learning to correct the Gaussian hyperparameters μ i and σ i , and the correction coefficient is 0.618;
L.将分值大于90分值的目标边缘概率参数置入数据字典,构成超参数数据字典集。L. Putting target marginal probability parameters with a score greater than 90 into the data dictionary to form a hyperparameter data dictionary set.
(5)训练和测试(5) Training and testing
将上述Open Images V4检测集的190万张图片分为训练集和测试集,通过有监督学习训练模型,输入测试集来验证训练的模型是否符合要求。至此,特征字典建立完成。Divide the 1.9 million pictures of the above-mentioned Open Images V4 detection set into a training set and a test set, train the model through supervised learning, and input the test set to verify whether the trained model meets the requirements. So far, the feature dictionary has been established.
(6)图像检测(6) Image detection
将待测图像输入检测模型,提取其边界框及目标掩膜,然后将该边界框及目标掩膜放入特征字典中进行对比,即可获得图像中各目标的类别。方法如下:首先用L2正则算子计算边界框和目标掩膜各自和所述特征字典的相似度权重,然后所述相似度高斯过程,提取目标边缘特征数据集,经过贝叶斯分类匹配,即可得到语义分割结果。在语义分割结果输出之前,先计算边高斯超参数函数,然后根据分值大小,计算目标匹配度,超参数集越优,得到语义分割的精准度分值就越高。Input the image to be tested into the detection model, extract its bounding box and target mask, and then put the bounding box and target mask into the feature dictionary for comparison, and then the category of each target in the image can be obtained. The method is as follows: firstly, the L2 regular operator is used to calculate the similarity weights of the bounding box and the target mask and the feature dictionary respectively, and then the similarity Gaussian process extracts the target edge feature data set, and undergoes Bayesian classification matching, namely Semantic segmentation results can be obtained. Before the semantic segmentation results are output, first calculate the edge Gaussian hyperparameter function, and then calculate the target matching degree according to the score. The better the hyperparameter set, the higher the accuracy score of the semantic segmentation.
通过上述步骤,即可完成基于贝叶斯深度学习的超参数优化的图像分割方法,在依托图像集训练的基础上,获得目标边缘分割超参数字典。有了超参数字典既可以实现目标的识别和分割,即:系统在训练好后可以在输入图像和语音的环境下,经过模型计算,可以实现目标和背景的分离和识别。该方法可有效解决传统深度学习优化算法耗时长、性能波动大、占用资源大等缺陷,模型经过训练好后,可以应用在智能手机图像语义识别软件中的插件。Through the above steps, the image segmentation method of hyperparameter optimization based on Bayesian deep learning can be completed, and the target edge segmentation hyperparameter dictionary can be obtained on the basis of image set training. With the hyperparameter dictionary, target recognition and segmentation can be realized, that is, after the system is trained, it can separate and recognize the target and the background through model calculation in the environment of input images and voice. This method can effectively solve the shortcomings of traditional deep learning optimization algorithms such as long time-consuming, large performance fluctuations, and large resource occupation. After the model is trained, it can be applied to a plug-in in smartphone image semantic recognition software.
上面结合附图和实施例对本发明作了详细的说明,但是,所属技术领域的技术人员能够理解,在不脱离本发明宗旨的前提下,还可以对上述实施例中的各个具体参数进行变更,形成多个具体的实施例,均为本发明的常见变化范围,在此不再一一详述。The present invention has been described in detail above in conjunction with the accompanying drawings and embodiments. However, those skilled in the art can understand that each specific parameter in the above embodiments can also be changed without departing from the spirit of the present invention. A number of specific embodiments are formed, all of which are common variation scopes of the present invention, and will not be described in detail here.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010501892.9A CN111652317B (en) | 2020-06-04 | 2020-06-04 | Super-parameter image segmentation method based on Bayes deep learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010501892.9A CN111652317B (en) | 2020-06-04 | 2020-06-04 | Super-parameter image segmentation method based on Bayes deep learning |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111652317A CN111652317A (en) | 2020-09-11 |
CN111652317B true CN111652317B (en) | 2023-08-25 |
Family
ID=72347345
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010501892.9A Active CN111652317B (en) | 2020-06-04 | 2020-06-04 | Super-parameter image segmentation method based on Bayes deep learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111652317B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112464948A (en) * | 2020-11-11 | 2021-03-09 | 常州码库数据科技有限公司 | Natural scene target contour extraction method and system based on bionics |
CN113468939A (en) * | 2020-11-30 | 2021-10-01 | 电子科技大学 | SAR target recognition method based on supervised minimization deep learning model |
CN115018690A (en) * | 2021-03-05 | 2022-09-06 | 富士通株式会社 | Image processing apparatus, image processing method, and machine-readable storage medium |
CN112906704A (en) * | 2021-03-09 | 2021-06-04 | 深圳海翼智新科技有限公司 | Method and apparatus for cross-domain target detection |
CN113111928B (en) * | 2021-04-01 | 2023-12-29 | 中国地质大学(北京) | Semi-supervised learning mineral resource quantitative prediction method based on geometrics database |
CN113269782B (en) * | 2021-04-21 | 2023-01-03 | 青岛小鸟看看科技有限公司 | Data generation method and device and electronic equipment |
CN113158960A (en) * | 2021-05-06 | 2021-07-23 | 吴国军 | Medical image recognition model construction and recognition method and device |
CN113450268B (en) * | 2021-05-24 | 2024-12-13 | 南京中医药大学 | A method for image denoising based on posterior probability |
CN113392933B (en) * | 2021-07-06 | 2022-04-15 | 湖南大学 | Self-adaptive cross-domain target detection method based on uncertainty guidance |
CN114067138B (en) * | 2021-10-27 | 2025-01-21 | 西安理工大学 | A method for matching degree analysis of fragmented images based on boundary line features |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010129711A1 (en) * | 2009-05-05 | 2010-11-11 | The Trustees Of Columbia University In The City Of New York | Devices, systems, and methods for evaluating vision and diagnosing and compensating impairment of vision |
US7979363B1 (en) * | 2008-03-06 | 2011-07-12 | Thomas Cecil Minter | Priori probability and probability of error estimation for adaptive bayes pattern recognition |
CN110245587A (en) * | 2019-05-29 | 2019-09-17 | 西安交通大学 | A method of target detection in optical remote sensing images based on Bayesian transfer learning |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7039239B2 (en) * | 2002-02-07 | 2006-05-02 | Eastman Kodak Company | Method for image region classification using unsupervised and supervised learning |
-
2020
- 2020-06-04 CN CN202010501892.9A patent/CN111652317B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7979363B1 (en) * | 2008-03-06 | 2011-07-12 | Thomas Cecil Minter | Priori probability and probability of error estimation for adaptive bayes pattern recognition |
WO2010129711A1 (en) * | 2009-05-05 | 2010-11-11 | The Trustees Of Columbia University In The City Of New York | Devices, systems, and methods for evaluating vision and diagnosing and compensating impairment of vision |
CN110245587A (en) * | 2019-05-29 | 2019-09-17 | 西安交通大学 | A method of target detection in optical remote sensing images based on Bayesian transfer learning |
Non-Patent Citations (1)
Title |
---|
包晓敏 ; 汪亚明 ; .基于最小风险贝叶斯决策的织物图像分割.纺织学报.2006,(02),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN111652317A (en) | 2020-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111652317B (en) | Super-parameter image segmentation method based on Bayes deep learning | |
CN109886121B (en) | Human face key point positioning method for shielding robustness | |
CN113592894B (en) | Image segmentation method based on boundary box and co-occurrence feature prediction | |
CN107203753B (en) | An Action Recognition Method Based on Fuzzy Neural Network and Graph Model Reasoning | |
CN114255403B (en) | Optical remote sensing image data processing method and system based on deep learning | |
CN109684922B (en) | A multi-model recognition method for finished dishes based on convolutional neural network | |
CN107610087B (en) | An automatic segmentation method of tongue coating based on deep learning | |
CN108305260B (en) | Method, device and device for detecting corner points in an image | |
Esmaeili et al. | Fast-at: Fast automatic thumbnail generation using deep neural networks | |
CN105678278A (en) | Scene recognition method based on single-hidden-layer neural network | |
CN111091129B (en) | Image salient region extraction method based on manifold ordering of multiple color features | |
CN109033978A (en) | A kind of CNN-SVM mixed model gesture identification method based on error correction strategies | |
CN107977660A (en) | Region of interest area detecting method based on background priori and foreground node | |
CN110008853A (en) | Pedestrian detection network and model training method, detection method, medium, equipment | |
CN108734200B (en) | Human target visual detection method and device based on BING feature | |
CN109509191A (en) | A kind of saliency object detection method and system | |
CN115810106A (en) | Tea tender shoot grade accurate identification method in complex environment | |
CN116630971B (en) | Spore segmentation method of wheat scab based on CRF_ResUnet++ network | |
CN117455868A (en) | SAR image change detection method based on significant fusion difference map and deep learning | |
Li et al. | Fast recognition of pig faces based on improved Yolov3 | |
CN111695560A (en) | Method for actively positioning and focusing crop diseases and insect pests based on convolutional neural network | |
CN115223033A (en) | Synthetic aperture sonar image target classification method and system | |
CN115661860A (en) | Method, device and system for dog behavior and action recognition technology and storage medium | |
CN110097067B (en) | Weak supervision fine-grained image classification method based on layer-feed feature transformation | |
CN111368865A (en) | Method and device for detecting remote sensing image oil storage tank, readable storage medium and equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |