Skip to content

pedrogengo/pixel_art

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Pixel Art Generator

In this project @piEsposito and I developed a simple code that can transform any image in pixel art. We were inspired by pixelicious and our main idea is not to create a concurrent solution, but just explain how it works behind the scenes and have fun 😜.

How it works?

We don't use AI here, only classical computer vision to make everything work. The pipeline that we proposed was inspired in this excellent article. To perform the trasnformation we applied the following steps:

  • Preprocess the image to make it slightly better to become a pixel art. For this, we add more weight to strong color (pixel value > 180);
  • Downscale the image to a choosen pixel grid size;
  • Convert the image to a pallete mode;
  • Apply color quantization and dithering;
  • Upscale the image to the original size.

How can you test?

You can run by yourself if you want, just using the following two commands:

pip install streamlit Pillow numpy

streamlit run pixel_art_app.py

Or you can test it on Hugging Face Space.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages