copied
Readme
Files and versions
Updated 2 years 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.dc2 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()

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.
| 10 Commits | ||
---|---|---|---|
|
1.1 KiB
|
3 years ago | |
|
1.6 KiB
|
2 years ago | |
|
711 B
|
3 years ago | |
|
2.5 KiB
|
3 years ago | |
|
5.9 KiB
|
3 years ago | |
|
12 MiB
|
3 years ago | |
|
47 B
|
3 years ago | |
|
137 KiB
|
3 years ago |