Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 2.44 KB

README.md

File metadata and controls

68 lines (51 loc) · 2.44 KB

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.