OpenViSTAI · Agents · Blockchain · Crypto
Menu
Image & Video AI

Cpm

Cpm is a Python computer-vision framework for transferring makeup colors and patterns from a reference image to another image, using separate color- and pattern-transfer branches.

Independent OpenViST project profile, based on linked sources.

Cpm — OpenViST project profile in Image & Video AI.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Cpm when you need a code-based workflow for transferring a reference makeup style to an image and want control over color and pattern transfer separately or together.

Who it is for

  • Computer-vision researchers studying or reproducing makeup-transfer methods.
  • Developers creating a makeup-transfer demo or image-processing workflow for portrait images.

Documented uses

  • Transfer both color and pattern makeup from a reference style to an input image.
  • Generate a color-only or pattern-only transfer result to examine each branch independently.
  • Train or evaluate the color and pattern branches using prepared face texture maps.
Before you choose

Requirements & limits

The repository is public and specifies the BSD-3-Clause license. Its README links a Google Colab notebook. The provided datasets have separate research-or-educational-use terms and may not be redistributed.

  • The framework combines a color branch based on BeautyGAN with a distinct pattern branch.
  • The documented local environment specifies Python 3.7, PyTorch 1.6.0, TensorFlow-GPU 1.14 and segmentation_models_pytorch.
  • Local use requires downloading CPM color and pattern weights and a PRNet pretrained model into specified folders.
  • The repository includes four datasets, but their stated terms differ from the code license and restrict redistribution.
  • The project requests citation when its datasets or model implementation contribute to published results or are incorporated into other software.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up Cpm and transfer makeup from reference images

Prepare the documented environment and use Cpm's example to generate a color-and-pattern transfer result.

Before you start

  • Python 3.7
  • PyTorch 1.6.0
  • TensorFlow-GPU 1.14
  • segmentation_models_pytorch
  • Conda and the repository's environment.yml

Steps

  1. Clone the repository and change into its directory.

  2. Create the Conda environment with conda env create -f environment.yml.

  3. Place color.pth and pattern.pth in the checkpoints folder and the PRNet model in PRNet/net-data.

  4. Run the documented main.py example with --style and --input image paths; use --color_only or --pattern_only to select one branch.

Expected outcome

The example is documented to save the transferred image as result.png.

Guide limitations

  • The README specifies a GPU-oriented environment and CUDA device selection in its examples.
  • The recipe describes the repository's documented setup and usage, not independently verified execution.
  • The datasets have separate research-or-educational-use and redistribution restrictions.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
VinAIResearch/CPM · Official homepage title · retained in its source language