Show HN: Neural Image Compression Demo
colab.research.google.com
Show HN: Neural Image Compression Demo
1–10 of 40 posts
Re: Show HN: Neural Image Compression Demo
#2This project is based on the paper "High-Fidelity Image Compression" by Mentzer et. al. [3] - this was one of the most interesting papers I've read this year! The model is capable of compressing images of arbitrary size and resolution to bitrates competitive with state-of-the-art compression methods while maintaining a very high perceptual quality. At a high-level, the model jointly trains an autoencoding architecture together with a GAN-like component to encourage faithful reconstructions, combined with a hierarchical probability model to perform the entropy coding.
What's interesting is that the model avoids compression artifacts associated with standard image codecs by subsampling high-frequency detail in the image while preserving the global features of the image very well - for example, the model learns to sacrifice faithful reconstruction of e.g. faces and writing and use these 'bits' in other places to keep the overall bitrate low.
The overall model is around 700MB - so transmitting the model wouldn't be particularly feasible, and the idea is that both the sender and receiver have access to the model, and can transmit the compressed messages between themselves.
If you have any questions or notice something weird I'd be more than happy to address them.
---
[1] Colab Demo: https://colab.research.google.com/github/Justin-Tan/high-fid...
[2]: Github: https://github.com/Justin-Tan/high-fidelity-generative-compr...
[3]: Original paper: https://hific.github.io/
[4]: Sample reconstructions: https://github.com/Justin-Tan/high-fidelity-generative-compr...
Re: Show HN: Neural Image Compression Demo
#3Hi everyone, I've been working on an implementation of a model for learnable image compression together with general support for neural image compression in PyTorch. You can try it out directly and compress your own images in Google Colab [1] or checkout the source on Github [2]. This project is based on the paper "High-Fidelity Image Compression" by Mentzer et. al. [3] - this was one of the most interesting papers I…
Re: Show HN: Neural Image Compression Demo
#4Re: Show HN: Neural Image Compression Demo
#5Hi everyone, I've been working on an implementation of a model for learnable image compression together with general support for neural image compression in PyTorch. You can try it out directly and compress your own images in Google Colab [1] or checkout the source on Github [2]. This project is based on the paper "High-Fidelity Image Compression" by Mentzer et. al. [3] - this was one of the most interesting papers I…
Re: Show HN: Neural Image Compression Demo
#6It's incredibly hard to change the default file format on the web, but there's an opportunity to switch libjpeg to a decoder with much more realistic output images.
Re: Show HN: Neural Image Compression Demo
#7otherwise seemed to work
Re: Show HN: Neural Image Compression Demo
#8Not an compression expert, but my eyes have been trained to ignore color gradient issues and minor pixelation as long as the outline of the shapes is clearly defined. This approach while doing better job on preserving detail in colors and avoids pixelation, it distorts significantly the shapes themselves (see the clock on the last example). It makes the images seem like google map 3D renders of shorts. How finely can…
One shortcoming is that this current model is non-adaptive - which means that the target rate is fixed. So to achieve different target compression rates you would have to train multiple models in different rate regimes. In the Colab demo there is the option to select between 3 different models trained with a target bits-per-pixel (bpp) rate at 0.14bpp, 0.30bpp, and 0.45bpp, respectively - higher rates correspond to more higher-fidelity reconstructions, at the expense of a lower compression ratio. The default is the `HiFIC-med` model (and this is what the all samples in the README were generated with), but the model trained at the highest bitrate should have less obvious imperfections.
There's also an aspect to the distortion that can be attributed to the entropy coding process rather than the model itself - currently the system clips values outside a certain probability range, resulting in artificial distortion - a fix is in the pipeline though.
Re: Show HN: Neural Image Compression Demo
#9Hi everyone, I've been working on an implementation of a model for learnable image compression together with general support for neural image compression in PyTorch. You can try it out directly and compress your own images in Google Colab [1] or checkout the source on Github [2]. This project is based on the paper "High-Fidelity Image Compression" by Mentzer et. al. [3] - this was one of the most interesting papers I…
Does this have issues with out of domain images?
One interesting failure model is that images dominated by high-frequency detail require a relatively large bitrate to store - see e.g. the last example in the Github README with the weird brickwork. Even though the model was trained to produce compressed representations with a soft constraint on the maximum bitrate, the filesize of the representation for this particular image is something like 60% above the nominal maximum.
Re: Show HN: Neural Image Compression Demo
#10Damn I got an error at cell 19 otherwise seemed to work