Live data from Hacker News

Compressing Images with Neural Networks

mlumiste.com

51–60 of 75 posts

Re: Compressing Images with Neural Networks

#51

How badly will its lossy-ness change critical things? In 2013, there were Xerox copiers with aggressive compression that changed numbers, https://www.theregister.com/2013/08/06/xerox_copier_flaw_mea...

The suitable lossy-ness (of any compression method) is entirely dependant on context. There is no one size fits all approach for all uses cases.

One key item with emerging 'AI compression' techniques is the information loss is not deterministic which somewhat complicates assessing suitability.

Re: Compressing Images with Neural Networks

#52
post #35

Earlier quoted context omitted.

The mentioned Xerox copier incident was not an OCR failure, but the copier actively changed the numbers in the original image due to its image compression algorithm.

Any lossy compressor changes the original image for better compression at expense of the perfect accuracy.

Exactly, in practice the alternatives are either blocky artifacts (JPEG and most other traditional codecs), blurring everything (learned codecs optimised for MSE) or "hallucinating" patterns when using models like GANs. However, in practice even the generative side of compression models is evaluated against the original image rather than only output quality, so the outputs tend to be passable.

To see what a lossy generator hallucinating patterns means in practice, I recommend viewing HiFiC vs original here: https://hific.github.io/

Re: Compressing Images with Neural Networks

#53

Something similar by Fabrice Bellard: https://bellard.org/nncp/

If you look at the winners of the Hutter prize, or especially the Large Text Compression Benchmark, then almost every approach uses some kind of machine learning approach for the adaptive probability model and then either arithmetic coding or rANS to losslessly encode it.

This is intuitive, as the competition organisers say: compression is prediction.

Re: Compressing Images with Neural Networks

#54

Earlier quoted context omitted.

Why the need for all things to be browser based? Why introduce the performance hit for something that brings no compelling justification? What problem is this solution solving? Why can't things just be native workflows and not be shoveled into a browser?

Not the parent but one imagines that WASM could be a good target for decompressing or otherwise decoding less-adopted formats/protocols because WASM is fairly broadly-adopted and seems to be at least holding steady if not growing as an executable format: it seems unlikely that WASM disappears in the foreseeable future. Truly standard ANSI C along with a number of other implementation strategies (LLVM IR seems unlikel…

Wasm is simple, well-defined, small enough that one person can implement the whole thing in a few weeks, and (unlike the JVM) is usable without its standard library (WASI).

LLVM isn't as simple: there's not really such thing as target-independent LLVM IR, there are lots of very specific keywords with subtle behavioural effects on the code, and it's hard to read. I think LLVM is the only full implementation of LLVM. (PNaCl was a partial reimplementation, but it's dead now.)

ANSI C is a very complicated language and very hard to implement correctly. Once Linux switches to another language or we stop using Linux, C will go the way of Fortran.

Part of archiving information has always been format shifting. Never think you can store information, forget about it for a thousand years (or even five), and have it available later.

Re: Compressing Images with Neural Networks

#55

How much vram is needed? And computing power? To open a webpage you soon need 24gb and 2 seconds of 1000 watts energy to uncompress images. Bandwidth is reduced from 2mb to only 20kb.

> Bandwidth is reduced from 2mb to only 20kb.

Plus the entire model, which comes with incorrect cache headers and must be redownloaded all the time.

Re: Compressing Images with Neural Networks

#56
post #10

Anyone know of open models useful (and good quality) for going the other way? I.e., Input is a 800x600 jpg and output is 4k version.

Current SOTA open source is I believe SUPIR (Example - https://replicate.com/p/okgiybdbnlcpu23suvqq6lufze), but it needs a lot of VRAM, or you can run it through replicate, or here's the repo (https://github.com/Fanghua-Yu/SUPIR)

Re: Compressing Images with Neural Networks

#59
post #35

Earlier quoted context omitted.

The mentioned Xerox copier incident was not an OCR failure, but the copier actively changed the numbers in the original image due to its image compression algorithm.

Any lossy compressor changes the original image for better compression at expense of the perfect accuracy.

Tradtional lossy compressors have well-understood artifacts. In particular they provide guarantees such that you can confidently say that an object in the image could not be an artifact.

Re: Compressing Images with Neural Networks

#60
post #2

It is not going to take off if it is not significantly better, and has browser support. WebP took off thanks to Chrome, while JPEG2000 floundered. If not native browser support, maybe the codec could be shipped by WASM or something? The interesting diagram to me is the last one, for computational cost, which shows the 10x penalty of the ML-based codecs.

Better or cheaper, e.g. AV1?
Post reply on HN