Code Monkey home page Code Monkey logo

mtcnn-tflite's Introduction

MTCNN face recognition

Implementation of the MTCNN face detection algorithm. This project converted the code from ipazc/mtcnn to TF Lite.

Installation

You can install the package through pip:

pip install mtcnn-tflite

Quick start

Similar to the original implementation, the following example illustrates the ease of use of this package:

>>> from mtcnn_tflite.MTCNN import MTCNN
>>> import cv2
>>>
>>> img = cv2.cvtColor(cv2.imread("ivan.jpg"), cv2.COLOR_BGR2RGB)
>>> detector = MTCNN()
>>> detector.detect_faces(img)
[
    {
        'box': [276, 88, 51, 68],
        'confidence': 0.9989245533943176,
        'keypoints': {
            'left_eye': (291, 117),
            'right_eye': (314, 114),
            'nose': (303, 130),
            'mouth_left': (296, 143),
            'mouth_right': (314, 141)
        }
    }
]

Benchmark

Image size TF version Process time *
561x561 TF2 698ms
561x561 This repository (TF Lite) 445ms

* executed on a CPU: Intel i7-10510U

License

MIT License

mtcnn-tflite's People

Watchers

James Cloos 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.