OCR for Baidu competition (level one)
Environment requirements:
tensorflow 1.1.0, python 2.7
This work is based on model from Peiwen Wang whose excellent work (https://github.com/ypwhs/baiduyun_deeplearning_competition) is carried out on keras. Thanks to him sincerely.
- Training dataset
- Model
- Loss & accuracy
- Features learned by different level layers
- Weights and biases
Training dataset has 100,000 pictures including characters from 0123456789+-*() with different length as pictures below show.The label format, for example, to the first training picture, is (7+5)+4 16. You can download dataset here https://pan.baidu.com/s/1geT4z9x , keep in mind that the label file is inside the unpacked folder.
The neural network includes conv network,RNN(GRU) and CTC (Connectionist Temporal Classifier) as picture below shows.
There are three convnet modules,layer1,layer2,layer3, every module has two convnet layers and a max_pool layer. [3,3] kernel and [1,1] strides are used behind every convnet layers. [2,2] kernel and [2,2] strides are used by max_pool layer. What's more, learning features by different convnet modules are outputted by tensorboard.
As we can see, after training about 2.5h, there is a sharp drop of CTCloss, meanwhile the training and validation accuracy turn to be close to 1.
Within the same level convnet layers,only some of them have learned effective features.
With the layers going deeper, features learned by them become more and more abstract.