CN110363777A - A Sea Image Semantic Segmentation Method Based on Reducible Spatial Constrained Mixture Model - Google Patents

A Sea Image Semantic Segmentation Method Based on Reducible Spatial Constrained Mixture Model Download PDF

Info

Publication number
CN110363777A
CN110363777A CN201910592087.9A CN201910592087A CN110363777A CN 110363777 A CN110363777 A CN 110363777A CN 201910592087 A CN201910592087 A CN 201910592087A CN 110363777 A CN110363777 A CN 110363777A
Authority
CN
China
Prior art keywords
category
sky
sea surface
haze
coast
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
CN201910592087.9A
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.)
University of Shanghai for Science and Technology
Original Assignee
University of Shanghai for Science and Technology
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 University of Shanghai for Science and Technology filed Critical University of Shanghai for Science and Technology
Priority to CN201910592087.9A priority Critical patent/CN110363777A/en
Publication of CN110363777A publication Critical patent/CN110363777A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • G06F18/2155Generating training patterns; Bootstrap methods, e.g. bagging or boosting characterised by the incorporation of unlabelled data, e.g. multiple instance learning [MIL], semi-supervised techniques using expectation-maximisation [EM] or naïve labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/143Segmentation; Edge detection involving probabilistic approaches, e.g. Markov random field [MRF] modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/30181Earth observation
    • G06T2207/30184Infrastructure

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)

Abstract

The sea image semantic segmentation method based on reducible space constraint mixed model that the invention discloses a kind of, comprising the following steps: (1) input sea color image to be detected;(2) assume that there are sky, seashore/haze, three main semantic regions of seawater and potential barrier regions for sea image, and establish the mixed model of space constraint with this;(3) space constraint mixed model is optimized using expectation-maximization algorithm (EM);(4) sky, seashore/haze classification Gaussian Profile KL distance (Kullback-Leibler divergence) are calculated, if KL distance is less than the threshold value of setting, abbreviation is carried out to space constraint mixed model;(5) sea image semantic segmentation result is exported.Method of the invention effectively can carry out semantic segmentation to sea image, and have the characteristics that speed is fast, robustness is good.

Description

一种基于可简化的空间约束混合模型的海面图像语义分割 方法A Semantic Segmentation of Sea Surface Image Based on Reducible Spatial Constrained Mixture Model method

技术领域technical field

本发明涉及图像处理技术领域,具体涉及一种基于可简化的空间约束混合模型的海面图像语义分割方法。The invention relates to the technical field of image processing, in particular to a sea surface image semantic segmentation method based on a simplified space-constrained mixed model.

背景技术Background technique

图像语义分割是计算机视觉理解的基础性技术,其任务是从像素的角度分割出图像中的不同对象并对每个像素都进行语义标注(即分类)。将语义分割技术应用于海面图像,有助于增强无人水面艇对周围环境的感知能力,从而保证其进行安全作业。Image semantic segmentation is a basic technology for computer vision understanding. Its task is to segment different objects in the image from the perspective of pixels and semantically label each pixel (that is, classify). Applying semantic segmentation technology to sea surface images can help enhance the perception of the surrounding environment of unmanned surface vehicles, thereby ensuring their safe operations.

近年来,随着深度学习的迅猛发展,基于卷积神经网络的语义分割方法在无人驾驶、医疗影像分析等领域得到了广泛的研究与应用。然而,利用卷积神经网络来对海面图像进行语义分割的相关研究还很少,其主要原因在于缺少大量的海面图像标注数据。2016年,Kristan等人在《Fast Image-Based Obstacle Detection From Unmanned SurfaceVehicles》中提出了一种基于聚类思想的海面语义分割方法。该方法定义了一个空间约束混合模型来对海面图像的像素特征进行建模。具体地,该方法利用了三个高斯分布和一个均匀分布来分别对海面图像的天空区域、中间海岸/雾霾混合区域、海水区域以及潜在的障碍物区域(奇异值区域)进行描述,并且通过期望最大化算法(EM算法)来实现海面图像的语义分割。该方法检测性能较好、速度较快;然而,通过观察无人水面艇拍摄的海面图像可以发现:当无人艇背离海岸行驶时,海面图像通常只存在天空区域、海水区域以及潜在的障碍物区域,并没有Kristan等人假设的中间海岸/雾霾混合区域,因而Kristan等人提出的方法在该情形下的语义分割结果与实际存在较大误差。In recent years, with the rapid development of deep learning, the semantic segmentation method based on convolutional neural network has been widely researched and applied in the fields of unmanned driving and medical image analysis. However, there are few related studies on semantic segmentation of sea surface images using convolutional neural networks. The main reason is the lack of a large amount of sea image annotation data. In 2016, Kristan et al. proposed a semantic segmentation method for sea surfaces based on clustering ideas in "Fast Image-Based Obstacle Detection From Unmanned Surface Vehicles". This method defines a spatially constrained mixture model to model the pixel features of sea surface images. Specifically, the method uses three Gaussian distributions and one uniform distribution to describe the sky region, mid-coast/haze mixed region, seawater region and potential obstacle region (singular value region) of the sea surface image respectively, and through The expectation maximization algorithm (EM algorithm) is used to realize the semantic segmentation of sea surface images. This method has better detection performance and faster speed; however, by observing the sea surface images taken by the unmanned surface vehicle, it can be found that when the unmanned surface vehicle is driving away from the coast, the sea surface image usually only has the sky area, sea water area and potential obstacles There is no middle coast/haze mixed area assumed by Kristan et al. Therefore, the semantic segmentation result of the method proposed by Kristan et al. has a large error in this case.

