# Corrupting Pixel Arts

In this memo, we work on a `corrupt.py` which will corrupt sprites.

## Trial 1

Operations:

1. White BG
    
2. Apply random translation (less than 1px)
    
3. Apply random scale (less than 1 px)
    
4. Gaussian Noise
    
5. Gaussian Blur
    

## Actual

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767739237713/467eb64e-b33c-47fd-89aa-66b5e8671d07.png align="center")

* Left: hand pixeled
    
* Middle: Resampled Pseudo Pixel Art
    
* Right: Artificial Corruption
    

This already is pretty good.

## Trial 2

Operations:

1. Add White BG
    
2. Layer the sprite
    
3. Upscale 3x (nearest neighbor)
    
4. Add minor compression artifact
    
5. Add gaussian noise
    
6. Blur
    
7. Translate randomly few pixels
    
8. Upscale 2x (bilinear)
    
9. Add jpeg compression artifact
    
10. Downscale (bilinear) to original size.
    
11. Add jpeg compression artifact
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767741502126/8df436a3-ead0-4b03-a4c6-fb8fe3f842a8.png align="center")

resample (bilinear), corrupt\_v1, corrupt\_v2

---

Next Steps:

* I will run this corruption on my sprite dataset to prepare data.
    
* Then, I will work on model design and training
    

— Sprited Dev 🐛
