Commit f50e7066 authored by Rayyyyy's avatar Rayyyyy
Browse files

Add icon and SCNet.

parent 4b8cb8fc
# Vision-Transformers-cifar10_pyTorch
## 论文
`An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale`
- https://arxiv.org/abs/2010.11929
## 模型结构
Vision Transformer先将图像用卷积进行分块以降低计算量,再对每一块进行展平处理变成序列,然后将序列添加位置编码和cls token,再输入多层Transformer结构提取特征,最后将cls tooken取出来通过一个MLP(多层感知机)用于分类。
![img](./img/vit.png)
## 算法原理
图像领域借鉴《Transformer is all you need!》算法论文中的Encoder结构提取特征,Transformer的核心思想是利用注意力模块attention提取特征:
![img](./img/attention.png)
## 环境配置
### Docker(方法一)
此处提供[光源](https://www.sourcefind.cn/#/service-details)拉取docker镜像的地址与使用步骤
......@@ -22,6 +24,7 @@ docker run -it -v /path/your_code_data/:/path/your_code_data/ --shm-size=32G --p
cd /path/workspace/
pip install pandas==1.5.3
```
### Dockerfile(方法二)
此处提供dockerfile的使用方法
```
......@@ -29,6 +32,7 @@ cd ./docker
docker build --no-cache -t yolov5:6.0 .
docker run -it -v /path/your_code_data/:/path/your_code_data/ --shm-size=32G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name docker_name imageID bash
```
### Anaconda(方法三)
此处提供本地配置、编译的详细步骤,例如:
......@@ -46,10 +50,10 @@ torchvision:0.10.0
pip install -r requirements.txt
pip install pandas==1.5.3
```
## 数据集
`CIFAR-10`
- [https://www.cs.toronto.edu/~kriz/cifar.html](https://www.cs.toronto.edu/~kriz/cifar.html)
- http://113.200.138.88:18080/aidatasets/project-dependency/cifar
训练数据目录结构如下,用于正常训练的完整数据集请按此目录结构进行制备:
```
......@@ -73,7 +77,6 @@ bash train.sh
```
## result
![accuracy](./img/accuracy.png)
### 精度
......@@ -83,15 +86,16 @@ bash train.sh
| 卡数 | 数据精度 | 准确率 |
| :------: | :------: | :------: |
| 4 | fp32 | 84.91% |
## 应用场景
### 算法类别
`图像分类`
图像分类
### 热点应用行业
`制造,环保,医疗,气象`
制造,环保,医疗,气象
## 源码仓库及问题反馈
- https://developer.hpccube.com/codes/modelzoo/vision-transformers-cifar10_pytorch
## 参考资料
- https://github.com/kentaroy47/vision-transformers-cifar10
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