Code Monkey home page Code Monkey logo

dct-net's Introduction

DCT-Net: Domain-Calibrated Translation for Portrait Stylization

Project page | Video | Paper

Official implementation of DCT-Net for Full-body Portrait Stylization.

DCT-Net: Domain-Calibrated Translation for Portrait Stylization,
Yifang Men1, Yuan Yao1, Miaomiao Cui1, Zhouhui Lian2, Xuansong Xie1,
1DAMO Academy, Alibaba Group, Beijing, China
2Wangxuan Institute of Computer Technology, Peking University, China
In: SIGGRAPH 2022 (TOG) arXiv preprint

google colab logo Hugging Face Spaces

Demo

demo_vid

News

(2022-10-09) The multi-style pre-trained models (3d, handdrawn, sketch, artstyle) and usage are available now.

(2022-08-08) The pertained model and infer code of 'anime' style is available now. More styles coming soon.

(2022-08-08) cartoon function can be directly call from pythonSDK.

(2022-07-07) The paper is available now at arxiv(https://arxiv.org/abs/2207.02426).

Web Demo

Requirements

  • python 3
  • tensorflow (>=1.14)
  • easydict
  • numpy
  • both CPU/GPU are supported

Quick Start

google colab logo

git clone https://github.com/menyifang/DCT-Net.git
cd DCT-Net

From python SDK

A quick use with python SDK

  • Installation:
conda create -n dctnet python=3.8
conda activate dctnet
pip install tensorflow
pip install "modelscope[cv]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  • Downloads:
python download.py
  • Inference:
python run_sdk.py

From source code

python run.py

Multi-style

Multi-style models and usages are provided here.

demo_img

git clone https://github.com/menyifang/DCT-Net.git
cd DCT-Net

Multi-style models download

  • upgrade modelscope>=0.4.7
conda activate dctnet
pip install --upgrade "modelscope[cv]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  • Download the pretrained models with specific styles [option: anime, 3d, handdrawn, sketch, artstyle]
python multi-style/download.py --style 3d

Inference

  • Quick infer with python SDK, style choice [option: anime, 3d, handdrawn, sketch, artstyle]
python multi-style/run_sdk.py --style 3d
  • Infer from source code & downloaded models
python multi-style/run.py --style 3d

Acknowledgments

Face detector and aligner are adapted from Peppa_Pig_Face_Engine and InsightFace.

Citation

If you find this code useful for your research, please use the following BibTeX entry.

@inproceedings{men2022dct,
  title={DCT-Net: Domain-Calibrated Translation for Portrait Stylization},
  author={Men, Yifang and Yao, Yuan and Cui, Miaomiao and Lian, Zhouhui and Xie, Xuansong},
  journal={ACM Transactions on Graphics (TOG)},
  volume={41},
  number={4},
  pages={1--9},
  year={2022},
  publisher={ACM New York, NY, USA}
}

dct-net's People

Contributors

ak391 avatar menyifang avatar

Stargazers

 avatar

Watchers

 avatar

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.