Commit e6bc3604 authored by dcuai's avatar dcuai
Browse files

Merge branch 'icon' into 'master'

Add icon and scnet

See merge request !1
parents dc742209 42cbe60f
# VGG16 # VGG16
## 论文 ## 论文
`VERY DEEP CONVOLUTIONAL NETWORKS FOR LARGE-SCALE IMAGE RECOGNITION`
VERY DEEP CONVOLUTIONAL NETWORKS FOR LARGE-SCALE IMAGE RECOGNITION
- https://arxiv.org/abs/1409.1556 - https://arxiv.org/abs/1409.1556
## 模型结构 ## 模型结构
VGG模型是2014年ILSVRC竞赛的第二名,第一名是GoogLeNet。但是VGG模型在多个迁移学习任务中的表现要优于GoogLeNet。而且,从图像中提取CNN特征,VGG模型是首选算法。 VGG模型是2014年ILSVRC竞赛的第二名,第一名是GoogLeNet。但是VGG模型在多个迁移学习任务中的表现要优于GoogLeNet。而且,从图像中提取CNN特征,VGG模型是首选算法。
![20231124132639](./images/20231124132639.png) ![20231124132639](./images/20231124132639.png)
## 算法原理 ## 算法原理
VGG16共有16个层,是一个相当深的卷积神经网络。VGG各种级别的结构都采用了5段卷积,每一段有一个或多个卷积层。 VGG16共有16个层,是一个相当深的卷积神经网络。VGG各种级别的结构都采用了5段卷积,每一段有一个或多个卷积层。
![20231124132925](./images/20231124132925.png) ![20231124132925](./images/20231124132925.png)
## 环境配置 ## 环境配置
### Docker(方法一) ### Docker(方法一)
```bash
```python
git clone --recursive http://developer.hpccube.com/codes/modelzoo/vgg16_mmcv.git git clone --recursive http://developer.hpccube.com/codes/modelzoo/vgg16_mmcv.git
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:1.10.0-centos7.6-dtk-22.10.1-py37-latest 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替换 # <your IMAGE ID>用以上拉取的docker的镜像ID替换
...@@ -33,7 +26,6 @@ pip install -r requirements.txt ...@@ -33,7 +26,6 @@ pip install -r requirements.txt
``` ```
### Dockerfile(方法二) ### Dockerfile(方法二)
```plaintext ```plaintext
cd vgg16_mmcv/docker cd vgg16_mmcv/docker
docker build --no-cache -t vgg16_mmcv:latest . docker build --no-cache -t vgg16_mmcv:latest .
...@@ -42,9 +34,7 @@ docker run --rm --shm-size 10g --network=host --name=vgg16 --privileged --device ...@@ -42,9 +34,7 @@ docker run --rm --shm-size 10g --network=host --name=vgg16 --privileged --device
``` ```
### Anaconda(方法三) ### Anaconda(方法三)
1、关于本项目DCU显卡所需的特殊深度学习库可从光合开发者社区下载安装: https://developer.hpccube.com/tool/ 1、关于本项目DCU显卡所需的特殊深度学习库可从光合开发者社区下载安装: https://developer.hpccube.com/tool/
```plaintext ```plaintext
DTK驱动:dtk22.10.1 DTK驱动:dtk22.10.1
python:python3.7 python:python3.7
...@@ -55,67 +45,53 @@ Tips:以上dtk驱动、python、torch等DCU相关工具版本需要严格一 ...@@ -55,67 +45,53 @@ Tips:以上dtk驱动、python、torch等DCU相关工具版本需要严格一
``` ```
2、其它非特殊库参照requirements.txt安装 2、其它非特殊库参照requirements.txt安装
```plaintext ```plaintext
pip install -r requirements.txt pip install -r requirements.txt
``` ```
## 数据集 ## 数据集
在本测试中可以使用ImageNet数据集,下载ImageNet数据集:http://113.200.138.88:18080/aidatasets/project-dependency/imagenet-2012
在本测试中可以使用ImageNet数据集。
下载ImageNet数据集:https://image-net.org/
下载val数据:链接:https://pan.baidu.com/s/1oXsmsYahGVG3uOZ8e535LA?pwd=c3bc 提取码:c3bc 替换ImageNet数据集中的val目录,处理后的数据结构如下: 下载val数据:链接:https://pan.baidu.com/s/1oXsmsYahGVG3uOZ8e535LA?pwd=c3bc 提取码:c3bc 替换ImageNet数据集中的val目录,处理后的数据结构如下:
``` ```
data ├── data
├──imagenet │ ├── imagenet
├── meta │   ├── meta
├──val.txt │   ├── val.txt
├──train.txt │   ├── train.txt
... │   ...
├── train │   ├── train
├── val │   ├── val
``` ```
## 训练 ## 训练
将训练数据解压到data目录下。 将训练数据解压到data目录下。
### 单机8卡 ### 单机8卡
```
./vgg16.sh bash ./vgg16.sh
```
## result ## result
![img](https://developer.hpccube.com/codes/modelzoo/vit_pytorch/-/raw/master/image/README/1695381570003.png) ![img](https://developer.hpccube.com/codes/modelzoo/vit_pytorch/-/raw/master/image/README/1695381570003.png)
### 精度 ### 精度
测试数据使用的是ImageNet数据集,使用的加速卡是DCU Z100L。 测试数据使用的是ImageNet数据集,使用的加速卡是DCU Z100L。
| 卡数 | 精度 | | 卡数 | 精度 |
| :--: | :---------------------: | | :--: | :---------------------: |
| 8 | top1:0.7162;top5:0.9049 | | 8 | top1:0.7162;top5:0.9049 |
## 应用场景 ## 应用场景
### 算法类别 ### 算法类别
图像分类 图像分类
### 热点行业 ### 热点行业
制造,能源,交通,网安 制造,能源,交通,网安
## 源码仓库及问题反馈 ## 源码仓库及问题反馈
- https://developer.hpccube.com/codes/modelzoo/vgg16_mmcv
https://developer.hpccube.com/codes/modelzoo/vgg16_mmcv
## 参考资料 ## 参考资料
- https://github.com/open-mmlab/mmpretrain
https://github.com/open-mmlab/mmpretrain
icon.png

64.6 KB

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment