Skip to content

This repository provides the face analysis by getting 68 Keypoints from the synthetic dataset published by Microsoft

License

Notifications You must be signed in to change notification settings

iamgmujtaba/FaceSynthetics

Repository files navigation

Introduction

This repository provides the 3D 68 Keypoints from the synthetic dataset published by Microsoft Fake It Till You Make It: Face analysis in the wild using synthetic data alone.

Note: This code is tested on Windows machine.

Installation

conda create -n synthetic python=3.6 -y
conda activate synthetic 

To install PyTorch along with CUDA run the following script

pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

To install packages remaining packages, run the following script.

pip install -r .\requirements.txt

If you are getting the following error

app = FaceAnalysis()
TypeError: __init__() missing 1 required positional argument: 'name'

run the following script

pip install -U insightface

Dataset

Download Face Synthetics dataset from https://github.com/microsoft/FaceSynthetics and put it somewhere.


Then use prepare_dataset.py for training data preparation.

Train and Test

Training

python train.py which uses resnet50d as backbone by default, please check the code for detail.

Pretrained Model

I have trained the network for 1000 epochs. The pre-trained model can be obtained from google drive ResNet50d. Place the pretrained model on [models][models] directory. Run test.py for the restuls.

Testing

Please check test.py for detail.

Result Visualization(3D 68 Keypoints)

Acknowledgment

The base code is borrowed from insightface.

About

This repository provides the face analysis by getting 68 Keypoints from the synthetic dataset published by Microsoft

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages