Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
MobileNetV2_mmcv
Commits
d801c1de
Commit
d801c1de
authored
Nov 24, 2023
by
sunxx1
Browse files
更新readme
parent
e33bd906
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
18 deletions
+49
-18
.gitmodules
.gitmodules
+3
-0
README.md
README.md
+45
-18
images/20231124104337.png
images/20231124104337.png
+0
-0
images/d15a0e56517b4f7284a862f1d6eaef9a.png
images/d15a0e56517b4f7284a862f1d6eaef9a.png
+0
-0
mmclassification-mmcv
mmclassification-mmcv
+1
-0
No files found.
.gitmodules
0 → 100644
View file @
d801c1de
[submodule "mmclassification-mmcv"]
path = mmclassification-mmcv
url = http://developer.hpccube.com/codes/aicomponent/mmclassification-mmcv
README.md
View file @
d801c1de
# Mobilenetv2
## 论文
MobileNetV2: Inverted Residuals and Linear Bottlenecks
-
https://openaccess.thecvf.com/content_cvpr_2018/papers/Sandler_MobileNetV2_Inverted_Residuals_CVPR_2018_paper.pdf
## 模型介绍
MobileNetV2是一种轻量级的卷积神经网络模型,由Google在2018年提出。它是MobileNet系列中的第二个版本,主要用于移动设备和嵌入式设备等资源受限的环境中进行图像分类、目标检测等计算机视觉任务。
## 模型结构

MobileNetV2的网络结构主要由两部分组成:特征提取层和分类器。
特征提取层采用了一连串的瓶颈块来减小模型大小和计算量。每个瓶颈块包括逐点卷积、逐通道扩展和逐点卷积三个操作。其中逐点卷积用于降低特征图的通道数量,逐通道扩展则是为了增加特征图的深度,逐点卷积再次将通道数量转换为更小的值。MobileNetV2引入了倒残差结构,即先使用逐点卷积缩小通道数量,然后使用瓶颈块处理特征图,最后再使用逐点卷积扩展通道数量。最后一个重要的设计是Squeeze-and-Excitation (SE)模块,它可以用于进一步优化特征提取。SE模块通过使用全局平均池化来获取特征图中每个通道的全局信息,并使用两个全连接层来动态地调整每个通道的权重,以增强重要的特征并抑制无关的特征。
分类器采用全局平均池化和全连接层来进行图像分类。全局平均池化将特征图的每个通道降为一个值,然后将这些值传递给全连接层进行分类。这种方法不仅可以减少参数数量,还可以防止过拟合。
## 模型结构
## 数据集
MobileNetV2的网络结构主要由两部分组成:特征提取层和分类器。
在本测试中可以使用ImageNet数据集。

##
Mobilenetv2训练
##
环境配置
###
环境配置
###
Docker
下载工程代码:
```
python
git
clone
--
recursive
http
:
//
developer
.
hpccube
.
com
/
codes
/
modelzoo
/
mobilenetv2_mmcv
.
git
docker
pull
image
.
sourcefind
.
cn
:
5000
/
dcu
/
admin
/
base
/
pytorch
:
1.10
.
0
-
centos7
.
6
-
dtk
-
22.10
.
1
-
py37
-
latest
# <your IMAGE ID>用以上拉取的docker的镜像ID替换
docker
run
--
shm
-
size
10
g
--
network
=
host
--
name
=
nit
-
pytorch
--
privileged
--
device
=/
dev
/
kfd
--
device
=/
dev
/
dri
--
group
-
add
video
--
cap
-
add
=
SYS_PTRACE
--
security
-
opt
seccomp
=
unconfined
-
v
$
PWD
/
Mobilenetv2_mmcv
:
/
home
/
Mobilenetv2_mmcv
-
it
<
your
IMAGE
ID
>
bash
http://developer.hpccube.com/codes/aicomponent/mmclassification-mmcv.git
cd
Mobilenetv2_mmcv
/
mmclassification
-
mmcv
pip
install
-
r
requirements
.
txt
```
提供
[
光源
](
https://www.sourcefind.cn/#/service-details
)
拉取的训练的docker镜像:
## 数据集
*
训练镜像:docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:1.10.0-centos7.6-dtk-22.10.1-py37-latest
*
pip install -r requirements.txt
*
cd mmclassification
*
pip install -e .
在本测试中可以使用ImageNet数据集。
```
├── meta
├── train
├── val
```
### 训练
将训练数据解压到data目录下。
训练命令:
### 单机8卡
./mobilenetv2.sh
##
准确率数据
##
精度
测试数据使用的是ImageNet数据集,使用的加速卡是DCU Z100L。
...
...
@@ -47,9 +60,23 @@ http://developer.hpccube.com/codes/aicomponent/mmclassification-mmcv.git
| :--: | :-----------------------: |
| 8 | top1:0.71764;top5:0.90386 |
## result

## 应用场景
### 算法类别
图像分类
### 热点行业
制造,能源,交通,网安
### 源码仓库及问题反馈
https://developer.hpccube.com/codes/modelzoo/mobilenetv2
-
mmcv
https://developer.hpccube.com/codes/modelzoo/mobilenetv2
_
mmcv
### 参考
...
...
images/20231124104337.png
0 → 100644
View file @
d801c1de
55.1 KB
images/d15a0e56517b4f7284a862f1d6eaef9a.png
0 → 100644
View file @
d801c1de
23.8 KB
mmclassification-mmcv
@
0f6a312a
Subproject commit 0f6a312ab4b30c6e27efd93608268fe0fe3f7dcc
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment