Lego-generator
Lego-generator copied to clipboard
Make image2image faster by broadcasting
Thanks for your nice repo, the idea and your code base is really friendly and easy to understand.
This pull request slightly improve the speed of your lego-nization algorithm by replacing for loop with broadcasting.
Run benchmark on my Air M1 show that the speed is nearly ~3X faster on input.jpg
The output image is nearly identical (because of rounding number, it's < 1% different)