Git Product home page Git Product logo

doface's Introduction

DoFace | 抖脸

A package that supports Virtual Makeup function, including lip color transfer and cosmetic contact lenses. This repository is based on PyTorch.

一个支持包括唇彩试色美瞳试戴功能的虚拟试妆软件包。该项目基于PyTorch。项目介绍见此MOOC链接

唇彩 美瞳

Get started

Clone the repository and configurate the environment.

git clone [email protected]:ChineseYjh/DoFace.git
pip install -r requirements.txt

Use DoFace in your projects.

Your project
│   README.md
│   ...
│   foo.py
│
└───DoFace
│
└───directory1
│   
└───...

Write codes in foo.py like:

import DoFace
img_path='./imgs/test.jpg' # original face image path
style="niuxuese" # it supports "niuxuese", "nanguase" and "yinghuafen" for chuncai(唇彩) ,and "shenlanse", "yamajin" for meitong(美瞳). All styles are supported by doface function.
dst_path='./imgs/res-niuxuese.jpg' # makeup result image path
save=True # whether to save img to dst_path
img=DoFace.doface(img_path=img_path,style=style,dst_path=dst_path,save=save,
                  cp='./DoFace/facetools/parsing/cp/cp_parsing.pth') # cp points to the face-parsing weight path

This package now supports:

  • chuncai(唇彩)
    • nanguase(南瓜色)
    • niuxuese(牛血色)
    • yinghuafen(樱花粉)
  • meitong(美瞳)
    • shenlanse(深蓝色)
    • yamajin(亚麻金)

Choose one and assign it to style in foo.py.

Acknowledgement

This repository is based on facetools and pytorch-CycleGAN-and-pix2pix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.