-
Notifications
You must be signed in to change notification settings - Fork 427
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
feat: Added page visualization function #54
Conversation
Codecov Report
@@ Coverage Diff @@
## main #54 +/- ##
==========================================
- Coverage 94.73% 92.43% -2.31%
==========================================
Files 23 24 +1
Lines 703 753 +50
==========================================
+ Hits 666 696 +30
- Misses 37 57 +20
Continue to review full report at Codecov.
|
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.
Thanks for the PR! Good design overall, I added some suggestions for user flexibility!
Regarding unittest, could you, without checking the output, at least trying to plot it in the test? (using plt.show(block=False)
). It will at least ensure that this gets executed without raising issues
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.
Thanks for the PR! Small modifications for the actual plotting and we're good to go!
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.
I added a fix suggestion, could you test it locally before pushing?
test/test_utils.py
Outdated
pages = _mock_pages() | ||
images = [np.ones((300, 200, 3)), np.ones((500, 1000, 3))] | ||
for image, page in zip(images, pages): | ||
utils.visualize_page(page, image) |
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.
utils.visualization.visualize_page(page, image)
I guess
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.
Thanks for the edits!
Implements a visualization function of all elements (blocks, artefacts, lines, words) inside a page, with the matplotlib & mplcursors libs.