All Projects → Lotayou → Face-Renovation

Lotayou / Face-Renovation

Licence: GPL-3.0 license
Official repository of the paper "HiFaceGAN: Face Renovation via Collaborative Suppression and Replenishment".

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Face-Renovation

Python-Complementary-Languages
Just a small test to see which language is better for extending python when using lists of lists
Stars: ✭ 32 (-86.94%)
Mutual labels:  benchmark
hashcat-benchmark-comparison
Hashcat Benchmark Comparison
Stars: ✭ 22 (-91.02%)
Mutual labels:  benchmark
beapi-bench
Tool for benchmarking apis. Uses ApacheBench(ab) to generate data and gnuplot for graphing. Adding new features almost daily
Stars: ✭ 16 (-93.47%)
Mutual labels:  benchmark
python-pytest-harvest
Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes.
Stars: ✭ 44 (-82.04%)
Mutual labels:  benchmark
embeddings
Embeddings: State-of-the-art Text Representations for Natural Language Processing tasks, an initial version of library focus on the Polish Language
Stars: ✭ 27 (-88.98%)
Mutual labels:  benchmark
gpumembench
A GPU benchmark suite for assessing on-chip GPU memory bandwidth
Stars: ✭ 62 (-74.69%)
Mutual labels:  benchmark
MDBenchmark
Quickly generate, start and analyze benchmarks for molecular dynamics simulations.
Stars: ✭ 64 (-73.88%)
Mutual labels:  benchmark
graphql-benchmarks
GraphQL benchmarks using the-benchmarker framework.
Stars: ✭ 54 (-77.96%)
Mutual labels:  benchmark
Color-Image-Inpainting
Image inpainting based on OMP and KSVD algorithm
Stars: ✭ 66 (-73.06%)
Mutual labels:  image-restoration
glDelegateBenchmark
quick and dirty benchmark for TFLite gles delegate on iOS
Stars: ✭ 13 (-94.69%)
Mutual labels:  benchmark
SQL-ProcBench
SQL-ProcBench is an open benchmark for procedural workloads in RDBMSs.
Stars: ✭ 26 (-89.39%)
Mutual labels:  benchmark
benchmarkjs-pretty
Tiny wrapper around benchmarkjs with a nicer api
Stars: ✭ 20 (-91.84%)
Mutual labels:  benchmark
LuaJIT-Benchmarks
LuaJIT Benchmark tests
Stars: ✭ 20 (-91.84%)
Mutual labels:  benchmark
ufw
A minimalist framework for rapid server side applications prototyping in C++ with dependency injection support.
Stars: ✭ 19 (-92.24%)
Mutual labels:  benchmark
nowplaying-RS-Music-Reco-FM
#nowplaying-RS: Music Recommendation using Factorization Machines
Stars: ✭ 23 (-90.61%)
Mutual labels:  benchmark
UWCNN
Code and Datasets for "Underwater Scene Prior Inspired Deep Underwater Image and Video Enhancement", Pattern Recognition, 2019
Stars: ✭ 82 (-66.53%)
Mutual labels:  image-restoration
TensorTrade
This repository hosts all my code related to TensorTrade. It consists of the main program, its old versions, and some extras for more insights.
Stars: ✭ 16 (-93.47%)
Mutual labels:  benchmark
cpm
Continuous Perfomance Monitor (CPM) for C++ code
Stars: ✭ 39 (-84.08%)
Mutual labels:  benchmark
hood
The plugin to manage benchmarks on your CI
Stars: ✭ 17 (-93.06%)
Mutual labels:  benchmark
gl-bench
⏱ WebGL performance monitor with CPU/GPU load.
Stars: ✭ 146 (-40.41%)
Mutual labels:  benchmark

python report PWC PWCPWC





Face-Renovation

HiFaceGAN: Face Renovation via Collaborative Suppression and Replenishment

Lingbo Yang, Chang Liu, Pan Wang, Shanshe Wang, Peiran Ren, Siwei Ma, Wen Gao

Project | arXiv | ACM link| Supplementary Material

Update 20201026: Pretrained checkpoints released to facilitate reproduction.

Update 20200911: Please find video restoration results at this repo!

