A face detection library based on libfacedetection
Project description
Slimeface
Introduction
A super fast face detector packaged by the libfacedetection repository using pybind11.
Change Log
[2023-5-8] Project init. [2024-9-27] Drop numpy dependency
Quick start
pip install slimeface
Usage
- Load image
# opencv
import cv2
img = cv2.imread('xxx.jpg')
# PIL
import PIL
import numpy as np
img = PIL.Image.open('xxx.jpg').convert('RGB')
img = np.array(img) # convert to numpy array
img = img[:, :, ::-1] # convert to BGR
# imageio
import imageio as io
img = io.imread('xxx.jpg')
img = img[:, :, ::-1] # convert to BGR
- Detect
# img: numpy.ndarray, shape=(H, W, 3), dtype=uint8, BGR
# conf_thresh: float, confidence threshold, default=0.5, range=[0.0, 0.1]
from slimeface import detect
confs, bboxes, landmarks = detect(img, conf_thresh=0.5)
- Deal result
# confs: numpy.ndarray, shape=(N,), dtype=uint16, confidence
# bboxes: numpy.ndarray, shape=(N, 4), dtype=uint16, bounding box (XYWH)
# landmarks: numpy.ndarray, shape=(N, 10), dtype=uint16, landmarks (XYXYXYXYXY)
import cv2
for conf, bbox, landmark in zip(confs, bboxes, landmarks):
cv2.rectangle(img, (bbox[0], bbox[1]), (bbox[0] + bbox[2], bbox[1] + bbox[3]), (0, 255, 0), 1)
cv2.putText(img, str(conf), (bbox[0], bbox[1]), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 0, 255), 1)
for i in range(5):
cv2.circle(img, (landmark[2*i], landmark[2*i+1]), 2, (0, 255, 0), 1)
cv2.imwrite('result.jpg', img)
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 Distributions
File details
Details for the file slimeface-2024.9.27.tar.gz
.
File metadata
- Download URL: slimeface-2024.9.27.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e237283e2059f0fbe5cbe5412d4bcb4e986237221758c3259daf097be04b9c70 |
|
MD5 | 6eb5178b3d4b7c606f79864af1369b9a |
|
BLAKE2b-256 | df64b9ba9d17f272eab6ff0a3e45d4168c42fd6a5b6933727f7029cbf6752252 |
File details
Details for the file slimeface-2024.9.27-cp313-cp313-win_amd64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 230.4 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b93c0c7c2a48abe777dcf4845130ff82e8730afea28b1d2942d2ef3bdc20e2b |
|
MD5 | 6bf794e11d6de168cb59e77b32c3a5c7 |
|
BLAKE2b-256 | ba90aa74244d14d68e804d8b4e9bb74e6b4fa2082bb5fe18a06696445fc7c52e |
File details
Details for the file slimeface-2024.9.27-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 475.0 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 631169294505b08a52406f3b266fe57d45074dbd8d1c5c3a24ebc7cb707c2f42 |
|
MD5 | b3163a41739d51089541d1bfa8390c2b |
|
BLAKE2b-256 | a025f8ad7bfece1722ee3e2f9b6781b68b4b01da6c0645d1f5ce530a8f971eb4 |
File details
Details for the file slimeface-2024.9.27-cp313-cp313-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 518.4 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0ab7f85c9b036e54a9fe1fe923e23d028a1d152a6f92fc16b7f6e0db58a14a3 |
|
MD5 | 5dc603009790190d9a848eeba63003b4 |
|
BLAKE2b-256 | f80cc3ec8404dbe23cf6c0c048ed4e5240b024d75a6a006efb54acc5e63595be |
File details
Details for the file slimeface-2024.9.27-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 230.4 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f1d09feaa2ac2e0613b5bd559603b61b5d3034c0ba372bd2085a069ee2d3c78 |
|
MD5 | b6c1495b25bc48cfd801ff5ea207a1be |
|
BLAKE2b-256 | d4f43885762a151c67ec9335ce0c7efc75c0dd3c95ea13e3b1ec5390507ac1b2 |
File details
Details for the file slimeface-2024.9.27-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 475.1 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed8855e14300a0893b14ac6efdc6663b27e4422fdf9a9e8b56725b9ca3a455ed |
|
MD5 | 780bd7b9fd24619b41b74a8dfa637027 |
|
BLAKE2b-256 | cfd9a21b665614c0742101f4681d0f17b96549443733c71922ec7249bc88f6e5 |
File details
Details for the file slimeface-2024.9.27-cp312-cp312-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 518.3 kB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ee38343b0ef95e2653e3fba6cf3137d60735566e6cd39cd5a6a8ffb87999323 |
|
MD5 | 56935d34148386e9b0801c3ebf449e57 |
|
BLAKE2b-256 | 6affc59eb41a6bd799df0667cbd7af6a0a9d7e421eb51468cc2ea4c5dbec1f0b |
File details
Details for the file slimeface-2024.9.27-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 230.1 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40b85c407966a5cff3d48ca62b6f0584d48ca1ff815b0a532f428d627b70dc2a |
|
MD5 | b0b8b060073965932308c9119b993d65 |
|
BLAKE2b-256 | 30915a45970b51059811842d31bb12be804941db47df76b0e4904ecd57d7bcf8 |
File details
Details for the file slimeface-2024.9.27-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 475.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | add4c258da8be39d9c9ec97b44c9cb487dca94c0876084cf81d8700641635929 |
|
MD5 | 130277e44bfa3860080372b3bc5bd541 |
|
BLAKE2b-256 | 68065922f918f51f5729eb556532852313222cc37be1ea8ac3230a7e6645e4d6 |
File details
Details for the file slimeface-2024.9.27-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 522.1 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a8c1157b44bcc7b6d13147560aed00c2046f0ba07de198e7882a816168e3f61 |
|
MD5 | ddbb7e24456ba27d28c4ac5983b8e627 |
|
BLAKE2b-256 | 1648a861b06f9a2ac0ea64e5427f625dd4b0253654d473e2eaef69535b5199f6 |
File details
Details for the file slimeface-2024.9.27-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 228.9 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8a7d75bfb308c15342e8471c26fa3bcb36b26670079590fd3c53c4386b1d052 |
|
MD5 | a26aef288da82e525f2e46760d22b7ac |
|
BLAKE2b-256 | f1beedef7fd2b17e17ad6317af5969eeeb26dc3ca1027b8b52f3f0ff71f9eafe |
File details
Details for the file slimeface-2024.9.27-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 473.6 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbd603962459d3d8bee82e6bbafc97c5a16bb6c85c7081c3c0272ff04775b8e2 |
|
MD5 | c7e4e44574d1d782b3725c313f7ef0d5 |
|
BLAKE2b-256 | fd9e54fe57d049545135e0bbc2f0f522c2769cddb80554d09f268a167f51e4a5 |
File details
Details for the file slimeface-2024.9.27-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 520.7 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65b94d86df4efe5b1b2340c460fa565e034ec206f7047b8a9638655994a046f6 |
|
MD5 | 8e274cee7d1ad839e4c2eb16e008e2ce |
|
BLAKE2b-256 | 7d7ef76e668dcda2922ab27b4f3e5c96a568f00289058c289479c3b9159ae7f1 |
File details
Details for the file slimeface-2024.9.27-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 228.9 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f8f38391bcaabd24336c1c13107ff078e1a1a1d3ea4421d9320eaaecad13bb9 |
|
MD5 | e0add55581b0ff9cb5513d0dc7033e9d |
|
BLAKE2b-256 | 38782b5ce07f92db425f4a9f806126ab3926a684d363d9c578176920efccedad |
File details
Details for the file slimeface-2024.9.27-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 473.7 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 681d603dfff1a58841194394059e299688202e582ca089599983d5be1703f286 |
|
MD5 | b0fe12068720e6017bfefd4894f5b1bf |
|
BLAKE2b-256 | 46046d006edc5fd1d96a4870a38c21956d8f01c32c4afb1c525eb9c7c48560d7 |
File details
Details for the file slimeface-2024.9.27-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 520.8 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d11d154aabefd1be63953e14152f3da7e4bc125e9ba3b65be0900a737a7df9b |
|
MD5 | 229a88a16ec4e644f9562786a1f90d13 |
|
BLAKE2b-256 | e0b7dfceb515819155d13fb47c0eac9289cc39bf2ffc1e1bcdf17d8594e89c85 |
File details
Details for the file slimeface-2024.9.27-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 228.8 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b693a1fe6cb11161ca61ddad585fd45f1b903f92e282807d16df87f98471dd9 |
|
MD5 | dd45dac255698d33b81b55cfdcc3068b |
|
BLAKE2b-256 | b44169bf57d18290e255fd4fb88f5ec30563fc3c864dbbd4f15763e10ec428df |
File details
Details for the file slimeface-2024.9.27-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 473.5 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f271b4b676120861ccf68e33423aaa45c02211f9b4921083dbc66003de832c89 |
|
MD5 | 316997419e3e9862dbfc400a1e2bd602 |
|
BLAKE2b-256 | fd179d144fb812eff7a5cc02a5f0d8d36393d96249d6570ebd3ecb626e5ffa10 |
File details
Details for the file slimeface-2024.9.27-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 520.5 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09610b653165b7252c81ab984fe2ad9e1fe61d0b1d58cea41c7c1cdf638e1769 |
|
MD5 | 19f7bfd4e12bbd02539c163618be6d8e |
|
BLAKE2b-256 | bd0ddf4244f07799ba8834a68bebeb368dd7639fb23d015dc8f615b6cd1993c9 |
File details
Details for the file slimeface-2024.9.27-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 229.2 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f6ed8194d954b576849c50bc67ad9bfcacc8dd85bee8aab907e8e33fe6d6a85 |
|
MD5 | 51df978b8d37d46e92afa7c24cea5fce |
|
BLAKE2b-256 | 9dfa6e819ae1a339e908ff35af1069bf7b1fa863a6a00ebfa38ebc214146d16d |
File details
Details for the file slimeface-2024.9.27-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 474.4 kB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 973126c054d2d3d56848375105c15571b5f15f7d87a391d9f7c0060b1c54941b |
|
MD5 | 1bc62018d118c87a964ca49a41132de6 |
|
BLAKE2b-256 | 2df0d4f649c982cea387e8adf7151bda755d99590335bad8235ba824d475a3cb |
File details
Details for the file slimeface-2024.9.27-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 520.6 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b27b9f0daf9bdddc249e87ef03296245c78f862565b5955ee898c5622b974df6 |
|
MD5 | 57dca25bcc15fbf72e09626b58a4ef32 |
|
BLAKE2b-256 | c63c2e0c5d589c492157313070e0274ff5785b45e9c896c64c72c77c7c463262 |
File details
Details for the file slimeface-2024.9.27-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 229.2 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54d0f910c67d8bf655fbc1d819ad05ff186a41f882bcc5aa35f4ccbe84add7cd |
|
MD5 | 681c5bc5e06fe5b76ae3923d911025dd |
|
BLAKE2b-256 | 53bf1c7f48f4d3cacd530485e0d2cd34be2ce657e7d0eb95ab697007d17701f8 |
File details
Details for the file slimeface-2024.9.27-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 474.2 kB
- Tags: CPython 3.6m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1f006d3eb536667aa9947bd6b95ddfc8fc6e11707106459275d10e3e3a57e41 |
|
MD5 | 9310b279f87b40b6b089054affcfbe5e |
|
BLAKE2b-256 | 8ba18c5119f6ee08b0b69ed8f9eff96607eb6a6067d95e98681b80c11b11528f |
File details
Details for the file slimeface-2024.9.27-cp36-cp36m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: slimeface-2024.9.27-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 520.0 kB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318d5ef4e44c30f04ceecf37d66d54f825dead035b92e5cb768c822a0843bd5e |
|
MD5 | b4c50e0426ac4cc99923a22b98b7d500 |
|
BLAKE2b-256 | 9369e9873de8187b0769746c994bd2abd3cb665ed2bd0e12aeeb29da78d12159 |