monniert / docExtractor

(ICFHR 2020 oral) Code for "docExtractor: An off-the-shelf historical document element extraction" paper
https://www.tmonnier.com/docExtractor
MIT License
85 stars 10 forks source link

from line level to word level? #9

Closed SB2020-eye closed 3 years ago

SB2020-eye commented 3 years ago

Hi. docExtractor is doing a great job! Any suggestions for getting from the line level to individual word level? Does this capability perhaps exist already? Or could you make any recommendations -- either for augmenting docExtractor or perhaps something that already exists in python elsewhere?

monniert commented 3 years ago

Hi, thanks for the interest! Unfortunately, there is no support for word level extraction but I think you can do a good baseline with tools in this repo with the following 2 leads:

Otherwise, you can try Tesseract in the case the document images are not too noisy, here is a good tutorial: https://nanonets.com/blog/ocr-with-tesseract/

SB2020-eye commented 3 years ago

Thanks so much, @monniert!

I've never trained my own network. (I'm barely out of the gate with Python or coding at all!) I would like to learn some day, as I at least know enough to know it could be useful for the kinds of hobby projects I'm pursuing.

Line extraction on the current document I'm working with is working very well. (Thanks!!!)

a. What is the "word-level label," if you don't mind? I searched the repository and saw all kinds of code with "word" in it. But I couldn't figure out what it is.

b. In some of your image examples, I see the teal blue lines highlighted, but in addition, I see some royal blue lines sometimes on shorter segments? What is this darker blue line? Does this have any relevance to my question?

c. If all else fails, I had a rather simplistic notion, especially given my learning curve and time available at the present. I have no idea if it has any merit whatsoever. I wondered if perhaps turning my extracted lines vertically and re-running those line images through line extraction would work, more or less. (lol.)

monniert commented 3 years ago

a. it is a label that will define a region for each word rather than each line. Yes you coulndt because it is not implemented at all :)

b. I think the royal blue lines you are mentioning correspond to the final baselines detected after the post processing, so it is only relevant when you evaluate the model with baseline detections.

c. haha no I think it wont work, extracted lines would be resized to 1280x1280 and I expect very weird results...

monniert commented 3 years ago

I close the issue for now, please reopen if needed