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
InceptionV3_pytorch
Commits
86505b95
"next_docs/en/git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "869cf0a609859b7fe328426f68b9d2c9237ce40d"
Commit
86505b95
authored
Nov 02, 2024
by
dcuai
Browse files
Update README.md ——24.04.2
parent
9f2f6203
Pipeline
#1834
canceled with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
22 deletions
+77
-22
README.md
README.md
+77
-22
No files found.
README.md
View file @
86505b95
# InceptionV3
# InceptionV3
## 论文
## 模型介绍
`Rethinking the Inception Architecture for Computer Vision`
InceptionV3是一种卷积神经网络模型,由Google的研究员Christian Szegedy等人在2015年提出。该模型采用了一种名为“Inception”的模块化结构,允许网络在不同的尺度上进行卷积操作,从而提高了网络的精度和效率。
-
https://arxiv.org/pdf/1512.00567v3.pdf
## 模型结构
## 模型结构
InceptionV3的整体结构由多个Inception模块组成,每个Inception模块由多个并行的卷积层和池化层组成。这些并行的卷积层和池化层的输出再被级联在一起,形成了一个高维度的特征向量,这个向量再被输入到下一个Inception模块中进行处理。
InceptionV3的整体结构由多个Inception模块组成,每个Inception模块由多个并行的卷积层和池化层组成。这些并行的卷积层和池化层的输出再被级联在一起,形成了一个高维度的特征向量,这个向量再被输入到下一个Inception模块中进行处理。
<div
align=
center
>
<img
src=
"images/模型结构图.png"
/>
</div>
## 算法原理
Inception-v3 架构的使用 factorized convolutions (分解卷积) ,使用两个3x3的卷积核代替5x5的卷积核可以减少 28% 的参数量,另外分解后多使用了一个激活函数,增加了非线性表达的能力,分解示意图如下所示:
<div
align=
center
>
<img
src=
"images/算法原理.png"
/>
</div>
## 环境配置
### Docker(方法一)
此处提供
[
光源
](
https://www.sourcefind.cn/#/service-details
)
拉取docker镜像的地址与使用步骤,以及
[
光合
](
https://developer.hpccube.com/tool/
)
开发者社区深度学习库下载地址
```
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu20.04-dtk24.04.2-py3.10
docker run -it --shm-size=128G -v /path/your_code_data/:/path/your_code_data/ -v /opt/hyhal:/opt/hyhal:ro --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name inceptionv3_pytorch <your IMAGE ID> bash # <your IMAGE ID>为以上拉取的docker的镜像ID替换
```
### Dockerfile(方法二)
此处提供dockerfile的使用方法
```
docker build --no-cache -t inceptionv3:latest .
docker run -it --shm-size=128G -v /path/your_code_data/:/path/your_code_data/ -v /opt/hyhal:/opt/hyhal:ro --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name inceptionv3_pytorch bash
```
### Anaconda(方法三)
此处提供本地配置、编译的详细步骤,例如:
关于本项目DCU显卡所需的特殊深度学习库可从
[
光合
](
https://developer.hpccube.com/tool/
)
开发者社区下载安装。
```
DTK驱动:dtk24.04.2
python:python3.10
torch: 2.1.0
torchvision: 0.16.0
```
`Tips:以上dtk驱动、python、torch等DCU相关工具版本需要严格一一对应`
## 数据集
## 数据集
在本测试中可以使用ImageNet数据集。
在本测试中可以使用ImageNet数据集。
## InceptionV3训练
### 环境配置
提供
[
光源
](
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
## 训练
将训练数据解压到data目录下。
预训练权重快速下载中心:
[
AIDatasets
](
http://113.200.138.88:18080/aidatasets
)
预训练权重快速下载中心:
[
AIDatasets
](
http://113.200.138.88:18080/aidatasets
)
项目中的预训练权重可从快速下载通道下载:
[
ImageNet
](
http://113.200.138.88:18080/aidatasets/project-dependency/imagenet-2012
)
项目中的预训练权重可从快速下载通道下载:
[
ImageNet
](
http://113.200.138.88:18080/aidatasets/project-dependency/imagenet-2012
)
可参考
[
data/extract_ILSVRC.sh
](
https://developer.sourcefind.cn/codes/modelzoo/inceptionv3_pytorch/-/blob/master/data/extract_ILSVRC.sh
)
处理数据集,处理后数据集结构如下:
```
data
└── imagenet
├── train
│ ├── n01440764
│ │ ├── n01440764_10026.JPEG
│ │ ├── n01440764_10027.JPEG
├──val
│ ├── n01440764
│ │ ├── ILSVRC2012_val_00000293.JPEG
├── meta
│ ├── train.txt
│ └── val.txt
```
训练命令:
## 训练
训练命令:
```
chmod +x inception_v3.sh
./inception_v3.sh ${isperf} ${output_json} ${ngpu}
./inception_v3.sh ${isperf} ${output_json} ${ngpu}
例如:HIP_VISIBLE_DEVICES=4,5,6,7 ./inception_v3.sh 0 output.json 4
```
${isperf}=0时,执行main.py;${isperf}=1时,执行perf.py
## result
<div
align=
center
>
<img
src=
"images/result.png"
/>
</div>
##
准确率数据
##
# 精度
测试数据使用的是ImageNet数据集,使用的加速卡是DCU Z100L。
测试数据使用的是ImageNet数据集,使用的加速卡是DCU Z100L。
...
@@ -38,6 +87,12 @@ InceptionV3的整体结构由多个Inception模块组成,每个Inception模块
...
@@ -38,6 +87,12 @@ InceptionV3的整体结构由多个Inception模块组成,每个Inception模块
| :--: | :-----------------------: |
| :--: | :-----------------------: |
| 8 | top1:0.73888;top5:0.90528 |
| 8 | top1:0.73888;top5:0.90528 |
### 源码仓库及问题反馈
## 应用场景
### 算法类别
https://developer.hpccube.com/codes/modelzoo/inceptionv3_pytorch
`图像分类`
### 热点应用行业
`科研,制造,医疗,教育`
## 源码仓库及问题反馈
-
https://developer.hpccube.com/codes/modelzoo/inceptionv3_pytorch
## 参考资料
-
https://github.com/Lornatang/InceptionV3-PyTorch.git
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