Skip to content

Commit d5341f5

Browse files
authored
Update README.md
1 parent 67b188d commit d5341f5

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

2-
# EssayKiller
2+
# WriteGPT
33

44
![image](https://img.shields.io/badge/License-Apache--2.0-green) ![image](https://img.shields.io/badge/License-MIT-orange) ![image](https://img.shields.io/badge/License-Anti--996-red) ![image](https://img.shields.io/badge/pypi-v0.0.1a4-yellowgreen) ![image](https://img.shields.io/badge/stars-%3C%205k-blue) ![image](https://img.shields.io/badge/issues-30%20open-brightgreen)
55

66
通用型议论文创作人工智能框架,仅限交流与科普。
77

88

99
## 项目简介
10-
EssayKiller是基于OCR、NLP领域的最新模型所构建的生成式文本创作AI框架,目前第一版finetune模型针对高考作文(主要是议论文),可以有效生成符合人类认知的文章,多数文章经过测试可以达到正常高中生及格作文水平。
10+
writeGPT是基于OCR、NLP领域的最新模型所构建的生成式文本创作AI框架,目前第一版finetune模型针对高考作文(主要是议论文),可以有效生成符合人类认知的文章,多数文章经过测试可以达到正常高中生及格作文水平。
1111

1212
| 项目作者 | 主页1 | 主页2 |
1313
| ------------- |:------:|:----:|
@@ -24,27 +24,27 @@ EssayKiller是基于OCR、NLP领域的最新模型所构建的生成式文本创
2424
- [x] 基于EAST、CRNN、Bert和GPT-2语言模型的高考作文生成AI
2525
- [x] 支持bert tokenizer,当前版本基于clue chinese vocab
2626
- [x] 17亿参数多模块异构深度神经网络,超2亿条预训练数据
27-
- [x] 线上点击即用的文本生成效果demo:[17亿参数作文杀手](https://colab.research.google.com/github/EssayKillerBrain/EssayKiller_V2/blob/master/colab_online.ipynb)
27+
- [x] 线上点击即用的文本生成效果demo:[17亿参数作文杀手](https://colab.research.google.com/github/EssayKillerBrain/writeGPT/blob/master/colab_online.ipynb)
2828
- [x] 端到端生成,从试卷识别到答题卡输出一条龙服务
2929

3030

3131

3232
### Colab线上作文生成功能
3333
国内没有足够显存的免费GPU平台,所以配合Google Drive将训练好的AI核心功能Language Network写作模块迁移到Colab。
3434

35-
当前线上仅开放文本生成功能,输入对应句子,AI返回生成文章。同一个句子可以输入多次,每一次输出都不同。也可以选择同时生成多篇文章。具体见:[17亿参数作文杀手](https://colab.research.google.com/github/EssayKillerBrain/EssayKiller_V2/blob/master/colab_online.ipynb)
35+
当前线上仅开放文本生成功能,输入对应句子,AI返回生成文章。同一个句子可以输入多次,每一次输出都不同。也可以选择同时生成多篇文章。具体见:[17亿参数作文杀手](https://colab.research.google.com/github/EssayKillerBrain/writeGPT/blob/master/colab_online.ipynb)
3636

3737
* 第一步:安装环境
38-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-15-22-13.png)
38+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-15-22-13.png)
3939

4040
* 第二部:加载模型
41-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-15-27-38.png)
41+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-15-27-38.png)
4242

4343
* 第三步:文章生成
44-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-15-27-14.png)
44+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-15-27-14.png)
4545

4646
* 写作效果
47-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-15-23-27.png)
47+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-15-23-27.png)
4848

4949

5050
## 本地环境
@@ -75,7 +75,7 @@ EssayKiller是基于OCR、NLP领域的最新模型所构建的生成式文本创
7575

7676
## 模型结构
7777
整个框架分为EAST、CRNN、Bert、GPT-2、DNN 5个模块,每个模块的网络单独训练,参数相互独立。infer过程使用pipeline串联,通过外接装置直接输出到答题卡。
78-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-15-35-00.png)
78+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-15-35-00.png)
7979

8080

8181
### 1. 输入
@@ -86,7 +86,7 @@ EssayKiller是基于OCR、NLP领域的最新模型所构建的生成式文本创
8686
### 2. 识别网络
8787
#### 2.1 EAST文本检测
8888
OpenCV 的EAST文本检测器是一个深度学习模型,它能够在 720p 的图像上以13帧/秒的速度实时检测任意方向的文本,并可以获得很好的文本检测精度。
89-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-15-45-54.png)
89+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-15-45-54.png)
9090

9191
<br>
9292

@@ -114,7 +114,7 @@ python multigpu_train.py --gpu_list=0 --input_size=512 --batch_size_per_gpu=14 -
114114
<br>
115115

116116
*检测结果*
117-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-16-25-01.png)
117+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-16-25-01.png)
118118

119119
除了EAST,也可以把识别网络替换为传统的CTPN等模型,github上有已经成熟的项目:https://github.com/Walleclipse/ChineseAddress_OCR
120120

@@ -162,7 +162,7 @@ Epoch 8/100
162162
BERT的全称是Bidirectional Encoder Representation from Transformers,即双向Transformer的Encoder。模型的主要创新点在pre-train方法上,用了Masked LM和Next Sentence Prediction两种方法分别捕捉词语和句子级别的representation。
163163

164164
模型的构成元素Transformer可以参考Google的 [Attention is all you need](https://arxiv.org/abs/1706.03762) ,BERT模型的结构如下图最左:
165-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-16-44-54.png)
165+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-16-44-54.png)
166166

167167
对比OpenAI GPT(Generative pre-trained transformer),BERT是双向的Transformer block连接;就像单向RNN和双向RNN的区别,直觉上来讲效果会好一些。
168168
<br>
@@ -203,12 +203,12 @@ python run.py --model bert
203203
```
204204
<br>
205205

206-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-16-40-19.png)
206+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-16-40-19.png)
207207

208208
测试时,需要用正则表达式过滤考试专用词,包括“阅读下面的材料,根据要求写作”,“要求:xxx”,“请完成/请结合/请综合xx”。
209209

210210
比如
211-
>![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-17-17-30.png)
211+
>![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-17-17-30.png)
212212
213213

214214
人们用眼睛看他人、看世界,却无法直接看到完整的自己。所以,在人生的旅程中,我们需要寻找各种“镜子”、不断绘制“自画像”来审视自我,尝试回答“我是怎样的人”“我想过怎样的生活”“我能做些什么”“如何生活得更有意义”等重要的问题。
@@ -227,7 +227,7 @@ python run.py --model bert
227227
**预训练**
228228
参考 [GPT2-ML](https://github.com/imcaspar/gpt2-ml/) 预训练模型,使用 [Quadro RTX 8000](https://www.nvidia.com/en-us/design-visualization/quadro/rtx-8000/) 训练 28w 步
229229

230-
>![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/2233.PNG)
230+
>![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/2233.PNG)
231231
232232

233233
<br>
@@ -252,11 +252,11 @@ CUDA_VISIBLE_DEVICES=0 python train/train_wc.py --input_file=/data/EssayKiller/
252252
### 3.判分网络
253253

254254
#### 3.1 DNN判分模型
255-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-18-59-12.png)
255+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-18-59-12.png)
256256

257257
这部分直接调用百度API。有现成的模型就不重复造轮子了,具体实现方式百度没有开源,这里简单描述一下语言模型的概念:
258258
语言模型是通过计算给定词组成的句子的概率,从而判断所组成的句子是否符合客观语言表达习惯。通常用于机器翻译、拼写纠错、语音识别、问答系统、词性标注、句法分析和信息检索等。
259-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-18-59-57.png)
259+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-18-59-57.png)
260260

261261
这里使用通顺度打分作为判断依据。
262262

@@ -273,20 +273,20 @@ CUDA_VISIBLE_DEVICES=0 python train/train_wc.py --input_file=/data/EssayKiller/
273273
4. 字数不能过长或过短
274274

275275
由于模型输出的文章不保证换行和分段,通过统计高考作文的常见段数、每段句数,编写脚本对输出进行划分。大多数情况下分段排版的结果都比较合理。
276-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-19-04-24.png)
276+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-19-04-24.png)
277277

278278
<br>
279279

280280
## 输出
281281
**答题卡**
282-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-19-07-53.png)
282+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-19-07-53.png)
283283

284284
**外接装置**
285285

286286
基于aedraw,一款开源的CNC(Computer Numerical Control数控机床)画图机器人,具有绘制图案、写字等功能,它也可以升级为激光雕刻等用途。
287287
详细教程见 http://aelab.net/ ,不仅能自己制作一台写字绘画机器人,而且能够掌握其工作原理拓展更多的应用。
288288

289-
![](https://github.com/EssayKillerBrain/EssayKiller_V2/blob/master/References/attachments/Clipboard_2020-09-29-19-12-07.png)
289+
![](https://github.com/EssayKillerBrain/writeGPT/blob/master/References/attachments/Clipboard_2020-09-29-19-12-07.png)
290290

291291
原版的输出临摹装置存在速度慢和格式不准的问题,通过改装和修改源代码得以优化
292292

@@ -344,7 +344,7 @@ CUDA_VISIBLE_DEVICES=0 python train/train_wc.py --input_file=/data/EssayKiller/
344344
year = {2020},
345345
publisher = {GitHub},
346346
journal = {GitHub repository},
347-
howpublished = {\url{https://github.com/EssayKillerBrain/EssayKiller}},
347+
howpublished = {\url{https://github.com/EssayKillerBrain/writeGPT}},
348348
}
349349
```
350350

@@ -372,7 +372,7 @@ CUDA_VISIBLE_DEVICES=0 python train/train_wc.py --input_file=/data/EssayKiller/
372372
[18] https://github.com/YCG09/chinese_ocr
373373
[19] https://github.com/xiaomaxiao/keras_ocr
374374
[20] https://github.com/nghuyong/ERNIE-Pytorch
375-
[21] https://zhuanlan.zhihu.com/p/43534801
375+
[21] https://zhuanlan.zhihu.com/p/43534801
376376
[22] https://blog.csdn.net/xuxunjie147/article/details/87178774/
377377
[23] https://github.com/JiangYanting/Pre-modern_Chinese_corpus_dataset
378378
[24] https://github.com/brightmart/nlp_chinese_corpus

0 commit comments

Comments
 (0)