Closed leezx337 closed 1 year ago
@leezx337 I am running the same model on English text, but it is only showing the detection, the recognized text is empty. I am using provided weights and demo.yaml as config. Can you please help me, I am not sure what I am missing here?
@strmojo You need to change the following in the demo.yaml file to /path/to/charmap/public/v3/ that is located on your machine https://github.com/facebookresearch/MultiplexedOCR/blob/1b4d931ffd566bc7b400769abbafa35bfb600b94/configs/demo.yaml#L1-L2
@leezx337 you will need to replace the hardcoded path of the Arial-Unicode-Regular.ttf in the following line reference below to your own location https://github.com/facebookresearch/MultiplexedOCR/blob/1b4d931ffd566bc7b400769abbafa35bfb600b94/multiplexer/engine/text_inference.py#L1103
If you don't have it, you can get it from https://github.com/stamen/toner-carto/blob/master/fonts/Arial-Unicode-Regular.ttf
Hope it works!
Thank you so much for your replies!! I'll try them out :)) @jefflink
@leezx337 I am running the same model on English text, but it is only showing the detection, the recognized text is empty. I am using provided weights and demo.yaml as config. Can you please help me, I am not sure what I am missing here?
Hello!! Mmm tbh i'm not very experienced with this haha.... could it be that you didn't change the directory of the demo.yaml file as mentioned by jefflink above, and as a result , the module is unable to perform encoding of the words?
Thank you! Stupid that I am, I changed the charmap path to "/checkpoint/jinghuang/multiplexer/charmap/" becuase /public/v3/ was hidden in my vscode menu
Thank you! Stupid that I am, I changed the charmap path to "/checkpoint/jinghuang/multiplexer/charmap/" becuase /public/v3/ was hidden in my vscode menu
No problem hahah glad it works now!!
Thank you sooo much for your assistance @jefflink !! The error has been resolved
Hello all, when trying to peform OCR on this image ![Chinese_2](https://github.com/facebookresearch/MultiplexedOCR/assets/134577768/837f8053-f96c-4ebe-942c-cf3fcb1d6694, I encountered the UnicodeEncodeError. Printing out the results from the text_inference.py at 3 positions in the render_box_multi_text function: word_result_list, in the for loop 'for word_result in word_result_list' and after 'word = f"{word_result.seq_word} [{int(round(score_det*100))}%,{word_result.language}"', i obtained the following output and error:
May I know why i'm unable to perform OCR on this image and why some words are not picked up evident in the fact that the outputs for the word_result_list and the for loop
for word_result in word_result_list:
differ. Thank you!!