Belval / CRNN

A TensorFlow implementation of https://github.com/bgshih/crnn
MIT License
297 stars 101 forks source link

How to train a new model #38

Open ImDePanDa opened 5 years ago

ImDePanDa commented 5 years ago

Hi , Belval ! First , I want to say thanks.Your codes give me lots of help . But there are some problems with me . I use your pretrained model to recognise some nubmers and some symbols like"+" , but the results is not good,so I want to train my own model to do my work but I don't know how to train ,can you give me some guidance ? Hope for your reply.Thanks !!

Belval commented 5 years ago

Hi!

To retrain the model, it should be as simple as:

python3 run.py -m save/ -ex [TRAINING/TESTING DATA] --train

You need Tensorflow installed.

You can see python3 run.py -h for more tuning options.

ImDePanDa commented 5 years ago

@Belval Hi,belval! I have a new trouble.I use my own pictures to train a new model(hand-writen model),but I find it doesn't work.Here are some pictures about my data and wrongs.And I find there are somethings different about my data and your data.The second is your data's sequences and the third is my data's sequences.Can you give me some advices? data 他的 我的

ImDePanDa commented 5 years ago

@Belval Hi,Belval! I have solved the above problem.The reason of this error is the names of the pictures are at the same length.But there is a new question.How can I use the model which has been well trained to predict a single picture?Look forward to your reply!

Belval commented 5 years ago

It used to be python3 run.py -ex [SAMPLE_FOLDER] --restore --test but I just tried it on my said an it did not work. Possibly something changed in TensorFlow/Numpy since then.

I'll try with older versions and see if I can get it to work.

sushanth-d commented 5 years ago

Hey! Thank you for all the code and all the explanations! :)

Any update on how to test single images? Or a set of images in a folder?

Belval commented 5 years ago

Haven't touched that repo in a while, currently on vacation. I'll add it to my todo list.