• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

nolanliou/mobile-deeplab-v3-plus: Deeplab-V3+ model with MobilenetV2/MobilenetV3 ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

nolanliou/mobile-deeplab-v3-plus

开源软件地址(OpenSource Url):

https://github.com/nolanliou/mobile-deeplab-v3-plus

开源编程语言(OpenSource Language):

Python 94.1%

开源软件介绍(OpenSource Introduction):

Mobile Deeplab-V3+ model for Segmentation

This project is used for deploying people segmentation model to mobile device and learning. The people segmentation android project is here. The model is another Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation (Deeplab-V3+) implementation base on MobilenetV2 / MobilenetV3 on TensorFlow.

This project uses tf.estimator API to do training, and many code come from TensorFlow model,

Segmentation result

Dataset

This project supports 2 dataset.

  1. PASCAL VOC2012
  2. Supervisely People dataset.

Environment

  • TensorFlow v1.12.0
    1. No module named keras_applications: solution
    2. AttributeError: 'Estimator' object has no attribute '_distribution': solution.

Usage

  1. Prepare pretrained MobilenetV2 model(optional)
    bash prepare.sh
  2. Train
    • train on pascal voc 2012 dataset
    bash train_pascal_voc2012.sh
    # Tensorboard
    tensorboard --logdir=datasets/pascal_voc2012/exp/deeplab-v3-plus/train
    • train on people segmentation dataset
    mv people_segmentation.tar.gz datasets
    bash train_people_seg.sh
    # Tensorboard
    tensorboard --logdir=datasets/people_segmentation/exp/deeplab-v3-plus/train
  3. Export and Freeze model
    • pascal voc 2012 dataset
    bash export_pascal_voc2012.sh
    # Output
    # 1. TensorFlow Serving: datasets/pascal_voc2012/exp/deeplab-v3-plus/export/
    # 2. Frozen model: datasets/pascal_voc2012/exp/deeplab-v3-plus/export/frozen_model.pb
    • people segmentation dataset
    bash export_people_seg.sh
    # Output
    # 1. TensorFlow Serving: datasets/people_segmentation/exp/deeplab-v3-plus/export/
    # 2. Frozen model: datasets/people_segmentation/exp/deeplab-v3-plus/export/frozen_model.pb

Explanation

You could modify the parameters and add new backbones network easily.

  1. Use MobilenetV3 backbone: Change parameter from --backbone="MobielentV2" to --backbone="MobilenetV3"
  2. quant_friendly: Remove BN layer after Depthwise Convolution, replace relu6 with relu, method from A Quantization-Friendly Separable Convolution for MobileNets.

Result

  1. Pascal VOC2012
Backbone Pretrained backbone Augmented Input Size ASPP Decoder mIOU(%)
MobilenetV2 YES YES 513x513 NO NO 70.51
  • Environment: base_lr=0.007, training_steps=30000, learning_policy=poly, num_gpu=1.
  1. People Segmentation Dataset
Backbone Input Size Augmented ASPP Decoder Quant-Friendly Steps mIOU(%) Pretrained Model
MobilenetV2 256x256 YES NO YES YES 150000 81.68 model
MobilenetV2 256x256 YES YES YES YES 150000 83.33 model
MobilenetV3 256x256 YES No YES YES 150000 81.86 model
MobilenetV2 513x513 YES No YES YES 150000 89.55 model
  • Environment: base_lr=0.05, training_steps=150000, learning_policy=poly, num_gpu=1.
  • Augmented: use augmented dataset.

TODO

References

  1. https://github.com/tensorflow/models/tree/master/research/deeplab
  2. https://github.com/rishizek/tensorflow-deeplab-v3-plus
  3. https://github.com/kuan-wang/pytorch-mobilenet-v3/blob/master/mobilenetv3.py
  4. https://github.com/DrSleep/tensorflow-deeplab-resnet



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap