# 起步 - 下载 1. CC3.1-alpha.7.zip 2. CC_Demo.zip 解压 `CC3.1-alpha.7.zip ` 看到 `jobs`目录 把 `CC_Demo.zip` 也解压进去. ![image.png](http://upload-images.jianshu.io/upload_images/4907501-908b695b3fc46d27.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ## 文件结构 |文件|说明| |-|-| |make-lmdb.bat|生成训练所需的lmdb数据库 |train-*|启动训练的批处理脚本 |/models|为训练中保存的模型文件 |/samples|为训练中保存的模型文件 ## 其他 nvdia卡算力达到3.0及以上的可使用 train-GPU 系列批处理进行训练 2.非nvdia卡货算理不足的可使用train-CPU 系列批处理进行训练 3.finetune为微调训练 resume为训练 # 生成验证码样本 ![image.png](http://upload-images.jianshu.io/upload_images/4907501-14c28e63498c5e19.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) `\CC_Demo\samples` ![image.png](http://upload-images.jianshu.io/upload_images/4907501-a62b058482d3884c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) # 生成标签文件 ![image.png](http://upload-images.jianshu.io/upload_images/4907501-faaee8a7e0527888.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ![image.png](http://upload-images.jianshu.io/upload_images/4907501-68c34c701ffc3c2a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) # 生成数据库 `make-lmdb.bat` ![image.png](http://upload-images.jianshu.io/upload_images/4907501-3cb8ffc701c3b57f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) # 生成网络 分类数量看 label-map.txt 的行数 ![image.png](http://upload-images.jianshu.io/upload_images/4907501-dc9aa9983478e66f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) # 开始训练 `train-gpu.bat` ![image.png](http://upload-images.jianshu.io/upload_images/4907501-7a7766469b961bb3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ``` I1020 20:24:15.690196 6056 solver.cpp:422] Iteration 500, Testing net (#0) I1020 20:24:19.975440 6056 solver.cpp:512] Test net output #0: accuracy = 0 I1020 20:24:19.975440 6056 solver.cpp:512] Test net output #1: ctc_loss = 39.3123 (* 1 = 39.3123 loss) I1020 20:25:09.998301 6056 solver.cpp:422] Iteration 1000, Testing net (#0) I1020 20:25:13.999531 6056 solver.cpp:512] Test net output #0: accuracy = 0.9775 I1020 20:25:14.000530 6056 solver.cpp:512] Test net output #1: ctc_loss = 0.127884 (* 1 = 0.127884 loss) I1020 20:26:03.341352 6056 solver.cpp:422] Iteration 1500, Testing net (#0) I1020 20:26:07.203573 6056 solver.cpp:512] Test net output #0: accuracy = 1 I1020 20:26:07.204573 6056 solver.cpp:512] Test net output #1: ctc_loss = 0.0036365 (* 1 = I1020 20:26:56.820411 6056 solver.cpp:422] Iteration 2000, Testing net (#0) I1020 20:27:00.899644 6056 solver.cpp:512] Test net output #0: accuracy = 1 I1020 20:27:00.899644 6056 solver.cpp:512] Test net output #1: ctc_loss = 0.00361446 (* 1 = ``` 500样本时 accuracy = 0 **没有识别率** 1000样本时 accuracy = 0.9775 **达到97%** 1500样本时 accuracy = 1 **这已经可以停止** 2000样本时 accuracy = 1 **完成训练 达到100%** # 训练好的文件 选取最后一个库就可以了 ![image.png](http://upload-images.jianshu.io/upload_images/4907501-a90bed0b0810082c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) # 调用识别 使用训练好的文件识别 100%通过 没有错误的. ![image.png](http://upload-images.jianshu.io/upload_images/4907501-8d474afe9507d292.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)