Git Product home page Git Product logo

stylealign's Introduction

Aggregation via Separation: Boosting Facial Landmark Detector with Semi-Supervised Style Translation

Shengju Qian, Keqiang Sun, Wayne Wu, Chen Qian, and Jiaya Jia

International Conference on Computer Vision (ICCV), 2019

This repository contains the implementation of our ICCV 2019 paper, 'Aggregation via Separation: Boosting Facial Landmark Detector with Semi-Supervised Style Translation'. The proposed method investigates how to boost the performance of facial landmark detector in limited training resources, using synthetic data in a style-translation manner.

aug

Results(NME/%) on WFLW dataset

Method Fullset Pose Expression Illumination Make-up Occlusion Blur
DVLN 6.08 11.54 6.78 5.73 5.98 7.33 6.88
LAB 5.27 10.24 5.51 5.23 5.15 6.79 6.32
SAN 5.22 10.39 5.71 5.19 5.49 6.83 5.80
WING 5.11 8.75 5.36 4.93 5.41 6.37 5.81
ResNet-18 6.09 10.76 6.97 5.83 6.19 7.15 6.67
AVS(ResNet-18) 5.25 9.10 5.83 4.93 5.47 6.26 5.86
AVS(LAB) 4.76 8.21 5.14 4.51 5.00 5.76 5.43
AVS(SAN) 4.39 8.42 4.68 4.24 4.37 5.60 4.86

We provide a synthetic WFLW dataset generated by this method here Google Drive or Baidu Drive.

In the provided dataset, each image is augmented with eight different styles in the original WFLW dataset. You may download from this link and are able to produce similar to re-produce the results reported in our paper.

For example, you can train a SAN(CVPR 2018) model using our script.

Avaliable Implementation

Tensorflow

Pytorch(Minimal)

Facial Landmark Detection(SAN)


The instruction of tensorflow implementation is provided in the following:

Prerequisites and Installation

  • Python 3.6
  • Tensorflow 1.2.1
  • CUDA 8.0 and CuDNN 5.1

Getting Started

Clone this repository:

git clone [email protected]:TheSouthFrog/stylealign.git
cd stylealign

Install dependencies using Anaconda:

conda create -n stylealign python=3.6
source activate stylealign
pip install -r requirements.txt

Note this implementation, we use variational u-net as network structure as it produces sharper results.

As it uses a deprecated API of data dependent initialization which requires legacy version of CUDA 8.0 and CuDNN 5.1 without backward compatibility.

Prepare Dataset

  • You may the original cropped WFLW dataset here Google Drive or Baidu Drive.
  • Unzip downloaded files. Remember to change the data_dir and image_list to your image directory and annotation file, respectively.

Running the code:

Assume that you have installed multiple versions of CUDA and CuDNN. By switching the environment to run our code, you need to find out the directory where you have installed the right version and run(for example):

export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64

Then run:

CUDA_VISIBLE_DEVICES=gpu_id python main.py --config config/exp_0001.yaml

Generate style-augmented samples

CUDA_VISIBLE_DEVICES=gpu_id python main.py --checkpoint XXXXXX --config config/test_0001.yaml

For acceleration, we use the transfer pass to perform testing, where every image in a batch(batch size: n) outputs n samples under different styles in this batch(n2 in single pass).

gen_landmark.py is used to generate seperated images and corresponding labels of synthetic images according to transfer images and given order in original annotation files.

  • --label_file: The annotation file that used for testing.
  • --checkpoint_iter: Trained Iteration of the testing checkpoint.
  • --batch_size: Testing batch size.
  • --gen_dir and --out_dir: Testing directory and Output directory.

Contact

If you have any questions, please feel free to contact the authors. Shengju Qian [email protected]

Citation

If you use our code, please consider citing our paper:

@inproceedings{qian2019aggregation,
  title={Aggregation via Separation: Boosting Facial Landmark Detector with Semi-Supervised Style Translation},
  author={Qian, Shengju and Sun, Keqiang and Wu, Wayne and Qian, Chen and Jia, Jiaya},
  journal={ICCV},
  year={2019}
}

stylealign's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stylealign's Issues

The evaluation

Hello, about the evaluation in your paper, I wonder if you could give me the specific calculation process. I encountered some problems when calculating my result evaluation, thank you.

Perfomance on CPU and GPU

Hi! First of all, congratulations on your work!

Could you please provide the runtime of the algorithm for processing one frame (on CPU and GPU)?

《make a face》problems

Hi,recently,i have been reading the paper 《Make a Face: Towards Arbitrary High Fidelity Face Manipulation》.
i am still confused about the paper and have a lot of problems. i just wonder whether you have the thought of open source of this paper. i will appreciate it very much if you do.
thankyou very much.

Hi!some question about re-training your pytorch code.

Hi! Thanks for your wonderful code.
First, In your pytorch code, the size of input images is 1281283, have you tested for 2562563, can the network provide similar result on different input size?
Second, all face image should be aligned?
Third, I downloaded your wflw-full dataset, how to choose the K sample image for style transform?
Thank you!

Question about the performance

Hi, this is a great work. After study, I have several questions:

  1. If I wanna improve my model with your augmentation, can I just download your augmented dataset and do the training? Furthermore, is it ok to combine origin images with stylized ones?
  2. The images are heavily stylized, which has a gap between images in real life. Will this perform better than just train with origin images?
  3. The augmented images has unclear contour, will this cause inaccurate contour points prediction?

datasets

Hi!
Your project is great. I have some questions about the dataset section. In your paper, used the AFLW dataset. The original number of the dataset is 19, How to label it as 68 label points? and the WFLW is 98 points. Are 68 points used in actual training? How is it obtained? I am confused about the processing of the data set, I hope you can give me some help. Thank you very much!

Why the perfomance of AVS(SAN) model is not good?

Hi,

Thank you very much for sharing the face landmark model. When I run on my own image, the detection results are not very good. Below is the result of a test image. Did I do something wrong? Thank you very much!

1

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.