Open n00mkrad opened 4 years ago
I totally second this. I'd love to have a go at PolyFit.
Good idea. I created this pre-release so that you can give it a try on Windows.
Just a word of warning, there is a good chance that it might fail on some inputs which differ from those currently seen so far as the geometry processing code for multicolored inputs is very experimental. If so, you are welcome to create an issue with a couple of examples that fail with the failing assert. I would be very happy to get an idea of what kind of inputs people are interested in vectorizing and what assumptions in the codebase need to be revisited :)
@dedoardo That's great, thanks! What steps should a code nitwit like me follow to correctly install and try this release? I'd love to try it on some of my pixel art.
The release, once uncompressed, contains a command line application (polyfit.exe) that you can run in the windows terminal or powershell as:
./polyfit.exe <input_image> <output_svg>
The release notes have a couple of comments regarding expected behavior.
Thanks! I'll try it, although @n00mkrad mentioned that he hasn't succeeded yet in getting any of the pixel art images he tried converted into SVG's successfully.
Created a pixel art character for an upscaler test.
Attached is my comparison: Nearest Neighbour, Polyfit and ESRGAN trained with @n00mkrad's Yandere Pixel Art model.
As you can see, Polyfit has really neat geometric results in a number of areas, but also fails to correctly interpret certain features, where ESRGAN does that better.
Just let me know if you'd like to receive the original pixel art for testing.
Thanks.
Thank you for running this test, it highlights some aspects of our algorithm which are worth looking into. I'm leaving some comments here that come to mind looking at the comparison.
Generally, ESRGAN results are very good, although they are entirely C1 continuous. The major contribution of our algorithm was exactly the identification of such C0 corners, which I think we are doing a decent job at, though sometimes producing visual discrepancies when not correctly interpreted for regions which are visually paired together. I think that in practice, identifying the discontinuities is important to produce good (potentially editable) outlines, but so is being robust.
Practically, I think that to obtain a decent tool (something that is more production-oriented) some degree of interactivity is required, though maybe not in the form of obscure thresholds but more visually intuitive parameters (along the lines of Illustrator's presets).
Hi @dedoardo ,
Thanks for your analysis. I agree with your observations.
ESRGAN is indeed very good at interpreting shapes. For upscaling pure, aliased pixel art @n00mkrad's Yandere Pixel Art model is very effective.
I've included a comparison of an extended version of my plumber pixel art, featuring a few colors, converted with ESRGAN Yandere Pixel Art. This extended pixel art version returns errors when feeding it to Polyfit. I've also included the original pixel art PNG so you can test it.
Please keep me posted. I'm excited about Polyfit.
Thanks!
It would save hundreds of people a lot of work if there would be a precompiled executable.