HACKER Q&A
📣 gampleman

Can an AI model be used to downscale an image?


Things like favicons need a specific resolution. You may have a nice much larger source image (i.e. 4000x3000), but you need it to be easy to see at say 64x64 pixels. You could simply downscale it, but generally speaking the results won't be great since to for the image to be readable at such a small resolution, it needs to be simplified. So instead of making tiny blurry lines, fewer, simpler and bolder shapes should be used to represent the same semantic image.

Seems like something AI would be good at, but I haven't seen anything tackling this problem. Are there any issues to do this? Have I missed some exciting projects tackling this?


  👤 gampleman Accepted Answer ✓
To give a better example why I think this is a job for AI. Consider this painting:

https://s3.amazonaws.com/cdn.monasteryicons.com/images/popup...

Now, look at what a cropped and downscaled version of this looks like:

https://imgur.com/a/Uf66tDO

You can hardly make out any meaning from the mess of colours in the favicon. A human artist given the job would likely modify the colours of the background to give more emphasis on the central figure. They would also simplify the crowd making it into fewer characters. In general most of the lines would be redrawn to form simpler shapes so that the viewer could actually recognise what the favicon is supposed to represent.


👤 verdverm
There was an algorithm that does what you want, based on some Terence Tao work iirc, around the time / based on his L1/L2 norm result...?

One of the examples was reconstructing an Obama picture from basic shapes.

Struggling to find it again, wisdom of the HN crowd help me out here?


👤 WallyFunk
If the original image is a vector/SVG then it should look well scaled down. I think you can have SVG graphics for a favicon.