-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Improve "Align Image to Reference"-node further #2956
base: main
Are you sure you want to change the base?
Conversation
Sorry for the delay @pifroggi!
I think such an option would be good. As for the UX of this option: I would probably make this a dropdown, because this switches between 2 methods of fixing minor misalignment. So maybe the dropdown could be called "Misalignment Fix" and have the option "???" and "Flow". I'm not sure what to call the old way of doing it, so I used a placeholder. What do you think? |
No worries, we could maybe call the two options "Fast" and "Precise" to better show when to use which. In further testing with this it also showed improvements in general, which makes aligning easier, more precise and artifact free. Because of that I'm no longer sure if it would be good to add an additional option for that and instead was thinking about letting the user control the speed just trough the precision dropdown and iteration count. This would avoid having too many combinations of options, which makes it harder to find the right one. I also couldn't find a good reason to turn the new method off yet. Here are a few reasons why I think so:
Do you think that makes sense? |
Hey! Sorry for the message, I just wanted to check what you think would be the best way to proceed with this. |
@pifroggi Your arguments sound good to me. Also, given that RIFE is much faster than most of the models that chaiNNer works with (e.g. ESRGAN), and even much faster than OpenCV's homography alignment in a lot of cases, I don't see any reason to clutter the UX with an option that will probably induce users to think "let's choose the faster option" when in reality they are unlikely to notice the speed difference and picking the "faster" option will just waste their cognitive time. |
Hey! When creating the alignment node, I noticed the alignment was not always 100% accurate, but sometimes shifted up to 1 pixel off to the right. I'm not sure what exactly determines the amount of shift, but it seems to have something to do with the image brightness. This seems to be consistent, so a model trained on such pairs learns this and should still work, but will in the end do a similar shift.
Because of this problem, to compensate, the node currently has a manual shift of 1 pixel in the opposite direction. This makes it more correct in many cases, but not always and this could be different with different datasets.
This new approach completely removes this shift by instead:
Unfortunately this will double processing time, but will get a much more accurate and consistent alignment. If multiple iterations are set, flow2 is reused, so the extra processing time overall gets smaller percentage wise.
I was thinking about adding a checkbox for that called "Improve Alignment" for example, but I'm not sure if it makes sense. It is not very clear what is happening and how it is different from the "Precision" dropdown. Maybe it should just always be active, since rife is pretty fast. What do you think and would you like this to be added?