【Xception】《Xception: Deep Learning with Depthwise Separable Convolutions》

本文深入探讨Xception架构,由Keras作者Francois Chollet提出。Xception被视为Inception模块与深度可分离卷积之间的桥梁,其在ImageNet和JFT数据集上表现优异,参数量与Inception V3相近但性能更佳。文章分析了Xception的创新点、方法论、实验结果及未来展望。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在这里插入图片描述

CVPR-2017

(solo CVPR,???)


作者介绍

在这里插入图片描述

github:https://github.com/fchollet
linkedin:https://www.linkedin.com/in/fchollet
twitter:https://twitter.com/fchollet
google scholar:https://scholar.google.com/citations?user=VfYhf2wAAAAJ&hl=en

Xception 的作者也是 Keras 的作者。Francois Chollet 是真正的大神。


源码

caffe版:https://github.com/soeaver/caffe-model/blob/master/cls/inception/deploy_xception.prototxt
caffe代码可视化工具:http://ethereon.github.io/netscope/#/editor
在 CIFAR-10 上的小实验可以参考博客 【Keras-Xception】CIFAR-10



1 Background and Motivation

CNN 不断发展,从 AlexNet、ZF、VGG 到 inception family

Inception family empirically appears to be capable of learning richer representations with less parameters.

作者三连问

  • How do they work?
  • how do they differ from regular convolutions?
  • What design strategies come after Inception?

作者深入探究,提出 inception module 是 regular convolution 和 depth-wise separable convolution 之间的过度的观点,并将 inception module 引申到极致,提出 xception(extreme inception) 结构(也即 depth-wise separable convolution),在同 inception-v3 参数相仿的情况下,在 ImageNet 和 JFT 数据集上,优于 inception-v3!

2 Advantages / Contributions

  • 提出一种解释,inception modules 是传统卷积和 depth-wise separable convolution 卷积的过渡阶段
  • 提出的 xception 结构和 Inception V3 的相仿的 parameters,但是 performance 要稍微好些(ImageNet、JFT 数据集)
    the performance gains are not due to increased capacity but rather to a more efficient use of model parameters.

传统 inception

  • 1×1 cross-channel correlations
  • 3×3 all correlations(cross-channel correlations + spatial correlations)

fundamental hypothesis behind Inception: cross-channel correlations and spatial correlations

  • are sufficiently decoupled
  • not to map them jointly

xception 或者 depth-wise separable convolution

  • 3×3 spatial correlations
  • 1×1 cross-channel correlations

3 Innovations

感觉最大的创新点不是提出 xception 结构, 而是认为 inception 是 regular convolution 与 depth-wise separable convolution 的过渡阶段

出发点是从 spatial convolution 卷积的 channel space 分割情况来划分的,传统卷积 single-segment case,depth-wise convolution channels 是 one segment per channel,两个极端。inception 介于 两者之间!懂 group 卷积就很好理解了!一个所有人一组,一个一人一组,一个几个人一组!

多说一句,不得不佩服 google,实验资源相当的恐怖!

4 Method

4.1 inception to xception

1)inception v3
在这里插入图片描述
2)简化下 inception v3
在这里插入图片描述
3)和 figure 2 等价的形式,我个人的理解如我画的红色部分,图 2 input 经过 1x1 变成3 份,图 3 把 3份合起来,从 output channels 的角度看,我们把输入分成了三份,去进行后续的 3x3 操作!
在这里插入图片描述
4)引申一下,从output channels 的角度看,我们可以划分成极端的 channels number 份,接后续的 3x3 卷积!这样就相当于先 point-wise convolution,然后 depth-wise convolution,与 depth-wise separable convolution 的顺序正好相反,但是不影响,因为都是两者的堆叠形式!
在这里插入图片描述

4.2 Xception(extreme inception) 和 depth-wise separable convolution 的不同

1)depth-wise 和 point wise convolution 的顺序
extreme inception:先 1×1 再 3×3,depth-wise separable convolution 先 3×3 再 1×1

2)是否 non-linear activation
extreme inception 中,1x1 和 3x3 之间有 non-linear activation,depth-wise separable convolution 的 3×3 与 1×1没有 non-linear convolution!

第一种不同不影响,因为都是两者的堆叠形式,先后顺序影响不大,作者实现的时候用的 depth-wise separable convolution,在 keras 中为 SeparableConv2D https://keras.io/layers/convolutional/#separableconv2d

论文中说注意不要和数字图像处理中的 spatially separable convolution 混淆了,也简写成 separable convolution,指的是类似二维高斯可分离卷积这种吗?

4.3 Xception

36 layers 14 modules
在这里插入图片描述
注意两点:
1)上图中每一个 SeparableConv 后都接一个 BatchNormalization
2)所有 SeparableConvdepth_multiplier 参数都设置为1,也即 depth-wise convolution 的输入和输出 channels 相同,官方文档介绍如下:

depth-wise convolution output channels = input channels * depth_multiplier
在这里插入图片描述
https://keras.io/layers/convolutional/#separableconv2d

5 Datasets

  • ImageNet:1000 classes (single-label classification task,1M+)
  • JFT:17,000-class (multi-label classification task,350M)
  • FastEval14k:6,000 classes(14,000 images with dense annotations,36.5 labels per image on average),评估 Mean Average Precision for top 100 predictions (MAP@100)

JFT:Google 内部数据集,300倍于 ImageNet(Hinton主导弄的)

6 Experiments

Xception 和 inception-v3 参数量相仿,trained on 60 NVIDIA K80 GPUs(哈哈,一块都用不起,60块,望洋兴叹)
60块 NVIDIA K80 GPUs ImageNet 实验跑3天,JFT 迭代 300M 次 a month,full convergence 3 month(……)

6.1 Optimization configuration

On ImageNet:

  • Optimizer: SGD
  • Momentum: 0.9
  • Initial learning rate: 0.045
  • Learning rate decay: decay of rate 0.94 every 2 epochs

On JFT:

  • Optimizer: RMSprop
  • Momentum: 0.9
  • Initial learning rate: 0.001
  • Learning rate decay: decay of rate 0.9 every 3,000,000 samples

这些 hyper parameters(包括没写的 weight decay、dropout) 是 inception-v3 最优的,Xception 也用同样的超参数,没有专门进行调整(suboptimal),inception-v3 还用了 auxiliary classifier(Auxiliary loss tower),Xception 没有使用这个。

总结, 作者表达的是,用 Xception 同 inception-v3 PK,什么要求都你说的算(优化策略,超参数),我们俩一个重量级(capacity 或者说 parameters),你(inception-v3)就是打不过我(Xception)!我的武艺(architecture)就是胜你一筹。

6.2 Classification performance

1)ImageNet solo
在这里插入图片描述 在这里插入图片描述

2)JFT solo
FC layers:two fully-connected layers of 4096 units each before the logistic regression layer
在这里插入图片描述
在这里插入图片描述 在这里插入图片描述

可以看出相比 inception-v3,Xception 在 JFT 数据集上的提升要大于在 ImageNet 数据集上的提升,作者的解释为,inception-v3 was developed with a focus on ImageNet and may thus be by design over-fit to this specific task.

6.3 Size and speed

在这里插入图片描述
没有 FC layer 的参数量,training steps per second is reported on ImageNet with 60 K80 GPUs running synchronous gradient descent.

6.4 Effect of the residual connections

在 ImageNet 上
在这里插入图片描述
有些不厚道(uncharitable)——作者说的,因为 non-residual 和 residual 都用的是 residual 的 optimization parameters,但是还是可以看出,redisual 结构的优势。在搭建 depth-wise separable convolution 的时候, residual 结构不是必要的,作者也跑了 VGG + depth-wise separable convolution non-residual 的结构,在与 inception-v3 相同的参数量下,在 ImageNet 和 JFT 上的结果要优于 Inception-v3

6.5 Effect of an intermediate activation after pointwise convolutions

在 depth-wise convolution 和 point-wise convolution 直接不加 activation funciton 效果最好,作者分析 possibly due to a loss of information,激活对有深度(channels 不为1)的 feature map 有效,对 1 channel 的可能有害。
在这里插入图片描述

7 Conclusion / Future work

We noted earlier the existence of a discrete spectrum between regular convolutions and depthwise separable convolutions, parametrized by the number of independent channel space segments used for performing spatial convolutions.

