Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Can an AI model be used to downscale an image?
3 points by gampleman on Dec 19, 2023 | hide | past | favorite | 6 comments
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?



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.


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?


Found that algo: https://calculatedcontent.com/2012/12/28/foundations-theory-...

It was related to compressed sensing


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.


This won't really work super well for massive downscaling. If you have a vector image designed with enough detail to look good at large resolution, the smaller version will not look great and not be easy to see (apart from being also massively inefficient).


this is the way!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: