a simple implmentation for face align
Project description
simple-face-alignment
a simple face alignment, standard face size is 96x112
example example image is https://github.com/wrenchzc/simple-face-alignment/blob/main/tests/ty1.jpg
before align
use 5 point affine
use 3 point affine
INSTALLATION ############
Currently it is only supported Python3.4 onwards. It can be installed through pip:
.. code:: bash
$ pip install simple-face-alignment
This implementation requires OpenCV>=4.1
USAGE
The following example illustrates the ease of use of this package:
.. code:: python
>>> from simple_face_alignment import align_face, ALIGN_METHOD_3POINT
>>>
>>> img = cv2.imread("ty1.jpg")
>>> # detector result should include a bbox and a landmark
>>> # bbox is x, y, r, b, landmark is left eye, right eye, nose, mouse left, mouse right
>>> bbox = [409.89, 230.20, 725.06, 557.34]
>>> landmark = [(497.8352508544922, 394.51161527633667), (610.6470794677734, 335.02099990844727),
(588.0000686645508, 446.7395896911621), (567.606155872345, 543.8972625732422),
(643.1047439575195, 437.53148651123047)]
>>> face_aligned = align_face(img, landmark, bbox)
LICENSE #######
MIT License_.
REFERENCE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple face alignment-0.0.1.tar.gz.
File metadata
- Download URL: simple face alignment-0.0.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.6.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efc1b5e1e54ed134043e01f9b5ddc720621836262d552930f26b60d3cdcd89aa
|
|
| MD5 |
3d6d56d7bf3ac367a0f5c29cd075fe2f
|
|
| BLAKE2b-256 |
e34ef288e2fd3e082661b64010bbd6682377a3e6c67ab61406267f57c6451d53
|
File details
Details for the file simple_face_alignment-0.0.1-py3.6.egg.
File metadata
- Download URL: simple_face_alignment-0.0.1-py3.6.egg
- Upload date:
- Size: 6.7 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.6.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb087c496b5cefb79874000bbc80ac08cb4bffcab3f67e2e9903bf596c72c23d
|
|
| MD5 |
7861f4dd65a6e890b239e7ddee17256c
|
|
| BLAKE2b-256 |
781cec38c65971e38a9c4db534b743ec895e99a13e39874ebfddd93090b76bfd
|