4 ms·
I want to do the same for Chinese. I have a collection of 1500 fonts, and finally exported all the PNGs for 75,000 characters. Now I need to pad, crop, and sca
by peterburkimsher 9y ago
I want to do the same for Chinese.
I have a collection of 1500 fonts, and finally exported all the PNGs for 75,000 characters. Now I need to pad, crop, and scale to make 28x28 (or 32x32, or 64x64, or another resolution).
Then I want to do the Machine Learning (Classify) step.
The article doesn't go into any detail about how to install Classify, how to import the training and testing data, and how to then actually run it. I watched the videos from CS231n because of my boss, but again, I'm still not really sure what to do practically.
If I have lots of folders of images, what should I do to build an OCR program?
- visarga 9y ago- load images, convert into array, call it X - put the labels (character codes one hot encoded) in an array called y - use a convolutional neural network to learn the mapping X->y (training) - send new images to the network to make predictions That's how you train all neural nets in supervised learning.
- peterburkimsher 9y agoJust like the article, your comment is pseudo-code. Isn't there a tutorial for this?
- yorwba 9y agoYou could try http://fast.ai http://fast.ai They show all the steps necessary to train an image classifier (for cats vs. dogs, but it should be possible to adapt to other classes easily) and the explanations are excellent. But if you are trying to do OCR on complete texts, maybe even handwritten, you're getting close to research-level problems very quickly.
- mchaver 9y agoOCR for handwritten number and Latin characters: http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_ml/py_knn/py_knn_opencv/py_knn_opencv.html http://opencv-python-tutroals.readthedocs.io/en/latest/py_tu... As my sibling poster mentioned, these are generally research level tasks. Most people working on this are either writing papers on very particular issues related to OCR or they are working in industry and the companies are not open sourcing their code because it is expensive to produce and/or they have custom data sets they don't want to give away. There might be some tutorials somewhere though. Source: previously worked on OCR systems for European and East Asian languages.
- henrikeh 9y agoClassify is a function in Mathematica which returns a ClassifierFunction. Documentation for Classify: http://reference.wolfram.com/language/ref/Classify.html http://reference.wolfram.com/language/ref/Classify.html As far as I could see they listed all the Wolfram Language code in the example to set it up.
- contingencies 9y agoSounds like a nice collection. I'd be keen to see any decent ones you have for rarer seal scripts.
- peterburkimsher 9y agoI recommend FangzhengXiaozhuantiFont-TraditionalChinese.ttf for Small Seal Script and JDFZHUANF.ttf for Large Seal Script. Both are supported by Pingtype. https://pingtype.github.io https://pingtype.github.io Sorry that it's slow to load; the fonts have to be downloaded from the server every time because I can't be sure if they're on the user's device. The default font is 12MB. Once it's loaded once, you can re-translate much faster - it's just the first run that's slow.
- contingencies 9y agoCool, thanks. https://imgur.com/a/o8Rqf https://imgur.com/a/o8Rqf