-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Empty Pipeline lowers image quality #262
Comments
Could you show us an example of input image and output image? Right now there's an overlay process to print ink layer to paper layer even though there isn't any augmentation in ink layer. The default overlay method is using You may insert a different overlay method in order to use a different overlay method, for example: default method:
Or something like:
Here's a list of supported
Most of the overlay methods are adapted from here: And visualization of their overlay methods: |
Ok. I can propose having the overlay types in a Enum-like structure - as class variables in a separate OverlayType class such that it is easier for IDEs to display the different options. I will submit a pull request at some later point. |
Yes, please submit a pull request, thanks. |
@kwcckw Do you think you have enough information for us to add this issue to the current sprint? |
I think this is important but not urgent yet, because later we will need to restructure the whole repo so that it can display the options in a similar way. |
@proofconstruction Regarding this proposed method - Actually it maybe too messy if we want to create a subclass for each method in a class. |
Do we really need to subclass each method? Would something like this work? from enum import Enum
class Overlay(str, Enum):
INK_TO_PAPER = "ink_to_paper"
MIN = "min"
MAX = "max"
MIX = "mix"
NORMAL = "normal"
LIGHTEN = "lighten"
DARKEN = "darken"
ADDITION = "addition"
SUBTRACT = "subtract"
DIFFERENCE = "difference"
SCREEN = "screen"
DODGE = "dodge"
MULTIPLY = "multiply"
DIVIDE = "divide"
HARD_LIGHT = "hard_light"
GRAIN_EXTRACT = "grain_extract"
GRAIN_MERGE = "grain_merge"
OVERLAY = "overlay"
# prints value, offers comparison testing
print(f"{Overlay.INK_TO_PAPER}")
print(f"{(Overlay.INK_TO_PAPER == 'ink_to_paper')}") Then overlay values could be passed as an enum, while internally treated as a string where code is not yet using the Enum: pipeline = AugraphyPipeline(ink, paper, post, overlay_type=Overlay.INK_TO_PAPER) |
Thanks, i didn't think of this. I guess this should work, i will try it later. |
So i tried this but i don't see how this will be clearer for the users to select the options? The input to overlay method is still |
The different values defined in the enum type can be displayed as hints by some IDEs. Using custom enums for parameters with a low-finite number of possible values (like |
Thanks, but to relate it into current case, we have overlay_type = str, so if we define the class like this:
The pipeline will be initialized with this:
Where If user uses a wrong input, actually it won't show all the possible options too, for example:
The error is
And it gives hints on types only. Using
Or did I missed out anything and it should be done in a different way? |
I will leave this open first unless it is proven the Enum method is able to show all the available options. |
Hi all,
I am working with a custom randomized version of the AugraphyPipeline and in the course of trials I noticed that even if no agumentations were passed to the AugraphyPipeline - i.e. three empty lists- it still distorts the image.
The text was updated successfully, but these errors were encountered: