Unlock AI-Powered Makeup Transfer: Copy Any Look to Your Photo in Three Steps

This article introduces an AI-powered makeup transfer technique that copies makeup from any reference image onto a user's photo, explains its advantages over traditional sticker-based apps, outlines a three‑step workflow, and provides sample Python code runnable on Huawei Cloud ModelArts.

Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Unlock AI-Powered Makeup Transfer: Copy Any Look to Your Photo in Three Steps

Huawei Cloud's elite programmer team presents an AI‑driven makeup transfer method that directly copies the makeup from a reference image onto a user’s portrait, allowing precise evaluation of whether a style suits one’s facial features and preferences.

Compared with conventional sticker‑based makeup apps, this technique offers far greater flexibility: it can extract makeup from any real‑world model photo, transfer colors, patterns, skin tone, texture, blush, stickers, and lighting, and produce natural‑looking results that faithfully reproduce the original look.

Capture a flat 2D image of both the user and the reference model.

Perform separate color‑style and pattern‑style transfers for eye shadow, lipstick, and other cosmetics.

Merge the transferred makeup and overlay it onto the user’s photo, achieving a refined, makeup‑enhanced appearance.

Sample Python code demonstrates the workflow:

model = Makeup(args)
model.prn_process(source_img)  # preprocess the un‑makeup image
S_txt = model.get_texture()      # obtain texture of the un‑makeup image
R_txt = model.prn_process_target(reference_img)  # texture of reference makeup
output = color_pattern_makeup(S_txt, F_txt)  # fuse color and pattern styles

The code is shared in Huawei Cloud ModelArts’ AI Gallery and can be executed with a single “Run in ModelArts” click, offering an interactive experience of makeup generation.

ModelArts is a one‑stop AI development platform that provides cloud‑based JupyterLab, free compute resources, and support for major frameworks (TensorFlow, PyTorch, MindSpore), making AI development accessible and high‑performance.

Pythondeep learningHuawei CloudModelArtsAI makeup transfer
Huawei Cloud Developer Alliance
Written by

Huawei Cloud Developer Alliance

The Huawei Cloud Developer Alliance creates a tech sharing platform for developers and partners, gathering Huawei Cloud product knowledge, event updates, expert talks, and more. Together we continuously innovate to build the cloud foundation of an intelligent world.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.