Belval / CRNN

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

Why I can run the code but can't get the good result? #13

Open forestlin7 opened 6 years ago

forestlin7 commented 6 years ago

the result show that Restoring Checkpoint is valid 0 Loading data Testing

Process finished with exit code 0

Belval commented 6 years ago

Hi!

Can you link to your testing data and paste the exact command you entered.

Thank you Belval

forestlin7 commented 6 years ago

I use your testing data that you named samples but still have nothing.

yyf1986 commented 6 years ago

I have the same problem. my command result Restoring Checkpoint is valid 0 Loading data 8.jpg 2.jpg 9.jpg 1.jpg 6.jpg 5.jpg 10.jpg 4.jpg 3.jpg 7.jpg Testing

Belval commented 6 years ago

I finally understand what is the issue here.

The data in the sample folder is NOT testing data. They are the images I use in the README.md. If you follow these steps you should get my results:

git clone https://github.com/Belval/CRNN.git
cd CRNN/CRNN
mkdir data
cd data
wget https://node1.belval.org/test_dataset.zip
unzip test_dataset.zip
rm test_dataset.zip
cd ..
python3 run.py -ex ./data/ --test --restore

A list of pair of words should appear. The first one is the ground truth, the second is what the CRNN "read".

If you wish to use your own images, replace everything in your data folder with you own images. The filename should be [TEXT_INIMAGE][INDEX].jpg (or whatever extension you want) with the index being a number whose value is unimportant.

Hopefully that helps.

ynuwm commented 5 years ago

@Belval why I put my own images into the data folder, it remain can't process? And I remove some images from the test_dataset, it also can't process.

Belval commented 5 years ago

Multiple reasons could explain your problem here.

First, the "test" part of the project is a bit rough on the edges in that it still uses batches. Therefore, make sure that you specify a batch_size that is smaller than the amount of picture you provided.

Second, I would be more apt to help you if you provided me with the command you used.

Regards

ynuwm commented 5 years ago

@Belval I know the reason, thank you. Another thing is how should I train new model or test on this image: https://zhidao.baidu.com/question/233435599.html

because I use your model to predict the HP trademark, it can't predice accurately.

ynuwm commented 5 years ago

@Belval Can you give me some suggestions about how to recognize the word of trademark in the images, for example, HP, Intel in some images. like this:https://qmul-openlogo.github.io/

allanruin commented 5 years ago

To those still cannot get acceptable results from author's pretrained model, you could manually edit 1save/checkpoint change model_checkpoint_path: "ckp-51" to model_checkpoint_path: "ckp-50", then it will run fine.

Belval commented 5 years ago

You are right, I didn't notice that the new checkpoint broke the testing.

I will fix it ASAP.

Belval commented 5 years ago

I pushed a quick fix, tell me if that fixes the issue.