akarsh-saxena / Textify

An android application which extracts handwritten text from an image.
8 stars 2 forks source link

Training the model #1

Closed pribadihcr closed 3 years ago

pribadihcr commented 4 years ago

Hi @akarsh-saxena,

How to train the model?. thanks

akarsh-saxena commented 4 years ago

It's been a long time since I've been active on this project. I've trained the model with Deep CNN. I will try to find the model training code and will update the repo once I'll find it.

Haaarrrssshhh commented 4 years ago

Hi akarsh , have you updated the code for training the program If yes , which file is it ?

shift-reality commented 3 years ago

needed for me too please

akarsh-saxena commented 3 years ago

Hi @pribadihcr @Haaarrrssshhh @shift-reality,

I have added the file for training the digit only model in commit #7da91b5.

Before running the code, please put the data inside "Python Script/data/digit_only" folder and rename the files to "mnist_train.csv" and "mnist_test.csv".

shift-reality commented 3 years ago

@akarsh-saxena thanks! Today i tested "/api/digit", this work perfectly for digits witch written in paper without noise, but fails on jpeg with bad quality (noised, random placed black dots, lines ... etc)...... I believe that "find corners" trouble.. And also i changed line 180 to: ctrs, hier = cv2.findContours(img_dilation.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) as this works good with opencv-python package...

Are you accept freelance projects? We can pay you and need implement some improvements, like cutting our input image and add JSON-result with all possible text variants (as lines in terminal..... Predicted X as Y...) Very needed

akarsh-saxena commented 3 years ago

Hi @shift-reality Thanks for your suggestion on the code. OpenCV has changed the return values for several methods in version 4+ but the code was written using version 3.

Also, the project sounds interesting. Can you please drop me a mail on my email id akarsh.saxena.as@gmail.com with some more details.

shift-reality commented 3 years ago

@akarsh-saxena mail sent, please see spam folder if not received

akarsh-saxena commented 3 years ago

@shift-reality Got it. Thanks.