Giter Club home page Giter Club logo

ar-lipstick's Introduction

AR Lipstick

ARKit/MLKit Face Detection based virtual lipstick.

ARKit

Requires iPhone X/XR/XS/XS Max, iPad Pro (11-inch), iPad Pro (12.9-inch, 3rd generation), or other iOS devices with front-facing TrueDepth camera running iOS 11.0 or later.

Mainly based on Apple’s sample code Tracking and Visualizing Faces. Support for multiple faces is not yet verified, but it should work (I hope).

I modified the original wireframe to only mask where the lips are, but it’s not very precise. Here’s the preview of the full size wireframe texture for you to make your own, probably more precise mask:

Face Wireframe

MLKit Face Detection

For other devices not having ARKit face detector, we'll use MLKit to trace facial contours, like this:

FirebaseMLVision Face Contours

I highly recommend checking out the official documentation for more instructions.

Vision

I tried the Apple provided Vision.framekwork, but it can only generate a LOW QUALITY outline for lips. It's not suitable for the purpose of this app, but if you are interested in using it for some other features, see VNFaceLandmarks2D for details.

Acknowledgements

List of lipstick colors (and their names/brands in Chinese) are from Ovilia/lipstick.

I never figured out how and if grizzly3ear/lipster-mobile works, but it does point me to Vision.framework and FirebaseMLVision (predecessor of MLKit Face Detection).

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.