Could someone please compile a binary for Windows?
It would save hundreds of people a lot of work if there would be a precompiled executable.
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.
- We don't have a concept of parallelism/thin regions which makes the inner sharp angle and outer smooth look inconsistent. They are clearly visually grouped together and we - as observers - expect similar geometry and continuity. Our algorithm tries to answer the question of what the inner region looks like when vectorized (arguably, a rectangle) but does not take into account the outer one. I definitively need to read up exactly on how the concept of regions/boundaries is interpreted in ESRGAN.
- This could be a bug/wrong parameters to the segmentation weights, I don't think it was intended behavior of Kopf's depixelize. It could be my implementation producing differences.
- While the two bits above are more code related, this one is algorithm related. It's really not what I would expect to see. The question that needs to be answered is if there are other similar scenarios where that could be a good interpretation. My guess would be no...
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!

