-
Notifications
You must be signed in to change notification settings - Fork 72
refactor: partition in elements #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
MthwRobinson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a couple of inline question, but overall looks good. I also keep getting the following error message on the test code.
Also, I'm getting this error on the test code. I'm able to run the unstructured and unstructured-inference tests in the same environment though and the test code works in iPython so wondering if it's something related to my jupyter version.
ImportError: dlopen(/Users/mrobinson/.pyenv/versions/inference/lib/python3.8/site-packages/detectron2/_C.cpython-38-darwin.so, 0x0002): Symbol not found: __ZN2at4_ops10select_int4callERKNS_6TensorExx
Referenced from: /Users/mrobinson/.pyenv/versions/3.8.13/envs/inference/lib/python3.8/site-packages/detectron2/_C.cpython-38-darwin.so
Expected in: /Users/mrobinson/.pyenv/versions/3.8.13/envs/inference/lib/python3.8/site-packages/torch/lib/libtorch_cpu.dylib
MthwRobinson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending a comment on the coefficients!
Added the capability to partition granular-scale elements that have been identified (words, characters) by proximity using the word/character height as a reference. In many cases this does a good job of grouping text blocks. Also moved logic for extracting text from a region into the region itself, so in the future different logic can be used for embedded text and images.
Testing:
In a jupyter notebook, try the following code:
The output should be the first page of the layout parser paper with color-coded groupings of the words in the page, representing the partition produced.