Open wangwangww opened 4 years ago
the function to display bboxes and label text is actually in the code, look for function vis(). I just called it from the main function loop to output the post processed images as well as the text files.
I attach a slightly modified inference file named test_net_bboxes.py
, which calls the bounding box function and will output the text files as well as the images with bounding boxes with recognized text labels next to those.
Here is a video example of the result.
Hope this helps. Ciao test_net_bboxes.zip
I attach a slightly modified inference file named
test_net_bboxes.py
, which calls the bounding box function and will output the text files as well as the images with bounding boxes with recognized text labels next to those. Here is a video example of the result.Hope this helps. Ciao test_net_bboxes.zip
ok,thank!
I realise I read this issue a bit too quickly, I guess you meant to draw boxes for each character of a given word instead of a box for the full word. That is not of interest to me but I guess you can tweak a bit the code, e.g. do a loop for a given word and divide the word box size by the number or letters of the word for the longest of the dimension of the parallelogram, and draw a box for each of those smaller parallelogram. If you want to leave a little gap between each box you will have to make an assumption for the margin to use. This is a bit of a geometric hack but I would be surprised that the model returns character level information but I did not check that.
In case required, I have implemented it at here
您好!您的邮件我已收到!我查阅后会尽快给您回复。
In your code,it save words boxes. I want to save char boxes,how to do.