-
Notifications
You must be signed in to change notification settings - Fork 161
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
improvements for stereo image generation #51
Conversation
Hi, thanks for contributing, it's truly amazing how this community keeps coming up with improvements and new ideas ! I've not had the chance to test it or look at it in detail yet, but that makes a lot of sense, and the results look quite good. I was just experimenting with numba to accelerate the stereo image generation because reading/writing single elements in python is indeed painfully slow. This slight adjustment (took a few shortcuts to test .. ahem) already gave an insane speed increase. Generation time went from several dozen seconds to less than a second.
np.array -> np.copy to check : numba also has options to attempt to automatically parallelize the function.. Ok, so I will check it in detail asap an merge the pr.. |
Wow, numba speed bonus is indeed insane! Thanks, now I know this thing exists. I've got carried away when improving the code, probably more than I would like to. Wish I had noticed (and changed) some of these things before creating the initial MR.. Anyways, new changes are:
|
Excellent! I see you added the numba jit too. I was looking into cython first, but that would require an installed c compiler and would complicate being multi platform. So some more googling revealed numba which uses llvm. I was expecting a good speed increase as all the interpreted languages struggle with this, but the increase in speed really is insane. I'll do a full test to check if nothing broke, and update the version and readme I was aware of that bug with full lines of black, great if that's solved too. Wait, did I mess up the merge ? |
I left some debug code inside...: apply_stereo_deviation vs apply_stereo_deviation_core. Not critical, but could be removed... |
Thank you for reviewing and accepting my changes! |
I'll remove the _core wrap too, also updated the ui in Script.ui to include the dropdown. You're very welcome, and thank you for the improvements, I've not fully tested it yet but the results look good, and the original method is still supported, so great. Still testing .. |
@tufeixp I don't really understand what do you mean. What do you mean by "uneven"? Do you suggest that this commit (58245f7) broke it? This commit (as far as I remember) should not have changed any logic, only simplify the code. The removed code was a duplicate from stereo_generation.py. What fill technique do you use? |
uneven means unbalanced deviation, no matter what hole fill method I choose, the result is unbalanced. |
@tufeixp Please try putting the stereo balance slider in the middle, try different stereo balance values |
@semjon00 Sure I have played with the balance slider settings as well. The default 0 should be defined as balanced where the gap fix should perceived on both side, however it's only on the left part of the dual images. Drag it to other values won't change it. |
@MavenDE Just remembered you notified me of the same/similar problem. Please update the extension and see if it fixed the issue. |
Hello!
Thanks to all the contributors of this fantastic technology and the script.
This code adds two new options for stereo image generation:
Hope I did not break anything in the process.
Now some demos :)
Settings: deviation is 12 (24 would be too extreme), res101 model, 384x384 net, BOOST enabled. The picture is taken from the discussion #45.
Current
With option 1 enabled
Option 1 enabled and the deviation is perfectly balanced
Waiting for improvement suggestions :)
Cheers