从传统的 convolution,到 depth-wise separable convolution,存在一个 discrete spectrum,就是 depth-wise convolution 的对象有多深,传统 convolution 对应的深度为 input channels,depth-wise separable convolution 对应的深度为 1,我们没有理由相信 depth-wise separable convolution 是最优的,可能最优的存在于 discrete spectrum 之上,all to 1 之间……


Q1:synchronous gradient descent(ImageNet) 和 asynchronous gradient descent(JFT)的细节和区别
Q2:如何解释 Xception-Non-residual 一开始 accuracy 停滞不前,或者说泛一点,跑自己的 model 时候,遇见这种情况怎么解决(accuracy 在开始的一些 epoch 下一直很低,例如类别分之一,然后某个 epoch 突然开始正常了),什么原因导致的呢?


8 References

【1】无需数学背景,读懂ResNet、Inception和Xception三大变革性架构

### 回答1: Xception是一种深度学习模型,它使用深度可分离卷积来提高模型的效率和准确性。深度可分离卷积是一种卷积操作,它将标准卷积分成两个步骤:深度卷积和逐点卷积。深度卷积在每个输入通道上执行卷积,而逐点卷积在每个通道之间执行卷积。这种方法可以减少计算量和参数数量,同时提高模型的准确性。Xception模型在图像分类、目标检测和语义分割等任务中表现出色。 ### 回答2: Xception是一个基于深度可分离卷积的深度学习架构。深度学习在计算机视觉和自然语言处理等领域取得了巨大成功,但也面临着计算复杂性和模型尺寸庞大的问题。Xception通过引入深度可分离卷积来解决这些问题。 深度可分离卷积由分离卷积和逐点卷积两个步骤组成。首先,分离卷积将输入张量分别应用于空间和通道维度上的低秩张量。通过这种方式,模型可以分别学习特征的空间位置和通道之间的依赖关系。其次,逐点卷积将通道维度上的低秩张量应用于输出特征图。逐点卷积允许每个通道单独学习特征。 通过使用深度可分离卷积,Xception减少了参数的数量,并提高了模型的计算效率。与传统卷积相比,深度可分离卷积在减少计算量的同时,还可以提高模型的表示能力。这意味着Xception可以更好地捕捉和表示输入数据中的特征。 在实践中,Xception在图像分类、目标检测和语义分割等任务上都取得了非常好的表现。由于其较小的模型尺寸和高效的计算性能,Xception成为了很多研究者和工程师首选的深度学习架构之一。 总而言之,Xception通过引入深度可分离卷积来解决深度学习中的计算复杂性和模型尺寸庞大的问题。它减少了模型参数的数量、提高了模型的计算效率,同时又保持了较高的表示能力。作为一种强大的深度学习架构,Xception在多个领域具有广泛的应用和研究价值。 ### 回答3: Xception是一种深度学习模型,使用深度可分离卷积的方法来提高模型的准确性和效率。深度可分离卷积是一种卷积操作,由分离卷积和逐元素卷积两个步骤组成。 在传统卷积中,输入图像通过一个卷积核进行卷积操作,得到特征图。而在深度可分离卷积中,卷积操作被分解成两个步骤。首先,输入图像通过一个分离卷积核进行深度卷积,从而获取特征深度信息。然后,逐元素卷积操作被应用于分离卷积的输出,以获取空间信息。这种分离的方式减少了计算量和参数量,提高了模型的效率。 Xception模型使用了这种深度可分离卷积的结构。相比于传统的卷积方式,Xception模型能够更好地捕捉到输入图像中的细节信息。同时,由于深度卷积和逐元素卷积的分离,Xception模型的参数量大大减少,使得模型更加轻量化,便于在移动设备等资源受限的场景中应用。 通过对ImageNet大规模图像数据库进行训练,Xception模型取得了很好的性能。它在图像分类、目标检测和语义分割等任务上都取得了优秀的结果。同时,Xception模型也为其他相关任务,如迁移学习和特征提取等,提供了一个有力的基础。 总的来说,Xception是一种利用深度可分离卷积的深度学习模型,它在提高准确性和效率方面取得了显著的进展。它的设计和性能使得它成为了计算机视觉领域一个重要的技术突破。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值