# MobileNet-V2
An implementation of `Google MobileNet-V2` introduced in PyTorch. According to the authors, `MobileNet-V2` improves the state of the art performance of mobile models on multiple tasks and benchmarks. Its architecture is based on an inverted residual structure where the input and output of the residual block are thin bottleneck layers opposite to traditional residual models which use expanded representations in the input an MobileNetV2 uses lightweight depthwise convolutions to filter features in the intermediate expansion layer.
Link to the original paper: [Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation](https://arxiv.org/abs/1801.04381)
This implementation was made to be an example of a common deep learning software architecture. It's simple and designed to be very modular. All of the components needed for training and visualization are added.
## Inverted Residuals with Linear Bottlenecks
<div align="center">
<img src="https://github.com/MG2033/MobileNet-V2/blob/master/figures/irc.png"><br><br>
</div>
## Usage
This project uses Python 3.5.3 and PyTorch 0.3.
### Main Dependencies
```
pytorch 0.3
numpy 1.13.1
tqdm 4.15.0
easydict 1.7
matplotlib 2.0.2
tensorboardX 1.0
```
Install dependencies:
```bash
pip install -r requirements.txt
```
### Train and Test
1. Prepare your data, then create a dataloader class such as `cifar10data.py` and `cifar100data.py`.
2. Create a .json config file for your experiments. Use the given .json config files as a reference.
### Run
```
python main.py config/<your-config-json-file>.json
```
### Experiments
Due to the lack of computational power. I trained on CIFAR-10 dataset as an example to prove correctness, and was able to achieve test top1-accuracy of 90.9%.
#### Tensorboard Visualization
Tensorboard is integrated with the project using `tensorboardX` library which proved to be very useful as there is no official visualization library in pytorch.
You can start it using:
```bash
tensorboard --logdir experimenets/<config-name>/summaries
```
These are the learning curves for the CIFAR-10 experiment.
<div align="center">
<img src="https://github.com/MG2033/MobileNet-V2/blob/master/figures/tb.png"><br><br>
</div>
## TODO
Measuring FLOPS on this architecture to compare with other realtime architectures. PyTorch doesn't have a profiler like TensorFlow's. So, I'll be working on measuring FLOPS on my own.
## License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
MobileNet-V2-master.zip (15个子文件)
MobileNet-V2-master
cifar10data.py 2KB
figures
irc.png 26KB
tb.png 37KB
train.py 7KB
utils.py 3KB
main.py 1KB
model.py 4KB
requirements.txt 77B
cifar100data.py 4KB
config
cifar100_test_exp.json 641B
cifar10_test_exp.json 639B
LICENSE 11KB
README.md 3KB
layers.py 3KB
.gitignore 1KB
共 15 条
- 1
资源评论
- 乒乒乓乓丫2018-11-08好像缺少一个配置文件啊
qq_33666011
- 粉丝: 17
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功