Live data from Hacker News

Perceptual Image Compression at Flickr

code.flickr.net

21–30 of 35 posts

Re: Perceptual Image Compression at Flickr

#21
post #18

I read this looking to see if there was anything we could adapt for mod_pagespeed. Making images smaller without looking worse is, of course, what anyone optimizing images wants. Unfortunately, all they say about how they actually did their perceptual compression is: Ideally we’d have an algorithm which automatically tuned all JPEG parameters to make a file smaller, but which would limit perceptible changes to the im…

https://github.com/technopagan/cjpeg-dssim

Re: Perceptual Image Compression at Flickr

#22
post #18

I read this looking to see if there was anything we could adapt for mod_pagespeed. Making images smaller without looking worse is, of course, what anyone optimizing images wants. Unfortunately, all they say about how they actually did their perceptual compression is: Ideally we’d have an algorithm which automatically tuned all JPEG parameters to make a file smaller, but which would limit perceptible changes to the im…

https://github.com/technopagan/cjpeg-dssim

imgmin: https://github.com/rflynn/imgmin

Re: Perceptual Image Compression at Flickr

#23
post #22

Earlier quoted context omitted.

https://github.com/technopagan/cjpeg-dssim

imgmin: https://github.com/rflynn/imgmin

Nice. I've been using Jpegoptim for years.

Do you know if it uses a similar strategy to imgmin?

Re: Perceptual Image Compression at Flickr

#24

What they did was super impressive, and is a fascinating way to figure out the optimal global compression settings. However, I got my hopes up that perceptual image compression might be about computer vision. At scale, analyzing every image would obviously be prohibitively expensive, but it would be amazing to analyze the detail/edges or color usage (e.g. how much red) in a photo, and tune the q & chroma values accor…

Love the approach. Then they showed their results, and it was only 606 "tests" (showings) of 250 images? On average, just a little more than one same and one different pair-showing for each image. Doesn't strike me as a huge sample.

Re: Perceptual Image Compression at Flickr

#25
post #22

Earlier quoted context omitted.

imgmin: https://github.com/rflynn/imgmin

Nice. I've been using Jpegoptim for years. Do you know if it uses a similar strategy to imgmin?

imgmin and jpegoptim are orthogonal.

imgmin finds the lowest-good quality, and jpegoptim optimizes compression at that quality.

Re: Perceptual Image Compression at Flickr

#26
post #18

I read this looking to see if there was anything we could adapt for mod_pagespeed. Making images smaller without looking worse is, of course, what anyone optimizing images wants. Unfortunately, all they say about how they actually did their perceptual compression is: Ideally we’d have an algorithm which automatically tuned all JPEG parameters to make a file smaller, but which would limit perceptible changes to the im…

You can use interpolated bisection instead of a straight one (I've tried using polynomial interpolation in imgmin and it saves a step or two).

I also wonder whether it would be possible to narrow down the range with only a sample of the image (i.e. pick "representative" subregion(s), bisect on that, then try that quality on the whole image).

Re: Perceptual Image Compression at Flickr

#27

Earlier quoted context omitted.

> Technology exists that attempts to do this Clearly.

It's odd that this is missing. Without it, it's not possible to analyze for biases w.r.t. the stimuli used or even the perceptual features they're adjusting.

There are a few human quality estimate corpuses out there. I know a year or two ago they were re-running the quality assessments with RED camera footage. Check out the NYU/UTexas/Waterloo labs working on SSIM, I bet you can download it.

Re: Perceptual Image Compression at Flickr

#28
post #20

Does anyone know what the equivalent imagemagick convert command could be for jpeg and webp? If Firefox supports webp in the near future and IE and Safari support can be done through javascript decompression what could the size reduction with a similar process on webp be compared to jpeg be?

If Firefox supports webp in the near future... Where are you getting this? My understanding is FF still doesn't intend to add WebP support. https://bugzilla.mozilla.org/show_bug.cgi?id=856375

That thread was effectively closed because the conversation became unproductive. There was no decision on implementation of WebP. See this comment for a summary https://bugzilla.mozilla.org/show_bug.cgi?id=856375#c170

Re: Perceptual Image Compression at Flickr

#29
post #24

What they did was super impressive, and is a fascinating way to figure out the optimal global compression settings. However, I got my hopes up that perceptual image compression might be about computer vision. At scale, analyzing every image would obviously be prohibitively expensive, but it would be amazing to analyze the detail/edges or color usage (e.g. how much red) in a photo, and tune the q & chroma values accor…

Love the approach. Then they showed their results, and it was only 606 "tests" (showings) of 250 images? On average, just a little more than one same and one different pair-showing for each image. Doesn't strike me as a huge sample.

"Doesn't strike me as a huge sample"

Based on what criteria, exactly? 606 comparisons is more than enough to rule out large differences, especially considering that the testers were heavily primed to look for even the tiniest difference and making forced-choices about difference or no difference. Less than 1% difference suggests no real difference.

Re: Perceptual Image Compression at Flickr

#30
I wonder if jbig-style pattern matching and substitution (See the Xerox fail) could be used on photos in jpg format.

If the 8x8 tiles in a jpg were lossy deduplicated, the Huffman compression should work better, even if you kept the high frequencies.

http://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_...

Post reply on HN