Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
port processor to core v3 #130
base: main
Are you sure you want to change the base?
port processor to core v3 #130
Changes from 14 commits
0a3f525
4a13781
9ce02a5
0d83db7
87adc4b
39b16e5
ddcc019
d7caeb2
8dfecb7
3381e5a
49c1a8f
c37d95d
61bcb43
d98fa2a
ecd202e
d26079d
7b92620
aef46a4
dfc4ac2
1e90257
17eafc1
9b274dc
f9c2d85
fdedae2
c6e0e05
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This whole effort was to ensure we can pass a working local filename, as (was) needed by Eynollah. The approach by OCR-D is
Workspace.image_from_page
/Workspace.image_from_segment
which will search for the right original or derived image, download it if necessary and load it into memory.I don't recall what the new behaviour of Eynollah is. If both an image filename and an image object are passed, who wins?
Assuming it's the memory object: this can be removed. (But then I wonder why we still pass the image filename at all...)
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.
Well, currently we have
image_filename
is (should) then only used passively, to generate filenames of plotted debug images as well as for PAGE serialization.So I think
image_pil
should win but for now we need both. But as I said above, one of those things I would love to untangle in the refactoring.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.
Note: that filename might not be where that image came from in
workspace.image_from_page
. It could well be a derived image generated by some previous processor (just not a cropped, deskewed or binarized image, because that would have changed its coordinate system).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.
It's still a bit hazy for me when
image_filename
is actually used. Ideally,image_pil
should take preference andimage_filename
is only for the plotter/writer, at least in the "single image mode" we're using.One of the aspects I hope I'll be able to improve a bit with https://github.com/qurator-spk/eynollah/tree/refactoring-2024-08/
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.
Perhaps we can also re-use
session
across Eynollah invokations in addition tomodels
?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.
In theory, yes, but with standalone eynollah being focused on batch processing now, I am honestly not sure how/where sessions are defined for the non-
dir_in
option - @vahidrezanezhad can you tell us?