This demo based on "Kailup Tan" works about handwriting recognition this version is more compatible and support Farsi/Arabic digit,
u can take some change for add other handwriting pattern it's so easy too use taste it

The algorithm behind, is a simple neural network. Basically, the images are resized to 7x5 pixcels (the crossed blue squares); then a NN is trained based on the traning data. The same procedure is applied on the test data, and finally the model predict the test