ModelZooStd.md 3.32 KB
Newer Older
liuhy's avatar
liuhy committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 仓库目录结构
## 除预训练模型外其他文件总大小尽量不要超过50M

    Project
    ├── imgs
    │   ├── xxx.jpg
    │   └── xxx.jpg
    ├── model
    │   ├── xxx.pth #预训练模型 
    │   ├── xxx.onnx #对应的onnx模型
    │   └── xxx.mxr #对应的migraphx离线推理模型
    ├── icon.png
    ├── README.md
    ├── requirement.txt
    ├── model.properties
    ├── code_file1.py
    ├── code_file2.py
    ├── code_file3.py
    ├── dirs
    │   ├── code_file4.py
    │   ├── code_file5.py
    └── └── code_file6.py
### icon.png:模型的图标文件,可到[iconfont](https://www.iconfont.cn/?spm=a313x.7781069.1998910419.d4d0a486a)查找。
### README.md:参照本文件下面部分。
### requirement.txt:模型依赖统一写到此文件。
### model.properties:固定模板如下:

28
29
30
    # 模型名称
    modelName=模型名称(同项目名称)
    # 模型描述
liuhy's avatar
liuhy committed
31
    modelDescription=简要描述此模型(尽量50字以内)
32
33
34
35
    # 应用场景
    appScenario=推理,训练,OCR,nlp,cv,车牌识别,目标检测(首先描述推理训练信息,然后描述领域信息,多个标签用英文逗号隔开)
    # 框架类型
    frameType=Tensorflow,PyTorch,Migraphx,ONNXRuntime(说明使用的框架类型, 多个标签用英文逗号隔开)
liuhy's avatar
liuhy committed
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

以下是README.md的编写框架:

# 模型名称(此处需修改,用英文全称与简写)
## 模型介绍
此处填写模型介绍。
## 模型结构
此处简要介绍模型结构。
## 数据集
此处介绍使用的数据集

如添加了自己写的数据集处理脚本,在此处说明脚本的使用方法:

    python xxx.py \
        --args0 xxx \
        --args1 xxx  \
        ...
## 训练及推理
### 环境配置
提供[光源](https://www.sourcefind.cn/#/service-details)拉取的训练以及推理的docker镜像:
* 训练镜像:
* 推理镜像:
liuhy's avatar
liuhy committed
58
59
60
61

python依赖安装:

    pip install -r requirement.txt
liuhy's avatar
liuhy committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
### 训练与Fine-tunning
训练命令:

    python train.py \
        --args0 xxx \
        --args1 xxx  \
        ...

Fine-tunning命令:

    python train.py \
        --args0 xxx \
        --args1 xxx  \
        ...
### 预训练模型
model文件夹提供的预训练模型介绍,例如:

    Project
    ├── model
    │   ├── xxx.pth #pytorch预训练模型 
    │   ├── xxx.onnx #对应的onnx模型
    └── └── xxx.mxr #对应的migraphx离线推理模型
### 测试
测试命令:

    python test.py \
        --args0 xxx \
        --args1 xxx
        ...

### 推理
推理引擎版本:
* ONNXRuntime(DCU版本) >= x.xx.x
* Migraphx(DCU版本) >= x.x.x
#### ORT
基于ORT的推理命令:

    python ORT_infer.py \
        --args0 xxx \
        --args1 xxx \
        ...
#### Migraphx
基于Migraphx的推理命令:

    python Migraphx_infer.py \
        --args0 xxx \
        --args1 xxx \
        ...

## 性能和准确率数据
测试数据:[test data](链接),使用的加速卡:xxx。

根据模型情况填写表格:
| xxx | xxx | xxx | xxx | xxx |
| :------: | :------: | :------: | :------: |:------: |
| xxx | xxx | xxx | xxx | xxx  |
| xxx | xx | xxx | xxx | xxx |
119
## 源码仓库及问题反馈
liuhy's avatar
liuhy committed
120
121
* 仓库的https链接
## 参考
liuhy's avatar
liuhy committed
122
123
* 链接1
* 链接2
liuhy's avatar
liuhy committed
124
* ......