发明内容Contents of the invention

本发明针对现有技术的不足,提供一种基于可简化的空间约束混合模型的海面图像语义分割方法,该方法可以有效地对海面图像进行语义分割,并且具有速度快、鲁棒性好的特点。Aiming at the deficiencies of the prior art, the present invention provides a method for semantic segmentation of sea surface images based on a simplified space-constrained hybrid model, which can effectively perform semantic segmentation of sea surface images, and has the characteristics of fast speed and good robustness .

为达到上述目的,本发明采用如下技术方案:To achieve the above object, the present invention adopts the following technical solutions:

一种基于可简化的空间约束混合模型的海面图像语义分割方法,包括以下步骤:A method for semantic segmentation of sea surface images based on a simplified spatially constrained mixture model, comprising the following steps:

(1)输入待检测的海面彩色图像;(1) Input the color image of the sea surface to be detected;

(2)假设海面图像存在天空、海岸/雾霾、海水三个主语义区域以及潜在的障碍物区域,并以此建立空间约束的混合模型;(2) Assume that there are three main semantic areas of sky, coast/haze, and sea water in the sea surface image, as well as potential obstacle areas, and establish a hybrid model of spatial constraints;

(3)利用期望最大化算法(EM)对空间约束混合模型进行优化;(3) Optimizing the space-constrained hybrid model by using the Expectation-Maximization Algorithm (EM);

(4)计算天空、海岸/雾霾类别高斯分布的KL距离(Kullback-Leibler散度),如果KL距离小于设定的阈值,则对空间约束混合模型进行化简;(4) Calculate the KL distance (Kullback-Leibler divergence) of the Gaussian distribution of the sky, coast/haze category. If the KL distance is less than the set threshold, the spatially constrained hybrid model is simplified;

(5)输出海面图像语义分割结果。(5) Output the semantic segmentation results of sea surface images.

进一步,所述步骤(2)中,假设混合模型由三个高斯分布和一个个均匀分布组成,其中三个高斯分布分别用于描述描述天空、雾霾/海岸混合区域、海水区域,而均匀分布用于描述潜在的障碍物区域(奇异值区域)。于是,图像中第i个像素的特征向量yi的概率可以表示为:Further, in the step (2), it is assumed that the mixed model consists of three Gaussian distributions and one uniform distribution, wherein the three Gaussian distributions are used to describe the sky, haze/coastal mixed area, and seawater area respectively, and the uniform distribution Used to describe potential obstacle regions (singular value regions). Then, the probability of the feature vector y i of the i-th pixel in the image can be expressed as:

上式中,N(·|m,C)表示均值为m而协方差为C的高斯分布函数,U(·)=ε表示均匀分布函数(其中,ε为一个极小的正值超参数);yi表示图像中第i个像素的特征向量(也称为观测数据),主要由像素的颜色特征(c1,c2,c3)和坐标(r,c)组成;θ表示模型中所有高斯分布的参数(即θ={mk,Ck}k=1,2,3);π表示图像中所有像素的类别先验分布(即π={πi}i=1:M,其中,M为图像中像素的个数),πi表示第i个像素的类别先验分布(即πi=[πi1,…,πik,…,πi4],其中,πik=p(xi=k)表示第i个像素的类别xi为k时的概率,假设k=1表示天空类别,k=2表示中间海岸/雾霾混合类别,k=3表示海水类别,k=4表示障碍物类别);In the above formula, N(·|m,C) represents a Gaussian distribution function with mean m and covariance C, and U(·)=ε represents a uniform distribution function (where ε is a very small positive hyperparameter) ; y i represents the feature vector of the i-th pixel in the image (also known as observation data), which is mainly composed of the color features (c1, c2, c3) and coordinates (r, c) of the pixel; θ represents all Gaussian distributions in the model The parameters of (ie θ={m k ,C k } k=1,2,3 ); π represents the class prior distribution of all pixels in the image (ie π={π i } i=1:M , where, M is the number of pixels in the image), π i represents the category prior distribution of the i-th pixel (that is, π i =[π i1 ,…,π ik ,…,π i4 ], where π ik =p( xi =k) represents the probability when the category x i of the i-th pixel is k, assuming that k=1 represents the sky category, k=2 represents the middle coast/haze mixed category, k=3 represents the seawater category, and k=4 represents obstacles object category);

为了克服海面图像中局部噪声对图像分割造成的不利影响,通过引入马尔可夫随机场(Markov Random Field,MRF)来对混合模型进行空间约束,即假设图像中所有像素的类别先验分布π={πi}i=1:M以及后验分布P={pi}i=1:M是关于邻域系统的一个MRF。根据Besag方法,先验分布π的联合概率分布可以近似为:In order to overcome the adverse effects of local noise in the sea surface image on image segmentation, a Markov Random Field (MRF) is introduced to place space constraints on the mixture model, that is, it is assumed that the class prior distribution of all pixels in the image is π = {π i } i=1:M and the posterior distribution P={p i } i=1:M is an MRF about the neighborhood system. According to the Besag method, the joint probability distribution of the prior distribution π can be approximated as:

