msight-tech / research-charnet

CharNet: Convolutional Character Networks
Other
610 stars 142 forks source link

save single char boxes #35

Open wangwangww opened 4 years ago

wangwangww commented 4 years ago

In your code,it save words boxes. I want to save char boxes,how to do.

Tetsujinfr commented 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.

Tetsujinfr commented 4 years ago

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

wangwangww commented 4 years ago

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!

Tetsujinfr commented 4 years ago

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.

harshdhamecha commented 2 months ago

In case required, I have implemented it at here

minyuping commented 2 months ago

您好!您的邮件我已收到!我查阅后会尽快给您回复。