Live data from Hacker News

Lepton image compression: saving 22% losslessly from images at 15MB/s

blogs.dropbox.com

131–140 of 196 posts

Re: Lepton image compression: saving 22% losslessly from images at 15MB/s

#131

Just a random idea: could machine learning algorithms that do object recognition help to improve the compression of images or videos? Maybe a lossy algorithm could compress away "irrelevant" things. This way a high resolution frame might have lower resolution objects inside but it would he ok because the important part of the content is preserved.

Absolutely, yes. There is a very deep link between compression and "understanding". I think we have every reason to believe that networks that can understand/"explain away" the content/statistics of a scene ought to be able to compress them better.

I presume someone (or likely many people) are working on exactly this.

Re: Lepton image compression: saving 22% losslessly from images at 15MB/s

#132

Am I the only person who spent the first paragraph or so very confused why dropbox was messing with thermal cameras? The FLIR Lepton is thermal imaging sensor ( http://www.flir.com/cores/content/?id=66257 ), and has been for a few years now. They really should have used a different name.

Just because you know another thing with the name doesn't make it illegal to use that name as it has a meaning anyway. There is also a CMS called Lepton. Pretty sure this will soon be the most popular product with this name anyway.

Re: Lepton image compression: saving 22% losslessly from images at 15MB/s

#133

Just a random idea: could machine learning algorithms that do object recognition help to improve the compression of images or videos? Maybe a lossy algorithm could compress away "irrelevant" things. This way a high resolution frame might have lower resolution objects inside but it would he ok because the important part of the content is preserved.

I think a fully trained neural network is, in a sense, a "lossy" (possibly very lossy) description of the training set.

Oh what I was imagining was more like if I was watching a news broadcast and so all I care about was the news anchor person, and the main on screen grapic/text. If you Compress down other things like the table or the background or wrote an algorithm to selectively stream resolutions tied to the object streamed instead of the frame streamed. Is that a viable form of "compression" using existing computer vision tech?

Re: Lepton image compression: saving 22% losslessly from images at 15MB/s

#134
post #131

Just a random idea: could machine learning algorithms that do object recognition help to improve the compression of images or videos? Maybe a lossy algorithm could compress away "irrelevant" things. This way a high resolution frame might have lower resolution objects inside but it would he ok because the important part of the content is preserved.

Absolutely, yes. There is a very deep link between compression and "understanding". I think we have every reason to believe that networks that can understand/"explain away" the content/statistics of a scene ought to be able to compress them better. I presume someone (or likely many people) are working on exactly this.

Very cool! if anyone who comes across this particular thread knows about papers/research being written about this topic, I'd be very interested to learn more.

Re: Lepton image compression: saving 22% losslessly from images at 15MB/s

#135

Earlier quoted context omitted.

Yes, it should all just switch to FLIF http://flif.info/

> FLIF is a novel lossless image format which outperforms PNG, lossless WebP, lossless BPG, lossless JPEG2000, and lossless JPEG XR in terms of compression ratio. > 74% smaller than lossless JPEG XR compression. > Works on any kind of image

> outperforms PNG, lossless WebP, lossless BPG, lossless JPEG2000, and lossless JPEG XR

PNG was not designed to be used for photograph-like images. The rest of those were not designed to be lossless formats, the lossless version is just a tacked-on afterthought.

Very unsurprising to find a codec that can beat those.

Re: Lepton image compression: saving 22% losslessly from images at 15MB/s

#136

Earlier quoted context omitted.

Why not use a better format to begin with? Like FLIF: http://flif.info/

Thanks for the info, see my response below.

I'd also consider WebP. FLIF is great but compression time is much slower than WebP for similar results.

Re: Lepton image compression: saving 22% losslessly from images at 15MB/s

#137

Earlier quoted context omitted.

Why not use a better format to begin with? Like FLIF: http://flif.info/

Thanks for the info, see my response below.

Store it as FLIF then dynamically serve up whatever is needed for the web interface...

Re: Lepton image compression: saving 22% losslessly from images at 15MB/s

#138

Earlier quoted context omitted.

Yes, it should all just switch to FLIF http://flif.info/

> FLIF is a novel lossless image format which outperforms PNG, lossless WebP, lossless BPG, lossless JPEG2000, and lossless JPEG XR in terms of compression ratio. > 74% smaller than lossless JPEG XR compression. > Works on any kind of image

It also loads progressively and has a novel feature that lets a client determine how much detail to render, then stop loading any more data, all while using the same file.

http://flif.info/example.html

Re: Lepton image compression: saving 22% losslessly from images at 15MB/s

#139

Am I the only person who spent the first paragraph or so very confused why dropbox was messing with thermal cameras? The FLIR Lepton is thermal imaging sensor ( http://www.flir.com/cores/content/?id=66257 ), and has been for a few years now. They really should have used a different name.

Just because you know another thing with the name doesn't make it illegal to use that name as it has a meaning anyway. There is also a CMS called Lepton. Pretty sure this will soon be the most popular product with this name anyway.

"Illegal"? Wut?

It's not illegal, it's just dumb. Sure, you could implement your entire C++ application inside the `std` namespace, and I'm sure it'd work fine, but you /shouldn't/. If you're going to start a project, at least google the name first.

Re: Lepton image compression: saving 22% losslessly from images at 15MB/s

#140
post #130
post #120

Earlier quoted context omitted.

The size difference between "high quality" jpeg and lossless compressed TIFFs can be quite significant - so I it might not be feasible to use eg. TIFF for archiving. And jpegs might very well be "good enough". Eg. just tested on a small 10MP Sony ARW raw image - the raw file is 7MB, the camera jpeg is 2.3MB, and a tiff compressed with LZW is 20MB (uncompressed 29MB). The raw tiff run through lzma is 9.3MB. But either…

How on earth did a 7MB raw blow out to a 20MB TIFF? Isn't that going from uncompressed RGBG to losslessly compressed RGB?

DNGs and RAWs aren't generally (AFAIK) uncompressed. But ideally they're losslessly compressed. They're all(?) "TIFF files" - but AFAIK saying something is a valid TIFF, is almost as helpful as saying something is "a file".

Apparently Sony uses some kind of lossy compression for it's files - I just tested with a jpeg2000 encoder on the same file above, and the size of the j2k file is approximately the same as the ARW: 7MB. Btw, the lep-file is 1.7MB.

Note that the uncompressed (flat) PPM file is 29MB as is the uncompressed TIFF - but simply running the TIFF through lzma reduces the size to 9.3MB. So ~7MB isn't that far off.

[ed: And while the lep-file was 1.7MB, shaving a bit off the original jpg, mozjpeg with defaults+baseline created a jpeg (at q=75, per default) 472k in size. Lep managed to shave a bit off that too - ending up with PPM->mozjpeg->lepton resulting in a 359K file. The (standard) progressive mozjpeg ended up at 464K.

This is not quite apples to apples, though, I think the comparable quality setting for mozjpeg would probably be 90 to 95 or so -- ending up around 1.6MB. But for this particular (rather crappy) image - I couldn't readily tell any difference.

Which I suppose is where https://github.com/danielgtaylor/jpeg-archive comes in.]

Post reply on HN