breadbread1984 / OCR-tf2

this project implements text area detection and OCR
6 stars 4 forks source link

Issue regarding output of TextRecognizer.py #3

Open arpitakabra opened 4 years ago

arpitakabra commented 4 years ago

Upon running the TextRecognizer.py for an image with text, desirable output in form of text is not shown. Instead, a single word output in Chinese language is given. Here is the output:

2020-05-12 18:05:46.741232: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1 2020-05-12 18:05:48.971860: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1 2020-05-12 18:05:48.973843: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected 2020-05-12 18:05:48.973888: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (f6a771207706): /proc/driver/nvidia/version does not exist 2020-05-12 18:05:48.979387: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 2200000000 Hz 2020-05-12 18:05:48.979641: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x282ebc0 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-05-12 18:05:48.979678: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 刀棱

It would be great if you could help me in getting the desired output of the image, that is the actual text written in it.

Thanks!

breadbread1984 commented 4 years ago

pretrained crnn model is not ready yet. i am still running it. you can train it on your device if you get a powerful one.

arpitakabra commented 4 years ago

Thanks a lot for the response! May I know the approx duration by which I may use the pre-trained model? The system I am working on is not that powerful. Also, for how many epochs the ocr is being trained?

breadbread1984 commented 4 years ago

I dont know yet. it is said that the training can be done after 80k iterations with batch size 64. the image is where I have been.

arpitakabra commented 4 years ago

Alright. Thanks a lot!:)

arpitakabra commented 4 years ago

Hello! Even after completing the training for ocr I am getting output in the Chinese language for an input image with English text. Even the translation of the Chinese input does not match the actual text in the image. May I know what problem could have occurred?

Thanks!

breadbread1984 commented 4 years ago

it has been a while since I used ctc last time. I failed to reserve 0 for blanked index. I just updated code again to deal with the problem, but I haven't tried myself.