GithubHelp home page GithubHelp logo

sefaburakokcu / yolov3-facial-landmark-detection Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 17.21 MB

Yolov3-facial-landmark-detection

Python 11.70% Jupyter Notebook 88.10% Shell 0.07% Cython 0.13%
face-detection landmark-detection multi-task-learning pytorch yolov3

yolov3-facial-landmark-detection's Introduction

Yolov3-facial-landmark-detection

This repository contains files for training and testing Yolov3 for multi-task face detection and facial landmarks extraction.

Example Output

P.S. A jupyter-notebook for all parts can be found here.

Installation

  • First, clone the repository.
git clone https://github.com/sefaburakokcu/yolov3-facial-landmark-detection.git
  • Then, install prerequisites.
pip install -r requirements.txt

Training

  1. For training the models with Widerface dataset, first download dataset from Widerface website. Then, under data/datasets/ run,
python widerface_yolo_format.py

Or downlaod Widerface training dataset in YOLO format directly from Google Drive and put images folder under data/datasets/widerface/.

  1. Under src folder, run
python train.py

Inference

For inference, pretrained weights can be used. Pretrained weights can be download from Google Drive. After downloading weigts, put all weights in weights folder under project main folder.

Under src folder, run

python inference.py

Tests

  1. In order to evaluate the models, first download Widerface Validation dataset from Widerface Website and WFLW dataset from WFLW Website or Google Drive and put it under data/datasets/wflw/.

  2. Then, under src run,

python test.py

in order to save face detection and facial landmarks predictions.

  1. Finally, under src/evaluations/widerface/, run
python evaluate_widerface.py

for face detection performance and under src/evaluations/wiflw/, run

python evaluate_wflw.py

for facial landmarks extraction performance.

Face Detection

Evaluation of models on Widerface Validation dataset for face detection is indicated below. Average Precision is used as a performance metric.

Models Easy Medium Hard
Mobilenetv2(0.75) 0.85 0.83 0.63
Mobilenetv2(1.0) 0.87 0.86 0.69
Retinaface(Mobilenetv2(0.25)) 0.90 0.87 0.67
Retinaface(Resnet50) 0.93 0.91 0.69
MTCNN 0.79 0.76 0.50

Facial Landmarks Extraction

Evaluation of models on WFLW dataset for facial landmarks extraction is shown below. Average Root Mean Square Error(RMSE) is chosen as a performance metric.

Models RMSE
Mobilenetv2(0.75) 6.53
Mobilenetv2(1.0) 4.36
Retinaface(Mobilenetv2(0.25)) 4.03
Retinaface(Resnet50) 0.93
MTCNN 4.5

References

yolov3-facial-landmark-detection's People

Contributors

dependabot[bot] avatar sefaburakokcu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

yolov3-facial-landmark-detection's Issues

How to train my own dataset?

Hi! It is my honor to see your achivement! I want to ask you a question about how to train my own fish dataset instead of people face dataset? What should I change in your codes? I would appreciate it if you could tell me ! Thanks!

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.