资源算法**MobileNetV2**(TVM Supported)

**MobileNetV2**(TVM Supported)

2019-09-10 | |  104 |   0 |   0

Reproduction of MobileNetV2 using MXNet

This is a MXNet implementation of MobileNetV2 architecture as described in the paper Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation.

Pretrained Models on ImageNet

We provide pretrained MobileNet models on ImageNet, which achieve slightly better accuracy rates than the original ones reported in the paper. We think the improved accuracy relies on additional augmentation strategy that use 480xN as input, and random scale between 0.533 ~ 1.0 at early training stages.

The top-1/5 accuracy rates by using single center crop (crop size: 224x224, image size: 256xN) on validation set:

Network|Multiplier|Top-1|Top-5| :---:|:---:|:---:|:---:| MobileNet V2|1.0|71.75|90.15| MobileNet V2|1.4|73.09|91.09|

More pretrained models with different multiplier settings would be uploaded later.

Normalization

The input images are substrated by mean RGB = [ 123.68, 116.78, 103.94 ].

Inference

The inference python script is relatively independent from MXNet, it relies on nnvm to build a computation graph and perform the inference operations. Since nnvm is built to support neural network inference on any device enabled with OpenCL, therefore, it's quite efficient to predict on an Intel/AMD/Mali GPU. Here is an concrete example:

>> python from_mxnet.py[14:52:11] src/runtime/opencl/opencl_device_api.cc:205: Initialize OpenCL platform 'Intel Gen OCL Driver'[14:52:12] src/runtime/opencl/opencl_device_api.cc:230: opencl(0)='Intel(R) HD Graphics Skylake ULT GT2' cl_device_id=0x7f091bbd2bc0elapsed: 2992.1 ms (2991.7 ms)('TVM prediction top-1:', 281, 'n02123045 tabby, tabby catn')('TVM prediction top-2:', 285, 'n02124075 Egyptian catn')('TVM prediction top-3:', 282, 'n02123159 tiger catn')('TVM prediction top-4:', 278, 'n02119789 kit fox, Vulpes macrotisn')('TVM prediction top-5:', 287, 'n02127052 lynx, catamountn')elapsed: 63.3 ms (62.8 ms)('TVM prediction top-1:', 281, 'n02123045 tabby, tabby catn')('TVM prediction top-2:', 285, 'n02124075 Egyptian catn')('TVM prediction top-3:', 282, 'n02123159 tiger catn')('TVM prediction top-4:', 278, 'n02119789 kit fox, Vulpes macrotisn')('TVM prediction top-5:', 287, 'n02127052 lynx, catamountn')elapsed: 62.6 ms (62.1 ms)('TVM prediction top-1:', 281, 'n02123045 tabby, tabby catn')('TVM prediction top-2:', 285, 'n02124075 Egyptian catn')('TVM prediction top-3:', 282, 'n02123159 tiger catn')('TVM prediction top-4:', 278, 'n02119789 kit fox, Vulpes macrotisn')('TVM prediction top-5:', 287, 'n02127052 lynx, catamountn')

Known Issues

Current implementation of dmlc/nnvm requires a merge with the PR submission here. For a quick solution, you can simply add 'clip' to the _identity_list variable in frontend/mxnet.py .

Miscellaneous

For Gluon version of MobileNetV2, please refer to chinakook/MobileNetV2.mxnet.

License

MIT License


上一篇:Pytorch-DPPO

下一篇:MXNMT

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...