brain.js icon indicating copy to clipboard operation
brain.js copied to clipboard

Handwriting Recognition?

Open MelerEcckmanLawler opened this issue 6 years ago • 5 comments

I want to input training data where each character is represented as an array of vectors (I mean each point's coordinates are given relative to the previous point) with the end property signifying whether it's the last point of a stroke.

For example, the letter "T" might look like this:

[ { x: 15, y: 38, end: false}, { x: 49, y: -8, end: false}, { x: 15, y: 4, end: true}, { x: 47, y: 26, end: false}, { x: -4, y: 37, end: false}, { x: 0, y: 4, end: false}, { x: 12, y: 21, end: true} ]

I believe I should use LSTM. But the page says training data must be array of values. Obviously I have an array of hashes. So what do I do?

EDIT: By the way, I have successfully used regular brain.NeuralNetwork on images (in the form of pixel arrays). But I want to use vectors not pixels.

MelerEcckmanLawler avatar Oct 07 '19 04:10 MelerEcckmanLawler

Are you trying to model the strokes?

alirezag avatar Oct 29 '19 18:10 alirezag

Yes

MelerEcckmanLawler avatar Oct 29 '19 23:10 MelerEcckmanLawler

I see. I am more from ML background a d new to brainjs. If you dont have an actual stroke data it is hard to learn a consistent model for strokes. The typical mnist dataset for example doesn't provide any stroke data..

On Wed, Oct 30, 2019, 8:10 AM MelerEcckmanLawler [email protected] wrote:

Yes

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BrainJS/brain.js/issues/460?email_source=notifications&email_token=AAMOGFK3PTVT6WCEKGNYN7DQRC7GLA5CNFSM4I57OHPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECSMKKI#issuecomment-547669289, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOGFPEQDDD6NJ7RQSUDXDQRC7GLANCNFSM4I57OHPA .

alirezag avatar Nov 02 '19 03:11 alirezag

I have a graphics tablet to create my own stroke data

MelerEcckmanLawler avatar Nov 05 '19 05:11 MelerEcckmanLawler

Nice!

On Tue, Nov 5, 2019, 2:21 PM MelerEcckmanLawler [email protected] wrote:

I have a graphics tablet to create my own stroke data

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BrainJS/brain.js/issues/460?email_source=notifications&email_token=AAMOGFI2O3IXLZT4KNHAZ7DQSD7GXA5CNFSM4I57OHPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDBUDQI#issuecomment-549667265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOGFOTNNDT3ETQYPN3UXTQSD7GXANCNFSM4I57OHPA .

alirezag avatar Nov 06 '19 00:11 alirezag