Update: This paper is accepted at ACM Multimedia 2020.

Stunner

Contents

  1. Usage
  2. Benchmark
  3. Remarks
  4. License
  5. Citation
  6. Acknowledgements

Usage

Environment

  • Ubuntu/CentOS
  • PyTorch 1.0+
  • CUDA 10.1
  • python packages: opencv-python, tqdm,
  • Data augmentation tool: imgaug
  • Face Recognition Toolkit for evaluation
  • tqdm to make you less anxious when testing:)

Dataset Preparation

Download FFHQ, resize to 512x512 and split id [65000, 70000) for testing. We only use first 10000 images for training, which takes 2~3 days on a P100 GPU, training with full FFHQ is possible, but could take weeks.

After that, run degrade.py to acquire paired images for training. You need to specify the degradation type and input root in the script first.

Configurations

The configurations is stored in options/config_hifacegan.py, the options should be self-explanatory, but feel free to leave an issue anytime.

Training and Testing

python train.py            # A fool-proof training script
python test.py             # Test on synthetic dataset
python test_nogt.py        # Test on real-world images
python two_source_test.py  # Visualization of Fig 5

Pretrained Models

Download, unzip and put under ./checkpoints. Then change names in configuration file accordingly.

BaiduNetDisk: Extraction code:cxp0

YandexDisk

Note:

  • These checkpoints works best on synthetic degradation prescribed in degrade.py, don't expect them to handle real-world LQ face images. You can try to fine-tune them with additional collected samples though.
  • There are two face_renov checkpoints trained under different degradation mixtures. Unfortunately I've forgot which one I used for our paper, so just try both and select the better one. Also, this could give you a hint about how our model behaves under a different degradation setting:)
  • You may need to set netG=lipspade and ngf=48 inside the configuration file. In case of loading failure, don't hesitate to submit a issue or email me.

Evaluation

Please find in metrics_package folder:

  • main.py: GPU-based PSNR, SSIM, MS-SSIM, FID
  • face_dist.py: CPU-based face embedding distance(FED) and landmark localization error (LLE).
  • PerceptualSimilarity\main.py: GPU-based LPIPS
  • niqe\niqe.py: NIQE, CPU-based, no reference

Note:

  • Read the scripts and modify result folder path(s) before testing (do not add / in the end), the results will be displayed on screen and saved in txt.
  • At least 10GB is required for main.py. If this is too heavy for you, reducebs=250 at line 79
  • Initializing Inception V3 Model for FID could take several minutes, just be patient. If you find a solution, please submit a PR.
  • By default face_dist.py script runs with 8 parallel subprocesses, which could cause error on certain environments. In that case, just disable the multiprocessing and replace with a for loop (This would take 2~3 hours for 5k images, you may want to wrap the loop in tqdm to reduce your anxiety).

Benchmark

Please refer to benchmark.md for benchmark experimental settings and performance comparison.

Memory Cost The default model is designed to fit in a P100 card with 16 GB memory. For Titan-X or 1080Ti card with 12 GB memory, you can reduce ngf=48, or further turn batchSize=1 without significant performance drop.

Inference Speed Currently the inference script is single-threaded which runs at 5fps. To further increase the inference speed, possible options are using multi-thread dataloader, batch inference, and combine normalization and convolution operations.

Remarks

Face Renovation is not designed to create a perfect specimen OUT OF you, but to bring out the best WITHIN you.

The Philosophy of Face Renovation | Understanding of HiFaceGAN

License

Copyright © 2020, Alibaba Group. All rights reserved. This code is intended for academic and educational use only, any commercial usage without authorization is strictly prohibited.

Citation

Please kindly cite our paper when using this project for your research.

@article{Yang2020HiFaceGANFR,
  title={HiFaceGAN: Face Renovation via Collaborative Suppression and Replenishment},
  author={Lingbo Yang and C. Liu and P. Wang and Shanshe Wang and P. Ren and Siwei Ma and W. Gao},
  journal={Proceedings of the 28th ACM International Conference on Multimedia},
  year={2020}
}

Acknowledgements

The replenishment module borrows the implementation of SPADE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].