-
Notifications
You must be signed in to change notification settings - Fork 31
updating eynollah README, how to use it for use cases #156
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
base: main
Are you sure you want to change the base?
Conversation
eynollah binarization \ | ||
-m <path to directory containing model files> \ | ||
<input image> \ | ||
<output 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.
Does <output image>
here expect a filename or a path? Because when it uses the path it would be nicer to be consistent with the CLI documentation for layout analysis and also call this <output directory>
.
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.
Binarization for a single image requires a filename (preferably in PNG format). As you suggested, I can update this to accept a file path instead. However, this change would also affect the OCR-D framework. What are your thoughts on this, @kba?
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.
We can adopt the OCR-D processor if the API changes but IIUC this would only be about the CLI, i.e. replacing the arguments with the same -i/-o
options as eynollah layout
? If so, then fine by me.
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.
After giving it some more thought, I would prefer to adapt the eynollah binarization CLI to follow the example of layout analysis CLI, i.e. it should work like this:
eynollah binarization \
-i <single input image> | -di <directory containing image files> \
-o <output directory> \
-m <directory containing model files>
So this would require some changes in the binarization CLI:
- Change the order of arguments (input and output before models)
- Add mandatory
-i
also for single input image file - Make
-o
mandatory and always useinputfilename.bin.png
as output filename - Use
-o
for both cases, single and batch image processing outputs (no more-do
)
But imo it should make it more easy and intuitive to use the different modules for end users and via OCR-D wrappers.
and for flowing from a directory like this: | ||
|
||
```sh | ||
eynollah binarization \ | ||
-m <path to directory containing model files> \ | ||
-di <directory containing image files> \ | ||
-do <output directory> | ||
``` |
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 would remove this and include the directory flow in the example call above, just like it is for layout analysis.
README.md
Outdated
```sh | ||
eynollah binarization \ | ||
-m <path to directory containing model files> \ | ||
<input 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.
<input image> \ | |
<input image> | -di <directory containing image files> \ |
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.
Is this correct? For directory input, the flag -di
can be used, but for a single image there is no -i
flag?
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.
yes it is the case
…s not set correctly, leading to an error while writing to the XML file.
…tput when using the skip layout and reading order option
…R-D framework for the Eynollah light version, which caused rectangles to be used instead of contours for textlines
No description provided.