Hacker News new | ask | show | jobs
by vbezhenar 1106 days ago
Does it really matter? These days decoding image with JS or Wasm should be fine. It's not video.
3 comments

Video is not lossless, a second of high quality video might be a total of 5 megabytes.

A mammogram on the other hand, might be 300 images of lossless 4k resolution, which could clock in at about 2 gigabytes. That could be per breast in a given study, and a study could have prior mammograms attached as well.

You will hit memory limits, so you need to be able to unload and load data intelligently and quickly.

Image compression for mammograms seems like a thing ideally suited to a straightforward ML task — a model trained to classify sections of an image which are outside of the area of relevance (i.e. not the breast) and classify details of high importance so that detail can be retained where it's needed.

Especially handy that it wouldn't require a new file format. It only requires the encoder to support variable compression. (I know Photoshop supported this for JPEG many decades ago.)

I might be missing the details here, but everything outside the breast should be pretty much black and will get compressed very efficiently (high signal, low noise, easy to predict).

Foveated compression sounds like a super cool idea I've never thought about before.

Before that, you would need to get radiologists onboard with the idea of something being "diagnostically lossless" (think visually lossless), which is currently a hard sell (some promising research does exist on this)!

https://giannirosato.com/blog/post/nvenc-v-qsv/ This site has WASM-decoded JXL images using JXL.js. Native support would be much faster, & trying to decode much larger images with JXL.js doesn’t work very well.
What do you mean by "much faster"? Those images are opened pretty much instantly both in desktop chrome and in iOS chrome. If you didn't mention that they're JXL, I would never notice that.
Images are opened and used in a lot of places that aren't browsers.