handwriting-ocr icon indicating copy to clipboard operation
handwriting-ocr copied to clipboard

How to create label file in charclas folder

Open sagarhukkire opened this issue 6 years ago • 2 comments

Hi,

I saw some open questions, but I do not understand how en-lables file match to character images? Any guideline will be a great help as I am going to put my letters for training

Thanks Sagar

sagarhukkire avatar Apr 25 '18 15:04 sagarhukkire

Hi,

I expect that you have your own dataset of letters, for training character classifier. In my solution images of letters are loaded from folder data/charclas/en where is a folder for each letter (plus a zero folder for wrongly separated letters). If you want to train the character classifier, just fill these folders with your letters. In file ocr/datahelpers.py is function loadCharsData() which loads the images. In your case you should call it as loadCharsData(charloc='data/charclas/', wordloc='', lang='en') and it outputs numpy array of images and numpy array of labels.

Hope it helps, Breta

Breta01 avatar Apr 25 '18 20:04 Breta01

Thanks @Breta01 I got it now ..Now I have created dataset and will train with your classifiers. My end objective is name if such image is given the network should give sagar, by slicing each character. I will update you the progress and happy to hear your input for my approach thanks

sagarhukkire avatar Apr 25 '18 22:04 sagarhukkire