Code Monkey home page Code Monkey logo

facial_depth_estimation's Introduction

Facial Depth Estimation: 3D and 2D-Synthetic-Data---Group_C3I-Team---

Single Frame Image Facial Depth Estimation

This is the project page for our research:

An Efficient Encoder-Decoder Model for Portrait Depth Estimation from Single Images trained on Pixel-Accurate Synthetic Data

High-Accuracy Facial Depth Models derived from 3D Synthetic Data
https://ieeexplore.ieee.org/document/9180166

Methodology for Building Synthetic Datasets with Virtual Humans
https://ieeexplore.ieee.org/abstract/document/9180188

Learning 3D Head Pose From Synthetic Data: A Semi-Supervised Approach
https://ieeexplore.ieee.org/abstract/document/9369299

Accurate 2D Facial Depth Models Derived from a 3D Synthetic Dataset https://ieeexplore.ieee.org/abstract/document/9427595

We will also update latest progress and available sources to this repository~

Note

This repository contains PyTorch implementations of FaceDepth, UNet-Simple, BTS, DenseDepth.

Dataset Generation Process

data_method

Setup & Requirements

To run this project, install it locally using pip install...:

$ pip install keras, Pillow, matplotlib, opencv-python, scikit-image, sklearn, pathlib, pandas, -U efficientnet,
$ pip install https://www.github.com/keras-team/keras-contrib.git, torch, torchvision
$ Python >= 3.6
Pytorch >= 1.6.0
Ubuntu 16.04
CUDA 9.2
cuDNN (if CUDA available)

Pretrained model

download the pre-trained model and keep in the FaceDepth directory:

https://nuigalwayie-my.sharepoint.com/:u:/g/personal/f_khan4_nuigalway_ie/EepkuVajAhdIjZoQm5Weyx4BjXcEZy-uw5OWxxMXq1WJPA?e=rv3aSY

Prepare Dataset for training & Testing

We prepared the dataset for training and testing
contact me on the following email: [email protected] for the complete dataset, I will provide the download link

Random sample frames with high-resolutions RGB images and their corresponding ground truth depth with differentvariations

image

Samples from the generated synthetic data with different variation of head pose

image

Live Demo

We attach live demo implementation for Pytorch.
Note change the model check point name if different

$ cd FaceDepth
$ python live_demo.py

Testing

First make sure that you have some images (RGB and depth) or you can use our test images: (rgb_syn_test) and (gt_syn_test).

$ cd FaceDepth
$ make a folder and keep your RGB images in that  
$ make a folder and keep your gt depth images in that
$ Change the path in the Facedepth_test.py
$ Name a folder that you want to save the predicted results (images)  

Once the preparation steps completed, you can test using following commands.

$ cd FaceDepth
$ python Facedepth_test.py

image

Training

Once the dataset download process completed, please make sure unzip all the data into a new folder and follow the following steps:

$ cd FaceDepth
$ Download the .csv or .txt files
$ Change the paths in the train.py  

Once the preparation steps completed, you can train using following commands.

$ cd FaceDepth
$ python train.py --batch_size 4 --epochs 25 

Training BTS and DenseDepth methods for our synthetic facial depth dataset.

We referred to BTS and DenseDepth:

$ https://github.com/cogaplex-bts/bts

$ https://github.com/ialhashim/DenseDepth

Training UNet_sample on synthetic facial depth dataset.

We referred to Facial_depth_estimation:

$ python train.py --batch_size 6 --epochs 25 

Results

image

Properties of the studied methods image

Qualitative results of a facial monocular depth estimation methods image

rrrr

Citation

If you find this work useful for your research, please consider citing our paper:

@INPROCEEDINGS{9427595,
  author={Khan, Faisal and Basak, Shubhajit and Corcoran, Peter},
  booktitle={2021 IEEE International Conference on Consumer Electronics (ICCE)}, 
  title={Accurate 2D Facial Depth Models Derived from a 3D Synthetic Dataset}, 
  year={2021},
  volume={},
  number={},
  pages={1-6},
  doi={10.1109/ICCE50685.2021.9427595}}
  
  @INPROCEEDINGS{9180166,
  author={Khan, Faisal and Basak, Shubhajit and Javidnia, Hossein and Schukat, Michael and Corcoran, Peter},
  booktitle={2020 31st Irish Signals and Systems Conference (ISSC)}, 
  title={High-Accuracy Facial Depth Models derived from 3D Synthetic Data}, 
  year={2020},
  volume={},
  number={},
  pages={1-5},
  doi={10.1109/ISSC49989.2020.9180166}}
  
  @ARTICLE{9369299,
  author={Basak, Shubhajit and Corcoran, Peter and Khan, Faisal and Mcdonnell, Rachel and Schukat, Michael},
  journal={IEEE Access}, 
  title={Learning 3D Head Pose From Synthetic Data: A Semi-Supervised Approach}, 
  year={2021},
  volume={9},
  number={},
  pages={37557-37573},
  doi={10.1109/ACCESS.2021.3063884}}
  
  @INPROCEEDINGS{9180188,
  author={Basak, Shubhajit and Javidnia, Hossein and Khan, Faisal and McDonnell, Rachel and Schukat, Michael},
  booktitle={2020 31st Irish Signals and Systems Conference (ISSC)}, 
  title={Methodology for Building Synthetic Datasets with Virtual Humans}, 
  year={2020},
  volume={},
  number={},
  pages={1-6},
  doi={10.1109/ISSC49989.2020.9180188}}

facial_depth_estimation's People

Contributors

khan9048 avatar

Watchers

James Cloos avatar  avatar

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.