Skip to content

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vahidrezanezhad
Copy link
Member

No description provided.

eynollah binarization \
-m <path to directory containing model files> \
<input image> \
<output image>
Copy link
Member

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>.

Copy link
Member Author

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?

Copy link
Contributor

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.

Copy link
Member

@cneud cneud May 14, 2025

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:

  1. Change the order of arguments (input and output before models)
  2. Add mandatory -i also for single input image file
  3. Make -o mandatory and always use inputfilename.bin.png as output filename
  4. 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.

Comment on lines +105 to +112
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>
```
Copy link
Member

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> \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<input image> \
<input image> | -di <directory containing image files> \

Copy link
Member

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?

Copy link
Member Author

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

vahidrezanezhad and others added 4 commits May 7, 2025 12:33
…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
kba added a commit that referenced this pull request Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants