logo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions

Updated 7 months ago

face-landmark-detection

MobileFaceNet Face Landmark Detector

author: David Wang


Description

MobileFaceNets is a class of extremely efficient CNN models to extract 68 landmarks from a facial image. It use less than 1 million parameters and is specifically tailored for high-accuracy real-time face verification on mobile and embedded devices. This repository is an adaptation from cuijian/pytorch_face_landmark.


Code Example

Extract facial landmarks from './img1.jpg'.

Write a pipeline with explicit inputs/outputs name specifications:

from towhee import pipe, ops, DataCollection

p = (
    pipe.input('path')
        .map('path', 'img', ops.image_decode())
        .map('img', 'landmark', ops.face_landmark_detection.mobilefacenet())
        .output('img', 'landmark')
)

DataCollection(p('./img1.jpg')).show()
result1


Factory Constructor

Create the operator via the following factory method:

face_landmark_detection.mobilefacenet(pretrained = True)

Parameters:

pretrained

​ whether load the pre-trained weights.

​ supported types: bool, default is True, using pre-trained weights.


Interface

An image embedding operator takes an image as input. it extracts the embedding as ndarray.

Parameters:

img: towhee.types.Image (a sub-class of numpy.ndarray)

​ The input image.

Returns: numpy.ndarray

​ The extracted facial landmarks.

More Resources

Jael Gu 441e9d8b84 Add more resources 13 Commits
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 3 years ago
file-icon README.md
3.3 KiB
download-icon
Add more resources 7 months ago
file-icon __init__.py
711 B
download-icon
update the readme. 3 years ago
file-icon mobilefacenet.py
2.5 KiB
download-icon
add the requirement. 3 years ago
file-icon mobilefacenet_impl.py
5.9 KiB
download-icon
update the operator. 3 years ago
file-icon mobilefacenet_model_best.pth
12 MiB
download-icon
update the operator. 3 years ago
file-icon requirements.txt
47 B
download-icon
add requirement 3 years ago
file-icon result.png
137 KiB
download-icon
update the readme. 3 years ago