# SpriteDX - Prop Gen 2 - Grid Fitting

Grid Fitting Results

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/86a2a820-74f9-442c-85cc-01691df7b636.png align="center")

Nearest Neighbor (17pixel grid size)

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/9f9d7dc1-02d7-4011-9a47-8527c5ec7cda.png align="center")

NN 17px - x4

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/0cc51b74-9a86-4ea3-a91c-60340e8afdaf.png align="center")

Bilinear 1/17 -x4

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/d420559c-8541-4b16-a85d-84ca775c756f.png align="center")

My trial at fitting the grid lattice. It's bad.

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/e6c60543-ff71-4a1e-a2e4-2c5854be9c05.png align="center")

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/99ee90cf-e45b-485f-85a4-575958e1a985.png align="center")

I thought NN and Bilinear would be a disaster but much better than other tries I had.

Let's start with the NN and try to recover Pixel art using ACM v2 model.

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/92bd3fe0-898c-4002-be87-79fe0f371b8f.png align="center")

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/2c393bcd-637a-4520-8eac-d87bde4db05a.png align="center")

ACM-v2 is not good. It basically applies some level of dithering and some level of sharpening which we don't really want.

The smoother version is much better IMO (bilinear):

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/d420559c-8541-4b16-a85d-84ca775c756f.png align="center")

We do however need some way to clean up those silhouettes. That can be done easily using Magic Wand tools in Photoshop.

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/6ec8ed9b-5250-4050-b4fa-601fce2ab5bb.png align="center")

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/4af5b8e4-0224-4f43-b316-dfb1bc562ae5.png align="center")

Perhaps we can run birefnet first on the source image then run the bilinear.

Still not exactly sure how to go about this. I will need to work with non-pixel arts and still be able to produce pixel arts and we seem to be trying to optimize on single image.

I will look into few other approaches.

\-- Sprited Dev 🐛
