Standford Machine Learning - Photo OCR (machine learning pipeline)
-
Photo OCR Applications - help the blinds know what sign in front of them; car navitation system, car can read street sign.
- Photo OCR pipeline
2.1 Text Detection(find out rectangle area)
2.2 Character Segmentation
2.3 Character Classifier
2.4 Spell Correction System(c1ean->clean), not included in the course - Pedestrain Detection
3.1 sliding window(height*width ratio) with step size(stride parameterusually 4 to 8 pixels) and pass to classifier; Change to another window size and scale to appropriate size to classifier. -
Text Detection
4.1 First, you use labeled training set(with character even split between words) to train a binary classifier(is there character or not in it)
4.2 Slide window and give to classifier and identify if the window contains a character. collect all windows in one image with different gray scale to present probability.
4.3 apply expansion operator to each white window(if surrounding with white pixel, it will also be white pixel) and generate connected bounding box. Check each connected bounding box’s ratio, remove “tall” one.

-
1D sliding window for character Segmentation
5.1 use training set to train a binary classifier to distinguish which sliding window shoud has the split line in the middle of characters

-
Finally, we use digit and character multi-classifier to identify A-Z and 0-1

-
Artificial Data Synthesis (Create Big data by yourself)
7.1 first method, use office software’s to combine different fonts with random backgroud image with some bluring operator,scaling and rotation
7.2 second method, reasonablely distort current data set, ex synthesize seperately noisy, crowd, machinery voice to original digital voice
7.3 Be careful, distortion used should be representation of noise/distortion in test set. Random/meanless noise/distortion is useless.
7.4 Before Creating big sythetical data, you should make sure you need big data(your model is suffering from low bias/high variance) -
How to Get Big data set
8.1 Artificial Data Synthesis
8.2 Label by hand (Count time of 10x data set before you start, you will be surprised how easy it is)
8.3 Using Crowd Source like “Amazon Mechanical Turk” - Before Creating Big data set, you should
9.1 Make sure you need big data set(Using learning curve to identify low bias/high variance)
9.2 Count the time you need for collecting 10x larger data than current data set