Skip to content
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

Input and output arguments for the CLI version #21

Open
Toufukun opened this issue Sep 2, 2020 · 2 comments
Open

Input and output arguments for the CLI version #21

Toufukun opened this issue Sep 2, 2020 · 2 comments

Comments

@Toufukun
Copy link

Toufukun commented Sep 2, 2020

Hi. Will you consider these possible improvements on the command-line arguments?

  • Remove the -i prefix for the input
  • Accept standard input and output (stdin & stdout)
  • Default output path (add a suffix -waifu2x.png, etc.)
  • Default values for scaling and denoise (-s 2 -n 1 for myself)
  • 1.6× scale in the original waifu2x
@imxieyi
Copy link
Owner

imxieyi commented Sep 2, 2020

Remove the -i prefix for the input

Adding -i makes it much easier to parse arguments. I don't think it is worth removing this considering that it doesn't affect usage at all.

Accept standard input and output (stdin & stdout)

This could be added.

Default output path (add a suffix -waifu2x.png, etc.)
Default values for scaling and denoise (-s 2 -n 1 for myself)

Adding support for a config file could be considered.

1.6× scale in the original waifu2x

According to the code of original waifu2x, 1.6x is achieved by upscaling to 2x and then down to 1.6x. You can chain this program with other programs (e.g. imagemagick) to have the same result.

@Toufukun
Copy link
Author

Toufukun commented Sep 3, 2020

Adding -i makes it much easier to parse arguments. I don't think it is worth removing this considering that it doesn't affect usage at all.

I don't know how arguments are parsed in Swift, but it's not hard in other languages with external packages.

According to the code of original waifu2x, 1.6x is achieved by upscaling to 2x and then down to 1.6x. You can chain this program with other programs (e.g. imagemagick) to have the same result.

I didn't see you answered how waifu2x achieves the 1.6x in another issue. I'm sorry.

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

No branches or pull requests

2 participants