Deep-digit-detector (and recognizer) in natural scene. A digit detection framework was implemented using keras with tensorflow backend.
This project implements deep-cnn-detector (and recognizer) in natural scene. I used keras framework and opencv library to build the detector. This detector determine digit or not with CNN classifier for the region proposed by the MSER algorithm.
A list of all the packages needed to run this project can be found in digit_detector.yml.
I recommend that you create and use an anaconda env that is independent of your project. You can create anaconda env for this project by following these simple steps.
$ conda env create -f digit_detector.yml
$ source activate digit_detector
The procedure to build digit detector is as follows:
Download train.tar.gz in http://ufldl.stanford.edu/housenumbers/ and unzip the file.
Svhn provides cropped training samples in matlab format. However, it is not suitable for detecting bounding box because it introduces some distracting digits to the sides of the digit of interest. So I collected the training samples directly using full numbers images and its annotation file.
I designed a Convolutional Neural Network architecture for detecting character. This network classify text and non-text.
The architecture is as follows:
The accuracy of the classifier is as follows
This Convolutional Neural Network recognize numbers. The architecture is same except for the number of class.
The architecture is as follows:
The accuracy of the classifier is as follows
In the running time, the detector operates in the 2-steps.
1) The detector finds candidate region proposed by the MSER algorithm.
2) The classifier determines whether or not it is a number in the proposed region.