-
文中所设计的方法是从局部和全局两个视角比较测试图和参考图之间的相似性。首先,将测试图和参考图输入节点注意力模块,从局部的角度出发筛选出与参考图相关性高的测试图节点,并以此去除测试图中背景节点的噪声干扰。随后,从全局的角度出发计算测试子图与参考子图之间的图相似度,通过比较两子图特征的分布规律考察测试子图中是否含有指定的违禁品。
-
文中算法提出的小样本语义分割模型包含三个阶段:图嵌入、图匹配和分割。下文将以单样本语义分割为例介绍违禁品检测的算法流程。模型的总体架构如图1所示,文中算法采用孪生网络提取测试图像与参考图像的 CNN 特征并由此建立起图结构。而后将测试图和参考图并行输入计算节点相似度的节点注意力模块。根据求得的节点相似度信息,在测试图中筛选出可能是违禁品区域的图节点并将筛选出的图节点构建成测试子图,参考子图则利用参考图的掩模信息构建而成。随后,模型采用DeepEMD算法[18]计算测试子图与参考子图之间的图相似度。文中算法将图相似度高于一定阈值的测试图预测掩模输入到ASPP模块中获取多尺度信息。最后,该算法将像素级分类后的概率图二值化以获得最终的分割结果。
-
在单样本语义分割模型的图嵌入阶段,模型的输入是一幅测试图像
$ {x}_{q}\in {R}^{H\times W\times 3} $ 和一幅带掩模$Mas{k_s} \in $ $ {\left\{ {0,1} \right\}^{H \times W \times 1}}$ 的参考图像${x_s} \in {R^{H \times W \times 3}}$ 。所提模型将所输入的一对测试图像和参考图像分别建立各自的全连接图。其中,每一个图节点皆为卷积神经网络对图像中的某一块感受野所提取的 CNN 特征。为提取图像特征,文中模型采用ResNet-50[19]作为特征提取器,它共包含四个模块。而该模型仅采用前三个模块所提取的特征构建图节点,并舍弃第三个模块之后所提取的特征,其原因在于通过 CNN 特征可视化[18]可观察到,越前列的模块所提取的特征更靠近底层,而越靠后的模块所提取的特征更为抽象。
值得注意的是,为保持特征图的空间分辨率,特征提取器的第二个模块中加入了膨胀卷积,该膨胀卷积的膨胀率为2。为使特征提取器的三个模块所提取的特征能一一对应,经这三个模块所提取的特征被重新规整尺寸,其长和宽都被缩减至原始图像的八分之一,由此,模型所构建的图节点便由特征提取器的第一个模块
${f_{block1}}( \cdot )$ 、第二个模块${f_{block2}}( \cdot )$ 和第三个模块${f_{block3}}( \cdot )$ 所提取的特征拼接得来。具体公式为:$$g_q^i = {f_{block1}}(x_q^i)||{f_{block2}}(x_q^i)||{f_{block3}}(x_q^i) \\i \in [1,H'W']$$ (1) $$ g_s^i = {f_{block1}}(x_s^i)||{f_{block2}}(x_s^i)||{f_{block3}}(x_s^i) \\i\in \left[1,{H}'{W}'\right] $$ (2) 式中:||为向量拼接操作;
${g_q}$ ,${g_s}$ 分别为测试图像和参考图像所构建的图节点;${x_q}$ ,${x_s}$ 分别为测试图像和参考图像的特征提取感受野;$H'W'$ 分别为原始图像长和宽的八分之一。经以上步骤便可将测试图像转换为测试图
${G_q} = \{ g_q^i\} _{i = 1}^{H'W'}$ ,参考图像转换为参考图${G_s} = \{ g_s^i\} _{i = 1}^{H'W'}$ 。相对应的参考图像的掩模也被调整至合适大小${M_s} = $ $ \{ m_s^i\} _{i = 1}^{H'W'}$ 作为对应参考图节点的标签。以上表述的是单样本语义分割模型的图嵌入步骤,当参考图像数量增多时,由不同参考图像构建而得的图节点可以合并,从而扩展至更大的参考图。 -
在获得测试图和参考图后,将其一同输入到节点注意力模块,如图2所示。文中模型根据计算得到的测试图和参考图节点之间的相似性信息筛选出可能含有违禁品区域的测试图节点并建立测试子图。节点相似度矩阵
${S_N} = \{ {s_{ij}} \in R\} _{i,j = 1}^{H'W'}$ 是由测试图中的每一个节点与参考图节点进行相似度计算得来,其计算公式如下:$${s_{ij}} = {(g_q^i)^{\rm T}}g_s^j,\;\;i,j \in [1,H'W']$$ (3) 式中:
${s_{ij}}$ 为第i个测试图节点和第j个参考图节点间的相似度。权重矩阵随后与参考图节点的标签
${M_s}$ 点乘,以去除由参考图中的背景节点所引起的噪声。而后利用 softmax 函数对权重矩阵进行规范化处理,具体公式如下:$$ {s}_{ij}=\frac{\mathrm{e}\mathrm{x}\mathrm{p}\left({s}_{ij}\right)}{{\displaystyle\sum }_{j=1}^{{H}'{W}'}\mathrm{e}\mathrm{x}\mathrm{p}\left({s}_{ij}\right)} $$ (4) 为提炼图节点中的信息,文中算法采用卷积操作分别对测试图和参考图的特征维度进行压缩。
$$ {V}_{q}=g\left({G}_{q}\right),{V}_{s}=g\left({g}_{s}\right) $$ (5) 式中:
${G_q}$ ,${G_s}$ 分别为压缩前的测试图和参考图;${V_q}$ ,${V_s}$ 分别为压缩后的测试图和参考图;$g( \cdot )$ 为卷积操作。而后,将计算得到的节点相似度矩阵与带标签的参考图节点相乘获得重建测试图。计算公式如下:
$$ {{\textit{z}}}_{q}^{i}=\sum _{j=1}^{{H}'{W}'}{s}_{ij}{v}_{s}^{j}, i\in \left[1,{H}'{W}'\right] $$ (6) 式中:s为某个测试图节点与参考图节点之间的相似度;
${v_s}$ 为s所对应的参考图节点;${z_q}$ 为s所对应的重建后的测试图节点。随后通过融合重建前后的两组测试图可以获得采用相似度作为权重进行筛选后的测试节点标签信息。融合公式如下:
$$ {h}_{similarity}^{i}= \varphi \left({{\textit{z}}}_{q}^{i}\right|\left|{v}_{q}^{i}\right),\;\;i\in \left[1,{H}'{W}'\right] $$ (7) 式中:
${h_{similarity}}$ 为预测的测试节点标签信息;$\varphi ( \cdot )$ 为卷积操作。而后建立测试子图,子图中将尽可能保留含有违禁品的图节点并将被筛去的图节点数值清零,参考子图的建立方式与测试子图相似,只需依照参考图的标签信息筛选节点即可。为便于后续的图相似度计算,文算法将进一步对测试子图与参考子图进行滤波操作以提炼信息并调整子图尺寸。滤波公式如下:
$${U_q} = F({V_q} \cdot {h_{similarity}}) $$ (8) $$ {U_s} = F({V_s} \cdot {M_s})$$ (9) 式中:
${U_q}$ 为测试子图;${U_s}$ 为参考子图;$F( \cdot )$ 为滤波函数。滤波半径和步长的计算公式为:$$ stride= floor\left(\frac{input\_size}{N}\right) {U_q}$$ (10) $$ ker nel\_si{\textit{z}}e = input\_si{\textit{z}}e - (N - 1) \times stride$$ (11) 式中:
$input\_size$ 为子图的初始边长;N为预期调整后子图边长;$floor( \cdot )$ 为向下取整函数;$stride$ 为滤波步长;$\ kernel\_size$ 为滤波半径。 -
在获得经过尺寸调整的测试子图与参考子图后,文中利用DeepEMD算法[17]计算两子图之间的图相似度。首先DeepEMD算法[17]是由EMD算法[20]融入到神经网络中衍化得来,EMD算法[20]测量的是两个概率分布之间的距离。
在DeepEMD算法中[17],测试图将作为源分布,测试图中的节点为i,其特征向量为
${u_i}$ ,权值为${s_i}$ 。同时,参考图将作为目标分布,参考图中的节点为j,其特征向量为${v_j}$ ,权值为${d_j}$ 。${c_{ij}}$ 表示测试图中的节i与参考图中的节点 j 之间的特征距离。在图匹配算法中,节点i转换为节点j的成本由两节点的权重共同决定。$$ {c}_{ij}= 1-\frac{{{u}_{i}}^{\rm T}{v}_{j}}{\left|{u}_{i}\right|\left|{v}_{j}\right|} $$ (12) 结合DeepEMD算法[17],文中将源分布设置为测试子图
${U_q}$ ,目标分布为参考子图${U_s}$ ,根据公式(12)计算测试子图与参考子图中各节点之间的距离后,文中还将计算每个节点对应的权重:$$\begin{split} {w}_{i}={\rm max}\Biggr({({u}_{q}^{i})}^{\rm T}\dfrac{\displaystyle\sum _{j=1}^{{N}^{2}}{{u}}_{{s}}^{{i}}}{{N}^{2}},0\Biggr) \end{split} $$ (13) 式中:
$u_q^i$ 为测试子图中的某个节点;$u_s^j$ 为参考子图中的某个节点;$\max ( \cdot )$ 为取最大值函数;${w_i}$ 为查询子图中节点 i 对应的权值。该公式表明,测试子图节点的权重与该节点同参考子图的相关性成正比,即两个子图中包含的相似区域的权值较高,而背景区域的权值较小。随后,文中算法对子图中所有节点的权值进行归一化,使测试节点的权值之和等于参考节点的权值之和。
$$ {\widehat{w}}_{i}={w}_{i}\frac{{N}^{2}}{\displaystyle\sum _{j=1}^{{N}^{2}}{{w}}_{{j}}} $$ (14) 式中:
${\hat w_i}$ 为节点i的最终权值。而测试子图与参考子图之间的距离为:$$s({U_q},{U_s}) = \sum\limits_{i = 1}^{{N^2}} {\sum\limits_{j = 1}^{{N^2}} {(1 - {c_{ij}})|{w_i} - {w_j}|} } $$ (15) 式中:
${c_{ij}}$ 为测试节点i到参考节点j的距离;${w_j}$ 为参考节点j的权重;$s({U_q},{U_s})$ 为两个子图之间的图相似度。 -
在模型的分割阶段,保留高于图相似度阈值所对应的预测测试节点标签信息,并将其输入空间金字塔池模块(ASPP)[21]。该模块包含全局平均池化层和
$1 \times 1$ 卷积层用于提取图像级特征,同时ASPP模块采用一个$1 \times 1$ 卷积层和三个不同采样率的放大卷积层来获取响应图的不同尺度信息。将ASPP模块生成的上述不同尺度特征用$1 \times 1$ 卷积层融合后,再通过双线性上采样便能得到最终的分割结果。 -
在训练阶段,文中算法采用Dice Loss[22]作为损失函数作用于测试图像的所有像素区域。
$$ {L}_{dice}=1-\frac{2\mathrm{ }\times \mathrm{ }|X\cap Y|}{\left|X\right|+\left|Y\right|} $$ (16) 式中:X为所预测的测试图像掩模拉伸至一维后的列向量;Y为参考图像的真值掩模拉伸至一维后的列向量。
在此基础上,文中提出图相似度损失函数,使预测的测试节点标签信息能更贴近于真值。
$$ {{L}_{graph}= - label \times {\rm log}\left(s\left({U}_{q},{U}_{s}\right)\right)-\left(1-label\right)\times (1-s({U}_{q},{U}_{s}\left)\right)} $$ (17) 式中:
$s({U_q},{U_s})$ 为两个子图之间的图相似度;$label$ 为图相似度真值。若测试图像中含有违禁品,则其值为1,反之为0。以上两个损失函数以相加的方式结合作为文中模型最终的损失函数。 -
文中在表1中展示出模型的完整参数配置。其中,#maps表示卷积核数量,k 表示卷积窗口大小,s表示步长,w表示池化窗口大小。在节点注意力模块中,拼接测试图节点和参考图节点的卷积操作
$\varphi ( \cdot )$ 共享参数;压缩测试图节点和参考图节点特征的卷积操作$g( \cdot )$ 也同样共享参数。表 1 基于图匹配网络违禁物品分割模型的参数设置
Table 1. Parameter setting of prohibited item segmentation model based on graph matching network
Operational layer Configuration Graph embedding Input image 321×321×3 Convolution layer #maps: 64,k: 7×7,s: 2×2 Maxpool layer w: 3×3,s: 2×2 Convolution layer $\left[ \begin{array}{l}{\rm{\# maps:} }\;\;{\rm{64,} }\;{{k:} }\;{\rm{1 \times 1} }\;{{s:} }\;{\rm{1 \times 1} }\\{\rm{\# maps:} }\;\;{\rm{64,} }\;{{k:} }\;{\rm{3 \times 3} }\;{{s:} }\;{\rm{1 \times 1} }\\{\rm{\# maps:} }\;{\rm{256,} }\;{{k:} }\;{\rm{1 \times 1} }\;{{s:} }\;{\rm{1 \times 1} }\end{array} \right]{\rm{ \times 3} }$ Convolution layer $\left[ \begin{array}{l}{\rm{\# maps:} }\;\;128{\rm{,} }\;{{k:} }\;{\rm{1 \times 1} }\;{{s:} }\;2{\rm{ \times 2} }\\{\rm{\# maps:} }\;\;128{\rm{,} }\;{{k:} }\;{\rm{3 \times 3} }\;{{s:} }\;2{\rm{ \times 2} }\\{\rm{\# maps:} }\;\;512{\rm{,} }\;{{k:} }\;{\rm{1 \times 1} }\;{{s:} }\;2{\rm{ \times 2} }\end{array} \right]{\rm{ \times 4} }$ Convolution layer $\left[ \begin{array}{l}{\rm{\# maps:} }\;\;\;256{\rm{,} }\;{ {k:} }\;{\rm{1 \times 1} }\;{ {s:} }\;1{\rm{ \times 1} }\\{\rm{\# maps:} }\;\;\;256{\rm{,} }\;{ {k:} }\;{\rm{3 \times 3} }\;{ {s:} }\;1{\rm{ \times 1} }\\{\rm{\# maps:} }\;\;1024{\rm{,} }\;{ {k:} }\;{\rm{1 \times 1} }\;{ {s:} }\;1{\rm{ \times 1} }\end{array} \right]{\rm{ \times 6} }$ Convolution layer #maps: 256,k: 1×1,s: 1×1 Graph matching Convolution layer #maps: 256,k: 1×1,s: 1×1 Avgpool layer w: 11×11,s: 1×1 Convolution layer #maps: 256,k: 1×1,s: 1×1 Convolution layer #maps: 256,k: 1×1,s: 1×1 Maxpool layer w: 10×10,s: 1×1 Segmentation Convolution layer #maps: 256,k: 1×1,s: 1×1 Convolution layer $\left[ \begin{array}{l}{\rm{\# maps:} }\;\;\;256{\rm{,} }\;{{k:} }\;3{\rm{ \times 3} }\;{{s:} }\;1{\rm{ \times 1} }\\{\rm{\# maps:} }\;\;\;256{\rm{,} }\;{{k:} }\;{\rm{3 \times 3} }\;{{s:} }\;1{\rm{ \times 1} }\end{array} \right]{\rm{ \times 3} }$ Convolution layer #maps: 1,k: 1×1,s: 1×1 在训练阶段,模型通过SGD优化器训练网络参数以达到最小化损失函数的目的。文中算法的图相似度阈值设置为0.5,模型训练的学习率被设置为0.0025,权值衰减设置为0.0005,batch的大小设置为4。在训练阶段该模型的训练时长为25 h,平均每轮训练15 min,在测试阶段模型处理一张X光图像的时长为10 ms。模型在 Nvidia 2080Ti GPU上训练与测试。
-
文中模型分别在SIXray数据集和Xray-PI数据集上进行实验,这两个数据集中的X光数据集皆为伪彩色图像。由于数据集中的X光图像来并非由同一款安检机拍摄得来,因此即使是同一物质的物体,在不同伪彩色X光图像之间也存在色差,故文中的所有实验在预处理阶段皆引入图像增强的方法[23]纠正严重偏移的色差。
以下将分别对这两个数据集进行简要介绍。
(1) SIXray数据集
SIXray数据集是由Miao等人提供的伪彩色X射线图像数据集[24],该数据集原是用于目标分类与定位的研究,因此仅对X光图像提供违禁品的边框标注。SIXray数据集共包含8929张含有违禁品的X光图像,该数据集中共含五类违禁品,各类违禁品的X光图像具体数量如下:手枪(Gun) 3131张,小刀(Knife)1943张,扳手(Wrench) 2199张,钳子(Pliers) 3961张,剪刀(Scissors) 983张。
(2) Xray-PI数据集
由于目前缺乏像素级标记的X光数据集,因此实验将由X光安检机采集得来的伪彩色图像进行像素级标注,并对所建立的X光数据集命名为Xray-PI。与SIXray数据集相比,该数据集的标注信息更精细,违禁品类别也更多样化。Xray-PI数据集共包含385张含有违禁品的X光图像,该数据集中共包含七类违禁品,各类违禁品的X光图像具体数量如下:扳手(Wrench) 34张,瓶子(Bottle) 86张,烟花(Firework)39张,枪(Gun) 70张,鞭炮(Firecracker) 64张,钳子(Pliers)43张,刀片(Blade) 49张。
实验的训练策略是在指定的X光数据集中选择含有某一类违禁品的X光图像作为测试集,含有其他类别违禁品的X光图像作为训练集。模型在训练集上学习网络参数,而后在测试集中挑选少量标注样本作为分割测试集中X光图像的参考图像。此训练策略可以保证模型参数不受测试阶段所分割的违禁品类别的影响。实验将在训练集和测试集中采用随机剪裁、翻转、缩放等方式扩充图像数量,而后分别在训练集和测试集中随机选择一定数量的图像来验证模型的性能。
实验通过计算测试图像的真值掩模
$pred$ 与预测分割结果$mask$ 之间的交并比作为该次预测正确与否的衡量指标,并用类平均交并比体现模型在指定数据集上预测分割的整体性能。交并比的定义公式如下:$$ IoU =\frac{mask\cap pred}{mask\cup pred} $$ (18) -
文中算法可将单张测试图像与多张样本图像一同输入模型中进行图匹配。在单样本条件下模型前向传播时所需的计算力为43.7407 G,参数总量占15.6254 M内存。随着样本图像数量的增加,模型前向传播时所需的计算力将成倍数增长。
模型在获得测试子图与参考子图后需借助滤波规整子图尺寸,实验通过控制变量的方式比较在不同滤波处理条件下,选定不同的子图边长对单样本模型预测的分割结果会产生何种影响,并根据实验结果选择合适的滤波器及子图边长。
如表2中数据所示,模型采用最大值滤波的分割效果优于采用均值滤波的分割效果,而在最大值滤波条件下,当测试子图和参考子图的边长为10时,其分割效果最佳。因此,模型选择使用最大值滤波将测试子图与参考子图规整至边长为10的尺寸,以此为后续图计算做准备。
表 2 模型在不同滤波器和子图边长条件下的分割性能
Table 2. Segmentation performance of model with different filters and length of subgraphs
Filter Size meanIoU Xray-PI SIXray Average filter 5 48.8% 34.0% 10 50.4% 35.8% 15 49.7% 35.5% Maximum filter 5 50.1% 34.8% 10 51.2% 36.4% 15 50.4% 35.3% -
图3为模型在SIXray数据集上获得的实验效果图。模型将与CANet [13]和PGNet [16]进行比较,观察表3中的信息可知文中方法在单样本和五样本分割任务中类平均交并比分别高于CANet [13]2.5%和2.2%,高于PGNet [16]2.6%和2.5%。模型在五样本分割任务中类平均交并比比单样本分割任务高1.3%。
表 3 在SIXray数据集上进行单样本和五样本分割性能
Table 3. Segmentation performance of 1-shot task and 5-shot task on SIXray dataset
-
在Xray-PI数据集上进行的实验效果如图4所示,该模型同样与CANet [13]和PGNet [16]这两种先进的小样本语义分割算法进行比较。根据表4中的实验结果可证明本方法的类平均交并比得分比CANet [13]在单样本分割任务和五样本分割任务中分别高出2.3%和1.9%。同时,文中方法的类平均交并比得分比PGNet [16]在单样本分割任务中高出5.7%,在五样本分割任务中高出5.2%。该模型在五样本分割任务中类平均交并比比单样本分割任务高1.7%。
图 4 在Xray-PI数据集上的实验效果图。(a)参考图像;(b)参考图像掩模型;(c)测试图像;(d)分割结果,其中红色区域为预测违禁品区域
Figure 4. Experimental effect results on Xray-PI dataset. (a) Support image; (b) Support image mask; (c) Query image; (d) Segmentation result, of which red region is the predicted prohibited item region
表 4 在Xray-PI数据集上进行单样本和五样本分割性能
Table 4. Segmentation performance of 1-shot task and 5-shot task on Xray-PI dataset
Methods Firework Firecracker Bottle Gun Wrench Pliers Blade meanIoU 1-shot CANet[13] 51.4 45.5 42.2 48.1 34.7 53.0 67.9 48.9% PGNet[16] 44.1 41.9 31.8 47.1 36.3 51.1 66.4 45.5% Proposed 52.9 45.7 47.4 51.2 37.5 55.5 68.7 51.2% 5-shot CANet[13] 54.8 47.6 45.2 49.5 35.6 56.1 68.0 51.0% PGNet[16] 46.0 43.0 35.1 48.5 37.1 55.6 68.3 47.7% Proposed 55.4 49.1 48.7 53.6 38.5 56.4 68.9 52.9%
Few-shot prohibited item segmentation algorithm based on graph matching network
-
摘要: 自动化安检技术是维护公共安全、提升安检效率的一项有效措施。在实际场景中很难获得充足的违禁品标注样本用于神经网络的训练,并且在不同场景和安全级别下违禁品的类别也有所不同。为解决基于神经网络的违禁品检测方法所面临的样本不均衡问题,以及避免模型在分割新的违禁品类别时需重新训练的现象,文中提出一种基于图匹配网络的小样本违禁物品分割算法。文中模型将测试图像与参考图像并行输入到图匹配网络中,并根据匹配结果从测试图像中分割出违禁品。所设计的图匹配模块不仅从图间节点的相似性考虑匹配问题,并利用DeepEMD算法建立全局概念,进一步提高测试图和参考图的匹配结果。在SIXray数据集和Xray-PI数据集上的实验表明:本模型在单样本分割任务中得到36.4%和51.2%的类平均交并比,分别比目前先进的单样本分割方法提高2.5%和2.3%。由此表明所设计的算法能有效提升小样本X光图像分割算法的精确度。Abstract: Automated security inspection is an effective measure to maintain public safety and improve the efficiency of security inspection. Usually, it is difficult to obtain enough labelled samples which contain some prohibited items of rarely appearing. Furthermore, the category of prohibited items varies in different scenarios and security levels. A graph matching network algorthm for few-shot prohibited item segmentation was introduced to deal with the imbalance of training samples faced by neural network methods, and to inspect prohibited items of new categories without the requirement of retraining. This model parallelly input a query image and several support images into the graph matching network, and segmented the prohibited items from the query image according to the matching results. The graph matching module not only considered the matching problem from the point of node similarity between two graphs, but also establisheed a global concept to match the graphs with the use of DeepEMD algorithm. Experiments on the SIXray dataset and Xray-PI dataset show that proposed model achieves 36.4% and 51.2% meanIoU for 1-shot tasks and outperforms the state-of-the-art method by 2.5% and 2.3% meanIoU, respectively. The extended experiments demonstrate that propoed algorithm can effectively improve the accuracy of few-shot X-ray image segmentation.
-
表 1 基于图匹配网络违禁物品分割模型的参数设置
Table 1. Parameter setting of prohibited item segmentation model based on graph matching network
Operational layer Configuration Graph embedding Input image 321×321×3 Convolution layer #maps: 64,k: 7×7,s: 2×2 Maxpool layer w: 3×3,s: 2×2 Convolution layer $\left[ \begin{array}{l}{\rm{\# maps:} }\;\;{\rm{64,} }\;{{k:} }\;{\rm{1 \times 1} }\;{{s:} }\;{\rm{1 \times 1} }\\{\rm{\# maps:} }\;\;{\rm{64,} }\;{{k:} }\;{\rm{3 \times 3} }\;{{s:} }\;{\rm{1 \times 1} }\\{\rm{\# maps:} }\;{\rm{256,} }\;{{k:} }\;{\rm{1 \times 1} }\;{{s:} }\;{\rm{1 \times 1} }\end{array} \right]{\rm{ \times 3} }$ Convolution layer $\left[ \begin{array}{l}{\rm{\# maps:} }\;\;128{\rm{,} }\;{{k:} }\;{\rm{1 \times 1} }\;{{s:} }\;2{\rm{ \times 2} }\\{\rm{\# maps:} }\;\;128{\rm{,} }\;{{k:} }\;{\rm{3 \times 3} }\;{{s:} }\;2{\rm{ \times 2} }\\{\rm{\# maps:} }\;\;512{\rm{,} }\;{{k:} }\;{\rm{1 \times 1} }\;{{s:} }\;2{\rm{ \times 2} }\end{array} \right]{\rm{ \times 4} }$ Convolution layer $\left[ \begin{array}{l}{\rm{\# maps:} }\;\;\;256{\rm{,} }\;{ {k:} }\;{\rm{1 \times 1} }\;{ {s:} }\;1{\rm{ \times 1} }\\{\rm{\# maps:} }\;\;\;256{\rm{,} }\;{ {k:} }\;{\rm{3 \times 3} }\;{ {s:} }\;1{\rm{ \times 1} }\\{\rm{\# maps:} }\;\;1024{\rm{,} }\;{ {k:} }\;{\rm{1 \times 1} }\;{ {s:} }\;1{\rm{ \times 1} }\end{array} \right]{\rm{ \times 6} }$ Convolution layer #maps: 256,k: 1×1,s: 1×1 Graph matching Convolution layer #maps: 256,k: 1×1,s: 1×1 Avgpool layer w: 11×11,s: 1×1 Convolution layer #maps: 256,k: 1×1,s: 1×1 Convolution layer #maps: 256,k: 1×1,s: 1×1 Maxpool layer w: 10×10,s: 1×1 Segmentation Convolution layer #maps: 256,k: 1×1,s: 1×1 Convolution layer $\left[ \begin{array}{l}{\rm{\# maps:} }\;\;\;256{\rm{,} }\;{{k:} }\;3{\rm{ \times 3} }\;{{s:} }\;1{\rm{ \times 1} }\\{\rm{\# maps:} }\;\;\;256{\rm{,} }\;{{k:} }\;{\rm{3 \times 3} }\;{{s:} }\;1{\rm{ \times 1} }\end{array} \right]{\rm{ \times 3} }$ Convolution layer #maps: 1,k: 1×1,s: 1×1 表 2 模型在不同滤波器和子图边长条件下的分割性能
Table 2. Segmentation performance of model with different filters and length of subgraphs
Filter Size meanIoU Xray-PI SIXray Average filter 5 48.8% 34.0% 10 50.4% 35.8% 15 49.7% 35.5% Maximum filter 5 50.1% 34.8% 10 51.2% 36.4% 15 50.4% 35.3% 表 3 在SIXray数据集上进行单样本和五样本分割性能
Table 3. Segmentation performance of 1-shot task and 5-shot task on SIXray dataset
表 4 在Xray-PI数据集上进行单样本和五样本分割性能
Table 4. Segmentation performance of 1-shot task and 5-shot task on Xray-PI dataset
Methods Firework Firecracker Bottle Gun Wrench Pliers Blade meanIoU 1-shot CANet[13] 51.4 45.5 42.2 48.1 34.7 53.0 67.9 48.9% PGNet[16] 44.1 41.9 31.8 47.1 36.3 51.1 66.4 45.5% Proposed 52.9 45.7 47.4 51.2 37.5 55.5 68.7 51.2% 5-shot CANet[13] 54.8 47.6 45.2 49.5 35.6 56.1 68.0 51.0% PGNet[16] 46.0 43.0 35.1 48.5 37.1 55.6 68.3 47.7% Proposed 55.4 49.1 48.7 53.6 38.5 56.4 68.9 52.9% -
[1] Akçay S, Kundegorski M E, Devereux M, et al. Transfer learning using convolutional neural networks for object classification within X-ray baggage security imagery[C]//Conference on International Conference on Image Processing, 2016: 1057–1061. [2] Jaccard N, Rogers T W, Morton E J, et al. Tackling the X-ray cargo inspection challenge using machine learning[C]//Conference on Anomaly Detection and Imaging with X-Rays. International Society for Optics and Photonics, 2016, 9847: 98470N. [3] Singh M, Singh S. Image segmentation optimisation for X-ray images of airline luggage[C]//Conference on Computational Intelligence for Homeland Security and Personal Safety, 2004: 10-17. [4] Bhowmik N, Gaus Y F A, Akçay S, et al. On the impact of object and sub-component level segmentation strategies for supervised anomaly detection within X-ray security imagery[C]//Conference on Machine Learning and Applications, 2019: 986-991. [5] An J, Zhang H, Zhu Y, et al. Semantic segmentation for prohibited items in baggage inspection[C]//Conference on Intelligent Science and Big Data Engineering, 2019: 495-505. [6] Yang N, Nan L, Zhang D Y, et al. Research on image interpretation based on deep learning [J]. Infrared and Laser Engineering, 2018, 47(2): 0203002. (in Chinese) doi: 10.3788/IRLA201847.0203002 [7] Finn C, Abbeel P, Levine S. Model-agnostic meta-learning for fast adaptation of deep networks [J]. arXiv preprint, 2017: arXiv1703.03400. [8] Xue S, Zhang Z, Lv Q Y, et al. Image recognition method of anti UAV system based on convolutional neural network [J]. Infrared and Laser Engineering, 2020, 49(7): 20200154. (in Chinese) [9] Snell J, Swersky K, Zemel R. Prototypical networks for few-shot learning[C]//Conference on Advances in Neural Information Processing Systems, 2017: 4077-4087. [10] Sung F, Yang Y, Zhang L, et al. Learning to compare: Relation network for few-shot learning[C]//Conference on Computer Vision and Pattern Recognition, 2018: 1199-1208. [11] Shaban A, Bansal S, Liu Z, et al. One-shot learning for semantic segmentation [J]. arXiv preprint, 2017: arXiv1709.03410. [12] Rakelly K, Shelhamer E, Darrell T, et al. Conditional networks for few-shot semantic segmentation[C]//Conference on Learning Representations Workshop, 2018. [13] Zhang C, Lin G, Liu F, et al. Canet: Class-agnostic segmentation networks with iterative refinement and attentive few-shot learning[C]//Conference on Computer Vision and Pattern Recognition, 2019: 5217-5226. [14] Li Y, Gu C, Dullien T, et al. Graph matching networks for learning the similarity of graph structured objects [J]. arXiv preprint, 2019: arXiv1904.12787. [15] Sarlin P E, DeTone D, Malisiewicz T, et al. Superglue: Learning feature matching with graph neural networks[C]//Conference on Computer Vision and Pattern Recognition, 2020: 4938-4947. [16] Zhang C, Lin G, Liu F, et al. Pyramid graph networks with connection attentions for region-based one-shot semantic segmentation[C]//Proceedings of the IEEE International Conference on Computer Vision, 2019: 9587-9595. [17] Zhang C, Cai Y, Lin G, et al. DeepEMD: Few-shot image classification with differentiable earth mover’s distance and structured classifiers[C]//Conference on Computer Vision and Pattern Recognition, 2020: 12200-12210. [18] Zeiler M D, Fergus R. Visualizing and understanding convo-lutional networks[C]//European Conference on Computer Vision, 2014: 818-833. [19] He K, Zhang X, Ren S, et al. Deep residual learning for image recognition[C]//Conference on Computer Vision and Pattern Recognition, 2016: 770-778. [20] Rubner Y, Tomasi C, Guibas L J. A metric for distributions with applications to image databases[C]//Proceedings of the IEEE International Conference on Computer Vision, 1998: 59-66. [21] Chen L C, Papandreou G, Schroff F, et al. Rethinking atrous convolution for semantic image segmentation [J]. arXiv preprint, 2017: arXiv1706.05587. [22] Milletari F, Navab N, Ahmadi S A. V-net: Fully convolutional neural networks for volumetric medical image segmen-tation[C]//International Conference on 3D Vision (3DV). IEEE, 2016: 565-571. [23] Piao Y, Liu L, Liu X Y. Enhancement technology of video under low illumination [J]. Infrared and Laser Engineering, 2014, 43(6): 2021-2026. (in Chinese) doi: 10.3969/j.issn.1007-2276.2014.06.057 [24] Miao C, Xie L, Wan F, et al. Sixray: A large-scale security inspection x-ray benchmark for prohibited item discovery in overlapping images[C]//Conference on Computer Vision and Pattern Recognition, 2019: 2119-2128.