Code Monkey home page Code Monkey logo

pytorch_face_landmark's Introduction

Pytorch Face Landmark Detection

Implementation of face landmark detection with PyTorch. The model was trained using coordinate-based regression methods. A video demo was displayed here.

  • Support 68-point and 39-point landmark inference.
  • Support different backbone networks.
  • Support ONNX inference.

Inference

Test on a sample folder and save the landmark detection results.

python3 -W ignore test_batch_mtcnn.py

Optimize with ONNX and test on a camera. The pytorch model has been converted to ONNX for fast inference.

python3 -W ignore test_camera_mtcnn_onnx.py

Benchmark Results on 300W

  • Inter-ocular Normalization (ION)
Algorithms Common Challenge Full Set CPU Inference (s)
ResNet18 (224×224) 3.73 7.14 4.39 /
Res2Net50 (224×224) 3.43 6.77 4.07 /
Res2Net50_SE (224×224) 3.37 6.67 4.01 /
Res2Net50_ExternalData (224×224) 3.30 5.92 3.81 /
HRNet_Small (224×224) 3.57 6.85 4.20 /
MobileNetV2 (224×224) 3.70 7.27 4.39 1.2
MobileNetV2_SE (224×224) 3.63 7.01 4.28 /
MobileNetV2 (56×56) 4.50 8.50 5.27 0.01 (onnx)
MobileNetV2_ExternalData (224×224) 3.48 6.0 3.96 1.2

Visualization Results

  • Face alignment on 300W dataset img1

  • Semi-frontal face alignment on Menpo dataset img1

  • Profile face alignment on Menpo dataset img1

TODO

The following features will be added soon.

  • Still to come:
    • Support for the 39-point detection
    • Support for the 106 point detection
    • Support for heatmap-based inferences

Datasets:

References:

pytorch_face_landmark's People

Contributors

cunjian 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.