How is AI being applied to the human pursuit of brainstorming? Surely Artificial Intelligence,...
Picture Perfect (ish)
For today's AI review, I took a test drive of an API that uses AI to enhance old photographs. The tool is called CodeFormer and can be found at https://huggingface.co.
Codeformer uses an AI algorithm to restore parts of old photos that are out of focus, fuzzy or just lo rez due to the era in which they were taken. Many of us have drawers, albums, and digital folders full of pictures from childhood, college or family heirlooms that could benefit from an upgrade. That's where CodeFormer comes in - using AI to digitally fill-in-the-blanks in all of those pixels lost to time. It also cleans up backgrounds, though to a lesser extent than its facial enhancement prowess.
It's the easiest of the AI tools I've used so far: simply upload or drag-and-drop the picture you want to enhance, submit it, and wait about 30 seconds while your picture works its way up the queue and then the algorithm does its thing.
The results are, er, mixed... For some pictures it restores some much-needed clarity, while for some it creates an oddly "game avatar" look. In the worst cases, usually where the faces are relatively small in relation to the whole photograph, the results look more like Sims than the true face it is seeking to upgrade. All that said, there are adjustments you can make manually to prioritize accuracy versus clarity, and some of the photos were really brought back to life in astonishing detail while still staying true to the subjects' faces.
Here are some before and after examples:
Notice that you have the ability to first re-crop the image (takes care of any copies of copies with surrounding table-top images). This particular enhancement does of great job of restoration without drifting too far from the actual likenesses.
Another example on larger facial images:
This works well, though oddly fails to solve the one thing cameras figured out 20 years ago -- red-eye or flash issues.
In this next example this adorably pensive young man takes on too much of an AI or "gaming avatar" facial look in the enhanced version. This highlights the inherent weakness in the AI -- since it doesn't know what the person looks like it fills in the missing detail with what it has "learned" about human features from millions of other photographs. So the lower the resolution in the original image, the more likely the result will be too artificial-looking.
Finally, an example where the faces are too small and lo rez for the algorithm, and so the resulting facial restorations look decidedly like the Sims:
Even in this case, if you didn't know the individuals in the picture you might think it adds much needed detail. But when we are dealing with friends and relatives all to familiar to us, the recognition bar is set higher.
So, CodeFormer is a great way to quickly and easily retouch old photographs in ways that would have been prohibitively expensive, or beyond the skills of most people, and now available in a simple drag-and-drop interface. But in some cases our memories may be best left the way they are in our human minds: soft, lo rez and a little faded.