> For the complete documentation index, see [llms.txt](https://nakamura-shogo.gitbook.io/dev-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nakamura-shogo.gitbook.io/dev-wiki/cv/aiml_cv_classification/mobilenet.md).

# MobileNet

* 原論文
  * MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications(Google Inc.)
  * <https://arxiv.org/pdf/1704.04861>
* 概要

  * Mobileアプリケーション向けに効率的なNetworkを研究したアーキテクチャ。
  * CNNをdepthwise(dw)とpointwise(pw)に分割して効率的な畳み込みを実現した。
    * 通常の畳み込みのパラメータ数
      * ksize x ksize x InputChannelSize x OutputChannelSize
    * dw + pw
      * ksize x ksize x InputChannelSize + InputChannelSize x OutputChannelSize
  * 層数は、CNNが14個相当(モジュールとしては、dwとpwなので28個ある)、Linear層が1個である。

  ![](https://3294144247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmH8NcJCWxXCHFaEhW1uq%2Fuploads%2Fgit-blob-ad5d04f7ee460c4d53dec5e6088d10d3bf6250cb%2Fcv_history_002_classification_mobile_net_v1_dw_and_pw.png?alt=media) (出典: 中村が作成)
* アーキテクチャ図

  * 以下のブロックをスタックすることで実現する。
  * CNN以外には、BatchNormalizationとReLUが使われている。

  ![](https://3294144247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmH8NcJCWxXCHFaEhW1uq%2Fuploads%2Fgit-blob-546e34b0ce190d73f624510c81550753b0f0fe1b%2Fcv_history_002_classification_mobile_net_v1_architecture_sub_block.png?alt=media) (出典: 原論文より)

  * 上記のブロックを最終的なスタックは以下のようになっている。

  ![](https://3294144247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmH8NcJCWxXCHFaEhW1uq%2Fuploads%2Fgit-blob-519ee7fa458ee965154e99533ee34ac8e1f07c49%2Fcv_history_002_classification_mobile_net_v1_architecture_overall.png?alt=media) (出典: 原論文より)
* 実装例
  * pytorch非公式
    * <https://github.com/wjc852456/pytorch-mobilenet-v1>
