【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks

paper:MobileNetV2
code:caffe pytorch


文章目录

      • 1、Preliminaries, discussion and intuition
        • 1.1、Depthwise Separable Convolutions
        • 1.2、Linear Bottlenecks
      • 2、Model Architecture
        • 2.1、MobileNetV1 vs. MobileNetV2
        • 2.2 、Inverted residuals vs. residuals
        • 2.3、MobileNetV2
      • 3、Experiments
        • 3.1、ImageNet Classification
        • 3.2、Object Detection
        • 3.3、Semantic Segmentation
        • 3.4、Ablation study


Mobilenetv2核心模块是:inverted residual structure.

1、Preliminaries, discussion and intuition

1.1、Depthwise Separable Convolutions

【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第1张图片

深度可分离卷积相比普通卷积计算量减少8-9倍

下图是MobileNetv1使用普通卷积 vs 深度可分离卷积:

【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第2张图片

1.2、Linear Bottlenecks


manifold流行学习:

由于数据内部特征的限制,一些高维中的数据会产生维度上的冗余,实际上只需要比较低的维度就能唯一地表示。

流行学习学习到了“将数据从高维空间降维到低维空间,还能不损失信息”的映射,那这个映射能够输入原始数据(高维数据),输出数据更本质的特征(低维数据)。使该低维的数据能够反映原高维数据的某些本质结构特征

哪怕不能直接找到这个映射,那我们可以找到某种方法,在高维空间处理数据,等效于“将高维空间映射到低维空间、再处理数据、再映射回高维空间”的这种操作。

推荐阅读大佬的文章:对ResNet本质的一些思考


Relu会造成低维数据坍塌,即信息损失。

对于一个feature,先通过一个给定的变换规则T和ReLU,将它映射到它的n维空间中,然后再把得到的feature逆变换回原始空间,这时我们会发现这个feature已经改变了。

当output_dim即输入Relu的维度比较小时,前后相差很大;

维度低的feature,分布到ReLU的激活带上的概率小,因此经过后信息丢失严重,甚至可能完全丢失。而维度高的feature,分布到ReLU的激活带上的概率大,虽然可能也会有信息的部分丢失,但是无伤大雅,大部分的信息仍然得以保留。

【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第3张图片
1、If the manifold of interest remains non-zero volume after ReLU transformation, it corresponds to a linear transformation.
2、ReLU is capable of preserving complete information about the input manifold, but only if the input manifold lies in a low-dimensional subspace of the input space

可以通过改变卷积层的channel维度来改变输入空间的维度

MobileNetV1通过width multiplier parameter来调节,MobileNetV2使用expansion ratio来调节

2、Model Architecture

2.1、MobileNetV1 vs. MobileNetV2

【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第4张图片图片来自:https://zhuanlan.zhihu.com/p/33075914

Mobilenetv2先第一个1x1的卷积升维,第二个1x1卷积降维,且之后不使用激活函数

non-linearity destroys information in low-dimensional space

2.2 、Inverted residuals vs. residuals

【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第5张图片
图片来自:https://zhuanlan.zhihu.com/p/33075914

Resnet采用普通卷积,Mobilenetv2采用depthwise卷积

Resnet的1x1卷积先降维再升维,Mobilenetv2的1x1卷积先升维再降维,正好相反。

2.3、MobileNetV2

【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第6张图片
【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第7张图片

3、Experiments

3.1、ImageNet Classification

【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第8张图片

3.2、Object Detection

SSDLite:replace all the regular convolutions with separable convolutions (depthwise followed by 1 × 1 projection) in SSD prediction layers.
【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第9张图片

3.3、Semantic Segmentation

【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第10张图片

3.4、Ablation study

【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第11张图片
non-linearity destroys information in low-dimensional space
【轻量级网络】MobileNetV2_ Inverted Residuals and Linear Bottlenecks_第12张图片


参考:
MobileNet,从V1到V3
MobileNet V2 论文初读

你可能感兴趣的:(轻量级网络)