Higher image quality of blurred faces in stock photos with AI

MLBoy
2 min readMar 12, 2023

--

Clear low-resolution facial images

When using free material images for presentations, advertisements, etc., the faces of people in small images may be blurred.

In such a case, let’s improve the image quality with AI.
For example, let’s say you have a stock photo of a crowd like this:

It’s a beautiful picture, but each person’s face is magnified and blurry.

When this is made high quality with AI. . .

You can get pretty sharp pictures like this.

Usage

This time, we will use an AI model called Codeformer.

install

git clone https://github.com/sczhou/CodeFormer.git
cd CodeFormer
pip install -r requirements.txt
python basicsr/setup.py develop
load_ext autoreload
autoreload 2
python scripts/download_pretrained_models.py CodeFormer

run

python inference_codeformer.py -w 0.5 --has_aligned --input_path face.jpg

With just this code, you can improve the image quality of your photos.

🐣

I am a freelance engineer. I have developed an AI system.
If you have any of the following requests, please feel free to contact us.
I want to develop an AI service, I want to incorporate AI into my business to make it more efficient, I want to develop a smartphone app that uses AI, I want to create an application that uses AR, I want to create a smartphone app, but I don’t know who to consult…”

I will take responsibility for all of them at a reasonable price that eliminates intermediate costs.

For work inquiries, please contact
rockyshikoku@gmail.com

I am creating applications using machine learning and AR technology.
I am disseminating information related to machine learning/AR.

GitHub

Twitter
Medium

--

--

MLBoy
MLBoy

No responses yet