You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.7 KiB
Markdown

3 years ago
# DCT-Net: Domain-Calibrated Translation for Portrait Stylization
3 years ago
### [Project page](https://menyifang.github.io/projects/DCTNet/DCTNet.html) | [Video](https://www.youtube.com/watch?v=Y8BrfOjXYQM) | [Paper](https://arxiv.org/abs/2207.02426)
3 years ago
Official implementation of DCT-Net for Portrait Stylization.
3 years ago
> [**DCT-Net: Domain-Calibrated Translation for Portrait Stylization**](arxiv_url_coming_soon),
> [Yifang Men](https://menyifang.github.io/)<sup>1</sup>, Yuan Yao<sup>1</sup>, Miaomiao Cui<sup>1</sup>, [Zhouhui Lian](https://www.icst.pku.edu.cn/zlian/)<sup>2</sup>, Xuansong Xie<sup>1</sup>,
3 years ago
> _<sup>1</sup>[DAMO Academy, Alibaba Group](https://damo.alibaba.com), Beijing, China_
3 years ago
> _<sup>2</sup>[Wangxuan Institute of Computer Technology, Peking University](https://www.icst.pku.edu.cn/), China_
3 years ago
> In: SIGGRAPH 2022 (**TOG**)
3 years ago
> *[arXiv preprint](https://arxiv.org/abs/2207.02426)*
3 years ago
## Demo
3 years ago
![demo_vid](assets/demo.gif)
3 years ago
3 years ago
## News
(2022-07-07) The paper is available now at arxiv(https://arxiv.org/abs/2207.02426).
3 years ago
2 years ago
(2022-08-08) cartoon function can be directly call from pythonSDK.
3 years ago
3 years ago
(2022-08-08) The pertained model and infer code of 'anime' style is available now. More styles coming soon.
3 years ago
3 years ago
2 years ago
## Web Demo
2 years ago
- Integrated into [Huggingface Spaces 🤗](https://huggingface.co/spaces) using [Gradio](https://github.com/gradio-app/gradio). Try out the Web Demo [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/SIGGRAPH2022/DCT-Net)
2 years ago
3 years ago
3 years ago
## Requirements
3 years ago
* python 3
* tensorflow (>=1.14)
* easydict
* numpy
* both CPU/GPU are supported
3 years ago
3 years ago
## Quick Start
3 years ago
3 years ago
```bash
git clone https://github.com/menyifang/DCT-Net.git
cd DCT-Net
```
3 years ago
### From python SDK
A quick use with python SDK
- Installation:
```bash
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:
```bash
python download.py
```
- Inference:
```bash
python run_sdk.py
```
### From source code
```bash
python run.py
```
## Acknowledgments
Face detector and aligner are adapted from [Peppa_Pig_Face_Engine](https://github.com/610265158/Peppa_Pig_Face_Engine
) and [InsightFace](https://github.com/TreB1eN/InsightFace_Pytorch).
3 years ago
## Citation
If you find this code useful for your research, please use the following BibTeX entry.
```bibtex
@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},
3 years ago
publisher={ACM New York, NY, USA}
3 years ago
}
```
3 years ago