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 3 years ago

face-landmark-detection

Mobilefacenet Face Landmark Detecter

authors: David Wang

Desription

A class of extremely efficient CNN models to extract 68 landmarks from a facial image[1].

from towhee import ops

model = ops.face_landmark_detection.mobilefacenet()
landmark = model(img)

Factory Constructor

Create the operator via the following factory method

ops.face_landmark_detection.mobilefacenet()

Interface

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

Args:

framework

​ the framework of the model

​ supported types: str, default is 'pytorch'

pretrained

​ whether load the pretrained weights..

​ supported types: bool, default is True, using pretrained weights

Parameters:

image: towhee._types.Image

​ The input image.

Returns:: numpy.ndarray

​ The extracted facial landmark.

Code Example

extracted facial landmark from './img1.jpg'.

Write the pipeline in simplified style:

import towhee.DataCollection as dc

dc.glob('./img1.jpg')
  .face_landmark_detection.mobilefacenet()
  .to_list()

Write a same pipeline with explicit inputs/outputs name specifications:

import towhee.DataCollection as dc

dc.glob['path']('./img1.jpg')
  .image_decode.cv2['path', 'img']()
  .face_landmark_detection.mobilefacenet()
  .to_list()

Reference

[1].https://arxiv.org/pdf/1804.07573.pdf

wxywb 6b5f897d7c update the operator. 2 Commits
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 3 years ago
file-icon README.md
1.4 KiB
download-icon
update the operator. 3 years ago
file-icon __init__.py
684 B
download-icon
update the operator. 3 years ago
file-icon mobilefacenet.py
2.5 KiB
download-icon
update the operator. 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