crnn 不同backbone探索
测试环境
- v100 10cpu 64Gi MEM
- torch==1.6.0
测试数据:银行卡卡号识别
- 训练集:32000+
- 验证集::3000+
训练
- train 200 epoch
测试
- 100张图求平均,跑了3遍
结果
模型 | 准确率 | 模型大小(M) | 说明 | inferTime(GPU/ms) | inferTime(CPU/ms) |
---|---|---|---|---|---|
mobilev3+CTC | 92.27 | 2.63 | baseline | ||
mobilev3+CTC | 93.91 | 2.63 | 1+2 | ||
mobilev3+CTC | 94.33 | 2.63 | 1+3 | ||
mobilev3+CTC | 95.00 | 2.63 | 1+3+5 | 5.7+6.0+5.9 | 19.4+19.0+18.5 |
lcnet+CTC | 95.53 | 4.75 | 1+3 | 5.9+5.8+5.8 | 20.7+21.8+20.2 |
mobilev3+2blstm+CTC | 94.58 | 13.6 | 1+2+4 | 9.8+9.6+9.7 | 44.3+43.9+45.3 |
repvggA0+CTC | 96.34 | 32.9 | 1+2 | ||
repvggA0+CTC | 96.45 | 32.9 | 1+3 | 2.2+2.3+2.3 | 16.4+16.3+16.4 |
repvggA1+CTC | 96.93 | 52.8 | 1+3 | 2.4+2.4+2.4 | 22.0+21.5+21.9 |
resnet18+CTC | 96.34 | 45.5 | 1+2 | ||
resnet18+CTC | 96.59 | 45.5 | 1+3 | 4.2+4.2+4.1 | 29.6+30.0+29.1 |
resnet34+CTC | 96.65 | 86 | 1+2 | 6.8+6.7+6.8 | 52.4+48.3+48.4 |
resnet34+CTC | 96.84 | 86 | 1+3 | ||
densenet121+CTC | 97.90 | 86 | 1+3 | 17.8+18.5+18.2 | 127.2+123.7+127.5 |
- add Text-Image-Augmentation
- use step Lr
- use poly Lr
- add blstm
- load premodel
基本结论:对于端侧模型mobilev3和lcnet(0.5)都不错,对于服务端模型,repvgg是个不错的选择,速度快,精度高。
继续提高
基于repvgg的思路,继续提升小模型准确率:
模型 | 准确率 | 模型大小(M) | 说明 | inferTime(GPU/ms) | inferTime(CPU/ms) | 提升 |
---|---|---|---|---|---|---|
mobilev3+CTC | 94.33 | 2.63 | None | 5.7+6.0+5.9 | 19.4+19.0+18.5 | baseline |
mobilev3+CTC | 94.58 | 2.63 | 1 | 5.7+6.0+5.9 | 19.4+19.0+18.5 | 0.25 |
mobilev3+CTC | 94.81 | 2.63 | 1+2 | 5.7+6.0+5.9 | 19.4+19.0+18.5 | 0.48 |
lcnet+CTC | 95.53 | 4.75 | None | 5.9+5.8+5.8 | 20.7+21.8+20.2 | baseline |
lcnet+CTC | 95.83 | 4.75 | 1 | 5.9+5.8+5.8 | 20.7+21.8+20.2 | 0.3 |
lcnet+CTC | 96.37 | 4.75 | 1+2 | 5.9+5.8+5.8 | 20.7+21.8+20.2 | 0.84 |
lcnet+CTC | 96.40 | 4.75 | 1+2+3 | 5.9+5.8+5.8 | 20.7+21.8+20.2 | 0.87 |
lcnet+CTC | 98.38 | 4.75 | 1+2+3+4 | 5.9+5.8+5.8 | 20.7+21.8+20.2 | 2.85 |
- add repvggblock
- add L2 loss
- warm up 20 epoch
- add 3w+ train data
基本结论: 加数据,yyds