上式中,Ni为像素i的邻域,为邻域Ni的类别先验分布:In the above formula, N i is the neighborhood of pixel i, is the category prior distribution of the neighborhood N i :

其中,λij为固定正值权重,当像素j与距离像素i越小,λij越大,并且∑jλij=1。Wherein, λ ij is a fixed positive weight, when the distance between pixel j and pixel i is smaller, λ ij is larger, and Σ j λ ij =1.

此外,MRF中的势能函数(即可以定义为:Furthermore, the potential energy function in the MRF (i.e. can be defined as:

上式中,为KL散度项,H(πi)为熵项。In the above formula, is the KL divergence item, and H(π i ) is the entropy item.

而后验分布P={pi}i=1:M的联合概率分布为:And the joint probability distribution of the posterior distribution P={p i } i=1:M is:

其中,像素i的后验分布pi={pik}k=1:4的计算公式如下:Wherein, the calculation formula of the posterior distribution p i ={p ik } k=1:4 of pixel i is as follows:

联立公式(1)、(2)、(4)和(5),可以得到基于高斯和均匀混合分布的语义分割模型的联合概率密度函数:Combining formulas (1), (2), (4) and (5), the joint probability density function of the semantic segmentation model based on Gaussian and uniform mixed distribution can be obtained:

上式中,由于中存在耦合关系,因此难以直接对其进行模型参数估计。为了解决该问题,可以引入辅助类别先验分布集s={si}i=1:M和辅助后验分布集q={qi}i=1:M到上式中,并且对等式两边同时取自然对数运算,从而得到空间约束混合模型的惩罚对数似然函数:In the above formula, because and There is a coupling relationship in , so it is difficult to estimate the model parameters directly. In order to solve this problem, the auxiliary class prior distribution set s={s i } i=1:M and the auxiliary posterior distribution set q={q i } i=1:M can be introduced into the above formula, and the equation The natural logarithm operation is taken on both sides at the same time, so as to obtain the penalty log likelihood function of the space-constrained mixed model:

上式中,°表示Hadamard积运算;并且当si≡πi和qi≡pi时,可以将其化简为公式(7)。此外,根据最大后验准则,可以通过EM算法最大化上述公式,从而实现对混合模型的优化。In the above formula, ° represents the Hadamard product operation; and when s i ≡ π i and q i ≡ p i , it can be simplified to formula (7). In addition, according to the maximum a posteriori criterion, the above formula can be maximized by the EM algorithm, thereby realizing the optimization of the mixture model.

进一步,所述步骤(3)中,期望最大化的具体步骤为:Further, in the step (3), the specific steps of expectation maximization are:

①初始化正态分布参数集θ={mk,Ck}k=1,2,3。将海面图像由上至下按比例{0,0.3}、{0.3,0.5}和{0.5,1}划分出三个区域,然后根据这三个区域像素的特征,分别计算出天空类别的均值m1和协方差C1、中间海岸/雾霾混合类别的均值m2和协方差C2、海水类别的均值m3和协方差C3①Initialize the normal distribution parameter set θ={m k ,C k } k=1,2,3 . Divide the sea surface image into three regions from top to bottom according to the proportion {0,0.3}, {0.3,0.5} and {0.5,1}, and then calculate the mean value m of the sky category according to the characteristics of the pixels in these three regions 1 and covariance C 1 , mean m 2 and covariance C 2 for the Mid Coast/Haze mixed category, mean m 3 and covariance C 3 for the seawater category;

②初始化所有像素的类别先验分布π={πi}i=1:M。对于每一个像素的类别先验分布πi,其初始化公式如下:② Initialize the class prior distribution of all pixels π={π i } i=1:M . For the class prior distribution π i of each pixel, its initialization formula is as follows:

上式中,ε为一个极小的正值超参数。In the above formula, ε is a very small positive hyperparameter.

在E-step:In E-step:

③将θ、π代入公式(6),计算所有像素的后验分布P={pi}i=1:M③ Substitute θ and π into formula (6) to calculate the posterior distribution P={p i } i=1:M of all pixels.

④根据下述公式,计算所有像素的辅助类别先验分布s={si}i=1:M④ According to the following formula, calculate the auxiliary category prior distribution s={s i } i=1:M of all pixels;

上式中,°表示Hadamard积运算,*表示卷积运算,为归一化常数。In the above formula, ° means Hadamard product operation, * means convolution operation, is the normalization constant.

⑤计算所有像素的辅助后验分布q={qi}i=1:M,计算公式如下:⑤ Calculate the auxiliary posterior distribution q={q i } i=1:M of all pixels, the calculation formula is as follows:

上式中,为归一化常数。In the above formula, is the normalization constant.

在M-step:In M-step:

⑥更新类别先验分布集,计算公式如下:⑥Update the category prior distribution set, the calculation formula is as follows:

⑦更新高斯分布参数,计算公式如下:⑦Update Gaussian distribution parameters, the calculation formula is as follows:

⑧判断EM算法是否达到迭代终止条件;如果达到,则停止迭代,否则,则继续③~⑧。其中,迭代终止条件如下:⑧Judge whether the EM algorithm reaches the iteration termination condition; if so, stop the iteration, otherwise, continue ③~⑧. Among them, the iteration termination condition is as follows:

进一步,所述步骤(4)中,由于无人水面艇面向海岸航行时,艇载相机拍摄到的海面图像从上至下存在天空、中间海岸/雾霾以及海水三个主语义区域;然而,当无人水面艇背离海岸航行时,艇载相机拍摄到的海面图像从上至下只存在天空和海水两个主语义区域。因此,当海面图像只存在天空和海水两个主语义区域时,需要对步骤(2)假设的空间约束混合模型进行化简。其具体步骤为:Further, in the step (4), since the unmanned surface vehicle sails towards the coast, the sea surface image captured by the boat-mounted camera has three main semantic areas of the sky, the middle coast/haze and sea water from top to bottom; however, When the unmanned surface vehicle sails away from the coast, there are only two main semantic areas of the sky and sea water in the sea surface image captured by the boat-mounted camera from top to bottom. Therefore, when there are only two main semantic regions of the sky and sea water in the sea surface image, the spatially constrained mixture model assumed in step (2) needs to be simplified. The specific steps are:

①在步骤(3)的基础上,计算EM后的天空类别和中间海岸/雾霾混合类别的高斯分布的KL距离(Kullback-Leibler散度):① On the basis of step (3), calculate the KL distance (Kullback-Leibler divergence) of the Gaussian distribution of the sky category after EM and the mixed category of Mid Coast/Haze:

dst=KL(N1||N2) (16)dst=KL(N 1 ||N 2 ) (16)

上式中,N1表示天空类别高斯分布N(·|m1,C1),N2表示中间海岸/雾霾混合类别的高斯分布N(·|m2,C2)。In the above formula, N 1 represents the Gaussian distribution N(·|m 1 ,C 1 ) of the sky category, and N 2 represents the Gaussian distribution N(·|m 2 ,C 2 ) of the mid-coast/haze mixed category.

②如果KL距离dst小于预设固定阈值T时,则对混合模型进行化简;否则,直接执行步骤(5)。具体地,当dst<T时,将天空类别和中间海岸/雾霾混合类别的高斯分布进行融合,从而形成新的天空类别高斯分布:② If the KL distance dst is less than the preset fixed threshold T, then simplify the hybrid model; otherwise, directly perform step (5). Specifically, when dst<T, the Gaussian distribution of the sky category and the mid-coast/haze mixed category is fused to form a new sky category Gaussian distribution:

上式中,m1和C1为EM优化后的天空类别的高斯参数,m2和C2为EM优化后的海岸/雾霾混合类别的高斯参数。In the above formula, m 1 and C 1 are the Gaussian parameters of the sky category after EM optimization, and m 2 and C 2 are the Gaussian parameters of the coast/haze mixed category after EM optimization.

于是,混合模型简化为由2个高斯分布和1个均匀分布组成,其中2个高斯分布分别用于描述描述天空和海水区域,而均匀分布用于描述潜在的障碍物区域(奇异值区域)。因此,海面图像中第i个像素的后验分布pi={pik}k=1:4可用下述公式进行计算:Therefore, the mixture model is simplified to consist of 2 Gaussian distributions and 1 uniform distribution, where 2 Gaussian distributions are used to describe the sky and sea water areas, and the uniform distribution is used to describe potential obstacle areas (singular value areas). Therefore, the posterior distribution p i ={pi ik } k=1:4 of the i-th pixel in the sea surface image can be calculated by the following formula:

上式中,m′1和C′1为新的天空类别的高斯参数,m3和C3为EM优化后的海水类别的高斯参数,πi3和πi4分别为EM优化后的海面图像中第i个像素属于海水、障碍物类别的类别先验概率,π′i1为海面图像中第i个像素属于新的天空类别的类别先验概率:In the above formula, m′ 1 and C′ 1 are the Gaussian parameters of the new sky category, m 3 and C 3 are the Gaussian parameters of the seawater category after EM optimization, and πi3 and πi4 are the sea surface images after EM optimization The i-th pixel belongs to the category prior probability of seawater and obstacle category, and π′ i1 is the category prior probability of the i-th pixel in the sea surface image belonging to the new sky category:

π′i1=πi1i2 (19)π′ i1 = π i1 + π i2 (19)

上式中,πi1和πi2分别为EM优化后的海面图像中第i个像素属于天空、中间海岸/雾霾混合类别的类别先验概率。In the above formula, π i1 and π i2 are the category prior probability of the i-th pixel in the EM-optimized sea surface image belonging to the mixed category of sky, middle coast/haze, respectively.

进一步,所述步骤(5)中,当dst<T时,利用公式(18)计算得到的后验分布p={pi}i=1:M获得海面图像语义分割结果当dst≥T时,则利用步骤(3)EM优化后的后验分布q={qi}i=1:M获得海面图像语义分割结果 Further, in the step (5), when dst<T, use the posterior distribution p={p i } i=1:M calculated by the formula (18) to obtain the semantic segmentation result of the sea surface image When dst≥T, use the posterior distribution q={q i } i=1:M optimized by step (3) EM to obtain the semantic segmentation result of the sea surface image

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

首先,本发明提出的方法可根据海面图像的实际情况自动地选择是否对空间约束的混合模型进行简化,从而提高了海面图像语义分割的准确性。其次,本发明所设计的海面图像语义分割方法具有模型结构简单,速度较快的特点,易于实际工程部署。Firstly, the method proposed by the present invention can automatically choose whether to simplify the mixed model of space constraints according to the actual situation of the sea surface image, thereby improving the accuracy of the semantic segmentation of the sea surface image. Secondly, the sea surface image semantic segmentation method designed in the present invention has the characteristics of simple model structure and fast speed, and is easy to deploy in actual projects.

附图说明Description of drawings

图1为本发明方法的流程图。Fig. 1 is the flowchart of the method of the present invention.

图2为本发明方法一个实施例的示意图,其中(a)为实施例待检测图;(b)为实施例语义分割结果图;Fig. 2 is the schematic diagram of an embodiment of the method of the present invention, wherein (a) is the figure to be detected of the embodiment; (b) is the semantic segmentation result figure of the embodiment;

图3为实施例在无海岸/雾霾背景下的海面图像语义分割示意图,其中(a)为实施例待检测图;(b)为实施例语义分割结果图。Fig. 3 is a schematic diagram of the semantic segmentation of the sea surface image in the embodiment without coast/haze background, wherein (a) is the image to be detected in the embodiment; (b) is the result image of the semantic segmentation in the embodiment.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清晰明了,下面结合附图,对本发明的具体实施例作详细说明。以下实施例中所涉及的方法或步骤,如无特别说明,则均为本技术领域的常规方法或步骤,本领域技术人员均能根据具体应用场景做出常规选择或者适应性调整。以下实施例采用python编程语言实现。In order to make the object, technical solution and advantages of the present invention clearer, specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. The methods or steps involved in the following embodiments, unless otherwise specified, are conventional methods or steps in the technical field, and those skilled in the art can make conventional selections or adaptive adjustments according to specific application scenarios. The following embodiments are implemented using the python programming language.

实施例1Example 1

如图1所示,一种基于可简化的空间约束混合模型的海面图像语义分割方法,具体实现步骤如下:As shown in Figure 1, a method for semantic segmentation of sea surface images based on a simplified spatially constrained hybrid model, the specific implementation steps are as follows:

(1)输入待检测的海面彩色图像;(1) Input the color image of the sea surface to be detected;

通过无人水面艇搭载的相机获得海面彩色图像(分辨率为512×512)。为了减小后续算法的执行时间,将海面图像缩放至分辨率100×100。如图2a所示为本实施例待检测海面图像,所用图像主要包括天空、海岸、海水波浪及障碍物浮标等。The color image of the sea surface (with a resolution of 512×512) was obtained by the camera carried by the unmanned surface vehicle. In order to reduce the execution time of subsequent algorithms, the sea surface image is scaled to a resolution of 100×100. As shown in FIG. 2 a , the image of the sea surface to be detected in this embodiment mainly includes the sky, the coast, sea waves, and obstacle buoys.

(2)假设海面图像存在天空、海岸/雾霾、海水三个主语义区域以及潜在的障碍物区域,并以此建立空间约束的混合模型;(2) Assume that there are three main semantic areas of sky, coast/haze, and sea water in the sea surface image, as well as potential obstacle areas, and establish a hybrid model of spatial constraints;

假设混合模型由3个高斯分布和1个均匀分布组成,其中3个高斯分布分别用于描述描述天空、雾霾/海岸混合区域、海水区域,而均匀分布用于描述潜在的障碍物区域(奇异值区域)。此外,通过引入马尔可夫随机场(Markov Random Field,MRF)来对混合模型进行空间约束,即假设图像中所有像素的类别先验分布π={πi}i=1:M以及后验分布P={pi}i=1:M是关于邻域系统的一个MRF。通过推导,最终得到空间约束混合模型的惩罚对数似然函数:It is assumed that the mixture model consists of 3 Gaussian distributions and 1 uniform distribution, of which 3 Gaussian distributions are used to describe the sky, haze/coast mixed area, sea water area, and the uniform distribution is used to describe potential obstacle areas (singular value field). In addition, the mixture model is spatially constrained by introducing a Markov Random Field (MRF), that is, it is assumed that the category prior distribution of all pixels in the image π={π i } i=1:M and the posterior distribution P={p i } i=1:M is an MRF about the neighborhood system. Through derivation, the penalty log-likelihood function of the spatially constrained mixed model is finally obtained:

此外,海面图像每一个像素的特征向量yi是由颜色特征(c1,c2,c3)和位置特征(r,c)所构成的一个5维向量[c1,c2,c3,r,c]T。其中,颜色特征分量由YCbCr颜色空间确定。In addition, the feature vector y i of each pixel of the sea surface image is a 5-dimensional vector [c1, c2, c3, r, c] composed of color features (c1, c2, c3) and position features (r, c) T . Among them, the color feature component is determined by the YCbCr color space.

(3)利用期望最大化算法(EM)对空间约束混合模型进行优化;(3) Optimizing the space-constrained hybrid model by using the Expectation-Maximization Algorithm (EM);

期望最大化(EM)的具体步骤为:The specific steps of expectation maximization (EM) are:

①初始化正态分布参数集θ={mk,Ck}k=1,2,3。将海面图像由上至下按比例{0,0.3}、{0.3,0.5}和{0.5,1}划分出三个区域,然后根据这三个区域像素的特征,分别计算出天空类别的均值m1和协方差C1、中间海岸/雾霾混合类别的均值m2和协方差C2、海水类别的均值m3和协方差C3①Initialize the normal distribution parameter set θ={m k ,C k } k=1,2,3 . Divide the sea surface image into three regions from top to bottom according to the proportion {0,0.3}, {0.3,0.5} and {0.5,1}, and then calculate the mean value m of the sky category according to the characteristics of the pixels in these three regions 1 and covariance C 1 , mean m 2 and covariance C 2 for the Mid Coast/Haze mixed category, mean m 3 and covariance C 3 for the seawater category;

②初始化所有像素的类别先验分布π={πi}i=1:M。对于每一个像素的类别先验分布πi,其初始化公式如下:② Initialize the class prior distribution of all pixels π={π i } i=1:M . For the class prior distribution π i of each pixel, its initialization formula is as follows:

上式中,ε为一个极小的正值超参数。在本实施例中,ε=1×10-15In the above formula, ε is a very small positive hyperparameter. In this embodiment, ε=1×10 −15 .

在E-step:In E-step:

③将θ、π代入公式(6),计算所有像素的后验分布P={pi}i=1:M,其中,均匀分布U(·)=ε=1×10-15③Substitute θ and π into formula (6) to calculate the posterior distribution P={p i } i=1:M of all pixels, where the uniform distribution U(·)=ε=1×10 -15 .

④利用下述公式,计算所有像素的辅助类别先验分布s={si}i=1:M④Use the following formula to calculate the auxiliary category prior distribution s={s i } i=1:M of all pixels;

上式中,表示Hadamard积运算,*表示卷积运算,为归一化常数。In the above formula, Indicates Hadamard product operation, * indicates convolution operation, is the normalization constant.

⑤计算所有像素的辅助后验分布q={qi}i=1:M,计算公式如下:⑤ Calculate the auxiliary posterior distribution q={q i } i=1:M of all pixels, the calculation formula is as follows:

上式中,ξqi为归一化常数。In the above formula, ξ qi is a normalization constant.

在M-step:In M-step:

⑥更新类别先验分布集,计算公式如下:⑥Update the category prior distribution set, the calculation formula is as follows:

⑦更新高斯分布参数,计算公式如下:⑦Update Gaussian distribution parameters, the calculation formula is as follows:

⑧判断EM算法是否达到迭代终止条件;如果达到,则停止迭代,否则,则继续③~⑧。其中,迭代终止条件如下:⑧Judge whether the EM algorithm reaches the iteration termination condition; if so, stop the iteration, otherwise, continue ③~⑧. Among them, the iteration termination condition is as follows:

(4)计算天空、海岸/雾霾类别高斯分布的KL距离(Kullback-Leibler散度),如果KL距离小于设定的阈值,则对空间约束混合模型进行化简;(4) Calculate the KL distance (Kullback-Leibler divergence) of the Gaussian distribution of the sky, coast/haze category. If the KL distance is less than the set threshold, the spatially constrained hybrid model is simplified;

当天空、海岸/雾霾类别的高斯分布的KL距离dst小于预设固定阈值T时,则对混合模型进行化简;否则,直接执行步骤(5)。其中,本实施例预设的固定阈值T=8。When the KL distance dst of the Gaussian distribution of the sky, coast/haze category is less than the preset fixed threshold T, the mixture model is simplified; otherwise, step (5) is directly performed. Wherein, the preset fixed threshold T=8 in this embodiment.

(5)输出海面图像语义分割结果。图2b为本实施例语义分割结果图。(5) Output the semantic segmentation results of sea surface images. Fig. 2b is a diagram of the result of semantic segmentation in this embodiment.

实施例2Example 2

图3为本发明方法在无海岸/雾霾背景下的一个优选实施例。其具体实施步骤与实施例1相同,故不再赘述。从实施例1和实施例2的语义分割结果可以看出,本发明的方法可根据海面图像的实际情况自动地选择是否对空间约束的混合模型进行简化,从而提高了海面图像语义分割的准确性。Fig. 3 is a preferred embodiment of the method of the present invention under the background of no coast/haze. Its specific implementation steps are the same as those in Embodiment 1, so they are not repeated here. As can be seen from the semantic segmentation results of Embodiment 1 and Embodiment 2, the method of the present invention can automatically select whether to simplify the mixed model of space constraints according to the actual situation of the sea surface image, thereby improving the accuracy of the semantic segmentation of the sea surface image .

Claims (3)

1.一种基于可简化的空间约束混合模型的海面图像语义分割方法,其特征在于,包括以下步骤:1. A sea surface image semantic segmentation method based on a simplified space-constrained hybrid model, is characterized in that, comprising the following steps: (1)输入待检测的海面彩色图像;(1) Input the color image of the sea surface to be detected; (2)假设海面图像存在天空、海岸/雾霾、海水三个主语义区域以及潜在的障碍物区域,并以此建立空间约束的混合模型;(2) Assume that there are three main semantic areas of sky, coast/haze, and sea water in the sea surface image, as well as potential obstacle areas, and establish a hybrid model of spatial constraints; (3)利用期望最大化算法EM对空间约束混合模型进行优化;(3) Using the expectation maximization algorithm EM to optimize the space-constrained hybrid model; (4)计算天空、海岸/雾霾类别高斯分布的KL距离,如果KL距离小于设定的阈值,则对空间约束混合模型进行化简;(4) Calculate the KL distance of the Gaussian distribution of the sky, coast/haze category, if the KL distance is less than the set threshold, the spatially constrained hybrid model is simplified; (5)输出海面图像语义分割结果。(5) Output the semantic segmentation results of sea surface images. 2.根据权利要求1所述的基于可简化的空间约束混合模型的海面图像语义分割方法,其特征在于,所述步骤(4)中,由于无人水面艇面向海岸航行时,艇载相机拍摄到的海面图像从上至下存在天空、中间海岸/雾霾以及海水三个主语义区域;然而,当无人水面艇背离海岸航行时,艇载相机拍摄到的海面图像从上至下只存在天空和海水两个主语义区域;因此,当海面图像只存在天空和海水两个主语义区域时,需要对步骤(2)假设的空间约束混合模型进行化简,其具体步骤为:2. the method for semantic segmentation of sea surface images based on a simplified space-constrained hybrid model according to claim 1, characterized in that, in the step (4), when the unmanned surface vehicle sails towards the coast, the vehicle-mounted camera shoots From top to bottom, there are three main semantic areas of the sea surface image, sky, middle coast/haze, and sea water; There are two main semantic areas of sky and sea water; therefore, when there are only two main semantic areas of sky and sea water in the sea surface image, it is necessary to simplify the space-constrained hybrid model assumed in step (2), and the specific steps are as follows: ①在步骤(3)的基础上,计算EM后的天空类别和中间海岸/雾霾混合类别的高斯分布的KL距离:① On the basis of step (3), calculate the KL distance between the sky category after EM and the Gaussian distribution of the middle coast/haze mixed category: dst=KL(N1||N2) (1)dst=KL(N 1 ||N 2 ) (1) 上式中,N1表示天空类别高斯分布N(·|m1,C1),N2表示中间海岸/雾霾混合类别的高斯分布N(·|m2,C2);In the above formula, N 1 represents the Gaussian distribution N(·|m 1 ,C 1 ) of the sky category, and N 2 represents the Gaussian distribution N(·|m 2 ,C 2 ) of the middle coast/haze mixed category; ②如果KL距离dst小于预设固定阈值T,则对混合模型进行化简;否则,直接执行步骤(5);具体地,当dst<T时,将天空类别和中间海岸/雾霾混合类别的高斯分布进行融合,从而形成新的天空类别高斯分布:② If the KL distance dst is less than the preset fixed threshold T, simplify the hybrid model; otherwise, directly perform step (5); specifically, when dst<T, combine the sky category and the middle coast/haze mixed category Gaussian distributions are fused to form a new sky category Gaussian distribution: 上式中,m1和C1为EM优化后的天空类别的高斯参数,m2和C2为EM优化后的海岸/雾霾混合类别的高斯参数;In the above formula, m 1 and C 1 are the Gaussian parameters of the sky category after EM optimization, and m 2 and C 2 are the Gaussian parameters of the coast/haze mixed category after EM optimization; 于是,混合模型简化为由2个高斯分布和1个均匀分布组成,其中2个高斯分布分别用于描述描述天空和海水区域,而均匀分布用于描述潜在的障碍物区域即奇异值区域;因此,海面图像中第i个像素的后验分布pi={pik}k=1:4用下述公式进行计算:Therefore, the mixture model is simplified to be composed of 2 Gaussian distributions and 1 uniform distribution, where 2 Gaussian distributions are used to describe the sky and sea water areas, and the uniform distribution is used to describe the potential obstacle area, that is, the singular value area; therefore , the posterior distribution p i ={p ik } k=1:4 of the i-th pixel in the sea surface image is calculated by the following formula: 上式中,N(·|m,C)表示均值为m而协方差为C的高斯分布函数,U(·)=ε表示均匀分布函数,其中,ε为一个极小的正值超参数;yi表示图像中第i个像素的特征向量,也称为观测数据,主要由像素的颜色特征(c1,c2,c3)和坐标(r,c)组成;m′1和C′1为新的天空类别的高斯参数,m3和C3为EM优化后的海水类别的高斯参数,πi3和πi4分别为EM优化后的海面图像中第i个像素属于海水、障碍物类别的类别先验概率,π′i1为海面图像中第i个像素属于新的天空类别的类别先验概率:In the above formula, N(·|m,C) represents a Gaussian distribution function with mean m and covariance C, U( )=ε represents a uniform distribution function, where ε is a very small positive hyperparameter; y i represents the feature vector of the i-th pixel in the image, also known as observation data, which is mainly composed of pixel color features (c1, c2, c3) and coordinates (r, c); m′ 1 and C′ 1 are the new The Gaussian parameters of the sky category, m 3 and C 3 are the Gaussian parameters of the seawater category after EM optimization, and πi3 and πi4 are the i-th pixel in the sea surface image after EM optimization, respectively. Prior probability, π′ i1 is the category prior probability of the i-th pixel in the sea surface image belonging to the new sky category: π′i1=πi1i2 (4)π′ i1 =π i1i2 (4) 上式中,πi1和πi2分别为EM优化后的海面图像中第i个像素属于天空、中间海岸/雾霾混合类别的类别先验概率。In the above formula, π i1 and π i2 are the category prior probability of the i-th pixel in the EM-optimized sea surface image belonging to the mixed category of sky, middle coast/haze, respectively. 3.根据权利要求1所述的基于可简化的空间约束混合模型的海面图像语义分割方法,其特征在于,所述步骤(5)中,当EM后的天空类别和中间海岸/雾霾混合类别的高斯分布的KL距离dst<T时,利用公式(3)计算得到的后验分布p={pi}i=1:M获得海面图像语义分割结果当dst≥T时,则利用步骤(3)EM优化后的后验分布q={qi}i=1:M获得海面图像语义分割结果 3. the sea surface image semantic segmentation method based on the simplifiable space constraint mixture model according to claim 1, is characterized in that, in described step (5), when the sky category after EM and middle coast/haze mixed category When the KL distance of the Gaussian distribution dst<T, use the posterior distribution p={p i } i=1:M calculated by the formula (3) to obtain the semantic segmentation result of the sea surface image When dst≥T, use the posterior distribution q={q i } i=1:M optimized by step (3) EM to obtain the semantic segmentation result of the sea surface image
CN201910592087.9A 2019-07-03 2019-07-03 A Sea Image Semantic Segmentation Method Based on Reducible Spatial Constrained Mixture Model Pending CN110363777A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910592087.9A CN110363777A (en) 2019-07-03 2019-07-03 A Sea Image Semantic Segmentation Method Based on Reducible Spatial Constrained Mixture Model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910592087.9A CN110363777A (en) 2019-07-03 2019-07-03 A Sea Image Semantic Segmentation Method Based on Reducible Spatial Constrained Mixture Model

Publications (1)

Publication Number Publication Date
CN110363777A true CN110363777A (en) 2019-10-22

Family

ID=68217730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910592087.9A Pending CN110363777A (en) 2019-07-03 2019-07-03 A Sea Image Semantic Segmentation Method Based on Reducible Spatial Constrained Mixture Model

Country Status (1)

Country Link
CN (1) CN110363777A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112613515A (en) * 2020-11-23 2021-04-06 上海眼控科技股份有限公司 Semantic segmentation method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799646A (en) * 2012-06-27 2012-11-28 浙江万里学院 Multi-view video-oriented semantic object segmentation method
CN104036503A (en) * 2014-06-05 2014-09-10 哈尔滨工程大学 Image segmentation method based on spatial location information
CN109284663A (en) * 2018-07-13 2019-01-29 上海大学 A method for detection of obstacles on the sea surface based on normal and uniform mixed distribution models

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799646A (en) * 2012-06-27 2012-11-28 浙江万里学院 Multi-view video-oriented semantic object segmentation method
CN104036503A (en) * 2014-06-05 2014-09-10 哈尔滨工程大学 Image segmentation method based on spatial location information
CN109284663A (en) * 2018-07-13 2019-01-29 上海大学 A method for detection of obstacles on the sea surface based on normal and uniform mixed distribution models

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KRISTAN,ET AL: "Fast Image-Based Obstacle Detection From Unmanned Surface Vehicles", 《IEEE TRANSACTIONS ON CYBERNETICS》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112613515A (en) * 2020-11-23 2021-04-06 上海眼控科技股份有限公司 Semantic segmentation method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110348330B (en) Face pose virtual view generation method based on VAE-ACGAN
Huang et al. Lcpformer: Towards effective 3d point cloud analysis via local context propagation in transformers
CN109977798B (en) Mask pooling model training and pedestrian re-identification method for pedestrian re-identification
US11881020B1 (en) Method for small object detection in drone scene based on deep learning
CN105069472B (en) A kind of vehicle checking method adaptive based on convolutional neural networks
CN110458038B (en) Small data cross-domain action identification method based on double-chain deep double-current network
CN110335290A (en) Siamese candidate region generation network target tracking method based on attention mechanism
CN110287837A (en) Sea Obstacle Detection Method Based on Prior Estimation Network and Spatial Constraint Hybrid Model
CN111723822B (en) A method and system for saliency detection of RGBD images based on multi-level fusion
CN108734713A (en) A Semantic Segmentation Method of Traffic Image Based on Multiple Feature Maps
CN106780430B (en) An image saliency detection method based on surrounded state and Markov model
CN106780450A (en) A kind of image significance detection method based on low-rank Multiscale Fusion
CN114387195A (en) Infrared image and visible light image fusion method based on non-global pre-enhancement
CN110458160A (en) An Algorithm for Recognition of Unmanned Boat Surface Targets Based on Deep Compression Neural Network
CN1932846A (en) Visual frequency humary face tracking identification method based on appearance model
CN114626042B (en) A face verification attack method and device
CN110991257A (en) Polarimetric SAR oil spill detection method based on feature fusion and SVM
CN105512630A (en) Human eyes detection and positioning method with near real-time effect
CN115719335A (en) Cerebrovascular image-label two-stage generation method, device and storage medium
CN114612802A (en) System and method for classifying fine granularity of ship target based on MBCNN
CN114049541A (en) Visual scene recognition method based on structural information characteristic decoupling and knowledge migration
CN116596792A (en) Inland river foggy scene recovery method, system and equipment for intelligent ship
CN102509308A (en) Motion segmentation method based on mixtures-of-dynamic-textures-based spatiotemporal saliency detection
WO2023206964A1 (en) Pedestrian re-identification method, system and device, and computer-readable storage medium
CN115713633A (en) Visual SLAM method, system and storage medium based on deep learning in dynamic scene

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

Application publication date: 20191022

RJ01 Rejection of invention patent application after publication