Inspiration

I was initially designing an architecture for detecting American sign language. While making a U-net for segmentation, it struck me how the data was being pushed through a bottleneck to extract the most useful information. This ignited my curiosity as it struck me that I could use this same principle to compress information. Consequently, I started researching AI compression and developed my own model.

What it does

The model draws out the most crucial information about an image, which reduces the size of the data by a whopping 93%. In some scenarios, it can even compete with JPEG.

How I built it

I used PyTorch to build a Generative Adversarial Network. The discriminator is a convolutional network. Meanwhile, the generator is an Autoencoder and Resent combination. The output generated by the first half of the Autoencoder is the compressed latent space, and then the other half of the Autoencoder rebuilds the image from that data. The discriminator is used to train the Autoencoder as it is superior to losses like MSE.

Challenges I ran into

Computing resources were scarce. After using up my Intel credits, I pivoted to using Kaggle, but it was a lot slower.

Accomplishments I am proud of

I am proud that I developed a compression model in 24 hours that can reduce 93% of the data size.

What I learned

Most ML models I have built in the past have relied on a static loss function. This was my first GAN, and I learned a lot about the clever way that it uses the discriminator as its loss function. Furthermore, as I tried, failed, and tried again to optimize the model, I learned about the deep intricacies of a GAN network, and many of the things that can help and hurt its training. Also, I also learned a lot about resents and how they can aid in image processing in comparison to CNNs. Lastly, I developed a website to showcase this model, and during that I learned three.js, which enabled me to unlock another realm of design.

What's next for Pixzip

Pixzip can already compete with JPEG in certain areas, and my goal in the coming months will be to close the gap between Pixzip and JPEG in the other areas. Furthermore, I will be launching a beta API for access to Pixzip compression.

Share this project:

Updates